Polygon
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getUncleByBlockNumberAndIndex returns the header of an uncle (ommer) block at a given index inside the block at a specified height or block tag. It is the height-based twin of eth_getUncleByBlockHashAndIndex and exists on Polygon — the MATIC-fueled PoS chain at https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89) — purely for Ethereum JSON-RPC compatibility. Polygon's Bor/Heimdall Proof-of-Stake consensus with L1 checkpoints does not create uncle blocks, so on this network the call returns null at every height. It stays in the interface so standard Ethereum tooling keeps working unmodified.
null, so this loop reports no uncles by design."earliest" let you reach genesis-era data without first resolving a hash — handy in generic tooling, though on Polygon the result here is still null and you would read the canonical block with eth_getBlockByNumber instead.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 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 Polygon playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block tag or uncle index is malformed. |
null for recent blocks — and in fact for every height. A null here is the expected result on Polygon, not a sign of a missing block or a bad request.المعاملات
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"
0x-prefixed hex integer (e.g. "0x0")