utils

package
v0.0.0-...-358e57e Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EthMetadata = &model.TokenMetadata{
	Name:     "Ethereum",
	Symbol:   "ETH",
	Decimals: 18,
	LogoURI:  "https://assets.coingecko.com/coins/images/279/small/ethereum.png?1595348880",
}

Functions

func ConvertHexToDecimal

func ConvertHexToDecimal(hexString string, decimalPlaces ...int32) (decimal.Decimal, error)

func GenericError

func GenericError() error

func HexToDecimal

func HexToDecimal(hex string) (decimal.Decimal, error)

func HexToDecimalHookFunc

func HexToDecimalHookFunc() mapstructure.DecodeHookFuncType

Types

type StringSet

type StringSet map[string]struct{}

func (StringSet) Add

func (s StringSet) Add(element string)

Add an element to the set

func (StringSet) Contains

func (s StringSet) Contains(element string) bool

Check if an element is present in the set

func (StringSet) Remove

func (s StringSet) Remove(element string)

Remove an element from the set

func (StringSet) Values

func (s StringSet) Values() []string

Convert the set to a slice of strings

Jump to

Keyboard shortcuts

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