Arbitrum One
Arbitrum One
Arbitrum One
免费套餐涵盖个人项目。按量付费,无需绑卡即可扩展。
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.
| # | 名称 | 类型 | 必填 | 描述 |
|---|---|---|---|---|
| 1 | blockHash | string (hex) | 是 | The hash of the block to count transactions in. |
| 类型 | 描述 |
|---|---|
| string (hex) | Hex-encoded transaction count. "0x0" means the block is empty. |
Try it live in the Arbitrum One playground.
| 错误码 | 错误信息 | 原因 |
|---|---|---|
-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.参数
0x-prefixed 32-byte block hash