Skip to main content

eth_getBlockTransactionCountByNumber

Ethereum API

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

Params

(1)

1. Block (required)

(one of)
string
Match pattern:
^0x([1-9a-f]+[0-9a-f]*|0)$

Result

(Transaction count)
(one of)
null

Params

Block


Request

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