Skip to main content

eth_getBlockByHash

Retrieves comprehensive information about a block on Celo by its hash identifier, including header data, transaction lists, and execution metrics.

Parameters​

ParameterTypeRequiredDescription
blockHashstringYesThe 32-byte block hash (66 characters with 0x prefix)
fullTransactionObjectsbooleanYesWhen true, returns complete transaction objects. When false, returns only transaction hashes

Returns​

Returns a block object with the following fields:

FieldTypeDescription
numberstringBlock number in hexadecimal
hashstring32-byte block hash
parentHashstringHash of the parent block
noncestringProof-of-work nonce (always 0x0000000000000000 on Celo)
sha3UnclesstringSHA3 hash of uncles data
logsBloomstring256-byte bloom filter for block logs
transactionsRootstringRoot hash of the transaction trie
stateRootstringRoot hash of the final state trie
receiptsRootstringRoot hash of the receipts trie
minerstringAddress receiving block rewards
difficultystringBlock difficulty (always 0x0 on Celo)
totalDifficultystringTotal chain difficulty up to this block
extraDatastringAdditional block-specific data
sizestringBlock size in bytes (hexadecimal)
gasLimitstringMaximum gas allowed in block
gasUsedstringTotal gas consumed by all transactions
timestampstringUnix timestamp of block creation
transactionsarrayArray of transaction hashes or full transaction objects
unclesarrayArray of uncle block hashes (always empty on Celo)
celoFeePerGasstringCelo fee per gas unit (EIP-1559)
withdrawalsarrayValidator withdrawals (if applicable)
withdrawalsRootstringRoot hash of withdrawals trie

Implementation Example​

curl -X POST https://api-celo-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByHash",
"params": [
"0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd",
false
],
"id": 1
}'

Response Example​

{
"jsonrpc": "2.0",
"id": 1,
"result": {
"celoFeePerGas": "0x2da282a8",
"difficulty": "0x0",
"extraData": "0x",
"gasLimit": "0x1c9c380",
"gasUsed": "0x3b9aca",
"hash": "0x4e3a3754410177e6937ef1f84bba68ea139e8d1a2258c5f85db9f1cd715a1bdd",
"logsBloom": "0x00000000000000000000000000000000...",
"miner": "0x4200000000000000000000000000000000000011",
"nonce": "0x0000000000000000",
"number": "0x5bad55",
"parentHash": "0xb4fbadf8ea452b139718e2700dc1135cfc81145031c84b7ab27cd99f43ec28ca",
"receiptsRoot": "0x9b0816dba2e4c1c7b2d38d0c3da6e6bb93c1713a7e986e38f856b6fb725234cf",
"sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
"size": "0x21d",
"stateRoot": "0xddc8b0234248b014296fed29c5c0e9d6e5a6e4a0576ce66970a36c064e3cd96b",
"timestamp": "0x5e0be0ff",
"totalDifficulty": "0x0",
"transactions": [
"0x5d2dd8b32dc30f347120c5877975c93ccf3e5a5c9ad0c595b0a73c3e00c9e9bb",
"0x8a91b1b37e0e463c27cb340dc0e2cbc5636cba8d9b3e9a66c2a9e6c3f8c65e82"
],
"transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
"uncles": []
}
}

Need help? Contact our support team or check the Celo documentation.