EVM
eth_getBlockByHash
Summary: Get block by block hash
This request returns block data for the given block hash. You can use this method to view the transactions in a block, or the transaction hashes.
Parameters
blockHash string
requiredA string representing the hash (32 bytes) of a block.
Pattern: ^0x[0-9a-f]{64}$
hydratedTransactions boolean
requiredFor hashes pass false, for detailed transaction objects, pass true.
Returns
Block object or
null
when there is no corresponding block.
getBlockByHashResponse oneOf
Customize request
Parameter
Value
Request
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": ["0xf9539cc20c8f5271ac12e6491c022f2e9faaaff1eca0000799e0a6e78d6050c5",false],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"baseFeePerGas": "0x7",
"difficulty": "0x2",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000f37f...",
"gasLimit": "0x3a2c940",
"gasUsed": "0x108061",
"hash": "0xf9539cc20c8f5271ac12e6491c022f2e9faaaff1eca0000799e0a6e78d6050c5",
"logsBloom": "0x04000004000c00000000100000000021000000001400524800000000000...",
"miner": "0x0000000000000000000000000000000000000000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"nonce": "0x0000000000000000",
"number": "0x4ff31d",
"parentHash": "0x8f702c7b4b88546f07cf66f09e46a6693a810131018b61a4ea257d369ace01c8",
"receiptsRoot": "0x70e4d96f4800e8c86ae75de75de1846da140a853d1e29fdae46400d93f85f4b8",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0xf74",
"stateRoot": "0x0411d23f01843fc2f08dc97ed9da86d19232c3c0ee6cd6e66a0fbf65ee7f0333",
"timestamp": "0x66630dae",
"totalDifficulty": "0x9fe63b",
"transactions": [
"0xd34e34e1bf1c940b7524c7180c1c8ca83fd886d736df5537214d5715365a4e29",
"0x78109d6f5d643369fbf0ff432bc0c89a150f1c96d849f06cde2fccde7cd4cb25",
"0x5b4ad10868aea3dbcb8999554e5ba86992a189b65f64e7e762f2e19830766de2",
"0x058e58b8fcd988f7cdc8b9ea10811405c83e1b107c9d0c008ee4716f35bee2d2",
"0x15bb69f5c0e7b43321c69917600665632e4a49dbfb84eeb21c31afb02f2bb49b",
"0x8d9c25bf2dcbd1b148137702cf748ee18600d7df7a374da7b72a56200166fb7d",
"0xee8270208bea7bee60eb10de43f7a46ae81f972e7473627d89311163dd068db8",
"0x645ceec2a8aa92bcf2491bc97b4ac98aa2acb360627aecb2391c6d7b9a841e9f",
"0xdcca21e756689b7bea9b5534698435b7ea729c852e50256f21832943f475c00f",
"0x61db38d84032e85e77e927172ada7062f1747c09078ffa1131fea374d4e1c177",
"0xd35b3f5490f13717b99efa6f1e8f2eabaf75b6e1e5ccff0c837c1e11731b0fd2",
"0x466864e901219e93de7ea03ac640f2b7cabf2f96dda62e0ed3b9a236c1a401e8"
],
"transactionsRoot": "0xd5100dcb4f1adad04c51fdea94706b145cb4218c69c6b4415ee165f1d7e6434e",
"uncles": []
}
}