Protected
cacheCaches fetched results indefinitely
Protected
customCalled whenever the cache, or custom tokens changes
Adds custom tokens to the token manager
tokens to add
address of the token to get
the network to get the token from
Optional
find: ((t) => boolean)optional function to find the token with specific criteria
Optional
the first occurence of the token with the given address, or undefined if not found
symbol of the token to get
the network to get the token from
the first occurence of the token with the given symbol, or undefined if not found
Returns an array of tokens with the given addresses. Order is not guaranteed. If a token cannot be found with the given address, it will be omitted from the array. If multiple tokens are found with the same address and network, they will all be included.
an array of objects with address as the address of the token, and network as the network of the token
an array of tokens with the given addresses.
this is not optimised for large addresses arrays
Returns an array of tokens with the given symbol. Order is not guaranteed. If a token cannot be found with the given address, it will be omitted from the array. If multiple tokens are found with the same address and network, they will all be included.
an array of objects with address as the address of the token, and network as the network of the token
an array of tokens with the given symbol.
this is not optimised for large symbol arrays
Protected
getSets custom tokens as a list of tokens
tokens to set
Sets a cache key to a token list
the key in the cache for which to set the tokenList
the tokenList to set
address of the token to get
the network to get the token from
Optional
find: ((t) => boolean)optional function to find the token with specific criteria
Optional
the first occurence of the token with the given address, or undefined if not found
symbol of the token to get
the network to get the token from
the first occurence of the token with the given symbol, or undefined if not found
Tries to get the wrapped native token for a network
the network from which to get the token
the wrapped native token if one exists, otherwise undefined
Static
Protected
removeGenerated using TypeDoc
The TokenList class is used to fetch and validate token lists.