Parameters
- blockNumber/tagstringREQUIRED
The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized
- transaction detail flagbooleanREQUIRED
The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions
Returns
- objectobject | null
A block object, or null when no block was found:
- baseFeePerGasstring
(Optional) A string of the base fee encoded in hexadecimal format. Please note that this response field will not be included in a block requested before the EIP-1559 upgrade
- blobGasUsedstring
(Optional) The amount of gas used by the blob
- difficultystring
The integer of the difficulty for this block encoded as a hexadecimal
- excessBlobGasstring
(Optional) The excess gas used by the blob
- extraDatastring
The “extra data” field of this block
- gasLimitstring
The maximum gas allowed in this block encoded as a hexadecimal
- gasUsedstring
The total used gas by all transactions in this block encoded as a hexadecimal
- hashstring | null
The block hash of the requested block. null if pending
- logsBloomstring | null
The bloom filter for the logs of the block. null if pending
- minerstring
The address of the beneficiary to whom the mining rewards were given
- mixHashstring
A string of a 256-bit hash encoded as a hexadecimal
- noncestring | null
The hash of the generated proof-of-work. null if pending
- numberstring | null
The block number of the requested block encoded as a hexadecimal. null if pending
- parentBeaconBlockRootstring
(Optional) The root of the parent beacon block in hexadecimal format
- parentHashstring
The hash of the parent block
- receiptsRootstring
The root of the receipts trie of the block
- sha3Unclesstring
The SHA3 of the uncles data in the block
- sizestring
The size of this block in bytes as an Integer value encoded as hexadecimal
- stateRootstring
The root of the final state trie of the block
- timestampstring
The unix timestamp for when the block was collated
- totalDifficultystring
(Optional) The integer of the total difficulty of the chain until this block encoded as a hexadecimal
- transactionsarray
An array of transaction objects
- transactionsRootstring
The root of the transaction trie of the block
- unclesarray
An array of uncle hashes
- withdrawalsarray
A withdrawals object contains information about withdrawals made by validators. Please note that this field will not be included in a block requested before the EIP-4895 upgrade
- indexstring
The index of the withdrawal to uniquely identify each withdrawal
- validatorIndexstring
The index of the validator who initiated the withdrawal
- addressstring
The address to which the withdrawn amount is sent
- amountstring
The amount of ether, provided in hexadecimal format, corresponding to a certain value in gwei
- withdrawalsRootstring
The Merkle root of withdrawal data. Also, please note that this field will not be included in a block requested before the EIP-4895 upgrade
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"baseFeePerGas": "0x7bc",6"blobGasUsed": "0x0",7"difficulty": "0x0",8"excessBlobGas": "0x0",9"extraData": "0x",10"gasLimit": "0x5f5e100",11"gasUsed": "0xab33",12"hash": "0xd3e6521d57725c622d6e91ccc7be6afc22a7099f5ba50ec083f6a2a12c8b1ada",13"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",14"miner": "0x4200000000000000000000000000000000000011",15"mixHash": "0xe1a34882103cf08eb7cb15ba73220d33d926bf36f2f8ab04148ad1069f537abc",16"nonce": "0x0000000000000000",17"number": "0xcec",18"parentBeaconBlockRoot": "0x6598c5aec8366002d0b89beeb5332f62d84d5e6cacee6378206fc42e657cb161",19"parentHash": "0xa698fa9cac09ff6a06dabc23cd1a56e5c10f5e02d6eb19e5c4f504216d831444",20"receiptsRoot": "0x7d3d19bd201e91a959c28bdf1cc481267907674ab8be001554d080e50bb88384",21"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",22"size": "0x347",23"stateRoot": "0x30110437f0e5b5657a63c753a534138a3de79a93fbcd171d5dc864a2eed8b4fe",24"timestamp": "0x667b14af",25"transactions": [26"0x648d8a685c167b2708cb2db5162734f064ee5230fca923b78f9ba4947bbe4b47"27],28"transactionsRoot": "0x64a6d609207a6732c95af94ed9b60d6ec5dba2dd8caf836de53422ba990821b4",29"uncles": [],30"withdrawals": [],31"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"32}33}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"baseFeePerGas": "0x7bc",6"blobGasUsed": "0x0",7"difficulty": "0x0",8"excessBlobGas": "0x0",9"extraData": "0x",10"gasLimit": "0x5f5e100",11"gasUsed": "0xab33",12"hash": "0xd3e6521d57725c622d6e91ccc7be6afc22a7099f5ba50ec083f6a2a12c8b1ada",13"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",14"miner": "0x4200000000000000000000000000000000000011",15"mixHash": "0xe1a34882103cf08eb7cb15ba73220d33d926bf36f2f8ab04148ad1069f537abc",16"nonce": "0x0000000000000000",17"number": "0xcec",18"parentBeaconBlockRoot": "0x6598c5aec8366002d0b89beeb5332f62d84d5e6cacee6378206fc42e657cb161",19"parentHash": "0xa698fa9cac09ff6a06dabc23cd1a56e5c10f5e02d6eb19e5c4f504216d831444",20"receiptsRoot": "0x7d3d19bd201e91a959c28bdf1cc481267907674ab8be001554d080e50bb88384",21"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",22"size": "0x347",23"stateRoot": "0x30110437f0e5b5657a63c753a534138a3de79a93fbcd171d5dc864a2eed8b4fe",24"timestamp": "0x667b14af",25"transactions": [26"0x648d8a685c167b2708cb2db5162734f064ee5230fca923b78f9ba4947bbe4b47"27],28"transactionsRoot": "0x64a6d609207a6732c95af94ed9b60d6ec5dba2dd8caf836de53422ba990821b4",29"uncles": [],30"withdrawals": [],31"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"32}33}