eth_sendRawTransaction
Send signed transaction on the IoTeX network.
Parameters
- Signed Transaction Data -
DATA
- The signed transaction data in RLP-encoded format
- Must be prefixed with
0x
{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0xf86c0185046110...signed_transaction_data...90a0cf5e"
],
"id": 1
}
Returns
DATA
, 32 Bytes - the transaction hash, or the zero hash if the transaction is not yet available.
Use eth_getTransactionReceipt to get the contract address after the transaction is included in a block.
Implementation Example
- cURL
- JavaScript
curl -X POST https://api-iotex-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0xf86c0185046110...signed_transaction_data...90a0cf5e"
],
"id": 1
}'
const response = await fetch('https://api-iotex-mainnet.n.dwellir.com/YOUR_API_KEY', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'eth_sendRawTransaction',
params: [
"0xf86c0185046110...signed_transaction_data...90a0cf5e"
],
id: 1
})
});
const data = await response.json();
console.log(data.result);
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x..."
}
Need help? Contact our support team or check the IoTeX documentation.