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_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.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Sí | The hash of the block to count uncles in. |
| Tipo | Descripción |
|---|---|
| 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 | Mensaje | 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