Multi-chain Assets

Using the multi-chain asset data available on Etherspot

Before we continue, please ensure that you have had a look at our Supported Ethereum Chains, followed the steps in Install Etherspot SDK and how to Bootstrap Etherspot SDK. We're assuming that you have completed these steps before going forward.

Getting started

Before we get started, it's important to know that Etherspot and the Etherspot SDK support the idea of "token lists", where tokens are grouped by a provider for community benefit or purpose. Token lists itself is a Uniswap initiative and can be viewed here.

Etherspot SDK currently supports the following token lists:

The above two token lists generally represent curated and high quality tokens, and can usually be sufficient for your project needs.

Need something specific with a token list? We can work with you to make a custom token list, or use an existing one from tokenlists.org - get in touch with us (using the links under the "Get In Touch" section in the navigation menu) and we'll be happy to help out.

Getting the native currencies

The Etherspot SDK provides a utility endpoint for you to read all the native currencies, sometimes also referred to as the "gas token", for each chain.

  const nativeCurrencies = await sdk.getNativeCurrencies();

  console.log('Native Currencies:', nativeCurrencies);

Try this out now on Etherspot Playground

Getting a token list

To fetch a token list, simply call the getTokenListTokens method on your instantiated Etherspot SDK instance.

Fetching a token list will return the default token list available on the chain or network the Etherspot SDK was instantiated with.

const tokenList = await sdk.getTokenListTokens();

console.log('Token list:', tokenList);

Getting a token list by token list name

Etherspot supports getting a token list by token list name. Simply pass the token list name into the the name named object parameter as shown below:

const aaveTokenList = await sdk.getTokenListTokens({
  name: 'AaveTokens'
});

console.log('Token list for AaveTokens:', aaveTokenList);

Last updated