Contents

eth_getTransactionCount RPC method

Parameters:

  1. Address - The address you want a transaction count from.
  2. Quantity or Tag - (optional) Integer block number encoded as a hexadecimal, or the string 'latest', 'earliest' or 'pending', see the default block parameter.

Returns:

  1. Result - Integer number of transactions sent from an address encoded as a hexadecimal.

Code Examples:

require 'ethereum.rb'
client = Ethereum::HttpClient.new('http://sample-endpoint-name.network.quiknode.pro/token-goes-here/')
txcount = client.eth_get_transaction_count('0x8D97689C9818892B700e27F316cc3E41e17fBeb9', 'latest')
puts txcount["result"].to_i(16)
Ready to try QuickNode? Start your 7-day free trial