Base
Base
Base
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_blockNumber returns the height of the most recently accepted block on Base — the OP Stack rollup built by Coinbase, where ETH is the gas token and the sequencer produces a new block roughly every 2 seconds. Point it at https://base.therpc.io/YOUR_API_KEY (chain ID 8453) and it answers with the current L2 tip as a hex integer, with no parameters required. It is the lightest call in the JSON-RPC surface, which makes it the natural first ping when you want to know how far Base has advanced.
eth_getLogs ranges so you never request blocks past the tip.Este método no acepta parámetros. Pasa un array vacío [].
| Tipo | Descripción |
|---|---|
| string (hex) | Hex-encoded integer block number. Parse with parseInt(value, 16) or BigInt(value). |
Try it live in the Base playground.
| Código | Mensaje | Causa |
|---|---|---|
-32603 | Internal error | Node is not reachable or has not yet produced any block. |
"0xabc123", not a number — run it through parseInt(value, 16) or BigInt(value) before any arithmetic.