EVM
eth_getBlockTransactionCountByHash
Summary: Get number of transactions by hash
This request returns the number of transactions from the block matching the given block hash.
Parameters
blockHash string
A string representing the hash (32 bytes) of a block.
Pattern: ^0x[0-9a-f]{64}$
Returns
The number of transactions in the block in hexadecimal, or
null
if no matching block hash is found.
eth_getBlockTransactionCountByHashResponse oneOf
Customize request
Parameter
Value
Request
curl https://linea-mainnet.infura.io/v3/<YOUR-API-KEY> \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockTransactionCountByHash",
"params": ["0xd459570b5d2994a81ec1875b058f665b7f9c006172a8bd2860de87aee9569ac8"],
"id": 1
}'
Example response
{
"id": 1,
"jsonrpc": "2.0",
"result": "0x21"
}