Skip to content

Send a raw transaction

Broadcast a locally signed transaction with eth_sendRawTransaction.

Submit a payment, swap, or contract call that you signed in your wallet, signer service, or application. GraphOps RPC broadcasts the signed payload with eth_sendRawTransaction and does not custody private keys. You store the returned hash, poll for the receipt, and decide when the transaction is final enough to report success.

Prerequisites

  • A GraphOps RPC API key.
  • Ethereum mainnet endpoint access.
  • A locally signed transaction for the same chain ID as the endpoint.
  • Application-side nonce, gas, and fee handling.

Prepare the transaction

Before signing, check the chain and plan fees against the same endpoint you will submit to:

  1. Call eth_chainId and confirm it matches the chain ID in the transaction. This prevents a wrong-chain submission.
  2. Estimate gas with eth_estimateGas, and set fees from eth_feeHistory and eth_maxPriorityFeePerGas.
  3. Sign the transaction locally and keep the signed bytes until the receipt confirms it.

Request

curl "https://rpc.graphops.xyz/v1/evm/1" \
  -H "Authorization: Bearer <GRAPHOPS_API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_sendRawTransaction",
    "params": ["0x<SIGNED_TRANSACTION>"]
  }'

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x<TRANSACTION_HASH>"
}

The hash identifies the transaction before it is included in a block. Store it before you report progress to your application, so a crash or timeout can resume from the hash instead of signing again.

Wait for the receipt

The hash comes back at submission, before the transaction is in a block. The receipt is null until inclusion, then shows the result in block N. Your confirmation policy decides when block N is final enough to report success.

Poll eth_getTransactionReceipt with the stored hash. It returns null until the transaction is included in a block:

curl "https://rpc.graphops.xyz/v1/evm/1" \
  -H "Authorization: Bearer <GRAPHOPS_API_KEY>" \
  -H "Content-Type: application/json" \
  --data '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getTransactionReceipt",
    "params": ["0x<TRANSACTION_HASH>"]
  }'
{  "transactionHash": "0x<TRANSACTION_HASH>",The hash you stored  "blockNumber": "0x112a880",The block that included it  "blockHash": "0x<BLOCK_HASH>",Recheck this if the block reorganizes  "status": "0x1",0x1 succeeded; 0x0 reverted but still paid gas  "gasUsed": "0x5208",  "effectiveGasPrice": "0x<WEI_PER_GAS>"Gas cost is gasUsed times this}
Illustrative receipt, trimmed to the fields that decide what to do next. A null result means the transaction is not in a block yet.

A receipt shows inclusion, not finality. For payments, settlement, or other irreversible steps, wait until the receipt's block is at or behind the safe or finalized block your workflow requires. If the block is reorganized, the transaction can return to the pending pool or be included in a different block, so check the receipt again before acting on it.

Retry guidance

Retrying the exact same signed transaction is usually safe because the transaction hash is deterministic. Do not mutate gas, nonce, or value and retry blindly.

MessageMeaningAction
already knownA node already has the transaction.Track the transaction hash and poll for a receipt.
nonce too lowThe nonce has already been used.Check whether the transaction was mined or replaced.
replacement transaction underpricedA replacement transaction did not pay enough.Reprice according to wallet policy.
insufficient fundsSender cannot cover value plus gas.Surface the error to the funding workflow.

Next steps