erigon
erigon_getHeaderByNumber
Returns the block header for a given block number as a JSON object.
Returns the block header for a given block number as a JSON object.
Parameters
| # | Type | Description |
|---|---|---|
| 1 | string | Block number as hex string. |
Returns
| Field | Type | Description |
|---|---|---|
parentHash | string | Hash of the parent block. |
sha3Uncles | string | SHA3 hash of the uncles list. |
miner | string | Address of the block producer. |
stateRoot | string | Root hash of the state trie. |
transactionsRoot | string | Root hash of the transactions trie. |
receiptsRoot | string | Root hash of the receipts trie. |
logsBloom | string | Bloom filter for log entries. |
difficulty | string | Block difficulty (hex). |
number | string | Block number (hex). |
gasLimit | string | Maximum gas allowed in the block (hex). |
gasUsed | string | Total gas used by all transactions (hex). |
timestamp | string | Unix timestamp of the block (hex). |
extraData | string | Extra data field. |
mixHash | string | Mix hash used for proof-of-work verification. |
nonce | string | Proof-of-work nonce. |
baseFeePerGas | string | Base fee per gas (EIP-1559, hex). |
hash | string | Block hash. |
Example
curl -s -X POST https://rpc.pulsechain.box \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "erigon_getHeaderByNumber",
"params": ["0x100"],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"parentHash": "0x...",
"sha3Uncles": "0x...",
"miner": "0x...",
"stateRoot": "0x...",
"transactionsRoot": "0x...",
"receiptsRoot": "0x...",
"logsBloom": "0x...",
"difficulty": "0x0",
"number": "0x100",
"gasLimit": "0x...",
"gasUsed": "0x...",
"timestamp": "0x...",
"extraData": "0x...",
"mixHash": "0x...",
"nonce": "0x0000000000000000",
"baseFeePerGas": "0x...",
"hash": "0x..."
}
}
TRY IT
Notes
- This is equivalent to calling
eth_getBlockByNumberwithfalsefor full transactions, but returns only the header fields without the transactions array or uncles array. - On PulseChain (proof-of-stake),
difficultyis"0x0"andnonceis"0x0000000000000000". - This method is more efficient than fetching a full block when you only need header data.
