Polygon
Polygon
Polygon
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getUncleCountByBlockHash returns the number of uncle blocks referenced by the block identified by a given hash, as a hex string. On Polygon — the MATIC-powered PoS chain reachable at https://polygon.therpc.io/YOUR_API_KEY (chain ID 137, 0x89) — that count is always "0x0", because the Bor/Heimdall Proof-of-Stake consensus and its L1 checkpoints never produce uncles. The method is retained for Ethereum JSON-RPC compatibility so that wallets, indexers, and libraries expecting the full standard interface continue to function against Polygon.
eth_getUncleByBlockHashAndIndex; on Polygon the count is always "0x0", so that follow-up is never needed.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | نعم | The hash of the block to count uncles in. |
| النوع | الوصف |
|---|---|
| string (hex) | Hex-encoded uncle count (always "0x0", "0x1", or "0x2" on PoW chains; "0x0" on PoS). |
Try it live in the Polygon playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block hash is malformed. |
"0x0"; the method only carries non-zero values on historical Proof-of-Work data from other chains, so do not build Polygon logic that expects a positive count.null rather than "0x0" — distinguish "block not found" (null) from "block has zero uncles" ("0x0") when handling the response.المعاملات
0x-prefixed 32-byte block hash