When you work with Web3 and blockchain's explorers, the only way to precisely identify a token is by its contract address.
I created CryptoLogos because I couldn't find any useful library of logos easily and programmatically reachable by contract addresses.
With CryptoLogos, you can grab logos of many crypto tokens directly from their explorer, and then use them easily with their contract addresses !
Problem:
I need to display the DAI logo of the polygon blockchain and I know the contract address is: 0x8f3cf7ad23cd3cadbd9735aff958023239c6a063
Solution:
I build the URL with the chain name and the contract address: raw.githubusercontent.com/dorianbayart/CryptoLogos/main/dist/[chain]/[contract address].png
Result:
npm install
npm run start:chain
where chain can be one of those parameters:
- ethereum
- polygon
- bsc
- fantom
- xdai
- arbitrum_one
- all
A lot of errors are due to the anti-DDOS of Cloudflare, wich prevents bots to send many requests.
You can run the same command again to resume, already downloaded logos will be bypassed.
- Add the possibility to download only one logo - with a new command line