eth_sendRawTransaction - Arbitrum
Example code for the eth_sendRawTransaction JSON RPC method. Сomplete guide on how to use eth_sendRawTransaction JSON RPC in GetBlock Web3 documentation.
This method broadcasts a signed raw transaction to the network for execution. The transaction must already be signed offline or by a wallet. Returns the transaction hash upon successful acceptance by the node.
Parameters
signedTransactionData
string
Hex encoded raw signed transaction. Must include nonce, gas, gasPrice or maxFee fields, to, value, data, and signature fields.
Request
curl --location 'https://go.getblock.us/<ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "2.0",
method": "eth_sendRawTransaction",
"params": [
"0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
],
"id": "getblock.io"
}'import axios from 'axios'
let data = JSON.stringify({
"jsonrpc": "2.0",
"method": "eth_sendRawTransaction",
"params": [
"0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"
],
"id": "getblock.io"
};
let config = {
method: "post",
maxBodyLength: Infinity,
url: "https://go.getblock.us/<ACCESS_TOKEN>",
headers: {
"Content-Type": "application/json",
},
data: data,
};
axios
.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Response
{
"jsonrpc": "2.0",
"id": "getblock.io",
"result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"
}Reponse Parameter Definition
result
The hash of the submitted transaction, as a hexadecimal string.
String
Use case
The eth_sendRawTransaction method helps developers to:
Submit fully signed transactions generated offline or by hardware wallets
Broadcast transactions without exposing private keys
Support automated transaction pipelines such as claim bots and arbitrage bots
Enable backend servers to send prebuilt transactions securely
Integrate custom signing flows for multi-chain smart contracts
Allow transaction submission even in environments without built in wallets
Error handling
403
Forbidden
Missing or invalid ACCESS_TOKEN.
-3200
max fee per gas less than block base fee
Invalid transaction
Insufficient funds
Integration with Web3
Using eth_sendRawTransaction with web3.js enables developers to:
Build backend services that prepare and sign transactions in a secure environment
Trigger automated onchain actions from server scripts
Support multisig configurations where the final signed output is broadcast via RPC
Allow dapps to submit transactions after signing via external wallets
Integrate custom key management systems or HSM based signing
Last updated
Was this helpful?