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_getUncleCountByBlockHash returns the number of uncle blocks referenced by the block identified by a given hash, encoded as a hex string. Base — Coinbase's OP Stack optimistic rollup that pays gas in ETH — implements this standard eth-namespace method so Ethereum tooling runs without modification. In practice the answer on Base is always 0x0: blocks are sealed by a single sequencer roughly every 2 seconds, so no competing blocks become uncles. Send the request to https://base.therpc.io/YOUR_API_KEY (Base mainnet, chain ID 8453 / 0x2105) and you will get 0x0 for every valid block hash.
eth_getUncleByBlockHashAndIndex; on Base the count is always 0x0, so the follow-up call is never needed.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Sim | The hash of the block to count uncles in. |
| Tipo | Descrição |
|---|---|
| string (hex) | Hex-encoded uncle count (always "0x0", "0x1", or "0x2" on PoW chains; "0x0" on PoS). |
Try it live in the Base playground.
| Código | Mensagem | Causa |
|---|---|---|
-32602 | Invalid params | Block hash is malformed. |
0x0 because its OP Stack sequencer produces no uncles; this method is only meaningful for historical proof-of-work data on other chains, not for Base activity.null rather than 0x0, so distinguish "block has zero uncles" from "block not found" when parsing the response.Parâmetros
0x-prefixed 32-byte block hash