-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add just some simple way to filter out tokens #398
Conversation
methodName: string, | ||
outputFilePath: string, | ||
tokensToReplace: Record<string, string | null> = {}, | ||
): Promise<void> { |
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 had too many arguments, so I decided to change from positional parameters to named parameters
.tryAggregate(false, getTotalSupplyCalls(bridgedAddresses, provider)) | ||
.then((results) => parseTotalSupplyResponses(results, bridgedAddresses, chainId)) | ||
|
||
const tokens = tokenFilter ? allTokens.filter(tokenFilter) : allTokens |
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.
gist of the PR, the function receives now an optional parameter with the actual filter
src/scripts/const/arbitrum.ts
Outdated
* Future versions of the script should decide using objective on-chain data if a token is liquid or not. | ||
*/ | ||
export const TOKENS_WITH_LIQUIDITY = [ | ||
'ARB', 'cbETH', 'GRT', 'LINK', 'USDC', 'USDT', 'WBTC', 'WETH', |
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.
Does it mean that we are going to have only 8 tradable tokens on Arbitrum?
Looks a bit poor
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.
We have liquidity for COW but it's not in the list
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.
no no, this is a placeholder for tomorrow.
Chen is working on the actual list. There will be many more
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
For Arbitrum launch we have one issue, most of the bridged tokens don't have liquidity.
This creates a bad user experience.
This PR allows the script generators to provide a filtering function that will have the last call on which token should be included and which don't.
In this simplistic implementation, I just allow to cherry-pick a bunch of tokens by token symbol. I know..., token symbols are not unique, but this comes from know lists so its not expected to have duplicates, and the configuration feels simpler to read if I can select the tokens to include by token symbol
Important
This PR should not be merged, and the token selection is not final. Chen is deciding on the final list of tokens to include, tomorrow he will provide them, so we can launch with a filtered list.
Edit 04/06/2024
I did a bunch of enhancements for the launch. Some of them need to be iterated later.
The goal was to reduce the list to a bunch of meaningful tokens (chen provided the list)
The problem, some of these were not in our list
Another problem was that these tokens provided by chen in a CSV didn't have a lot of the information (token name, decimals, etc)
This PR added: