utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Wei   = big.NewInt(params.Wei)
	GWei  = big.NewInt(params.GWei)
	Ether = big.NewInt(params.Ether)
)

Functions

func EtherToWei

func EtherToWei(ether *big.Int) *big.Int

EtherToWei converts Ether to Wei.

func Fatal

func Fatal(err error)

func FormatWei

func FormatWei(amount *big.Int) string

Adjust units and separate by 3 digits.

func ToDigit

func ToDigit(n *big.Int) string

ToDigit separates by 3 digits.

func ToEther

func ToEther(wei *big.Int) *big.Int

ToEther converts Wei to Ether.

func ToGWei

func ToGWei(wei *big.Int) *big.Int

ToGWei converts Wei to GWei.

Types

This section is empty.

Jump to

Keyboard shortcuts

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