BNB Smart Chain
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
BNB Smart Chain
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Chain ID 56 finalizes one canonical block per PoSA slot in roughly three seconds, paying gas in BNB, and never accumulates competing sibling blocks along the way. eth_getUncleCountByBlockNumber, issued against https://bsc.therpc.io/YOUR_API_KEY, is documented to count the ommers a block references when you address that block by height or by a tag like latest. Whether you name the block by number or by hash makes no difference to the result. PoSA forks no uncles, so this variant stays an Ethereum-compatibility shim that hands back 0x0 at every height you ask about.
eth_getUncleByBlockNumberAndIndex; a 0x0 count tells you up front there is nothing further to fetch at that height.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockTag | string | Sí | The block to count uncles in. |
| Tipo | Descripción |
|---|---|
| string (hex) | Hex-encoded uncle count. |
Try it live in the BNB Smart Chain playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
0x0 for every height regardless of which block you name, so never branch on the expectation of a positive count.0x0 to a number before any numeric comparison or you risk comparing strings by accident.Parámetros
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"