Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getUncleByBlockHashAndIndex is the standard Ethereum JSON-RPC call for fetching the uncle (ommer) block header at a given index inside the block identified by hash. On OP Mainnet — the ETH-gas OP Stack rollup at chain ID 10 (0xa) — the method exists for compatibility but always returns null: a single sequencer produces blocks deterministically with no proof-of-work race, so there are no competing siblings and therefore no uncles to reference. The endpoint https://optimism.therpc.io/YOUR_API_KEY accepts the call and responds with null for any block hash and index.
null rather than any rate data.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | نعم | The hash of the block that references the uncle. |
| 2 | uncleIndex | string (hex) | نعم | Zero-based index of the uncle within the block's uncles array. |
| النوع | الوصف |
|---|---|
| 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 Optimism playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block hash or uncle index is malformed. |
null regardless of the block hash or index you pass.0x2 and above always returned null. On OP Mainnet every index — including 0x0 — returns null, so do not treat a null here as a malformed request.المعاملات
0x-prefixed 32-byte block hash
0x-prefixed hex integer (e.g. "0x0")