RPC method

eth_getTransactionByHash on Metal L2

Supported on SwiftNodes

Everything below was measured on 2026-12-06 by calling eth_getTransactionByHash on Metal L2 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 Metal L2

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

0x7e L1-to-L2 deposit (OP Stack)5 (100%)

Fields beyond Ethereum's

Type 0x7e (L1-to-L2 deposit (OP Stack)) transactions carry extra fields. sourceHash: the unique ID of an L1-to-L2 deposit, derived from its L1 origin; mint: the amount of ETH minted on L2 by a deposit; depositReceiptVersion: the version of the deposit receipt format.

Transactions include blockTimestamp, so you get the block time without a second call for the block.

A real Metal L2 transaction

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

{
  "type": "0x7e",
  "sourceHash": "0xc3dad11d76be11d4844b62224abac6244b2e7e73a3e53ab74cf33dc3febe4ddb",
  "from": "0xdeaddeaddeaddeaddeaddeaddeaddeaddead0001",
  "to": "0x4200000000000000000000000000000000000015",
  "mint": "0x0",
  "value": "0x0",
  "gas": "0xf4240",
  "input": "0x3db6be2b000a6fe0…(178 bytes)",
  "hash": "0x441ade1efcdd7e43c49f1ba4cfb05597afab6e58ddf830282cab20daed911f19",
  "r": "0x0",
  "s": "0x0",
  "yParity": "0x0",
  "v": "0x0",
  "blockHash": "0x7c9349919ebcaaacd76cbd718de418c147f6d5d843fdc2b4dda18356fe8b1873",
  "blockNumber": "0x2885063",
  "transactionIndex": "0x0",
  "blockTimestamp": "0x6b1503c1",
  "depositReceiptVersion": "0x1",
  "gasPrice": "0x0",
  "nonce": "0x2885083"
}

Example request

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

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

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

Other methods on Metal L2

eth_getTransactionByHash on other chains

Frequently asked questions

Does Metal L2 support eth_getTransactionByHash?

Yes. eth_getTransactionByHash answered on the SwiftNodes Metal L2 endpoint when our weekly probe called it through the customer path (2026-12-06).

Which transaction types does Metal L2 use?

In five recent blocks: 5 × 0x7e (L1-to-L2 deposit (OP Stack)).

Why does eth_getTransactionByHash return null on Metal L2?

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.

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

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