Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
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.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Optimism playground.
| الكود | الرسالة | السبب |
|---|---|---|
-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.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0")