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
A block object, or null when no block was found. The block object contains the following fields:
- baseFeePerGas
(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
- difficulty
The integer of the difficulty for this block encoded as a hexadecimal
- extraData
The “extra data” field of this block
- gasLimit
The maximum gas allowed in this block encoded as a hexadecimal
- gasUsed
The total used gas by all transactions in this block encoded as a hexadecimal
- hash
The block hash of the requested block. null if pending
- logsBloom
The bloom filter for the logs of the block. null if pending
- miner
The address of the beneficiary to whom the mining rewards were given
- mixHash
A string of a 256-bit hash encoded as a hexadecimal
- nonce
The hash of the generated proof-of-work. null if pending
- number
The block number of the requested block encoded as hexadecimal. null if pending
- parentHash
The hash of the parent block
- receiptsRoot
The root of the receipts trie of the block
- sha3Uncles
The SHA3 of the uncles data in the block
- size
The size of this block in bytes as an Integer value encoded as hexadecimal
- stateRoot
The root of the final state trie of the block
- timestamp
The UNIX timestamp for when the block was collated
- totalDifficulty
The integer of the total difficulty of the chain until this block encoded as a hexadecimal
- transactions
An array of transaction objects - please see eth_getTransactionByHash for exact shape
- transactionsRoot
The root of the transaction trie of the block
- uncles
An array of uncle hashes
- withdrawals
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
- index
The index of the withdrawal to uniquely identify each withdrawal
- validatorIndex
The index of the validator who initiated the withdrawal
- address
The address to which the withdrawn amount is sent
- amount
The amount of ether, provided in hexadecimal format, corresponding to a certain value in gwei
- withdrawalsRoot
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": "0x848",6"difficulty": "0x0",7"extraData": "0x",8"gasLimit": "0x1c9c380",9"gasUsed": "0xb755",10"hash": "0xa4f43911b31c3cd33e1b2b33ec2a334a3b97c8eccd0364a3f0e19f3c8b526459",11"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",12"miner": "0x4200000000000000000000000000000000000011",13"mixHash": "0x5662824f769fc5a353022719b99e033db77e9a4e3f2da84fe1a01361d44bfa84",14"nonce": "0x0000000000000000",15"number": "0xcec",16"parentHash": "0x2134fd3294838acd8278f8fc863405743a216290d557a6490ee3082aee28dd3b",17"receiptsRoot": "0xaf87ac8f1196e83e5d098aada3e4b9861240891b4c8b3ad3b0a009c1859d6383",18"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",19"size": "0x388",20"stateRoot": "0x4c30461e7dbcf13a0596f8e4fbbf0936958dcfc9066b38ee4ba8de4f66012852",21"timestamp": "0x659b8e38",22"totalDifficulty": "0x0",23"transactions": [24"0x1be364efc5ebe5f08a68d6df376924234098e7d7e46c06148cabffd9e0fe7f27"25],26"transactionsRoot": "0x6009b183d9603f0c042f95774471de2dfc6450f337f40d6d398aa7b868da7f0b",27"uncles": [],28"withdrawals": [],29"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"30}31}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"baseFeePerGas": "0x848",6"difficulty": "0x0",7"extraData": "0x",8"gasLimit": "0x1c9c380",9"gasUsed": "0xb755",10"hash": "0xa4f43911b31c3cd33e1b2b33ec2a334a3b97c8eccd0364a3f0e19f3c8b526459",11"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",12"miner": "0x4200000000000000000000000000000000000011",13"mixHash": "0x5662824f769fc5a353022719b99e033db77e9a4e3f2da84fe1a01361d44bfa84",14"nonce": "0x0000000000000000",15"number": "0xcec",16"parentHash": "0x2134fd3294838acd8278f8fc863405743a216290d557a6490ee3082aee28dd3b",17"receiptsRoot": "0xaf87ac8f1196e83e5d098aada3e4b9861240891b4c8b3ad3b0a009c1859d6383",18"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",19"size": "0x388",20"stateRoot": "0x4c30461e7dbcf13a0596f8e4fbbf0936958dcfc9066b38ee4ba8de4f66012852",21"timestamp": "0x659b8e38",22"totalDifficulty": "0x0",23"transactions": [24"0x1be364efc5ebe5f08a68d6df376924234098e7d7e46c06148cabffd9e0fe7f27"25],26"transactionsRoot": "0x6009b183d9603f0c042f95774471de2dfc6450f337f40d6d398aa7b868da7f0b",27"uncles": [],28"withdrawals": [],29"withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"30}31}