-
Notifications
You must be signed in to change notification settings - Fork 299
feat: add cosmos token to coinFactory #6539
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
5544f18 to
f87f706
Compare
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.
Pull Request Overview
Adds Cosmos token support to the coin factory to enable creation and management of Cosmos-based tokens. This enhancement extends the existing token framework to support the Cosmos ecosystem.
- Adds
CosmosTokenConfigtype to the token configuration system - Integrates
CosmosTokenclass into the coin factory registration and constructor lookup - Updates Cosmos sidechain features to include token support
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| modules/statics/src/tokenConfig.ts | Adds CosmosTokenConfig to union types and token creation logic |
| modules/statics/src/coins.ts | Implements Cosmos token creation logic in createToken function |
| modules/statics/src/coinFeatures.ts | Adds SUPPORTS_TOKENS feature to Cosmos sidechain capabilities |
| modules/bitgo/test/browser/browser.spec.ts | Updates test expectations to include CosmosToken |
| modules/bitgo/src/v2/coins/index.ts | Exports CosmosToken class |
| modules/bitgo/src/v2/coinFactory.ts | Registers Cosmos token constructors and adds token constructor lookup |
| modules/bitgo/package.json | Adds abstract-cosmos dependency |
| modules/abstract-cosmos/src/cosmosToken.ts | Makes token configurations parameter configurable |
f87f706 to
5245c50
Compare
veetragjain
left a comment
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.
LGTM
| case 'near': | ||
| case 'tnear': | ||
| return Nep141Token.createTokenConstructor(tokenConfig as Nep141TokenConfig); | ||
| case 'asi': |
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.
Please don't add all cosmos coins.
Remove all the coins which don't support tokens currently.
This is just increasing lines of code and can also confuse someone.
| token.isToken, // isToken | ||
| token.kind // kind | ||
| ); | ||
| case 'asi': |
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.
Please don't add all cosmos coins.
Remove all the coins which don't support tokens currently.
This is just increasing lines of code and can also confuse someone.
TICKET: COIN-4915