Method: EvmClient::Formatter#to_int
- Defined in:
- lib/evm_client/formatter.rb
#to_int(hexstring) ⇒ Object
101 102 103 104 |
# File 'lib/evm_client/formatter.rb', line 101 def to_int(hexstring) return nil if hexstring.nil? (hexstring.gsub(/^0x/,'')[0..1] == "ff") ? (hexstring.hex - (2 ** 256)) : hexstring.hex end |