clefutils

package
v0.0.0-...-d59d07f Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Wei   = uint64(1)
	GWei  = uint64(1e9)
	Ether = uint64(1e18)
)

Variables

This section is empty.

Functions

func DefaultFormat

func DefaultFormat(weiVal *big.Int) string

DefaultFormat converts bigint wei into a non-exact but user-friendly form

func IsValidAddress

func IsValidAddress(rawAddress string) bool

func TextToWei

func TextToWei(text string, fromUnit uint64) (*big.Int, error)

TextToWei converts a string representation of a certain unit into a big.Int (in wei)

func ToChecksumAddress

func ToChecksumAddress(rawAddress string) (returnAddress string, err error)

func WeiToString

func WeiToString(weiVal *big.Int, toUnit uint64) string

WeiToString converts bigint wei into a string-representation in the given unit

Types

This section is empty.

Jump to

Keyboard shortcuts

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