-
Notifications
You must be signed in to change notification settings - Fork 2
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
Supported tokens #11
base: main
Are you sure you want to change the base?
Supported tokens #11
Conversation
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.
Some comments.
After they're addressed, we can merge, and I'll make a follow-up to migrate the rest of the commands to the commands module.
Thank you!
Co-authored-by: André Vitor de Lima Matos <[email protected]>
export const CCIPContractTypeBurnMintTokenPool = 'BurnMintTokenPool' | ||
export type CCIPContractTypeBurnMintTokenPool = typeof CCIPContractTypeBurnMintTokenPool | ||
export const CCIPContractTypeBurnMintTokenPoolAndProxy = 'BurnMintTokenPoolAndProxy' | ||
export type CCIPContractTypeBurnMintTokenPoolAndProxy = | ||
typeof CCIPContractTypeBurnMintTokenPoolAndProxy | ||
export const CCIPContractTypeBurnMintTokenPoolWithTax = 'BurnMintTokenPoolWithTax' | ||
|
||
export const CCIPContractTypeBurnWithFromMintTokenPool = 'BurnWithFromMintTokenPool' | ||
export type CCIPContractTypeBurnWithFromMintTokenPool = | ||
typeof CCIPContractTypeBurnWithFromMintTokenPool | ||
|
||
export const CCIPContractTypeBurnWithFromMintTokenPoolAndProxy = 'BurnWithFromMintTokenPoolAndProxy' | ||
export type CCIPContractTypeBurnWithFromMintTokenPoolAndProxy = | ||
typeof CCIPContractTypeBurnWithFromMintTokenPoolAndProxy | ||
|
||
export type CCIPContractTypeBurnMintTokenPoolWithTax = | ||
typeof CCIPContractTypeBurnMintTokenPoolWithTax | ||
export const CCIPContractTypeBurnWithFromMintRebasingTokenPool = 'BurnWithFromMintRebasingTokenPool' | ||
export type CCIPContractTypeBurnWithFromMintRebasingTokenPool = | ||
typeof CCIPContractTypeBurnWithFromMintRebasingTokenPool | ||
export const CCIPContractTypeLockReleaseTokenPool = 'LockReleaseTokenPool' | ||
export type CCIPContractTypeLockReleaseTokenPool = typeof CCIPContractTypeLockReleaseTokenPool | ||
export const CCIPContractTypeLockReleaseTokenPoolAndProxy = 'LockReleaseTokenPoolAndProxy' | ||
export type CCIPContractTypeLockReleaseTokenPoolAndProxy = | ||
typeof CCIPContractTypeLockReleaseTokenPoolAndProxy | ||
export const CCIPContractTypeUSDCTokenPool = 'USDCTokenPool' | ||
export type CCIPContractTypeUSDCTokenPool = typeof CCIPContractTypeUSDCTokenPool | ||
|
||
export const CCIPContractTypeTokenPool = [ | ||
CCIPContractTypeBurnMintTokenPool, | ||
CCIPContractTypeBurnMintTokenPoolAndProxy, | ||
CCIPContractTypeBurnMintTokenPoolWithTax, | ||
CCIPContractTypeBurnWithFromMintRebasingTokenPool, | ||
CCIPContractTypeLockReleaseTokenPool, | ||
CCIPContractTypeLockReleaseTokenPoolAndProxy, | ||
CCIPContractTypeUSDCTokenPool, | ||
CCIPContractTypeBurnWithFromMintTokenPoolAndProxy, | ||
CCIPContractTypeBurnWithFromMintTokenPool, | ||
] | ||
export type CCIPContractTypeTokenPool = | ||
| CCIPContractTypeBurnMintTokenPool | ||
| CCIPContractTypeLockReleaseTokenPool | ||
| CCIPContractTypeLockReleaseTokenPoolAndProxy | ||
| CCIPContractTypeUSDCTokenPool | ||
| CCIPContractTypeBurnWithFromMintRebasingTokenPool | ||
| CCIPContractTypeBurnMintTokenPoolAndProxy | ||
| CCIPContractTypeBurnMintTokenPoolWithTax | ||
| CCIPContractTypeBurnWithFromMintTokenPoolAndProxy | ||
| CCIPContractTypeBurnWithFromMintTokenPool |
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.
Do we really need these contract types here?
When I created them, it was with the assumption that token pools were not strictly part of the ccip core contracts. They can even be implemented by 3Ps, and not comply with our interfaces at all.
I'd rather leave them to some self-contained command, and not tie them directly into lib.
Add CCIP Supported Tokens Discovery Command
This PR adds a new command to discover and display tokens that are supported for CCIP cross-chain transfers between two chains.
Features
supported-tokens
command to check CCIP-supported tokensImplementation Details
src/commands/supported-tokens.ts
Usage
Check supported tokens between chains
npx tsx src/index.ts supported-tokens <source> <router> <dest> [--format <format>]
Example
npx tsx src/index.ts supported-tokens ethereum-mainnet 0x80226fc0Ee2b096224EeAc085Bb9a8cba1146f7D avalanche-mainnet