Create script to update tokens list from ethereum-lists/tokens #1247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Triage temporary solution for #969.
Description
Right now we've just been keeping up to date with MyCryptoHQ/mycrypto.com for token lists changes, but the future plan is to use ethereum-lists/tokens as our source of tokens. The problem is its format is kind of spread out and not easy to import directly to our repo. This PR adds a script that fetches its output from IPFS, imports and formats the tokens to match our format, and stages the tokens for commit. This won't stop us from manually updating, but should make the process much easier.
One concern of this change is that our token list has ballooned from ~90 to 513 with this. This'll be a much larger load on our node, and probably includes a lot of junk tokens. Not to mention, some of them don't use proper symbol acronyms, and instead have rather long names. We may want to either audit
ethereum-lists/tokens
and clean out any useless ones, or implement a blacklist of tokens to exclude.Also of note, I'm not sure decimals or amounts are being handled properly right now with tokens. See screenshot below.Fixed, see comment below.Changes
scripts/
folder that fetches tokens.Steps to Test
eth-lists-script
npm run update:tokens
Screenshots
^ Are these amounts correct? Is something wrong with decimals?