Class: Float

Inherits:
Object
  • Object
show all
Defined in:
lib/solidity/typed/integer.rb

Instance Method Summary collapse

Instance Method Details

#e18Object



46
# File 'lib/solidity/typed/integer.rb', line 46

def e18() (self *10**18).to_i; end

#e24Object

note: add e6 (zeros) after conversion to int 21e24.to_i = 20999999999999999110807552 !!!! 21.0.e24 = 21000000000000000000000000



51
# File 'lib/solidity/typed/integer.rb', line 51

def e24() (self *10**18).to_i.e6; end

#etherObject Also known as: eth

use alias_method :ether, :e18 - why? why not?



54
# File 'lib/solidity/typed/integer.rb', line 54

def ether() (self *10**18).to_i; end