Avalanche
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Avalanche
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockTag | string | 是 | The block that references the uncle. |
| 2 | uncleIndex | string (hex) | 是 | Zero-based index of the uncle within the block's uncles array. |
| 类型 | 描述 |
|---|---|
| object | null | Same uncle header object as eth_getUncleByBlockHashAndIndex. Returns null if not found. |
Try it live in the Avalanche playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-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.参数
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0")