Module: EtherUnits
- Included in:
- Integer
- Defined in:
- lib/units-money.rb
Instance Method Summary collapse
- #ether ⇒ Object (also: #eth)
- #gwei ⇒ Object (also: #shannon)
- #kwei ⇒ Object (also: #babbage)
- #microether ⇒ Object (also: #szabo, #microeth, #micro)
- #milliether ⇒ Object (also: #finney, #millieth, #milli)
- #mwei ⇒ Object (also: #lovelace)
-
#wei ⇒ Object
Ethereum money units.
Instance Method Details
#ether ⇒ Object Also known as: eth
90 |
# File 'lib/units-money.rb', line 90 def ether() self * e18; end |
#gwei ⇒ Object Also known as: shannon
87 |
# File 'lib/units-money.rb', line 87 def gwei() self * e9; end |
#kwei ⇒ Object Also known as: babbage
85 |
# File 'lib/units-money.rb', line 85 def kwei() self * e3; end |
#microether ⇒ Object Also known as: szabo, microeth, micro
88 |
# File 'lib/units-money.rb', line 88 def microether() self * e12; end |
#milliether ⇒ Object Also known as: finney, millieth, milli
89 |
# File 'lib/units-money.rb', line 89 def milliether() self * e15; end |
#mwei ⇒ Object Also known as: lovelace
86 |
# File 'lib/units-money.rb', line 86 def mwei() self * e6; end |
#wei ⇒ Object
Ethereum money units
wei 1 wei | 1
kwei (babbage) 1e3 wei | 1_000
mwei (lovelace) 1e6 wei | 1_000_000
gwei (shannon) 1e9 wei | 1_000_000_000
microether (szabo) 1e12 wei | 1_000_000_000_000
milliether (finney) 1e15 wei | 1_000_000_000_000_000
ether 1e18 wei | 1_000_000_000_000_000_000
Names in Honor:
wei => Wei Dai
lovelace => Ada Lovelace (1815-1852)
babbage => Charles Babbage (1791-1871)
shannon => Claude Shannon (1916-2001)
szabo => Nick Szabo
finney => Hal Finney (1956-2014)
84 |
# File 'lib/units-money.rb', line 84 def wei() self; end |