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:
| Parameter | Type | Description |
|---|---|---|
blockTag | BlockTag | Block to query ('latest', 'earliest', 'pending', or block number) |
fullTransactions | boolean | true for full tx objects, false for hashes only |
Blocketh_getBlockByHash
eth_getBlockByHash
Get block by hash with full transactions or hashes.Parameters:
Returns:
| Parameter | Type | Description |
|---|---|---|
blockHash | Hash | Block hash to query |
fullTransactions | boolean | true for full tx objects, false for hashes only |
Blocketh_getBlockReceipts
eth_getBlockReceipts
Get all transaction receipts for a block.Parameters:
Returns:
| Parameter | Type | Description |
|---|---|---|
blockTag | BlockTag | Block to query |
TransactionReceipt[]eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByHash
Get transaction count in a block by hash.Parameters:
Returns:
| Parameter | Type | Description |
|---|---|---|
blockHash | Hash | Block hash to query |
Quantityeth_getBlockTransactionCountByNumber
eth_getBlockTransactionCountByNumber
Get transaction count in a block by number.Parameters:
Returns:
| Parameter | Type | Description |
|---|---|---|
blockTag | BlockTag | Block to query |
Quantityeth_getUncleCountByBlockHash
eth_getUncleCountByBlockHash
Get uncle count for a block by hash.Parameters:
Returns:
| Parameter | Type | Description |
|---|---|---|
blockHash | Hash | Block hash to query |
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:
| Parameter | Type | Description |
|---|---|---|
blockTag | BlockTag | Block to query |
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

