https://github.com/asset-projects/token-list
This library is a list of tokens that exist on the ethereum mainnet, L2, and sidechain.
https://github.com/asset-projects/token-list
arbitrum erc20 ethereum l2 mainnet optimism side-chain test-network token-list
Last synced: about 2 months ago
JSON representation
This library is a list of tokens that exist on the ethereum mainnet, L2, and sidechain.
- Host: GitHub
- URL: https://github.com/asset-projects/token-list
- Owner: asset-projects
- License: mit
- Created: 2021-09-03T13:16:18.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-07T07:12:46.000Z (almost 3 years ago)
- Last Synced: 2024-09-21T09:56:42.856Z (8 months ago)
- Topics: arbitrum, erc20, ethereum, l2, mainnet, optimism, side-chain, test-network, token-list
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/@asset-projects/token-list
- Size: 1.69 MB
- Stars: 6
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @asset-projects/token-list
[](https://unpkg.com/@asset-projects/token-list@latest/)[](https://bundlephobia.com/package/@asset-projects/token-list)[](https://github.com/asset-projects/token-balance/blob/main/LICENSE)
[](https://github.com/asset-projects/token-list/actions/workflows/linkchecker.yml)
[](https://github.com/asset-projects/token-list/actions/workflows/tests.yml)
[](https://github.com/asset-projects/token-list/actions/workflows/release-please.yml)This library maintains a list of ERC20 tokens that exist on the ethereum mainnet, L2 and sidechain.
It manages the main tokens and the top 100 or so tokens.
Support for Ethereum mainnet, optimistic-ethereum, arbitrum, polygon, and Other chains will be supported in the future.
## Install on your project
```zsh
# npm
npm i @asset-projects/token-list# yarn
yarn add @asset-projects/token-list
```# How to Use
```ts
import { getTokenList } from '@asset-projects/token-list';console.log(getTokenList(1).ERC20);
// [{"chainId": 1, "type": "ERC20", "address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", "name": "Wrapped BTC", ...}]console.log(getTokenList(1).ERC721);
// [{"chainId": 1, "type": "ERC721", "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", "name": "Ethereum Name Service", ...}]
```# Other imports
```ts
import { tokens } from '@asset-projects/token-list';console.log(tokens().filter((token) => token.chainId === 1 && token.symbol === 'DAI'));
// [
// {
// chainId: 1,
// type: 'ERC20',
// address: '0x6b175474e89094c44da98b954eedeac495271d0f',
// name: 'Dai Stablecoin',
// symbol: 'DAI',
// decimals: 18,
// logoURI: 'https://raw.githubusercontent.com/asset-projects/token-list/main/public/dai.png'
// }
// ]console.log(
tokens().filter(
(token) =>
token.chainId === 1 && token.address === '0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85', // ENS
),
);
// [
// {
// chainId: 1,
// type: 'ERC721',
// address: '0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85',
// name: 'Ethereum Name Service',
// symbol: 'ENS',
// logoURI: ''
// }
// ]
```## License
MIT