Skip to main content

eth_getBlockByNumber RPC Method

Returns information of the block matching the given block number.

Updated on
Dec 4, 2024

eth_getBlockByNumber RPC Method

To use the eth_getBlockByNumber method on the C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

Parameters

blockNumber/tag
string
REQUIRED
The block number in hexadecimal format or the string latest, earliest, pending, safe or finalized
transaction detail flag
REQUIRED
The method returns the full transaction objects when this value is true otherwise, it returns only the hashes of the transactions

Returns

result
object
The result containing details of the block
baseFeePerGas
string
The base fee per gas in the block, in hexadecimal
blockExtraData
string
Extra data included in the block
blockGasCost
string
The gas cost of the block, in hexadecimal
difficulty
string
The difficulty of the block, in hexadecimal
extDataGasUsed
string
Gas used for external data in the block
extDataHash
string
Hash of the external data in the block
extraData
string
Extra data field of the block
gasLimit
string
The gas limit for the block, in hexadecimal
gasUsed
string
The total gas used by transactions in the block
hash
string
The hash of the block
logsBloom
string
The bloom filter for the logs in the block
miner
string
The address of the miner who mined the block
mixHash
string
The mix hash used for the block
nonce
string
The block nonce
number
string
The block number in hexadecimal
parentHash
string
The hash of the parent block
receiptsRoot
string
The root hash of the receipts trie
sha3Uncles
string
The SHA3 hash of the uncles list
size
string
The size of the block, in hexadecimal
stateRoot
string
The root hash of the state trie after this block
timestamp
string
The timestamp of the block, in hexadecimal
totalDifficulty
string
The total difficulty of the chain up to this block
transactions
array
The list of transactions in the block
transactionHash
string
The hash of a transaction
transactionsRoot
string
The root hash of the transactions trie
uncles
array
The list of uncle blocks included in this block
Request
1
curl https://docs-demo.flare-mainnet.quiknode.pro/ext/bc/C/rpc \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method":"eth_getBlockByNumber","params":["0xc5043f",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