Skip to content

Latest commit

 

History

History
275 lines (216 loc) · 14.6 KB

README.md

File metadata and controls

275 lines (216 loc) · 14.6 KB

Trust Wallet Assets Info

CI

Overview

Hello and welcome to Trust Wallet assets info contribution guide. We appreciate your effort to open-source. Token repository https://github.com/trustwallet/assets (repo) is a source of images used by Trust Wallet including:

  1. ERC20, ERC223 tokens on Ethereum compatible networks supported by Trust Wallet such as:
  1. BEP2 Binance DEX token (native marketplace on Binance Chain)

  2. TRC10, TRC20 tokens on TRON blockchain

  3. coins integrated in Wallet Core

  4. dApp images available in Browser section in Trust Wallet and at https://dapps.trustwallet.com and bookmarks icons. read requirements. Also you can submit dApp to our list read more

  5. Staking validators info, such as name, image, validator id, website url. Supported staking coins. Read requirements

  6. Crypto price providers map: CoinMarketCap

  7. Token and coin info

  8. Smart contract deprecation/upgrade read more

  9. Coming soon: Coin pop up notification trustwallet#1274

Contribution steps

Add new asset

  1. Prepare asset, look at image requirements, dapp requirements
  2. Get familiar with our folder structure, it will give you an understanding where assets should be placed
  3. Add asset guide

Update and remove an existing asset

Whenever you updating or deleting an asset on behalf of the asset owner or just found outdated information, please provide a link to the source saying about changes. That will help to speed up the review process.

