BNB Smart Chain
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
BNB Smart Chain
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | blockTag | string | Sim | The block to count transactions in. |
| Tipo | Descrição |
|---|---|
| string (hex) | Hex-encoded transaction count. |
Try it live in the BNB Smart Chain playground.
| Código | Mensagem | 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"