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_getUncleByBlockNumberAndIndex is the height-based counterpart to the hash variant: on proof-of-work chains it returns the uncle (ommer) block header at a given index within the block at a specified height or block tag. On the Avalanche C-Chain (chain ID 43114, fees paid in AVAX), blocks are finalized by the Snowman/Avalanche BFT protocol rather than mined competitively, so no uncle blocks ever exist and this method returns null at every height — including latest. It remains exposed at https://avalanche.therpc.io/YOUR_API_KEY so standard EVM clients that probe for uncles keep working against the C-Chain.
null for every block, since Avalanche produces no uncles.earliest: convenient for height-based access in general, but on the C-Chain there are no uncle headers to retrieve at any height; use eth_getBlockByNumber for the canonical header instead.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockTag | string | Oui | The block that references the uncle. |
| 2 | uncleIndex | string (hex) | Oui | Zero-based index of the uncle within the block's uncles array. |
| Type | Description |
|---|---|
| object | null | Same uncle header object as eth_getUncleByBlockHashAndIndex. Returns null if not found. |
Try it live in the Avalanche playground.
| Code | Message | Cause |
|---|---|---|
-32602 | Invalid params | Block tag or uncle index is malformed. |
null for recent blocks and for latest alike — do not treat an empty result as an error.Paramètres
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0")