Avalanche
Avalanche
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Avalanche
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. On the Avalanche C-Chain (chain ID 43114, gas paid in AVAX), that count is always 0x0: the chain reaches consensus through the Snowman/Avalanche BFT protocol rather than proof-of-work mining, so blocks never reference uncles (ommers). The method stays available at https://avalanche.therpc.io/YOUR_API_KEY for compatibility with EVM clients and indexers that expect the full Ethereum JSON-RPC method set, but on this chain it is effectively a constant 0x0.
eth_getUncleByBlockHashAndIndex: on the C-Chain the count is always 0x0, so you can skip the follow-up call entirely.0x0 uncle count across all blocks; track finality time or block production instead.| # | 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 Avalanche playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Block hash is malformed. |
0x0 here; there is no historical era on this chain where the count is non-zero.null rather than 0x0 — distinguish "unknown block" (null) from "known block, no uncles" (0x0) when handling the response.Parámetros
0x-prefixed 32-byte block hash