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
- difficultystring
The integer of the difficulty for this block encoded as a hexadecimal
- 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
- 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
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
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"baseFeePerGas": "0x1312d00",6"difficulty": "0x0",7"extraData": "0x",8"gasLimit": "0x2e90edd000",9"gasUsed": "0xd7f9",10"hash": "0xe7c7f00364aa96bfa494e1aa63e9e39f22b00026951497025c9860afac1b44fd",11"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",12"miner": "0x4200000000000000000000000000000000000011",13"mixHash": "0xf38f530b6a3a4e250c88d3ecad3b02931aa93fc93fe50dd245087495f59ea943",14"nonce": "0x0000000000000000",15"number": "0x3bc17e0",16"parentHash": "0xbec229854e91543996d1ff23cd018b6c7aabed4eddf61ea6f77369590fddf3d4",17"receiptsRoot": "0xce4521c11188e4e1efa1997a0f825399679232d1704b43d769d6b67ab6110a4c",18"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",19"size": "0x36c",20"stateRoot": "0x5107993ecfcd57906cb744c3a13eca4e087d4ef8529057522f01d2b81524cfbc",21"timestamp": "0x662121c8",22"transactions": [23"0xe6d42c92b1aa6e48255b7314aa0c704d836d59f8d5bd6d63a82906774a17a7cd"24],25"transactionsRoot": "0xb73f9e4a94b01a358c837efb8cb0d3458771ffe0dc0ecc36fdd4b10050b0fd86",26"uncles": []27}28}
1{2"jsonrpc": "2.0",3"id": 1,4"result": {5"baseFeePerGas": "0x1312d00",6"difficulty": "0x0",7"extraData": "0x",8"gasLimit": "0x2e90edd000",9"gasUsed": "0xd7f9",10"hash": "0xe7c7f00364aa96bfa494e1aa63e9e39f22b00026951497025c9860afac1b44fd",11"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",12"miner": "0x4200000000000000000000000000000000000011",13"mixHash": "0xf38f530b6a3a4e250c88d3ecad3b02931aa93fc93fe50dd245087495f59ea943",14"nonce": "0x0000000000000000",15"number": "0x3bc17e0",16"parentHash": "0xbec229854e91543996d1ff23cd018b6c7aabed4eddf61ea6f77369590fddf3d4",17"receiptsRoot": "0xce4521c11188e4e1efa1997a0f825399679232d1704b43d769d6b67ab6110a4c",18"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",19"size": "0x36c",20"stateRoot": "0x5107993ecfcd57906cb744c3a13eca4e087d4ef8529057522f01d2b81524cfbc",21"timestamp": "0x662121c8",22"transactions": [23"0xe6d42c92b1aa6e48255b7314aa0c704d836d59f8d5bd6d63a82906774a17a7cd"24],25"transactionsRoot": "0xb73f9e4a94b01a358c837efb8cb0d3458771ffe0dc0ecc36fdd4b10050b0fd86",26"uncles": []27}28}