currency

package
v0.0.0-...-f06f5b4 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cmp

func Cmp(val1 *big.Int, currency1 *common.Address, val2 *big.Int, currency2 *common.Address) int

func Convert

func Convert(val *big.Int, currencyFrom *common.Address, currencyTo *common.Address) (*big.Int, error)

NOTE (jarmg 4/24/19): values are rounded down which can cause an estimate to be off by 1 (at most)

func ConvertToGold

func ConvertToGold(val *big.Int, currencyFrom *common.Address) (*big.Int, error)

func CurrencyWhitelist

func CurrencyWhitelist(header *types.Header, state vm.StateDB) ([]common.Address, error)

func GetBalanceOf

func GetBalanceOf(accountOwner common.Address, contractAddress common.Address, gas uint64, header *types.Header, state vm.StateDB) (result *big.Int, gasUsed uint64, err error)

This function will retrieve the balance of an ERC20 token.

func IsWhitelisted

func IsWhitelisted(currencyAddress common.Address, header *types.Header, state vm.StateDB) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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