Base
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Base
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | blockTag | string | Sim | The block to count uncles in. |
| Tipo | Descrição |
|---|---|
| string (hex) | Hex-encoded uncle count. |
Try it live in the Base playground.
| Código | Mensagem | 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"