Documentation
¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringToWei ¶
StringToWei turns a string in to number of Wei. The string can be a simple number of Wei, e.g. "1000000000000000" or it can be a number followed by a unit, e.g. "10 ether". Unit names are case-insensitive, and can be either given names (e.g. "finney") or metric names (e.g. "mlliether"). Note that this function expects use of the period as the decimal separator.
func UnitToMultiplier ¶
UnitToMultiplier takes the name of an Ethereum unit and returns a multiplier
from Wei
Example ¶
multiplier, err := UnitToMultiplier("ether") if err != nil { return } fmt.Println(multiplier.Text(10))
Output: 1000000000000000000
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.