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