Marketplace has launched, further enabling blockchain developers! Learn more


eth_getBlockTransactionCountByHash RPC method

The eth_getBlockTransactionCountByHash EVM method is only supported on the Avalanche C-Chain.


  1. Hash - Hash of the block.


  1. Result - Integer number of transactions in the block.

Code Examples:

To use the eth_getBlockTransactionCountByHash EVM method on the Avalanche C-Chain, ensure that the end of your URL includes ext/bc/C/rpc.

require 'ethereum.rb'
client ='')
txCount = client.eth_get_block_transaction_count_by_hash('0x829df9bb801fc0494abf2f443423a49ffa32964554db71b098d332d87b70a48b')
puts txCount["result"].to_i(16)
Ready to get started? Create a free account