> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chainstack.com/llms.txt
> Use this file to discover all available pages before exploring further.

# erigon_getHeaderByNumber | Hyperliquid EVM

> The erigon_getHeaderByNumber JSON-RPC method retrieves block header information by block number on the Hyperliquid EVM blockchain.

<Info>
  This method is available on Chainstack. Not all Hyperliquid methods are available on Chainstack, as the open-source node implementation does not support them yet — see [Hyperliquid methods](/docs/hyperliquid-methods) for the full availability breakdown.
</Info>

The `erigon_getHeaderByNumber` JSON-RPC method retrieves block header information by block number on the Hyperliquid EVM blockchain. This method is an alias for `ots_getHeaderByNumber` and exists for compatibility with tools expecting Erigon-specific endpoints.

## Parameters

1. **block number** (integer, required): The block number to retrieve the header for

## Response

The method returns a block header object with the following fields:

### Response structure

* `number` — the block number
* `hash` — the block hash
* `parentHash` — the parent block hash
* `nonce` — proof-of-work nonce (always 0x0000000000000000 for PoS)
* `sha3Uncles` — SHA3 hash of the uncles data
* `logsBloom` — bloom filter for the logs
* `transactionsRoot` — root of the transaction trie
* `stateRoot` — root of the final state trie
* `receiptsRoot` — root of the receipts trie
* `miner` — address of the beneficiary
* `difficulty` — difficulty for this block
* `totalDifficulty` — total difficulty of the chain until this block
* `extraData` — extra data field of this block
* `size` — size of this block in bytes
* `gasLimit` — maximum gas allowed in this block
* `gasUsed` — total gas used by all transactions
* `timestamp` — Unix timestamp of the block
* `mixHash` — mix hash for the block
* `baseFeePerGas` — base fee per gas (post-EIP-1559)

## Usage example

`erigon_getHeaderByNumber` is a non-standard JSON-RPC method, so the EVM client libraries below call it through their raw request interface rather than a named helper.

<CodeGroup>
  ```shell Shell theme={"system"}
  curl -X POST https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274/evm \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "method": "erigon_getHeaderByNumber",
      "params": [1000],
      "id": 1
    }'
  ```

  ```python web3.py theme={"system"}
  from web3 import Web3

  w3 = Web3(Web3.HTTPProvider("YOUR_CHAINSTACK_ENDPOINT"))

  response = w3.provider.make_request("erigon_getHeaderByNumber", [1000])
  print(response["result"])
  ```

  ```javascript ethers.js theme={"system"}
  import { JsonRpcProvider } from "ethers";

  const provider = new JsonRpcProvider("YOUR_CHAINSTACK_ENDPOINT");

  const header = await provider.send("erigon_getHeaderByNumber", [1000]);
  console.log(header);
  ```

  ```typescript viem theme={"system"}
  import { createPublicClient, http } from "viem";

  const client = createPublicClient({
    transport: http("YOUR_CHAINSTACK_ENDPOINT"),
  });

  const header = await client.request({
    method: "erigon_getHeaderByNumber",
    params: [1000],
  } as any);
  console.log(header);
  ```
</CodeGroup>

<Note>
  **Use your own endpoint in your code.** The code examples use a placeholder Chainstack endpoint (YOUR\_CHAINSTACK\_ENDPOINT) — replace it with your own Hyperliquid node endpoint from the [Chainstack console](https://console.chainstack.com/). The curl above uses a shared public endpoint for quick checks only; do not use it in production.
</Note>

### Example response

```json theme={"system"}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "number": "0x3e8",
    "hash": "0xe8399bf41516f5ca663c79bc30db02b4989385c2f3a96f42958dea5753cbf4a9",
    "parentHash": "0x7c8f6a0e4d3b2a1c9e5f8b7d4a6c3e9f2b8d5a7c1e4f9b3a6d8c2e5f7a9b4c6d",
    "nonce": "0x0000000000000000",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
    "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "stateRoot": "0x9f3c6b0d8e5a2d1f7c9e4b3a8d6c5e2f9a7b4c8d1e6f3a5b7d9c2e4f6a8b3c5d",
    "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
    "miner": "0x0000000000000000000000000000000000000000",
    "difficulty": "0x0",
    "totalDifficulty": "0x0",
    "extraData": "0x",
    "size": "0x220",
    "gasLimit": "0x1c9c380",
    "gasUsed": "0x0",
    "timestamp": "0x6734e8d0",
    "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "baseFeePerGas": "0x7"
  }
}
```

## Compatibility note

This method is functionally identical to `ots_getHeaderByNumber`. The `erigon_` prefix exists for compatibility with:

* Otterscan block explorer (which checks for Erigon nodes)
* Tools expecting Erigon-specific endpoints
* Migration paths from Erigon to other node implementations

## Use cases

The `erigon_getHeaderByNumber` method is essential for:

* **Otterscan compatibility**: Allow Otterscan to detect node type
* **Tool migration**: Support tools moving from Erigon nodes
* **Block header retrieval**: Efficiently fetch header data
* **Cross-client compatibility**: Work with tools supporting multiple clients
* **Legacy support**: Maintain compatibility with older integrations
* **Node detection**: Identify nodes supporting Erigon-like APIs
* **Development tools**: Support development frameworks expecting Erigon
* **Block verification**: Validate block headers across different clients
* **API standardization**: Provide familiar endpoints for developers
* **Infrastructure flexibility**: Allow switching between node types

This alias method ensures maximum compatibility with existing Ethereum tooling and block explorers.


## OpenAPI

````yaml openapi/hyperliquid_node_api/hyperevm/evm_erigon_get_header_by_number.json post /evm
openapi: 3.0.0
info:
  title: Hyperliquid EVM API - erigon_getHeaderByNumber
  version: 1.0.0
servers:
  - url: >-
      https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274
security: []
paths:
  /evm:
    post:
      summary: erigon_getHeaderByNumber
      description: >-
        Get block header by number using Erigon-specific method on Hyperliquid
        EVM. Returns detailed header information.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - method
                - params
                - id
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  default: '2.0'
                  description: JSON-RPC version
                method:
                  type: string
                  enum:
                    - erigon_getHeaderByNumber
                  default: erigon_getHeaderByNumber
                  description: The RPC method name
                params:
                  type: array
                  description: 'Parameters: [block number]'
                  default:
                    - 1000
                id:
                  type: integer
                  default: 1
                  description: Request identifier
            example:
              jsonrpc: '2.0'
              method: erigon_getHeaderByNumber
              params:
                - 1000
              id: 1
      responses:
        '200':
          description: Successful response with block header
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC version
                  id:
                    type: integer
                    description: Request identifier
                  result:
                    type: object
                    description: Block header object
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  number: '0x3e8'
                  hash: >-
                    0xe8399bf41516f5ca663c79bc30db02b4989385c2f3a96f42958dea5753cbf4a9
                  parentHash: >-
                    0x7c8f6a0e4d3b2a1c9e5f8b7d4a6c3e9f2b8d5a7c1e4f9b3a6d8c2e5f7a9b4c6d
                  timestamp: '0x6734e8d0'

````