eth_getTransactionByHash on X Layer
Everything below was measured on 2026-10-13 by calling eth_getTransactionByHash on X Layer 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 X Layer
Types of the 62 transactions in five consecutive blocks when we measured. Decoders that reject unknown types will fail on X Layer if any of these is missing from their list.
| 0x2 EIP-1559 | 53 (85%) |
|---|---|
| 0x7e L1-to-L2 deposit (OP Stack) | 5 (8%) |
| 0x0 legacy | 4 (6%) |
Fields beyond Ethereum's
Type 0x7e (L1-to-L2 deposit (OP Stack)) transactions carry extra fields. depositReceiptVersion: the version of the deposit receipt format; mint: the amount of ETH minted on L2 by a deposit; sourceHash: the unique ID of an L1-to-L2 deposit, derived from its L1 origin.
A real X Layer transaction
A type 0x2 transaction from one of the latest blocks, as our endpoint returned it (long hex values shortened).
{
"accessList": [],
"blockHash": "0x8974b172e91a708d9fa094c5fe36c129052eae9e972f4f1fa98b152aba080f2b",
"blockNumber": "0x45bd73d",
"chainId": "0xc4",
"from": "0x1bd1fadb835efb2134a0b902eb6658afd7461df0",
"gas": "0xc5c77",
"gasPrice": "0x1312d02",
"hash": "0xf25cc4d548c197aaeb1909f361ed997be478bbc7ff36d1a50dab8192c34536c7",
"input": "0xd7ea7c1300000000…(324 bytes)",
"maxFeePerGas": "0x1c9c382",
"maxPriorityFeePerGas": "0x2",
"nonce": "0x195",
"r": "0x1801da037c568b0294eae5c07c482222746dbfdfa383361cfb710691867342bf",
"s": "0x2f2b668a656d20765a69dd1974edf76208b141c715e73bdaac9c135c755571b0",
"to": "0xe2e6774c784eb076551543e04f3059b4bc716fdd",
"transactionIndex": "0x1",
"type": "0x2",
"v": "0x1",
"value": "0x0",
"yParity": "0x1"
}Example request
curl -s https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEY \
-X POST -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getTransactionByHash","params":["0xf25cc4d548c197aaeb1909f361ed997be478bbc7ff36d1a50dab8192c34536c7"]}'import { createPublicClient, http } from "viem";
const client = createPublicClient({
transport: http("https://rpc.swiftnodes.io/rpc/xlayer?key=YOUR_API_KEY"),
});
const tx = await client.getTransaction({ hash: "0xf25cc4d548c197aaeb1909f361ed997be478bbc7ff36d1a50dab8192c34536c7" });
if (tx.blockNumber === null) console.log("still pending");
console.log(tx.type, tx.from, tx.to, tx.value);Other methods on X Layer
- eth_blockNumberSupported
- eth_chainIdSupported
- eth_getBalanceSupported
- eth_getBlockByNumberSupported
- eth_getTransactionReceiptSupported
- eth_callSupported
- eth_estimateGasSupported
- eth_gasPriceSupported
- eth_maxPriorityFeePerGasSupported
- eth_sendRawTransactionSupported
- eth_getTransactionCountSupported
- eth_getCodeSupported
- eth_subscribeSupported
- eth_getLogsSupported
- eth_getBlockReceiptsSupported
- eth_feeHistorySupported
- eth_getProofSupported
- eth_createAccessListSupported
- debug_traceCallSupported
- trace_blockSupported
- trace_transactionSupported
eth_getTransactionByHash on other chains
- Ethereum
- Base
- Arbitrum
- Optimism
- Polygon
- BNB Smart Chain
- Avalanche
- Sonic
- Linea
- Scroll
- zkSync Era
- Blast
- Mantle
- Gnosis
- Celo
- Berachain
- Monad
- Unichain
- Kaia
- PulseChain
- World Chain
- Ronin
- Abstract
- ApeChain
- MegaETH
- Fantom
- Lisk
- Hemi
- BOB
- Plasma
- Fraxtal
- Zora
- Story
- Soneium
- Sei
- Hyperliquid
- Taiko
- Morph
- Ink
- Katana
- Ethereum Classic
- opBNB
- Mode
- Flare
- Core
- Chiliz
- Telos EVM
- Tempo
- Cronos
- Manta Pacific
- Shibarium
- Boba Network
- Arbitrum Nova
- Immutable zkEVM
Frequently asked questions
Does X Layer support eth_getTransactionByHash?
Yes. eth_getTransactionByHash answered on the SwiftNodes X Layer endpoint when our weekly probe called it through the customer path (2026-10-13).
Which transaction types does X Layer use?
In five recent blocks: 5 × 0x7e (L1-to-L2 deposit (OP Stack)), 53 × 0x2 (EIP-1559), 4 × 0x0 (legacy).
Why does eth_getTransactionByHash return null on X Layer?
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.
X Layer endpoints, live block height and WebSocket status are on the X Layer RPC page.
One key covers every chain we serve, and SwiftNodes has a free tier.