RPC method

eth_getTransactionByHash on Sonic

Supported on SwiftNodes

Everything below was measured on 2026-10-13 by calling eth_getTransactionByHash on Sonic through the same endpoint customers use, and is re-measured weekly.

What eth_getTransactionByHash does

Returns a transaction by its hash: sender, recipient, value, input data, gas fields and signature, plus the block it was included in. It returns null for a hash the node does not know, and a transaction still in the mempool has a null blockNumber.

Transaction types on Sonic

Types of the 30 transactions in five consecutive blocks when we measured. Decoders that reject unknown types will fail on Sonic if any of these is missing from their list.

0x2 EIP-155930 (100%)

A real Sonic transaction

A type 0x2 transaction from one of the latest blocks, as our endpoint returned it (long hex values shortened).

{
  "blockHash": "0x9536929302d47e9d0950d99e3f2816000a154459d9507fe612ee260737fc6937",
  "blockNumber": "0x4d2bd38",
  "from": "0xe46c82f4d95ed83ae914df238ce8db37613caebd",
  "gas": "0x7a1200",
  "gasPrice": "0xbe2d12e80",
  "maxFeePerGas": "0x122c247c80",
  "maxPriorityFeePerGas": "0x3e95ba80",
  "hash": "0xd72d1cc51d1c5d4341196d720232d631bec362803eed168719fcf5cb7f28b72e",
  "input": "0x6fadcf7200000000…(1188 bytes)",
  "nonce": "0x170be",
  "to": "0x238c875b655ddf40b7017956fb2d2e35d1fa6266",
  "transactionIndex": "0x0",
  "value": "0x0",
  "type": "0x2",
  "accessList": [],
  "chainId": "0x92",
  "v": "0x0",
  "r": "0xec72bb30058a90eb6576af8946b11e653292ba5449dd90a6f76a17eb45fff9ab",
  "s": "0x1cb699cdd474d4693cc640748dd99568b5ae2212a19bfdcb89df22090e2fe19d",
  "maxFeePerBlobGas": null,
  "blobVersionedHashes": null
}

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_getTransactionByHash","params":["0xd72d1cc51d1c5d4341196d720232d631bec362803eed168719fcf5cb7f28b72e"]}'
import { createPublicClient, http } from "viem";

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

const tx = await client.getTransaction({ hash: "0xd72d1cc51d1c5d4341196d720232d631bec362803eed168719fcf5cb7f28b72e" });
if (tx.blockNumber === null) console.log("still pending");
console.log(tx.type, tx.from, tx.to, tx.value);

Other methods on Sonic

eth_getTransactionByHash on other chains

Frequently asked questions

Does Sonic support eth_getTransactionByHash?

Yes. eth_getTransactionByHash answered on the SwiftNodes Sonic endpoint when our weekly probe called it through the customer path (2026-10-13).

Which transaction types does Sonic use?

In five recent blocks: 30 × 0x2 (EIP-1559).

Why does eth_getTransactionByHash return null on Sonic?

The node does not know the hash: it was never broadcast, it was dropped from the mempool, or it was sent to another chain. Check the hash and the chain ID before retrying.

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.