tokenlist

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ERC20Token

type ERC20Token struct {
	Address  string `json:"address"`
	Symbol   string `json:"symbol"`
	Name     string `json:"name"`
	Decimals int    `json:"decimals"`
}

ERC20Token is a struct to represent the token

func (ERC20Token) Asset

func (t ERC20Token) Asset(chain common.Chain) common.Asset

Asset returns the common.Asset representation of the token.

type EVMTokenList

type EVMTokenList struct {
	Name      string       `json:"name"`
	LogoURI   string       `json:"logoURI"`
	Tokens    []ERC20Token `json:"tokens"`
	Keywords  []string     `json:"keywords"`
	Timestamp time.Time    `json:"timestamp"`
}

func GetAVAXTokenList

func GetAVAXTokenList(version semver.Version) EVMTokenList

func GetBSCTokenList

func GetBSCTokenList(version semver.Version) EVMTokenList

func GetETHTokenList

func GetETHTokenList(version semver.Version) EVMTokenList

func GetEVMTokenList

func GetEVMTokenList(chain common.Chain, version semver.Version) EVMTokenList

GetEVMTokenList returns all available tokens for external asset matching for a particular EVM chain and version.

NOTE: These tokens are NOT necessarily the same tokens that are whitelisted for each chain - whitelisting happens in each chain's bifrost chain client.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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