Base
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Base
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_getUncleCountByBlockNumber returns the number of uncle blocks referenced by the block at a given height or block tag (such as "latest" or "finalized"), as a hex string. Base — Coinbase's ETH-gas OP Stack rollup settling to Ethereum L1 — ships this method for full eth-namespace compatibility, but its single sequencer produces one canonical block roughly every 2 seconds with no competing forks, so the count is always 0x0. Query https://base.therpc.io/YOUR_API_KEY (Base mainnet, chain ID 8453 / 0x2105) at any height and the response will be 0x0.
0x0, so the computed rate is flat zero across the whole range.eth_getUncleByBlockNumberAndIndex; since Base always reports 0x0, the detail call can be skipped entirely.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockTag | string | Sí | The block to count uncles in. |
| Tipo | Descripción |
|---|---|
| string (hex) | Hex-encoded uncle count. |
Try it live in the Base playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
0x0 regardless of which block or tag you query, because its OP Stack sequencer never produces uncles — do not build logic that expects a non-zero count here."0x0"), not a number; parse it with parseInt(value, 16) or your library's hex helper before any numeric comparison.Parámetros
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"