eth_getBlockTransactionCount
Returns the number of transactions in a block with given block number
Last updated
Returns the number of transactions in a block with given block number
Last updated
web3.eth.getBlockTransactionCount(blockHashOrBlockNumber [, callback])
The block number or hash. Or the string "earliest"
, "latest"
or "pending"
as in the default block parameter.
(optional) Optional callback, returns an error object as first parameter and the result as second.
The number of transactions in the given block.
> web3.eth.getBlockTransactionCount(43458).then(console.log)
> 0