GithubHelp home page GithubHelp logo

token-list's Introduction

onekey-token-list

@onekeyfe@onekey-token-list

Onekey Token List is a package that contains tokens of multi chains. The JSON schema for the tokens includes: chainId, address, name, decimals, symbol, logoURI (optional), and custom extensions metadata.

Usage

npm install @onekeyfe/onekey-token-list

or

yarn add @onekeyfe/onekey-token-list

or

CDN TODO

Build

Should install python3 environment for your machine before build
Download Python

git clone https://github.com/OneKeyHQ/onekey-token-list.git
cd onekey-token-list
pip install requests
python3 ./script/build_list.py
python3 ./script/check_fix.py

Commit PR

In addition to obtaining third-party token lists, we also maintain our own token lists. You are welcome to submit PRs to add your tokens to our list.

How to add token

There is a chain code as the folder name under the tokens folder in the project. The chain.json in the folder records the chain information, and the tokens.json contains the tokens. The content format of the tokens.json is as follows:

[
    {
      "address": "0xadbd1231fb360047525bedf962581f3eee7b49fe",
      "decimals": 18
      "logoURI": "https://assets.coingecko.com/coins/images/21098/large/logox200.png?1638324977",
      "name": "CronaSwap Token",
      "symbol": "CRONA"
    }
]

Please follow this format to append the token information to the tokens.json in the target chain folder, For example, add the above token to the tokens/cronos/tokens.json file

除了获取第三方的token list, 我们也自己维护了token列表,欢迎你提交PR把你的token加入到我们的列表中。

添加token方法:在项目中的tokens文件夹下有链码作为文件夹名,文件夹内chain.json记录chain信息,tokens.json收录token,tokens.json内容格式如下:

[
    {
      "address": "0xadbd1231fb360047525bedf962581f3eee7b49fe",
      "decimals": 18
      "logoURI": "https://assets.coingecko.com/coins/images/21098/large/logox200.png?1638324977",
      "name": "CronaSwap Token",
      "symbol": "CRONA"
    }
]

请按照此格式把token信息追加到目标chain文件夹的tokens.json中,比如把上述token添加到tokens/cronos/tokens.json文件中

token-list's People

Contributors

hzxiao avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.