tokendetails
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

TokenList-ERC20

Get details about tokens from different Chains

How to use

Get details about token by chain name or id and token Symbol

Install using npm

  npm install tokendetails

Install using yarn

  yarn add tokendetails

Example

    import { tokens } from "tokendetails";
    const usdc = tokens.homestead.USDC; // This is a JS object

    console.log(usdc); //  return the following
    // {
    //     name: "USD Coin",
    //     symbol: "USDC",
    //     address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
    // }

    const wmatic = tokens[137].WMATIC; // Also chainId(s) are accepted 

    console.log(wmatic); // return the following
    // {
    //     name: "Wrapped Matic",
    //     symbol: "WMATIC",
    //     address: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270"
    // }

    // The format is tokens.name.symbol
    // where the name is homestead or polygon
    // Can also accept chainId
    // And symbol is token symbol

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i tokendetails

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

33.5 kB

Total Files

22

Last publish

Collaborators

  • omjikush09