Skip to content

web3anondev/token-lists

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Token Lists

Automatically generate Token Lists

How to add an image to the CoW Swap default token list

In order to add a new token to the CoW Swap default token list follow these steps

  • Find an icon with reasonable quality/size (256px, <100kB).
  • Add the icon to src/public/images/<chainId>/<address>.png 1
  • Upload the image to IPFS (https://www.pinata.cloud/ is a simple recommended service to do that)
  • Create a new entry in src/public/CowSwap.json containing token address, symbol, etc. (use IPFS link for icon!)
  • Make sure you bump the version using SemVersions
  • Create a PR with these changes

Setup

# Install dependencies
yarn

# Generate Coingecko list
yarn coingecko

Download images

There's a script that will fetch all images form the CowSwap list and store them in src/public/images/<chainId>/<address>.png

yarn downloadImages

Footnotes

  1. To resize/convert your image ImageMagick installed you can simply run convert ~/Downloads/img.png -resize 256 src/public/images/<chainId>/<address>.png

Packages

No packages published

Languages

  • JavaScript 61.8%
  • Python 38.2%