ethCon: Convert Ethereum Denominations

Description Usage Arguments Details Value Examples

View source: R/converters.R

Description

Convert Ethereum Denominations

Usage

1
ethCon(x, from, to)

Arguments

x

numeric, number to be converted

from

character, 2 letter short notation to convert from (see details)

to

character, 2 letter short notation to convert to (see details)

Details

This function returns a Multiple Precision Floating-Point Reliable number (implemented by the Rmpfr package). This is to allow for the conersion of very high values of Wei into other forms. This can then be converted to numeric, integer or double as required at the expense of accuracy. WARNING do not use this in calculating values to transact actual ether as the precision is not guaranteed currently. This is intended for indicative conversions when parsing data from the Ethereum blockchain.

Denomination short codes:
wei = we, Kwei = kw, Mwei = mw, Gwei = gw
szabo = sz, finney = fi, ether = et
Kether = ke, Mether = me,Gether = ge, Tether = te

Value

mpfr converted value (see details)

Examples

1
2
ethCon(15000000000000000, "we", "et")
ethCon(1000000000, "et", "me")

BSDStudios/ethr documentation built on May 5, 2019, 10:26 a.m.