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

# eth_getBlockByHash

Returns information about a block by hash.

This method will use `40` [Compute Units](https://docs.validationcloud.io/nodeapi/about/billing.md).

***

## Reference: [Here](https://ethereum.org/en/developers/docs/apis/json-rpc/#eth_getblockbyhash)

## **Parameters**

1. `DATA`, 32 Bytes - Hash of a block.
2. `Boolean` - If `true` it returns the full transaction objects, if `false` only the hashes of the transactions are returned.

```javascript theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
params: [
  "0xb4ac8c880ad6ab31b3b37546f5ad56b43ce07844e5bab88de23c2c969d32e50f",
  false
]
```

## **Returns**

`Object` - A block object, or `null` when no block was found:

* `number`: `QUANTITY` - the block number. `null` when its pending block.
* `hash`: `DATA`, 32 Bytes - hash of the block. `null` when its pending block.
* `parentHash`: `DATA`, 32 Bytes - hash of the parent block.
* `nonce`: `DATA`, 8 Bytes - hash of the generated proof-of-work. `null` when its pending block.
* `sha3Uncles`: `DATA`, 32 Bytes - SHA3 of the uncles data in the block.
* `logsBloom`: `DATA`, 256 Bytes - the bloom filter for the logs of the block. `null` when its pending block.
* `transactionsRoot`: `DATA`, 32 Bytes - the root of the transaction trie of the block.
* `stateRoot`: `DATA`, 32 Bytes - the root of the final state trie of the block.
* `receiptsRoot`: `DATA`, 32 Bytes - the root of the receipts trie of the block.
* `miner`: `DATA`, 20 Bytes - the address of the beneficiary to whom the mining rewards were given.
* `difficulty`: `QUANTITY` - integer of the difficulty for this block.
* `totalDifficulty`: `QUANTITY` - integer of the total difficulty of the chain until this block.
* `extraData`: `DATA` - the "extra data" field of this block.
* `size`: `QUANTITY` - integer the size of this block in bytes.
* `gasLimit`: `QUANTITY` - the maximum gas allowed in this block.
* `gasUsed`: `QUANTITY` - the total used gas by all transactions in this block.
* `timestamp`: `QUANTITY` - the unix timestamp for when the block was collated.
* `transactions`: `Array` - Array of transaction objects, or 32 Bytes transaction hashes depending on the last given parameter.
* `uncles`: `Array` - Array of uncle hashes.

```json theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "baseFeePerGas": "0x1dceeba0",
    "difficulty": "0x1",
    "extraData": "0x548c712dc522690b44607fe16027decab94c6ebd838725e873a38ec15ff71105",
    "gasLimit": "0x4000000000000",
    "gasUsed": "0x47b56",
    "hash": "0xb4ac8c880ad6ab31b3b37546f5ad56b43ce07844e5bab88de23c2c969d32e50f",
    "l1BlockNumber": "0x315e65c",
    "logsBloom": "0x20000000000800000000000000000020042000000000000000000000008400000000000000000000000000000000000000000000040000000040000000200000...",
    "miner": "0xa4b000000000000000000073657175656e636572",
    "mixHash": "0x0000000000001a7d000000000315e65c000000000000003d0001000000000000",
    "nonce": "0x00000000002858ca",
    "number": "0x84dee8",
    "parentHash": "0x3fa0ac5c23a7fd4fabe59c74a5df1c4092cade7bfeff68e39c8e01ac80fdec63",
    "receiptsRoot": "0xb2620bc69f3deafb5fb58146752cf3e367c635689ae1d39f15635e2048fc849a",
    "sendCount": "0x1a7d",
    "sendRoot": "0x548c712dc522690b44607fe16027decab94c6ebd838725e873a38ec15ff71105",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": "0x72a",
    "stateRoot": "0xd331d9124643f697e5a54affc7b6f12bc615059e44bf7be0da35caa24d840a64",
    "timestamp": "0x6b003329",
    "transactions": [
      "0xa8dd1a0f1c32b1e31eb507601a22624b80f3c211a02c836a052ab5d30bbe3293",
      "0x1edcfafe2394941ab6a70191a5ee7674c23c2d511d897ed7361c9455745621db",
      "0xc301c25a0cbbaff049cc1202b5815daaa02022c03397485c97862752c85f766f",
      "0x70abf86ea0d43760a3c77aedb0d4c0824c52f01efaf23b6cdff6c0bf8a9356c9",
      "0xa817e0512291bf70054b6749717589f517ccb9c97b8a3b61b0eb3230a5138325"
    ],
    "transactionsRoot": "0xef1a0766ed19339840dfcb524415a9c2177c7082b664284d21603d1ace673344",
    "uncles": []
  }
}
```

```bash title="mainnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://mainnet.elysium.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xb4ac8c880ad6ab31b3b37546f5ad56b43ce07844e5bab88de23c2c969d32e50f",false],"id":1}'
```

```bash title="testnet" theme={"theme":{"light":"github-light","dark":"github-dark-default"}}
curl https://testnet.elysium.validationcloud.io/v1/<YOUR_API_KEY_HERE> \
    -X POST \
    -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x9a8eb09f20182c1cf05f398b3d3a46c42ca5c4c56d3b2af8d4c7cba34dc5d1b9",false],"id":1}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.