-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add cross-chain mappings to default token list #1130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
2d7e6d2 to
c3f389d
Compare
src/write.js
Outdated
| console.log(JSON.stringify(buildList(), null, 2)); | ||
|
|
||
| (async () => { | ||
| console.log(JSON.stringify(await buildList(), null, 2)); | ||
| })(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can skip the async iife like this:
buildList().then(data => console.log(JSON.stringify(data, null, 2)))
| module.exports = async function buildList() { | ||
| const parsed = version.split("."); | ||
| return { | ||
| const l1List = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this needs to be an async function. Returning the chainify result (I'm assuming it's a promise?) will give you the same behavior.
package.json
Outdated
| }, | ||
| "dependencies": { | ||
| "@uniswap/token-list-bridge-utils": "^1.0.7" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be in devDependencies
package.json
Outdated
| "main": "build/uniswap-default.tokenlist.json", | ||
| "scripts": { | ||
| "test": "mocha", | ||
| "test": "mocha --timeout 10000", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might make sense to manually provide the timeout where it's necessary (using this.timeout(n)) instead of setting it globally and potentially slowing down the whole suite.
0f17fb6 to
0579450
Compare
This PR adds a call to the token-list-bridge-utils
chainifyfunction as part of the buildList.js script. This takes the generated L1 list and appends an extensions.bridgeInfo field to the token entries in the list which contains cross-chain address mapping information. The mappings will not be fully inclusive/complete, as we are limited to what the sources that token-list-bridge-utils uses provide.generated cross-chain token list file:
uniswap-default.tokenlist.txt