class Harmony::Api::Utilities

Public Class Methods

hex_to_int(string) click to toggle source
# File lib/harmony/api/utilities.rb, line 7
def hex_to_int(string)
  string.to_i(16)
end
int_to_hex(int) click to toggle source
# File lib/harmony/api/utilities.rb, line 11
def int_to_hex(int)
  "0x#{int.to_s(16)}"
end
wei_to_ether(wei) click to toggle source
# File lib/harmony/api/utilities.rb, line 15
def wei_to_ether(wei)
  1.0 * wei / 10**18
end