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_getUncleByBlockHashAndIndex is the Ethereum JSON-RPC call that, on proof-of-work chains, returns the uncle (ommer) block header at a given index within the block identified by a hash. On the Avalanche C-Chain (chain ID 43114, gas paid in AVAX) it is part of the standard EVM API surface but has no real data to return: blocks are produced under the Snowman/Avalanche BFT consensus, not by competing miners, so the chain never creates uncle blocks. As a result this method returns null for every block. The endpoint is https://avalanche.therpc.io/YOUR_API_KEY; the call exists purely so EVM tooling that expects it continues to work against the C-Chain.
null.null; for header research, fetch the canonical block header instead with eth_getBlockByHash.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Sí | The hash of the block that references the uncle. |
| 2 | uncleIndex | string (hex) | Sí | Zero-based index of the uncle within the block's uncles array. |
| Tipo | Descripción |
|---|---|
| object | null | Block header object (no transactions array): number, hash, parentHash, sha3Uncles, miner, stateRoot, transactionsRoot, receiptsRoot, logsBloom, difficulty, gasLimit, gasUsed, timestamp, extraData, mixHash, nonce. Returns null if not found. |
Try it live in the Avalanche playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Block hash or uncle index is malformed. |
null for any block hash and uncle index, including the most recent blocks.0x0, 0x2, or any other index all return null on Avalanche. Use eth_getBlockByHash for real block header data.Parámetros
0x-prefixed 32-byte block hash
0x-prefixed hex integer (e.g. "0x0")