Method: Eth::Client#get_balance

Defined in:
lib/eth/client.rb

#get_balance(address) ⇒ Integer

Gets the balance for an address.

Parameters:

  • address (Eth::Address)

    the address to get the balance for.

Returns:

  • (Integer)

    the balance in Wei.



107
108
109
# File 'lib/eth/client.rb', line 107

def get_balance(address)
  eth_get_balance(address)["result"].to_i 16
end