Block Methods
8 methods for querying block data, receipts, and transaction counts.Overview
Block methods provide access to block headers, full blocks, transaction receipts, and metadata. Use these methods to query blockchain state at specific block heights or hashes.Methods
eth_blockNumber
eth_blockNumber
Get the most recent block number.Returns:
Quantityeth_getBlockByNumber
eth_getBlockByNumber
Get block by number with full transactions or hashes.Parameters:
Returns:
Blocketh_getBlockByHash
eth_getBlockByHash
Get block by hash with full transactions or hashes.Parameters:
Returns:
Blocketh_getBlockReceipts
eth_getBlockReceipts
Get all transaction receipts for a block.Parameters:
Returns:
TransactionReceipt[]eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByHash
Get transaction count in a block by hash.Parameters:
Returns:
Quantityeth_getBlockTransactionCountByNumber
eth_getBlockTransactionCountByNumber
Get transaction count in a block by number.Parameters:
Returns:
Quantityeth_getUncleCountByBlockHash
eth_getUncleCountByBlockHash
Get uncle count for a block by hash.Parameters:
Returns:
QuantityUncle blocks were removed in Ethereum’s transition to Proof of Stake (The Merge). This method returns 0 for post-merge blocks.
eth_getUncleCountByBlockNumber
eth_getUncleCountByBlockNumber
Get uncle count for a block by number.Parameters:
Returns:
QuantityUncle blocks were removed in Ethereum’s transition to Proof of Stake (The Merge). This method returns 0 for post-merge blocks.
Usage Patterns
Get Latest Block with Transactions
Query Historical Block
Check Block Finality
Related
- eth Methods - All eth namespace methods
- Transaction Methods - Transaction queries and submission
- State Methods - Account and storage queries
- Block JSON-RPC Types - Block type definitions

