eth_sendRawTransactionSync - Monad
Example code for the eth_sendRawTransactionSync JSON-RPC method. Complete guide on how to use eth_sendRawTransactionSync JSON-RPC in GetBlock Web3 documentation.
Parameters
Parameter
Type
Required
Description
Request
curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
"jsonrpc": "2.0",
"method": "eth_sendRawTransactionSync",
"params": ["0xf86c0a8502540be400825208944bbeeb066ed09b7aed07bf39eee0460dfa26152088016345785d8a0000801ba0e2c.."],
"id": "getblock.io"
}'import axios from 'axios';
const signedTx = "0xf86c0a8502540be400825208944bbeeb066ed09b7aed07bf39eee0460dfa26152088016345785d8a0000801ba0e2c..";
const data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_sendRawTransactionSync",
"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": {
"transactionHash": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331",
"blockHash": "0xdc0818cf78f21a8e70579cb46a43643f78291264dda342ae31049421c82d21ae",
"blockNumber": "0x1b4"
}
}Response Parameters
Field
Type
Description
Use Case
Error Handling
Status Code
Error Message
Cause
Comparison with eth_sendRawTransaction
Feature
eth_sendRawTransaction
eth_sendRawTransactionSync
Web3 Integration
Last updated
Was this helpful?