Base
Base
Base
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
eth_getUncleCountByBlockHash returns the number of uncle blocks referenced by the block identified by a given hash, encoded as a hex string. Base — Coinbase's OP Stack optimistic rollup that pays gas in ETH — implements this standard eth-namespace method so Ethereum tooling runs without modification. In practice the answer on Base is always 0x0: blocks are sealed by a single sequencer roughly every 2 seconds, so no competing blocks become uncles. Send the request to https://base.therpc.io/YOUR_API_KEY (Base mainnet, chain ID 8453 / 0x2105) and you will get 0x0 for every valid block hash.
eth_getUncleByBlockHashAndIndex; on Base the count is always 0x0, so the follow-up call 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 Base playground.
| الكود | الرسالة | السبب |
|---|---|---|
-32602 | Invalid params | Block hash is malformed. |
0x0 because its OP Stack sequencer produces no uncles; this method is only meaningful for historical proof-of-work data on other chains, not for Base activity.null rather than 0x0, so distinguish "block has zero uncles" from "block not found" when parsing the response.المعاملات
0x-prefixed 32-byte block hash