eth_getBlockByNumber RPC Method
Parameters
blockNumber/tag
string
REQUIRED
The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized
transaction detail flag
boolean
REQUIRED
(default: false) The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions
Returns
object
A block object, or null when no block was found
hash
The block hash of the requested block. null if pending
parentHash
The hash of the parent block
sha3Uncles
The SHA3 of the uncles data in the block
miner
The address of the beneficiary to whom the mining rewards were given
stateRoot
The root of the final state trie of the block
transactionsRoot
The root of the transaction trie of the block
receiptsRoot
The root of the receipts trie of the block
number
The block number of the requested block encoded as a hexadecimal. null if pending
l1BatchNumber
The l1 batch number of the requested block. null if pending
gasUsed
The total used gas by all transactions in this block encoded as a hexadecimal
gasLimit
The maximum gas allowed in this block encoded as a hexadecimal
baseFeePerGas
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
extraData
The “extra data” field of this block
logsBloom
The bloom filter for the logs of the block. null if pending
timestamp
The unix timestamp for when the block was collated
l1BatchTimestamp
The unix l1 batch timestamp for when the block was collated
difficulty
The integer of the difficulty for this block encoded as a hexadecimal
totalDifficulty
The integer of the total difficulty of the chain until this block encoded as a hexadecimal
sealFields
Contains any fields that seal the block (such as mining proof)
uncles
An array of uncle hashes
transactions
An array of transaction objects - please see eth_getTransactionByHash for exact shape
size
The size of this block in bytes as an Integer value encoded as hexadecimal
mixHash
A string of a 256-bit hash encoded as a hexadecimal
nonce
The hash of the generated proof-of-work. null if pending
Request
1curl https://docs-demo.abstract-testnet.quiknode.pro/ \2-X POST \3-H "Content-Type: application/json" \4--data '{"method":"eth_getBlockByNumber","params":["0xa2129",false],"id":1,"jsonrpc":"2.0"}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free