RPC method

eth_getTransactionReceipt on Sonic

Supported on SwiftNodes

Everything below was measured on 2026-11-15 by calling eth_getTransactionReceipt on Sonic through the same endpoint customers use, and is re-measured weekly.

What eth_getTransactionReceipt does

Returns the outcome of a mined transaction: status (1 success, 0 reverted), gas used, the effective gas price, the logs it emitted and any contract it created. It returns null until the transaction is in a block.

eth_getTransactionReceipt on Sonic: what we measured

Fields14
Receipt for an unknown hashnull
Size of the sample receipt1.6 KB

Reading the fee and fields

The fee is gasUsed × effectiveGasPrice, the same as on Ethereum: Sonic receipts carry no separate L1 or data fee field.

A hash the node has not seen returns null, not an error, so poll until it is non-null (viem's waitForTransactionReceipt does this) and give up after a timeout.

A real Sonic receipt

As our endpoint returned it; logs collapsed to a count and long hex values shortened.

{
  "blockHash": "0x269aa4d1e7693d1067dba84c686af7e944e1a966325e32543ed8f233b8510c1b",
  "blockNumber": "0x4ec5585",
  "contractAddress": null,
  "cumulativeGasUsed": "0xbdc2",
  "effectiveGasPrice": "0xba43b7401",
  "from": "0x0c4a2e6c374cc4abd9e2265de93179f9d2b46dd9",
  "gasUsed": "0xbdc2",
  "logs": "1 logs",
  "logsBloom": "0x0000000000000000…(256 bytes)",
  "status": "0x1",
  "to": "0x02f92800f57bcd74066f5709f1daa1a4302df875",
  "transactionHash": "0xcf83914b3f54f55ff39b9fa05b27b9350c0f049843fa15b7ec4542ed2b84542a",
  "transactionIndex": "0x0",
  "type": "0x2"
}

Example request

curl -s https://rpc.swiftnodes.io/rpc/sonic?key=YOUR_API_KEY \
  -X POST -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionReceipt","params":["0xcf83914b3f54f55ff39b9fa05b27b9350c0f049843fa15b7ec4542ed2b84542a"]}'
import { createPublicClient, http } from "viem";

const client = createPublicClient({
  transport: http("https://rpc.swiftnodes.io/rpc/sonic?key=YOUR_API_KEY"),
});

const receipt = await client.waitForTransactionReceipt({ hash, timeout: 60_000 });
if (receipt.status !== "success") throw new Error("reverted");

const total = receipt.gasUsed * receipt.effectiveGasPrice;

Other methods on Sonic

eth_getTransactionReceipt on other chains

Frequently asked questions

Does Sonic support eth_getTransactionReceipt?

Yes. eth_getTransactionReceipt answered on the SwiftNodes Sonic endpoint when our weekly probe called it through the customer path (2026-11-15).

How do I get the total fee of a transaction on Sonic?

gasUsed × effectiveGasPrice from the receipt.

Why is the Sonic receipt null?

The transaction is not in a block yet, or the hash is unknown to the node. Keep polling with a timeout.

Sonic endpoints, live block height and WebSocket status are on the Sonic RPC page.

One key covers every chain we serve, and SwiftNodes has a free tier.