Skip to main content

eth_getBlockByNumber | Arbitrum Method

POST 

https://arbitrum.callstaticrpc.com/:apiKey

Returns information about a block by block number on the Arbitrum network.

Request

Path Parameters

    apiKey string
    Default value: docs-demo

Body

    id Id (integer)
    Default value: 1
    jsonrpc JsonRpc (string)
    Default value: 2.0
    method Method (string)
    Default value: eth_getBlockByNumber
    params object[]
    1. String - Either the hex value of a block number OR One of the following block tags:
      • pending - A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Intuitively, you can think of these as blocks that have not been mined yet.
      • latest - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions.
      • safe - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged.
      • finalized - The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged.
      • earliest - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created.
    2. Boolean - If true it returns the full transaction objects, if false only the hashes of the transactions. Defaults to false.

    Possible values: >= 2, <= 2

  • Array [
  • anyOf
    string

    String - Either the hex value of a block number OR block tags:

    1. block number (in hex) OR
    2. block tag (one of the following): * pending (Not available on Ethereum) - A sample next block built by the client on top of latest and containing the set of transactions usually taken from local mempool. Intuitively, you can think of these as blocks that have not been mined yet. * latest - The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions. * safe - The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is “unlikely” to be re-orged. * finalized - The most recent crypto-economically secure block, that has been accepted by >2/3 of validators. Cannot be re-orged outside of manual intervention driven by community coordination. Intuitively, this block is very unlikely to be re-orged. * earliest - The lowest numbered block the client has available. Intuitively, you can think of this as the first block created.
    Default value: finalized
  • ]

Responses

Returns a block object with the following fields, or null when no block was found.
Schema
    id integer
    jsonrpc string
    result object
    number string

    The block number. null when its pending block.

    hash string

    32 Bytes - hash of the block. null when its pending block.

    parentHash string

    32 Bytes - hash of the parent block.

    nonce string

    8 Bytes - hash of the generated proof-of-work. null when its pending block.

    sha3Uncles string

    32 Bytes - SHA3 of the uncles data in the block.

    logsBloom string

    256 Bytes - the bloom filter for the logs of the block. null when its pending block.

    transactionsRoot string

    32 Bytes - the root of the transaction trie of the block.

    stateRoot string

    32 Bytes - the root of the final state trie of the block.

    receiptsRoot string

    32 Bytes - the root of the receipts trie of the block.

    miner string

    20 Bytes - the address of the beneficiary to whom the mining rewards were given.

    difficulty string

    Fixed at 0x1

    Example: 0x1
    totalDifficulty string

    Integer of the total difficulty of the chain until this block.

    size string

    Integer the size of this block in bytes.

    extraData string

    The Merkle root of the Outbox tree state - same as sendRoot.

    Example: 0x1992458362ac0d6c8e5f33d32a83edc9e7c53723d3f13dc3f41f710e2c2c5091
    gasLimit string

    Value is fixed at 0x4000000000000, but it's important to note that Arbitrum currently has a 32M gas limit per block

    Example: 0x4000000000000
    gasUsed string

    The total used gas by all transactions in this block.

    timestamp string

    The unix timestamp for when the block was collated.

    transactions string[]

    Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.

    uncles string[]

    Array of uncle hashes.

    l1BlockNumber string

    An approximate L1 block number hex string that occurred before this L2 block.

    Example: 0x1000755
    sendCount string

    The hex-number of L2-to-L1 messages since Nitro genesis.

    Example: 0xdd2d
    sendRoot string

    The Merkle root of the Outbox tree state.

    Example: 0x1992458362ac0d6c8e5f33d32a83edc9e7c53723d3f13dc3f41f710e2c2c5091
    mixHash string

    First 8 bytes is equivalent to sendCount, second 8 bytes is equivalent to l1BlockNumber

    Example: 0x000000000000df4f00000000010036d5000000000000000a0000000000000000
curl -L 'https://arbitrum.callstaticrpc.com/:apiKey' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"id": 1,
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": [
"finalized",
false
]
}'
Request Collapse all
Base URL
https://arbitrum.callstaticrpc.com
Parameters
— path
Body
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "eth_getBlockByNumber",
  "params": [
    "finalized",
    false
  ]
}
ResponseClear

Click the Send API Request button above and see the response here!