Arbitrum One
Arbitrum One
Arbitrum One
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_getBlockTransactionCountByHash returns the number of transactions in the Arbitrum One block identified by a given 32-byte hash. It is a lightweight way to gauge how full an L2 block is without downloading the full block body — useful on this ETH-gas Optimistic Rollup where the Nitro sequencer packs blocks quickly. Send the hash to https://arbitrum.therpc.io/YOUR_API_KEY (chain ID 42161) and parse the hex count from the response.
| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | Sí | The hash of the block to count transactions in. |
| Tipo | Descripción |
|---|---|
| string (hex) | Hex-encoded transaction count. "0x0" means the block is empty. |
Try it live in the Arbitrum One playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | Invalid params | Block hash is malformed or not 32 bytes. |
null when the block hash is not found on the node — null-check before running parseInt, or you will get NaN.eth_getBlockTransactionCountByNumber instead.Parámetros
0x-prefixed 32-byte block hash