Base
Base
Base
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
eth_getBlockByHash returns the full block data for the block identified by a given 32-byte hash. Base is Coinbase's OP Stack rollup that uses ETH for gas and produces a block roughly every 2 seconds, so a single hash uniquely pins one L2 block. Send the hash to https://base.therpc.io/YOUR_API_KEY (chain ID 8453) along with a boolean choosing full transaction objects or just hashes, and the node returns the header fields, gas metrics, withdrawals, and transaction list — or null if it has never seen that hash.
blockHash from a transaction receipt.gasUsed, gasLimit, baseFeePerGas), and header fields for a specific canonical Base block.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Oui | The hash of the block to retrieve. |
| 2 | includeTransactions | boolean | Oui | When true, transactions[] contains full transaction objects. When false, only hashes. |
| Type | Description |
|---|---|
| object | null | Block object with fields: number, hash, parentHash, timestamp, miner, gasUsed, gasLimit, baseFeePerGas, transactions, uncles, withdrawals, stateRoot, receiptsRoot, transactionsRoot, logsBloom, extraData, size, difficulty, totalDifficulty, mixHash, nonce, sha3Uncles. Returns null if no block was foun |
Try it live in the Base playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block hash is malformed or not 32 bytes. |
includeTransactions, not the string "true" — the type matters and a string will be rejected or misread.includeTransactions=true, a busy Base block packed with DEX swaps can push the response past 1 MB; stream or fall back to hashes-only if bandwidth is constrained.null for a hash the node has never seen — always null-check before reading fields off the result.Paramètres
0x-prefixed 32-byte block hash
true = full tx objects, false = tx hashes only