Documentation ¶
Index ¶
- func GetTokenPegSymbol(symbol string) string
- type DefaultStore
- type Manager
- func (tm *Manager) DeleteCustom(chainID uint64, address common.Address) error
- func (tm *Manager) DiscoverToken(ctx context.Context, chainID uint64, address common.Address) (*Token, error)
- func (tm *Manager) FindSNT(chainID uint64) *Token
- func (tm *Manager) FindToken(network *params.Network, tokenSymbol string) *Token
- func (tm *Manager) GetAllTokens() ([]*Token, error)
- func (tm *Manager) GetAllTokensAndNativeCurrencies() ([]*Token, error)
- func (tm *Manager) GetBalance(ctx context.Context, client *chain.ClientWithFallback, account common.Address, ...) (*big.Int, error)
- func (tm *Manager) GetBalances(parent context.Context, clients map[uint64]*chain.ClientWithFallback, ...) (map[common.Address]map[common.Address]*hexutil.Big, error)
- func (tm *Manager) GetBalancesByChain(parent context.Context, clients map[uint64]*chain.ClientWithFallback, ...) (map[uint64]map[common.Address]map[common.Address]*hexutil.Big, error)
- func (tm *Manager) GetChainBalance(ctx context.Context, client *chain.ClientWithFallback, account common.Address) (*big.Int, error)
- func (tm *Manager) GetCustoms() ([]*Token, error)
- func (tm *Manager) GetCustomsByChainID(chainID uint64) ([]*Token, error)
- func (tm *Manager) GetTokenBalance(ctx context.Context, client *chain.ClientWithFallback, account common.Address, ...) (*big.Int, error)
- func (tm *Manager) GetTokenBalanceAt(ctx context.Context, client *chain.ClientWithFallback, account common.Address, ...) (*big.Int, error)
- func (tm *Manager) GetTokens(chainID uint64) ([]*Token, error)
- func (tm *Manager) GetVisible(chainIDs []uint64) (map[uint64][]*Token, error)
- func (tm *Manager) IsTokenVisible(chainID uint64, address common.Address) (bool, error)
- func (tm *Manager) ToToken(network *params.Network) *Token
- func (tm *Manager) Toggle(chainID uint64, address common.Address) error
- func (tm *Manager) UpsertCustom(token Token) error
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTokenPegSymbol ¶ added in v0.131.11
Types ¶
type DefaultStore ¶ added in v0.138.8
type DefaultStore struct {
// contains filtered or unexported fields
}
func (*DefaultStore) GetTokens ¶ added in v0.138.8
func (ts *DefaultStore) GetTokens() ([]*Token, error)
type Manager ¶
Manager is used for accessing token store. It changes the token store based on overridden tokens
func NewTokenManager ¶
func (*Manager) DeleteCustom ¶
func (*Manager) DiscoverToken ¶
func (*Manager) GetAllTokens ¶ added in v0.115.5
func (*Manager) GetAllTokensAndNativeCurrencies ¶ added in v0.131.11
func (*Manager) GetBalance ¶
func (*Manager) GetBalances ¶
func (*Manager) GetBalancesByChain ¶ added in v0.115.5
func (*Manager) GetChainBalance ¶
func (*Manager) GetCustoms ¶
func (*Manager) GetCustomsByChainID ¶
func (*Manager) GetTokenBalance ¶
func (*Manager) GetTokenBalanceAt ¶ added in v0.125.2
func (*Manager) GetVisible ¶
func (*Manager) IsTokenVisible ¶
func (*Manager) UpsertCustom ¶
type Token ¶
type Token struct { Address common.Address `json:"address"` Name string `json:"name"` Symbol string `json:"symbol"` Color string `json:"color"` // Decimals defines how divisible the token is. For example, 0 would be // indivisible, whereas 18 would allow very small amounts of the token // to be traded. Decimals uint `json:"decimals"` ChainID uint64 `json:"chainId"` // PegSymbol indicates that the token is pegged to some fiat currency, using the // ISO 4217 alphabetic code. For example, an empty string means it is not // pegged, while "USD" means it's pegged to the United States Dollar. PegSymbol string `json:"pegSymbol"` }
Click to show internal directories.
Click to hide internal directories.