Optimism
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Optimism
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.| # | 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 Optimism playground.
| Code | Message | Cause |
|---|---|---|
-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.Paramètres
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0")