RPC method

eth_getBlockByNumber on Metal L2

Supported on SwiftNodes

Everything below was measured on 2026-12-06 by calling eth_getBlockByNumber on Metal L2 through the same endpoint customers use, and is re-measured weekly.

What eth_getBlockByNumber does

Returns a block by number or tag (latest, safe, finalized, pending, earliest): the header, and either the transaction hashes or the full transactions. Indexers, explorers and wallets use it to follow the chain.

eth_getBlockByNumber on Metal L2: what we measured

Header fields26
Transactions per block1, 1, 1, 1, 1 in five consecutive blocks
Response size, full transactions (true)2.7 KB average
Response size, hashes only (false)1.8 KB
Gas limit30,000,000
Gas used in the latest block46,206 (0.154% of the limit)
Base fee252 wei
Tag "safe"block 42,487,832
Tag "finalized"block 42,487,238
Tag "pending"block 42,487,911
Tag "earliest"block 0

What is different on Metal L2

The header includes the fields added by London (EIP-1559 base fee), Shanghai (withdrawals), Cancun (EIP-4844 blob gas), Cancun (EIP-4788 beacon root), Prague (EIP-7685 requests). Code that assumes Ethereum's current header shape will parse it as is.

5 of the 5 transactions in those five blocks were system transactions (5 × type 0x7e, L1-to-L2 deposit (OP Stack)). They are not user activity: filter them out when counting transactions.

"finalized" was 672 blocks (about 22 min) behind the head.

A real Metal L2 block header

From block 42,487,907, as our endpoint returned it (long hex values shortened).

{
  "hash": "0x7c9349919ebcaaacd76cbd718de418c147f6d5d843fdc2b4dda18356fe8b1873",
  "parentHash": "0x99dc0c83c602aae471ee31033fe5ededa82dcea9933dc80abc229a70954e26f7",
  "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
  "miner": "0x4200000000000000000000000000000000000011",
  "stateRoot": "0xa66983e5ee7d69d2ca481e4c6003ba0801f35a4596e0ac8e1b4d728478b98641",
  "transactionsRoot": "0x5b9c48ff72426c751a96948281b50c7e87bc64f9f8b48f7996f4d4d166c8dd2b",
  "receiptsRoot": "0xfa2fbe10c50c75be075d93680f1ec999f47f3940dd89547355e42bf44d742056",
  "logsBloom": "0x0000000000000000…(256 bytes)",
  "difficulty": "0x0",
  "number": "0x2885063",
  "gasLimit": "0x1c9c380",
  "gasUsed": "0xb47e",
  "timestamp": "0x6b1503c1",
  "extraData": "0x01000000fa000000060000000000000000",
  "mixHash": "0x87d205cf9ac893df34c02a4972156539ec8d2efbc7a63835cd034ec2f2dde8f6",
  "nonce": "0x0000000000000000",
  "baseFeePerGas": "0xfc",
  "withdrawalsRoot": "0x6e2eb1f919a13d69a77e96d9ac8c9a274a39e19c5043e365cf52cbffccd485c4",
  "blobGasUsed": "0x0",
  "excessBlobGas": "0x0",
  "parentBeaconBlockRoot": "0xccc0630ddd5601a1288dc372839dbc909cd10ec63ead3a70d231e7c9ffa9aebf",
  "requestsHash": "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "size": "0x38b",
  "uncles": [],
  "transactions": "1 transactions",
  "withdrawals": []
}

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_getBlockByNumber","params":["latest",false]}'
import { createPublicClient, http } from "viem";

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

// Header plus transaction hashes (1.8 KB)
const block = await client.getBlock({ blockTag: "latest" });

// With full transactions (2.7 KB on average on Metal L2)
const full = await client.getBlock({ blockNumber: block.number, includeTransactions: true });
const userTxs = full.transactions.filter((t) => !["0x7e"].includes(t.typeHex));

// A block that will not be reorganised
const final = await client.getBlock({ blockTag: "finalized" });

Other methods on Metal L2

eth_getBlockByNumber on other chains

Frequently asked questions

Does Metal L2 support eth_getBlockByNumber?

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

How many transactions are in each Metal L2 block?

In five consecutive blocks on 2026-12-06: 1, 1, 1, 1, 1.

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.