Skip to main content

eth_getBlockTransactionCountByHash

Ethereum API

Returns the number of transactions in a block from a block matching the given block hash.

Params

(1)

1. Block hash (required)

string
Match pattern:
^0x[0-9a-f]{64}$

Result

(Transaction count)
(one of)
null

Params

Block hash


Request

await window.ethereum.request({
"method": "eth_getBlockTransactionCountByHash",
"params": [
null
]
});