Parameters
- blockNumber/tagstring
The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized
- transaction detail flagdefault: false
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. The block object contains the following fields:
- baseFeePerGasstring
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 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 - please see eth_getTransactionByHash for exact shape
- transactionsRootstring
The root of the transaction trie of the block
- unclesarray
An array of uncle hashes
- stepnumber
The consensus step number
- signaturestring
The block signature
1{2"jsonrpc": "2.0",3"result": {4"difficulty": "0xfffffffffffffffffffffffffffffffe",5"extraData": "0x4e65746865726d696e64",6"gasLimit": "0xbebc20",7"gasUsed": "0x35c38",8"hash": "0xa8b07fadd5006d676f1a2122ab72eca6e80de718b7175ade13e4140258ee558a",9"logsBloom": "0x00000000400000000000000000000000000000000000000000000000040000000001000008000100000000000000000100000000000000000000000000000000000000000800000000000008000000000000000100000200020000000000000000000000020040000000000000000800000008000400000000000010000008000000000000000000000000800000000000000000000001000000000000000000000000000000000020000000000004000000000000000000000010000000000000000002000000000000008000000000002000000000000000000000000020000000000000000008000000000000000000040800000000000000000000000000",10"miner": "0x9233042b8e9e03d5dc6454bbbe5aee83818ff103",11"number": "0xc5043f",12"parentHash": "0x21b95d4784aef4a514217c0c543268da549565304834de558e865e0e66578784",13"receiptsRoot": "0xd0bc897e8caed6d894f416b97e3fd1de8906e1439095073a33be9bb55d88ba01",14"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",15"signature": "0xcdcd144bc35b1ea38952e3389604cc04505c695207f37e2e81f129f7225023015be176b167ce59fd871bccc209d10f273457fd4f04649669e1cfc6a74b71037900",16"size": "0x71e",17"stateRoot": "0xf3204b15ab5ae4cf775e2f1f6a0320e24bdfe6e3e290bdbac8871bb0f1219fc2",18"step": 320959457,19"totalDifficulty": "0xc5043effffffffffffffffffffffffec1b87e0",20"timestamp": "0x5fa74365",21"transactions": [22"0x78ca2742a03ee9ddfc6acc2e43268af5ad5febbd4cc0c95d24dfee94d952b413",23"0xadda332066f657e99eacf8b2f087d6823e76ce4b52a6bdb78c36796ba4c94d8a"24],25"transactionsRoot": "0x3147dcc458902e56836ed4101fc3c0b37fcc6aee97a58c4fd343b8a7fdb916ba",26"uncles": []27},28"id": 129}
1{2"jsonrpc": "2.0",3"result": {4"difficulty": "0xfffffffffffffffffffffffffffffffe",5"extraData": "0x4e65746865726d696e64",6"gasLimit": "0xbebc20",7"gasUsed": "0x35c38",8"hash": "0xa8b07fadd5006d676f1a2122ab72eca6e80de718b7175ade13e4140258ee558a",9"logsBloom": "0x00000000400000000000000000000000000000000000000000000000040000000001000008000100000000000000000100000000000000000000000000000000000000000800000000000008000000000000000100000200020000000000000000000000020040000000000000000800000008000400000000000010000008000000000000000000000000800000000000000000000001000000000000000000000000000000000020000000000004000000000000000000000010000000000000000002000000000000008000000000002000000000000000000000000020000000000000000008000000000000000000040800000000000000000000000000",10"miner": "0x9233042b8e9e03d5dc6454bbbe5aee83818ff103",11"number": "0xc5043f",12"parentHash": "0x21b95d4784aef4a514217c0c543268da549565304834de558e865e0e66578784",13"receiptsRoot": "0xd0bc897e8caed6d894f416b97e3fd1de8906e1439095073a33be9bb55d88ba01",14"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",15"signature": "0xcdcd144bc35b1ea38952e3389604cc04505c695207f37e2e81f129f7225023015be176b167ce59fd871bccc209d10f273457fd4f04649669e1cfc6a74b71037900",16"size": "0x71e",17"stateRoot": "0xf3204b15ab5ae4cf775e2f1f6a0320e24bdfe6e3e290bdbac8871bb0f1219fc2",18"step": 320959457,19"totalDifficulty": "0xc5043effffffffffffffffffffffffec1b87e0",20"timestamp": "0x5fa74365",21"transactions": [22"0x78ca2742a03ee9ddfc6acc2e43268af5ad5febbd4cc0c95d24dfee94d952b413",23"0xadda332066f657e99eacf8b2f087d6823e76ce4b52a6bdb78c36796ba4c94d8a"24],25"transactionsRoot": "0x3147dcc458902e56836ed4101fc3c0b37fcc6aee97a58c4fd343b8a7fdb916ba",26"uncles": []27},28"id": 129}