1.42.0 • Published 8 days ago

@indexcoop/tokenlists v1.42.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 days ago

tokenlists

npm: https://www.npmjs.com/package/@indexcoop/tokenlists

github: https://github.com/IndexCoop/tokenlists


Install

yarn add @indexcoop/tokenlists

Usage

import {
  MainnetTokens,
  MaticTokens,
  IndexCoopMainnetTokens,
  IndexCoopMaticTokens,
  TokenData,
} from '@indexcoop/tokenlists';
  • IndexCoopMainnetTokens: Only IndexCoop Mainnet tokens
  • IndexCoopMaticTokens: Only IndexCoop Matic network tokens
  • IndexCoopArbitrumTokens: Only IndexCoop Arbitrum roll-up tokens
  • IndexCoopOptimismTokens: Only IndexCoop Optimism roll-up tokens
  • IndexCoopAvalanceTokens: Only IndexCoop Avalanche network tokens
  • MainnetTokens: All Mainnet tokens, including IndexCoopMainnetTokens
  • MaticTokens: All Matic network tokens, including IndexCoopMaticTokens
  • ArbitrumTokens: All Arbitrum roll-up tokens, including IndexCoopArbitrumTokens
  • OptimismTokens: All Optimism roll-up tokens, including IndexCoopOptimismTokens
  • AvalancheTokens: All Avalanche network tokens, including IndexCoopAvalanceTokens
  • TokenData: The token interface used by the lists

Contributing

npm run commit

REQUIRED: Due to the use of semantic-release for deploying to npm's registry, we require commits to be formatted a specific way. This is made easy by the above npm script. If your commit doesn't use the above command for styling, it won't be picked up by semantic-release for publishing.

Adding IndexCoop Tokens

When adding IndexCoop tokens, find the IndexCoop specific array in the appropriate network file and append the IndexCoop list at the top as shown below.

const INDEX_COOP_MAINNET_TOKENS: TokenData[] = [
  {
    address: '0x47110d43175f7f2c2425e7d15792acc5817eb44f',
    chainId: 1,
    name: 'My New Index',
    symbol: 'MNI',
    decimals: 18,
    logoURI:
      'https://docs.indexcoop.com/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJY-enmfAw5ra2s-8QX%2Fuploads%2FAHyFusKCIRPu5o9FhZkk%2FGMI_LOGO-07.svg?alt=media&token=536da550-6d40-4f6c-b115-3b52a6365d64',
  },
  {...}
];

Adding non-IndexCoop Tokens

When adding any other token, find the generic array in the appropriate network file and append the second array at the bottom as shown below.

const MAINNET_TOKENS: TokenData[] = [
  {
    address: '0x47110d43175f7f2c2425e7d15792acc5817eb44f',
    chainId: 1,
    name: 'My New Token',
    symbol: 'MNT',
    decimals: 18,
    logoURI:
      'https://docs.indexcoop.com/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJY-enmfAw5ra2s-8QX%2Fuploads%2FAHyFusKCIRPu5o9FhZkk%2FGMI_LOGO-07.svg?alt=media&token=536da550-6d40-4f6c-b115-3b52a6365d64',
  },
  {...}
];

Adding a new network

When adding a new network, create a new file in src/lists named after the network, and copy the structure from any of the other lists. File should include at a minimum:

  • An exported INDEX_COOP_NEW_NETWORK_TOKENS TokenData array, containing only IndexCoop tokens on that network.
  • A default exported NEW_NETWORK_TOKENS TokenData array, containing all tokens on that network, with the last item appended being the aforementioned INDEX_COOP_[NETWORK]_TOKENS array.
  • Make sure to use a folder from now on (separating index and network tokens)

After this, index.ts should be updated to export the newly created lists as shown below:

export const NewNetworkTokens = NEW_NETWORK_TOKENS;
export const IndexCoopNewNetworkTokens = INDEX_COOP_NEW_NETWORK_TOKENS;

When these are complete, update the Usage list above to show what lists are available to a user.

Releasing

Releases are automatically pushed to npm via publish.yml

1.42.0

8 days ago

1.41.0

25 days ago

1.40.0

2 months ago

1.40.1

2 months ago

1.39.1

2 months ago

1.39.2

2 months ago

1.38.1

2 months ago

1.37.0

2 months ago

1.38.0

2 months ago

1.36.0

3 months ago

1.35.0

3 months ago

1.34.0

4 months ago

1.32.0

4 months ago

1.31.1

4 months ago

1.33.0

4 months ago

1.30.3

4 months ago

1.31.0

4 months ago

1.30.2

5 months ago

1.29.0

8 months ago

1.29.1

8 months ago

1.27.0

10 months ago

1.28.0

10 months ago

1.29.2

8 months ago

1.29.3

6 months ago

0.0.0-development

10 months ago

1.25.0

2 years ago

1.26.0

2 years ago

1.24.0

2 years ago

1.23.0

2 years ago

1.22.0

2 years ago

1.19.0

2 years ago

1.21.0

2 years ago

1.20.1

2 years ago

1.21.1

2 years ago

1.20.2

2 years ago

1.20.0

2 years ago

1.20.3

2 years ago

1.20.4

2 years ago

1.18.0

2 years ago

1.17.0

2 years ago

1.16.0

2 years ago

1.15.0

2 years ago

1.14.0

2 years ago

1.13.0

2 years ago

1.12.0

2 years ago

1.11.0

2 years ago

1.10.0

2 years ago

1.9.0

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.4

2 years ago