common

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ETHAddr ethereum address
	ETHAddr = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"
	// ETHSymbol ethereum symbol
	ETHSymbol = "ETH"
)

Variables

This section is empty.

Functions

func ArrTokenToMap added in v1.1.2

func ArrTokenToMap(listToken []ethereum.Token) map[string]ethereum.Token

ArrTokenToMap convert array token to map with key is address

func CopyMapToken added in v1.1.2

func CopyMapToken(mapTokenDest, mapTokenSource map[string]ethereum.Token)

CopyMapToken make a copy of

func FromDestToSrc

func FromDestToSrc(destAmount string, rate string, srcDecimals int, destDecimal int) (*big.Int, error)

func FromSrcToDest

func FromSrcToDest(srcAmount string, rate string, srcDecimals int, destDecimal int) (*big.Int, error)

func GetAmountEnableFirstBit

func GetAmountEnableFirstBit(amount float64, decimals int) *big.Int

func GetOrAmount

func GetOrAmount(amount *big.Int) *big.Int

func IsDifferentMapToken added in v1.1.2

func IsDifferentMapToken(mapTokenA, mapTokenB map[string]ethereum.Token) bool

IsDifferentMapToken compare two map tokens

func StringToWei

func StringToWei(amount string, decimals int) (*big.Int, error)

func ToToken

func ToToken(amount string, decimals int) (*big.Float, error)

func ToWei

func ToWei(amount float64, decimals int) *big.Int

Types

type UserInfo

type UserInfo struct {
	Cap   *big.Int `json:"cap"`
	Kyced bool     `json:"kyced"`
	Rich  bool     `json:"rich"`
}

Jump to

Keyboard shortcuts

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