eth
eth_getBlockTransactionCountByHash
Returns the number of transactions in a block identified by block hash.
Returns the number of transactions in a block identified by block hash.
Parameters
| # | Type | Description |
|---|---|---|
| 1 | string | Block hash (32-byte hex). |
Returns
| Type | Description |
|---|---|
string | Transaction count (hex). |
Example
curl -s -X POST https://rpc.pulsechain.box \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0x9ce9d9c533b1e3d23f5a67f999fd0848f23d3837c12ca0296f134bcfe2074008"],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x16"
}
TRY IT
Notes
- Complement to
eth_getBlockTransactionCountByNumber— same data, different lookup key. - Returns
nullif the block hash is not found.
