eth_sendRawTransaction - Monad
Example code for the eth_sendRawTransaction JSON-RPC method. Complete guide on how to use eth_sendRawTransaction JSON-RPC in GetBlock Web3 documentation.
This method submits a pre-signed transaction for broadcast to the Monad network.
Parameters
data
string
Yes
The signed transaction data as a hex string.
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": ["0xf86c0a8502540be400825208944bbeeb066ed09b7aed07bf39eee0460dfa26152088016345785d8a0000801ba0e2c.."],
"id": "getblock.io"
}'import axios from 'axios';
const signedTx = "0xf86c0a8502540be400825208944bbeeb066ed09b7aed07bf39eee0460dfa26152088016345785d8a0000801ba0e2c..";
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [signedTx],
"id": "getblock.io"
});
const config = {
method: 'post',
url: 'https://go.getblock.io/<ACCESS-TOKEN>/',
headers: {
'Content-Type': 'application/json'
},
data: data
};
axios(config)
.then(response => console.log(JSON.stringify(response.data)))
.catch(error => console.log(error));Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}Response Parameters
result
string
The 32-byte transaction hash, or zero hash if transaction is not yet available.
Use Case
The eth_sendRawTransaction method is essential for:
Submitting signed transactions to the network
Wallet transaction broadcasting
DeFi protocol interactions
Token transfers
Smart contract deployments
High-frequency trading on Monad
Error Handling
403
Forbidden
Missing or invalid ACCESS-TOKEN.
-32602
Invalid params
Invalid transaction data format.
-32000
Nonce too low
Transaction nonce already used.
-32000
Insufficient funds
Not enough MON for gas.
-32000
Gas limit exceeded
Transaction exceeds block gas limit.
-32003
Transaction rejected
Transaction validation failed.
Web3 Integration
Last updated
Was this helpful?