Optimism
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Optimism
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getUncleCountByBlockNumber returns the number of uncle blocks referenced by the block at a given height or block tag. On OP Mainnet — the ETH-gas OP Stack rollup at chain ID 10 (0xa) that settles to Ethereum L1 — that count is always 0x0. The chain is built by a single sequencer with no proof-of-work competition, so no orphaned sibling blocks ever become uncles. Point the call at https://optimism.therpc.io/YOUR_API_KEY with any height or tag such as latest, and it returns zero uncles; the method is retained purely for Ethereum JSON-RPC compatibility.
0x0, so the resulting rate is flat zero.eth_getUncleByBlockNumberAndIndex — though on OP Mainnet the 0x0 answer tells you upfront there are no uncle details to fetch.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockTag | string | نعم | The block to count uncles in. |
| النوع | الوصف |
|---|---|
| string (hex) | Hex-encoded uncle count. |
Try it live in the Optimism playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
0x0 regardless of which block or tag you query — its OP Stack consensus produces no uncles, so never branch on a non-zero count here."0x0"), not a number — parse it (for example parseInt(result, 16)) before doing any numeric comparison.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"