Arbitrum One
准备好在生产环境中调用了吗?
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Arbitrum One
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
eth_getUncleCountByBlockNumber returns the number of uncle blocks referenced by the block at a given height or block tag ("latest", "earliest", "safe", "finalized", etc.), as a hex-encoded integer. On Arbitrum One — the ETH-fee Optimistic Rollup built on Nitro/ArbOS — that count is always "0x0", because the chain's single sequencer orders blocks with no proof-of-work fork race and therefore never produces ommers. It is the height-addressed counterpart of eth_getUncleCountByBlockHash, retained for Ethereum JSON-RPC compatibility. The endpoint is https://arbitrum.therpc.io/YOUR_API_KEY (chain ID 42161, 0xa4b1).
"0x0", so the computed rate is a constant zero.eth_getUncleByBlockNumberAndIndex; since Arbitrum One always reports zero, the detail fetch can be skipped.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockTag | string | 是 | The block to count uncles in. |
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded uncle count. |
Try it live in the Arbitrum One playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
"0x0" regardless of the block height or tag, the same as post-Merge proof-of-stake chains; do not build logic that expects a non-zero uncle count here."0x0", not a number — parse it (for example with parseInt(value, 16)) before any numeric comparison.参数
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"