> ## 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.

# eth_getBlockByHash | Hyperliquid EVM

> The eth_getBlockByHash JSON-RPC method returns information about a block by its hash. Available on Hyperliquid EVM via Chainstack.

<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 `eth_getBlockByHash` JSON-RPC method returns information about a block by its hash. This method is essential for retrieving detailed block information when you have the block hash, commonly used for block exploration, transaction verification, and blockchain analysis.

## Parameters

The method takes two parameters:

1. **Block hash** - The hash of the block to retrieve
2. **Full transaction objects** - Whether to return full transaction objects or just hashes

### Parameter details

* `blockHash` (string, required) — The 32-byte hash of the block to retrieve
* `fullTransactionObjects` (boolean, required) — If `true`, returns full transaction objects; if `false`, returns only transaction hashes

## Response

The method returns detailed information about the specified block, or `null` if the block is not found.

### Response structure

**Block object:**

* `number` — Block number as a hexadecimal string
* `hash` — The 32-byte hash of the block
* `parentHash` — Hash of the parent block
* `timestamp` — Block timestamp as a Unix timestamp in hexadecimal
* `gasLimit` — Maximum gas allowed in this block
* `gasUsed` — Total gas used by all transactions in the block
* `transactions` — Array of transaction hashes or full transaction objects
* `miner` — Address of the block miner/validator
* `difficulty` — Block difficulty (may be 0 for some consensus mechanisms)
* `totalDifficulty` — Total difficulty of the chain until this block
* `size` — Block size in bytes as a hexadecimal string
* `extraData` — Extra data field of the block
* `nonce` — Block nonce (if applicable)
* `receiptsRoot` — Root hash of the receipts trie
* `stateRoot` — Root hash of the state trie
* `transactionsRoot` — Root hash of the transactions trie

### Transaction data format

**With fullTransactionObjects = false:**

* Returns array of transaction hashes as strings
* Minimal data transfer for basic block information
* Suitable for block overview and transaction counting

**With fullTransactionObjects = true:**

* Returns array of complete transaction objects
* Includes all transaction details (from, to, value, gas, etc.)
* Larger response but comprehensive transaction data

## Hyperliquid-specific considerations

### System transactions

**HyperCore transactions:**

* Blocks may contain system transactions that originate from HyperCore
* Use `eth_getSystemTxsByBlockHash` to retrieve system transactions specifically
* System transactions are separate from regular user transactions
* Important for complete block analysis and understanding network activity

### Block data interpretation

**Transaction types:**

* Regular transactions: Standard user-initiated transactions
* System transactions: Transactions originating from HyperCore
* Both types contribute to block gas usage and transaction count

**Data analysis:**

* Consider both regular and system transactions for complete analysis
* System transactions may have different patterns and characteristics
* Use appropriate methods to retrieve the specific transaction type needed

## Example request

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

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

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

  block = w3.eth.get_block(
      "0x53e84f299e6893680383c6a53329574122a7292e5bb9397bb6a0b51b4db5957a",
      full_transactions=False,
  )
  print(block)
  ```

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

  const provider = new JsonRpcProvider("YOUR_CHAINSTACK_ENDPOINT");

  const block = await provider.getBlock(
    "0x53e84f299e6893680383c6a53329574122a7292e5bb9397bb6a0b51b4db5957a"
  );
  console.log(block);
  ```

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

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

  const block = await client.getBlock({
    blockHash:
      "0x53e84f299e6893680383c6a53329574122a7292e5bb9397bb6a0b51b4db5957a",
    includeTransactions: false,
  });
  console.log(block);
  ```
</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>

## Use cases

The `eth_getBlockByHash` method is essential for applications that need to:

* **Block explorers**: Display detailed block information and navigation
* **Transaction verification**: Confirm transaction inclusion in specific blocks
* **Blockchain analytics**: Analyze block data for network insights
* **Audit systems**: Verify block integrity and transaction history
* **Development tools**: Debug and test blockchain applications
* **Monitoring systems**: Track block production and network health
* **DeFi protocols**: Verify block-based events and state changes
* **System transaction analysis**: Analyze both regular and HyperCore system transactions
* **Network diagnostics**: Troubleshoot blockchain synchronization issues
* **Integration services**: Provide block data to external systems

<Note>
  Block hashes are unique identifiers. If a block hash doesn't exist or is invalid, the method returns `null`. On Hyperliquid, blocks may contain system transactions from HyperCore - use `eth_getSystemTxsByBlockHash` to retrieve these separately.
</Note>


## OpenAPI

````yaml openapi/hyperliquid_node_api/hyperevm/evm_eth_get_block_by_hash.json post /evm
openapi: 3.0.0
info:
  title: Hyperliquid EVM API - eth_getBlockByHash
  version: 1.0.0
servers:
  - url: >-
      https://hyperliquid-mainnet.core.chainstack.com/4f8d8f4040bdacd1577bff8058438274
security: []
paths:
  /evm:
    post:
      summary: eth_getBlockByHash
      description: Returns information about a block by its hash.
      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:
                    - eth_getBlockByHash
                  default: eth_getBlockByHash
                  description: The RPC method name
                params:
                  type: array
                  description: 'Parameters: [blockHash, fullTransactionObjects]'
                  default:
                    - >-
                      0x53e84f299e6893680383c6a53329574122a7292e5bb9397bb6a0b51b4db5957a
                    - false
                id:
                  type: integer
                  default: 1
                  description: Request identifier
            example:
              jsonrpc: '2.0'
              method: eth_getBlockByHash
              params:
                - >-
                  0x53e84f299e6893680383c6a53329574122a7292e5bb9397bb6a0b51b4db5957a
                - false
              id: 1
      responses:
        '200':
          description: Successful response with block information
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC version
                  id:
                    type: integer
                    description: Request identifier
                  result:
                    type: object
                    properties:
                      number:
                        type: string
                        description: Block number as a hexadecimal string
                      hash:
                        type: string
                        description: Block hash
                      parentHash:
                        type: string
                        description: Hash of the parent block
                      timestamp:
                        type: string
                        description: Block timestamp as a hexadecimal string
                      gasLimit:
                        type: string
                        description: Gas limit for the block
                      gasUsed:
                        type: string
                        description: Total gas used by all transactions in the block
                      transactions:
                        type: array
                        description: >-
                          Array of transaction hashes or full transaction
                          objects
                      miner:
                        type: string
                        description: Address of the block miner
                      difficulty:
                        type: string
                        description: Block difficulty
                      totalDifficulty:
                        type: string
                        description: Total difficulty of the chain until this block
                      size:
                        type: string
                        description: Block size in bytes
                      extraData:
                        type: string
                        description: Extra data field of the block
              example:
                jsonrpc: '2.0'
                id: 1
                result:
                  number: '0x1234'
                  hash: >-
                    0x53e84f299e6893680383c6a53329574122a7292e5bb9397bb6a0b51b4db5957a
                  parentHash: >-
                    0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef
                  timestamp: '0x61bc8c3a'
                  gasLimit: '0x1c9c380'
                  gasUsed: '0x5208'
                  transactions:
                    - 0xabc123...
                    - 0xdef456...
                  miner: '0x0000000000000000000000000000000000000000'
                  difficulty: '0x0'
                  totalDifficulty: '0x0'
                  size: '0x220'
                  extraData: 0x

````