-
Notifications
You must be signed in to change notification settings - Fork 0
[DON'T MERGE] Hedera ITS / Diff #1
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: main
Are you sure you want to change the base?
Conversation
- add small doc as guide for testing via Hedera localnet
- check isMinter via token manager instead of the InterchainToken contract
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 makes significant updates to support Hedera Token Service (HTS) integration in the Interchain Token Service suite while also updating test cases, deployment scripts, compiler settings, and various token‐manager interfaces. Key changes include new utility functions for nonzero address checks and token manager parameter validation, updated deployment logic (including HTS and WHBAR contracts), and revisions in token creation pricing and token manager contracts.
Reviewed Changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
test/*.js | Updates to test cases to reflect new HTS-related functions and parameter checks |
scripts/deploy*.js | Deployment scripts now include HTS and WHBAR library deployments and funding |
hardhat.config.js | Adjusted default network and optimizer settings |
contracts/utils/*.sol | New TokenCreationPricing and updated Minter and InterchainTokenDeployer contracts |
contracts/token-manager/*.sol | Revised TokenManager with new roles and HTS integration |
contracts/proxies/*.sol and interfaces | Updates to proxy and interface definitions to include HTS and new parameter types |
contracts/hedera/*.sol | New contracts for WHBAR, HTS library, Hedera interfaces and response codes |
contracts/InterchainTokenService*.sol | Removed obsolete functions and added setters for token creation price and WHBAR |
contracts/InterchainTokenFactory.sol | Updated token metadata retrieval to support HTS tokens |
Comments suppressed due to low confidence (4)
test/InterchainTokenServiceFullFlow.js:796
- Passing the string '0x' as the operator parameter in validateTokenManagerParams could be ambiguous. Consider using a well-defined constant like AddressZero for clarity.
)
contracts/utils/Minter.sol:58
- Changing the visibility of isMinter from external to public may affect external interface compatibility. Please ensure this change is intentional and that all external callers are updated accordingly.
function isMinter(address addr) public view returns (bool) {
contracts/utils/TokenCreationPricing.sol:38
- It would be helpful to add an explanation for the '+ 1' adjustment in _tokenCreationPriceTinybars to clarify the rounding logic.
// TODO(hedera) explain why + 1 (for rounding)
contracts/utils/InterchainTokenDeployer.sol:12
- The removal of Create3Fixed and the changes to the minimal proxy bytecode logic should be documented clearly to explain how determinism and deployment address calculation are maintained with the new HTS integration.
*/
name = fTokenInfo.tokenInfo.token.name; | ||
symbol = fTokenInfo.tokenInfo.token.symbol; | ||
int32 htsDecimals = fTokenInfo.decimals; | ||
if (decimals < 0 || htsDecimals > int32(uint32(type(uint8).max))) { |
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.
Since decimals is declared as a uint8, the condition 'decimals < 0' is always false. Consider removing this check for improved clarity.
if (decimals < 0 || htsDecimals > int32(uint32(type(uint8).max))) { | |
if (htsDecimals > int32(uint32(type(uint8).max))) { |
Copilot uses AI. Check for mistakes.
WIP