Skip to content

[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

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open

[DON'T MERGE] Hedera ITS / Diff #1

wants to merge 16 commits into from

Conversation

rista404
Copy link
Member

WIP

@Copilot Copilot AI review requested due to automatic review settings June 25, 2025 14:30
Copy link

@Copilot Copilot AI left a 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))) {
Copy link
Preview

Copilot AI Jun 25, 2025

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.

Suggested change
if (decimals < 0 || htsDecimals > int32(uint32(type(uint8).max))) {
if (htsDecimals > int32(uint32(type(uint8).max))) {

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant