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.
eth_getBlockTransactionCountByNumber answers a narrow question cheaply: how many transactions sit in the block at a given height or named tag? BNB Smart Chain finalizes new blocks about every three seconds under PoSA and pays its fees in BNB. You pass either a hex block number or a label like latest, safe, or finalized, and receive the count as a hex integer without downloading the full block body. Send the request to https://bsc.therpc.io/YOUR_API_KEY on chain ID 56 whenever you want block fullness but not the transactions themselves.
latest block and watching how its transaction count rises and falls.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockTag | string | Sí | The block to count transactions in. |
| Tipo | Descripción |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the BNB Smart Chain playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Block tag is malformed or unrecognised. |
pending tag counts transactions the node is currently queuing for the next BSC block, so the figure can shift from one call to the next.0x9c; run it through parseInt(value, 16) before doing any numeric comparison or arithmetic.Parámetros
hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"