Avalanche
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Avalanche
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Oui | The hash of the block to count uncles in. |
| Type | Description |
|---|---|
| string (hex) | Hex-encoded uncle count (always "0x0", "0x1", or "0x2" on PoW chains; "0x0" on PoS). |
Try it live in the Avalanche playground.
| Code | Message | Cause |
|---|---|---|
-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.Paramètres
0x-prefixed 32-byte block hash