-
Notifications
You must be signed in to change notification settings - Fork 299
feat: ERC721 token support for EVM coins #7707
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
base: master
Are you sure you want to change the base?
Conversation
7dbdff9 to
3b2cdbc
Compare
ArunBala-Bitgo
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.
Could we add test cov for the new changes
e6f722c to
0c52dd8
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
This PR adds ERC721 (NFT) token support for EVM-compatible coins, specifically enabling it for Hedera EVM (both mainnet and testnet). The implementation follows the existing ERC20 token pattern and introduces the necessary infrastructure to support NFTs across EVM chains.
Key Changes:
- Added
SUPPORTS_ERC721coin feature andERC721underlying asset type - Implemented
EthLikeERC721Tokenclass and factory function with non-divisible token support (0 decimal places) - Registered ERC721 token constructors and configured token mappings for supported chains
- Fixed Hedera EVM base unit from
HBAR(tinybar) toETH(wei) to align with EVM standards
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/statics/src/base.ts | Added SUPPORTS_ERC721 coin feature enum value |
| modules/statics/src/account.ts | Added EthLikeERC721Token class, Erc721ConstructorOptions interface, and erc721Token factory function with proper documentation |
| modules/statics/src/tokenConfig.ts | Added ERC721 token configuration functions and integration into token map structure |
| modules/statics/src/coins.ts | Added ERC721 chain-to-name mapping and token creation logic in createToken function |
| modules/statics/src/allCoinsAndTokens.ts | Enabled SUPPORTS_ERC721 feature for Hedera EVM (mainnet and testnet) and corrected base unit from HBAR to ETH |
| modules/sdk-coin-evm/src/ethLikeErc721Token.ts | Implemented EthLikeErc721Token class extending EthLikeToken with ERC721-specific functionality |
| modules/sdk-coin-evm/src/register.ts | Added ERC721 token constructor registration for EVM SDK |
| modules/sdk-coin-evm/src/index.ts | Exported EthLikeErc721Token class |
| modules/bitgo/src/v2/coinFactory.ts | Added ERC721 token registration, testnet/mainnet mapping, and token constructor logic |
| modules/bitgo/src/v2/coins/index.ts | Exported EthLikeErc721Token for use in BitGo SDK |
| modules/bitgo/test/browser/browser.spec.ts | Updated test exclusions to include EthLikeErc721Token |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
7f71c74 to
c58e5ee
Compare
eaebcde to
86f67bc
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.
Looks good to me, Please make sure that the test token onboarded works in lower environments before releasing in prod
ticket: win-8154
Changes:-