BNB Smart Chain
BNB Smart Chain
BNB Smart Chain
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
Ask for an uncle tally on chain 56 and the answer is fixed before you send the request: 0x0. BNB Smart Chain spends BNB for gas and runs PoSA consensus, whose deterministic fast-finality block production never leaves orphaned siblings behind. Sent to https://bsc.therpc.io/YOUR_API_KEY, eth_getUncleCountByBlockHash reports how many ommers a block (named by its hash) references. The PoSA validator schedule accepts exactly one block per slot, which pins that figure at zero, so the method lives on here as an Ethereum-compatibility shim that always answers 0x0.
eth_getUncleByBlockHashAndIndex; on chain 56 the 0x0 answer lets you skip those follow-ups entirely.| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 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 BNB Smart Chain playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-32602 | Invalid params | Block hash is malformed. |
0x0; the method only ever carries meaningful counts on legacy PoW chains, so treat any non-zero expectation as a bug in your assumptions.null rather than 0x0 — distinguish "block absent" from "block present with zero uncles" before acting.参数
0x-prefixed 32-byte block hash