This instruction wil be helpfull if you want to:

  1. Update information about the smart contract

  2. (Depreate)[#What-is-smart-contract-deprication] or update contract address

Smart contract address update procedure:

  1. Rename old contract address in coresponding coin folder to new contract e.g.:

  2. Remove smart contract e.g.:

`rm -r ./blockchains/<COIN>/assets/<OLD_CONTRACT_ADDRESS>/`

`rm -r ./blockchains/ethereum/assets/0x19fFfd124CD9089E21026d10dA97f8cD6B442Bff/`
  1. Commit changes and make a PR (pull request)

Image Requirements

  • File location: must be placed in the correct folder and subfolder within the folder structure.
  • File extension: png. Uppercase PNG is considered invalid.
  • File name:logo.png.
  • Dimension: 256px by 256px or 512px by 512px.
  • Background: preferably transparent (should fit dark mode as well; black logos need light border/background).
  • File size: maximum 100KB. Tip: optimize image size, e.g. using simple drag-and-drop online service tinypng.

dApp image naming requirements

dApp submission and listing requirements

Staking validators requirements

General requirements

  1. Add validator basic information to the bottom of the list, see example for: Kava, Cosmos, Tezos, Tron, Solana, Harmony
  2. Add validator logo image to blockchains/<chain>/validators/assets/<validator_address>/logo.png see images requirements
  3. Check chain specific requirements

Validators specific requirements

Tezos

We utilize Baking Bad API to collect and update existing bakers list. To remain in validators list:

  1. Baker must accept minimum 0 XTZ for delegation
  2. Baker must payout regularly
  3. Baker must maintain available staking capacity (subject to temporary removal from the list when capacity reached below 0)

Repository structure

blockchains folder contains many subfolders and represents chains e.g. ethereum, binance ...

assets folder contains token folders named by smart contract address in checksum address for Ethereum like networks and inside of it logo.png - image representation. Note: Lowercase or uppercase contract addresses are considered as invalid. You can find the checksum address by searching on etherscan.io, for example stablecoin DAI the checksum address is located at the top left corner of the page and has both uppercase and lowercase characters. Or convert Ethereum address to Checksum address. For other networks the address must be specified as it was originated on the chain, e.g TRON TRC10: 1002000, TRON TRC20: TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t etc ...

info folder contains for now only logo.png that represents the coin image

validators folder contains folders: assets same structure as above and list.json information about validators.

blacklist.json and whitelist.json files you may find in folders like tron, ethereum but not limited to, contain list of address approved based on many criterias (TODO add criterias) and disapproved based on factors such as scam, outdated, abandoned contracts etc ... .

.
├── blockchains
│   └──ethereum
│   │   └──assets
│   │   │  └──0x0a2D9370cF74Da3FD3dF5d764e394Ca8205C50B6 // address folder
│   │   │     └──logo.png  // address logo
|   |   |     └──info.json // info related to the contract
│   │   └──info
│   │      └──logo.png  // coin logo
|   |      └──info.json // coin info
|   |
|   └──binance
│   │   └──assets
│   │   │  └──ONE-5F9
│   │   │     └──logo.png
|   |   |     └──info.json
│   │   └──info
│   │      └──logo.png
|   └──tron
│   |  └──assets
│   |  │  └──1002000
│   |  │  |   └──logo.png
|   |  |  |   └──info.json
|   |  |  └──TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
|   |  |      └──logo.png
|   |  |      └──info.json
|   |  | 
│   |  └──info
│   |     └──logo.png
|   |     └──info.json 
|   |
|   └──cosmos
│   │   └──info
|   |   |  └──logo.png
|   |   |  └──info.json
|   |   |
│   │   └──validators
│   │   |  └──assets
|   |   |     └──cosmosvaloper1clpqr4nrk4khgkxj78fcwwh6dl3uw4epsluffn
|   |   |        └──logo.png
|   |   |
|   |   └──list.json
├── ...

Common uploads

Uploading:

  1. Ethereum ERC20 token folder
  2. Binance DEX BEP2 token token folder
  3. TRON TRC10, TRC20 token token folder
  4. Add Cosmos validator image
  5. Add Tezos validator info
  6. Add Ethereum contract address to blacklist
  7. Add TRON TRC10 ID or TRC20 owner contract address to whitelist

How To Add Asset

Process adding new tokens may look complicated at first glance, but once you completed it will be way easier do it next time:

Easy way

  1. Follow image requirements
  2. Proceed to https://github.com/trustwallet/assets
  3. Press on Fork in the top right corner, wait for process to complete
  4. Navigate to desire chain folder you want to add asset
  5. Prepare folder with image on your computer
  6. Simply drag and drop folder from step 5 to active window
  7. In Commit changes box:
  • Add files via upload add meaningfull comment what you adding to the repo
  • optional: In Add an optional extended description write a comment about upload
  • optional: adjust fork branch nam
  1. Click on Propose changes
  2. Press on Create pull request
  3. Once tests have completed and verified that your image follows all requirements, a maintainer will merge it. In 5-10 minutes your token will have the updated image instead of plain logo in Trust Wallet. For more information see FAQ.

Easy way for Git users

  1. Fork the repository to your own GitHub account
  2. Clone fork and create new branch:
git clone [email protected]:YOUR_HANDLE/assets.git
cd tokens
git branch <branch_name>
git checkout <branch_name>
  1. Add asset to appropriate directory, the folder strcture documentation will help you
  2. Commit and push to your fork
git add -A
git commit -m “Add <token_name>”
git push origin <branch_name>
  1. From your repo clone page make a new PR (pull request)

FAQ

Why do I still see old logo in Trust Wallet after uploaded new one?

Both clients, Android and iOS keep old image cache for up to 7 days. In order to see changes immediately, reinstall Trust Wallet. But as always, make sure you have a backup of all your wallets.

Why i don't see my token in search after PR was merged?

After PR was merged, set of cron workers will update token status normally with in 10 minutes and sometimes up to 30 minutes and token became visible in search result.

What is smart contract deprication (removal)?

A process of removing smart contract information such as (token logo and info) from this repository. Removed contract address will be added to the blacklist and, as a result, will no longer be present in token search results inside the TW app. Why would you want to do this ?. You are contract owner or just good samaritan who noticed contract to be no longer "active" and was an upgrade and abandoned by owning organization, involved in a scam, mimicking by its name or/and symbol a real contract. All facts must be supported with a link to any resource proving these statements.

How to use it? (For Developers)

Base URL for token image:

https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/<contract_address_checksum>/logo.png

Base URL for coin image:

https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/<coin_name_lowercase>/info/logo.png

Examples:

Coin logo, e.g Bitcoin:

https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/bitcoin/info/logo.png

ERC20:

https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x006BeA43Baa3f7A6f765F14f10A1a1b08334EF45/logo.png

BEP-2:

https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/binance/assets/ANKR-E97/logo.png

TRC-10:

https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/assets/1002000/logo.png

TRC-20:

https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tron/assets/TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t/logo.png

Used in Applications

  • Trust Wallet - iOS and Android
  • 0x Tracker - The 0x Protocol Trade Explorer and news aggregator.
  • Uniswap - Uniswap is a protocol for automated token exchange on Ethereum.
  • LinkDrop - A customer acquisition platform for DApps. The easiest crypto onboarding.
  • Aragon − Aragon is platform and network for decentralized organizations.
  • SpiderDEX - Decentralized exchange for crypto collectibles.
  • Zerion — A simple interface to decentralized finance.

Disclaimer

Trust Wallet team allows anyone to submit new assets to this repository. However, this does not mean that we are in direct partnership with all of the projects. Trust Wallet team will blacklist projects that are deemed as scams after careful review of the said assets. Trust Wallet team reserves the right to change the terms of asset submissions at any time due to changing market conditions, risk of fraud, or any other factors we deem relevant.