Optimism
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Optimism
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_getUncleByBlockNumberAndIndex returns the uncle (ommer) block header at a given index inside the block at a specified height or block tag. On OP Mainnet — the ETH-gas OP Stack rollup at chain ID 10 (0xa) that settles to Ethereum L1 — this method is kept for JSON-RPC compatibility but always returns null. Blocks here are produced by a single sequencer roughly every 2 seconds with no proof-of-work competition, so no orphaned sibling blocks (uncles) are ever referenced. You can call it against https://optimism.therpc.io/YOUR_API_KEY with any height and index, and the response will be null.
null at every height because the rollup mints no uncles.earliest tag conveniently targets genesis-era blocks, but OP Mainnet's genesis and all later blocks carry no uncles, so this still yields null — the call remains available only for tooling that expects the standard method to exist.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockTag | string | Sí | 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 | Same uncle header object as eth_getUncleByBlockHashAndIndex. Returns null if not found. |
Try it live in the Optimism playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Block tag or uncle index is malformed. |
null. Do not interpret that null as the block being missing or the request being wrong.Parámetros
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0")