Documentation ¶
Index ¶
- Constants
- Variables
- func AddressToAlias(t string) string
- func AddressToToken(t common.Address) (*types.Token, error)
- func AliasToAddress(t string) common.Address
- func CalculatePrice(amountS, amountB string, s, b string) float64
- func GetSide(s, b string) string
- func GetSymbolWithAddress(address common.Address) (string, error)
- func Initialize(options config.MarketOptions)
- func IsAddress(token string) bool
- func IsSupportedMarket(market string) bool
- func StartRefreshCron(option config.MarketOptions)
- func StringToFloat(token string, amount string) float64
- func TokenRegister(input eventemitter.EventData) error
- func TokenUnRegister(input eventemitter.EventData) error
- func UnWrap(market string) (s, b string)
- func UnWrapToAddress(market string) (s, b common.Address)
- func WethTokenAddress() common.Address
- func WrapMarket(s, b string) (market string, err error)
- func WrapMarketByAddress(s, b string) (market string, err error)
- type TokenPair
- type TokenStandard
Constants ¶
View Source
const SideBuy = "buy"
View Source
const SideSell = "sell"
Variables ¶
View Source
var ( SupportTokens map[string]types.Token // token symbol to entity AllTokens map[string]types.Token SupportMarkets map[string]types.Token // token symbol to contract hex address AllMarkets []string AllTokenPairs []TokenPair SymbolTokenMap map[common.Address]string )
View Source
var MarketBaseOrder = map[string]uint8{"BAR": 5, "LRC": 10, "WETH": 20, "DAI": 30}
Functions ¶
func AddressToAlias ¶
func AliasToAddress ¶
func CalculatePrice ¶
func Initialize ¶
func Initialize(options config.MarketOptions)
func IsSupportedMarket ¶
func StartRefreshCron ¶
func StartRefreshCron(option config.MarketOptions)
func StringToFloat ¶
func TokenRegister ¶
func TokenRegister(input eventemitter.EventData) error
func TokenUnRegister ¶
func TokenUnRegister(input eventemitter.EventData) error
func UnWrapToAddress ¶
func WethTokenAddress ¶
func WrapMarket ¶
func WrapMarketByAddress ¶
Types ¶
type TokenStandard ¶
type TokenStandard uint8
Click to show internal directories.
Click to hide internal directories.