RPC method

eth_getTransactionByHash on Polygon

Supported on SwiftNodes

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

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

0x2 EIP-1559395 (93%)
0x0 legacy29 (7%)
0x4 EIP-7702 set-code2 (0%)
0x1 EIP-2930 access list1 (0%)

A real Polygon transaction

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

{
  "blockHash": "0x098e3cf197520995c465edf637af99571e2d14bdb95e4baefc5fcdd1405eb36c",
  "blockNumber": "0x5b097ee",
  "from": "0x501c43b2510da0ca6572e05b479e530ce3985646",
  "gas": "0x5208",
  "gasPrice": "0xfc99250c4e",
  "maxFeePerGas": "0x1180cf6392c",
  "maxPriorityFeePerGas": "0xc2d9786ec8",
  "hash": "0x9ed51731810c4a6402bdaa9061940d87f590ba18d85aa546c0a91ad820806e25",
  "input": "0x",
  "nonce": "0x32249f",
  "to": "0x16ea50379dfca736efb9cd4afda6cf2cbd4b8e28",
  "transactionIndex": "0x0",
  "value": "0x4796ded58e9eea",
  "type": "0x2",
  "accessList": [],
  "chainId": "0x89",
  "v": "0x1",
  "r": "0xcf75428c4562bf9873bc5878cec3e5f6215c4d9e0fa96c9dd4e0dba161073327",
  "s": "0x37fcec4da8d092a019a8c25a18ef5b251e3b65cb6250f83c17d9c55a80cb0406",
  "yParity": "0x1"
}

Example request

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

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

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

Other methods on Polygon

eth_getTransactionByHash on other chains

Frequently asked questions

Does Polygon support eth_getTransactionByHash?

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

Which transaction types does Polygon use?

In five recent blocks: 395 × 0x2 (EIP-1559), 29 × 0x0 (legacy), 2 × 0x4 (EIP-7702 set-code), 1 × 0x1 (EIP-2930 access list).

Why does eth_getTransactionByHash return null on Polygon?

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.

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

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