npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@harshsingh_007/tokenlist

v1.0.5

Published

Get details about tokens from different Chains

Downloads

13

Readme

TokenList-ERC20

About TokenList-ERC20 Package

Get details about tokens from different Chains

Currently Polygon and Ethereum tokens are available


Tokens available in the chains are:

  • Homestead - 945 ERC20 tokens
  • Polygon - 442 ERC20 tokens

Get details about token by using chain name or chain id:

  • Homestead
    • Chain-name -homestead
    • Chain-id -1
  • Polygon
    • Chain-name -polygon
    • Chain-id -137

Installation

Using npm:

$ npm i @harshsingh_007/tokenlist

Using yarn:

$ yarn add @harshsingh_007/tokenlist

Example

Usage

    const { tokens } = require("@harshsingh_007/tokenlist"); //importing package via require method
    
    //Syntax for accessing tokens by chainID:--

        //const variableName = tokens.chainName.token
        //Where
        // the format is tokens.chainName.symbol
        // the variableName is your variable declared
        // the chainName is homestead or polygon and
        // the token is symbol

        //Accessing homestead tokens by using chainName
        const usdc = tokens.homestead.USDC; // This is a JS object
        console.log(usdc); // should return the following
        // {
        //     name: "USD Coin",
        //     symbol: "USDC",
        //     address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
        // }
    
        //Accessing polygon tokens by chainName
        const wmatic = tokens.polygon.WMATIC; // This is a JS object
        console.log(wmatic); // should return the following
        // {
        //     name: "Wrapped Matic",
        //     symbol: "WMATIC",
        //     address: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"
        // }


    //Syntax for accessing tokens by using chainID:--

        //const variableName = tokens.[chainID].token
        //Where
        // the format is tokens.[chainID].symbol
        // the variableName is your variable declared
        // the chainID is 1 for homestead and 137 for polygon 
        // the token is symbol

         //Accessing homestead tokens by chainID
        const usdc = tokens[1].USDC; // This is a JS object
        console.log(usdc); // should return the following
        // {
        //     name: "USD Coin",
        //     symbol: "USDC",
        //     address: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
        // }
    
        //Accessing polygon tokens by chainID
        const wmatic = tokens[137].WMATIC; // This is a JS object
        console.log(wmatic); // should return the following
        // {
        //     name: "Wrapped Matic",
        //     symbol: "WMATIC",
        //     address: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270"
        // }
    
    
    

Token Symbol Examples

  • Homestead

[
    'USDT', 'USDC',  'BNB',   'BUSD',      'MATIC', 'DAI',
    'SHIB', 'stETH', 'HEX',   'THETA',     'WBTC',  'UNI',
    'OKB',  'LEO',   'LINK',  'CRO',       'QNT',   'NEAR',
    'VEN',  'XCN',   'FRAX',  'APE',       'wMANA', 'SAND',
    'LDO',  'HT',    'cUSDC', 'MKR',       'KCS',   'CHZ',
    'USDP', 'TUSD',  'USDD',  'BTT',       'cDAI',  'GRT',
    'cETH', 'SNX',   'FTM',   'NEXO',      'PAXG',  'BIT',
    'XDCE', 'FXS',   'XAUt',  'ENJ',       'BAT',   'CEL',
    'RPL',  'ZIL',   'AMP',   'DFI',       'cUSDT', '1INCH',
    'ENS',  'HOT',   'COMP',  'GUSD',      'wCELO', 'LRC',
    'OHM',  'NXM',   'GMT',   'pSAFEMOON', 'GNO',   'WQTUM',
    'SRM',  'MCO',   'RSR',   'SUSHI',     'GLM',   'HBTC',
    'POLY', 'IOTX',  'GALA',  'YFI',       'LPT',   'BAL',
    'OMG',  'ONE',   'MIM',   'IOST',      'EURT',  'ZRX',
    'DYDX', 'WOO',   'HUSD',  'CHSB',      'SYN',   'RBN',
    'WAX',  'VVS',   'NFT',   'ZEON',      'SXP',   'MEDX',
    'UMA',  'INJ',   'CET',   'RNDR',
    ... 845 more items
]
  • Polygon

 [
        'USDT',   'pUSDt', 'USDC',  'BNB',   'BUSD',  'MATIC',
        'DAI',    'WBTC',  'UNI',   'AVAX',  'LEO',   'LINK', 
        'CRO',    'FRAX',  'APE',   'AAVE',  'MANA',  'SAND',
        'LDO',    'HT',    'THETA', 'MKR',   'CHZ',   'PAX',
        'TUSD',   'USDD',  'GRT',   'SNX',   'FTM',   'NEXO',
        'PAXG',   'CRV',   'FXS',   'ENJ',   'CEL',   'BAT',
        'RPL',    'WOO',   'AMP',   'UST',   '1INCH', 'HOT',
        'COMP',   'GUSD',  'LRC',   'GNO',   'POLY',  'SRM',
        'GLM',    'SUSHI', 'SXP',   'IOTX',  'YFI',   'LPT',
        'BAL',    'HUSD',  'OMG',   'ZRX',   'EWTB',  'CHSB',
        'SYN',    'UMA',   'INJ',   'ELON',  'RNDR',  'EURS',
        'VGX',    'OCEAN', 'PYR',   'BOBA',  'POWR',  'ORBS',
        'KNC',    'GNS',   'TEL',   'BNT',   'RLC',   'XYO',
        'renBTC', 'sUSD',  'BEPRO', 'OGN',   'KEEP',  'aETHc',
        'AGIX',   'FET',   'IQ',    'OXT',   'XSGD',  'miMATIC',
        'GHST',   'MASK',  'MFT',   'ATA',   'USDK',  'BAND',
        'LCX',    'POND',  'ORN',   'FORTH',
        ... 342 more items
 ]

License

MIT License