eth_getBlockTransactionCountByHash

The eth_getBlockTransactionCountByHash method returns the number of transactions in a block from a block matching the given block hash on the Optimism network. Identical to eth_getBlockTransactionCountByNumber but uses the block hash as the identifier, providing certainty about which specific block you're querying even in cases of chain reorganizations.


Parameters

parameter
type
description
blockHash
string (required)
Hash of the block (32 bytes)
Return Object

The method returns the number of transactions in the block.

Request Example
Request
Response Example
Response

Share on
Share on FacebookShare on XShare on LinkedIn
Did you find this page useful?