RPC method

eth_getTransactionByHash on BNB Smart Chain

Supported on SwiftNodes

Everything below was measured on 2026-10-13 by calling eth_getTransactionByHash on BNB Smart Chain 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 BNB Smart Chain

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

0x0 legacy238 (61%)
0x2 EIP-1559140 (36%)
0x1 EIP-2930 access list8 (2%)
0x4 EIP-7702 set-code1 (0%)
0x3 EIP-4844 blob1 (0%)

A real BNB Smart Chain transaction

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

{
  "blockHash": "0x2861492aecb5f68fd8e5791a70fcc23494fd41d4517ad6b140c69667c049e7b5",
  "blockNumber": "0x797ffc6",
  "from": "0x4848489f0b2bedd788c696e2d79b6b69d7484848",
  "gas": "0xbbb0",
  "gasPrice": "0x0",
  "hash": "0x4ae307c39d198822862ba3ebaee820e101b24b126a50d004da748ff580af3676",
  "input": "0x426c6f636b206275…(352 bytes)",
  "nonce": "0x45fee46",
  "to": "0x4848489f0b2bedd788c696e2d79b6b69d7484848",
  "transactionIndex": "0x0",
  "value": "0x0",
  "type": "0x0",
  "chainId": "0x38",
  "v": "0x94",
  "r": "0xf57dc2b21701a747a6d8e94b4c041912500e0aa6f5f0e7ec093ed2900c06a114",
  "s": "0x4784d58f3f8c262d51609280fbd372d423d21ce7a497862517fe6d42c870c00"
}

Example request

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

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

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

Other methods on BNB Smart Chain

eth_getTransactionByHash on other chains

Frequently asked questions

Does BNB Smart Chain support eth_getTransactionByHash?

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

Which transaction types does BNB Smart Chain use?

In five recent blocks: 238 × 0x0 (legacy), 140 × 0x2 (EIP-1559), 1 × 0x4 (EIP-7702 set-code), 8 × 0x1 (EIP-2930 access list), 1 × 0x3 (EIP-4844 blob).

Why does eth_getTransactionByHash return null on BNB Smart Chain?

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.

BNB Smart Chain endpoints, live block height and WebSocket status are on the BNB Smart Chain RPC page.

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