Taiko

Taiko

eth_sendRawTransaction

eth_sendRawTransaction submits a fully-signed transaction to the network. It's the only way to produce a state change through a stateless RPC endpoint — every wallet, every contract deployment, every token transfer goes through this method.

The one-line summary

You sign the transaction off-the-wire with the sender's private key, RLP-encode it, prefix with 0x, and hand it to eth_sendRawTransaction. The provider doesn't see the key — only the signed payload.

Parameter

NameTypeDescription
signedTxstringHex-encoded, RLP-encoded signed transaction with a 0x prefix. Always a single string.

Building a signed transaction

You don't sign by hand. Use a library:

import { Wallet, JsonRpcProvider } from 'ethers';
const provider = new JsonRpcProvider('https://ethereum.therpc.io/<YOUR_KEY>');
const wallet = new Wallet(process.env.PRIVATE_KEY!, provider);
const tx = await wallet.populateTransaction({
to: '0x...',
value: 1n * 10n ** 18n,
});
const signed = await wallet.signTransaction(tx);
const hash = await provider.send('eth_sendRawTransaction', [signed]);

For EIP-1559 transactions, set maxFeePerGas and maxPriorityFeePerGas instead of legacy gasPrice. Most modern wallets do this by default.

Response shape

The result is the transaction hash:

{
"jsonrpc": "2.0",
"id": 1,
"result": "0x9b07f3e8...c4e1"
}

The hash is final the instant the call returns — but the transaction is not yet on-chain. It's in the mempool. To wait for inclusion, poll eth_getTransactionReceipt with the returned hash, or subscribe via eth_subscribe.

Common failure modes

  1. nonce too low / nonce too high — the nonce in the signed payload doesn't match the sender's current nonce. Fetch it fresh via eth_getTransactionCount and rebuild.
  2. insufficient funds for gas * price + value — the sender doesn't have enough native-token balance for gas × maxFeePerGas + value.
  3. replacement transaction underpriced — you tried to replace a pending tx (same nonce) but with a fee that's not high enough above the original. Most providers require ≥10% bump on both maxFeePerGas and maxPriorityFeePerGas.
  4. execution reverted — the EVM rejected the call. The revert reason is decoded by your library; if you got it from a raw RPC response, parse error.data with the contract ABI.

After submission

The tx hash lets you track the lifecycle:

  1. Pending — visible via eth_getTransactionByHash, no receipt yet.
  2. Minedeth_getTransactionReceipt returns a receipt with status: "0x1" (success) or "0x0" (revert with gas consumed).
  3. Finalised — receipt's blockNumber is now ≤ the chain's finalized tag. Reorg-safe from this point.

See also

Parameters

Hex-encoded signed transaction (0x-prefixed)

curl https://taiko.therpc.io \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_sendRawTransaction","params":[""]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.