Narcoleptic Pony Machine

    @asset-projects/token-list
    TypeScript icon, indicating that this package has built-in type declarations

    4.0.0 • Public • Published

    @asset-projects/token-list

    npmPackage size!License BuildTestCheck Markdown links

    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

      # npm
      npm i @asset-projects/token-list
    
      # yarn
      yarn add @asset-projects/token-list

    How to Use

    import { tokenList } from '@asset-projects/token-list';
    
    console.log(tokenList().mainnet.ERC20);
    // [{"chainId": 1, "type": "ERC20", "address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", "name": "Wrapped BTC", ...}]
    
    console.log(tokenList().mainnet.ERC721);
    // [{"chainId": 1, "type": "ERC721", "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", "name": "Ethereum Name Service", ...}]

    Other imports

    import { MAINNET } from '@asset-projects/token-list';
    
    console.log(MAINNET.ERC20);
    // [{"chainId": 1, "type": "ERC20", "address": "0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599", "name": "Wrapped BTC", ...}]
    
    console.log(MAINNET.ERC721);
    // [{"chainId": 1, "type": "ERC721", "address": "0x57f1887a8bf19b14fc0df6fd9b2acc9af147ea85", "name": "Ethereum Name Service", ...}]

    References

    This project was created with reference to uniswap/default-token-list and trustWallet/assets.

    It was created because these projects lacked resources for L2 contract addresses such as optimism and arbitrum.

    Respect to these projects!

    Install

    npm i @asset-projects/token-list

    DownloadsWeekly Downloads

    97

    Version

    4.0.0

    License

    MIT

    Unpacked Size

    286 kB

    Total Files

    49

    Last publish

    Collaborators

    • nextc