wad

package
v0.0.0-...-086ef7a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OneGwei *big.Int

OneGwei is a constant equal to 1 billion (1e9)

Functions

func AfToNotNegWei

func AfToNotNegWei(amount string, errp errstack.Putter) *big.Int

AfToNotNegWei takes float number in Ascii, with max 9 digits after comman and converts it to Wei. It puts an error if amount less then zero.

func AfToPosWei

func AfToPosWei(amount string, errp errstack.Putter) *big.Int

AfToPosWei takes float number in Ascii, with max 9 digits after comman and converts it to Wei. It puts an error if amount less or equal zero.

func AfToWei

func AfToWei(amount string, errp errstack.Putter) *big.Int

AfToWei takes float number in Ascii, with max 9 digits after comman and converts it to Wei.

func FToWei

func FToWei(amount float64) *big.Int

FToWei transforms float64 coin 1e18 denominated into wei.

func GweiToWei

func GweiToWei(n uint64) *big.Int

GweiToWei converts gwei to wei amount

func ToWei

func ToWei(amount uint64) *big.Int

ToWei converts integer (Ether units) to wei

func WeiToGwei

func WeiToGwei(wei *big.Int) uint64

WeiToGwei return wei in Gwei, skipping decimal digits

func WeiToInt

func WeiToInt(wei *big.Int) uint64

WeiToInt converts wei to coins unit (Ether units - 1e18)

func WeiToString

func WeiToString(wei *big.Int) string

WeiToString turns a number of Wei in to a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL