Skip to content

Conversation

blockchainguyy
Copy link
Contributor

@blockchainguyy blockchainguyy commented Sep 30, 2025

why?

  • Use different strategies for lock_unlock & mint_burn manager modes
  • Separate GMP calls for register coin metadata and link token to prevent failures

how?

  • For non-origin tokens or lock_unlock mode, mint new coins using TreasuryCap
  • For origin tokens with mint_burn mode, use coins from the client/deployer wallet (first combine coins if they are splitted)

testing

  • Comprehensive testing is already completed

Note

Overhauls Sui ITS scripts by separating coin metadata registration from linking, adding salt and gas-fee handling, improving mint_burn origin flow, updating docs, and switching the Sui testnet RPC.

  • Sui CLI/ITS:
    • New command: register-coin-metadata to register coin metadata on Axelar Hub.
    • Linking refactor: link-coin now links existing coins (no name/decimals), supports --tokenManagerMode, optional --salt, --registered, and --destinationOperator; validates inputs; encodes params with TextEncoder; pays gas using estimateITSFee.
    • Custom coin registration: register-custom-coin and give-unlinked-coin accept --salt; validation added; persist saltAddress and tokenManagerType in saved config.
    • Gas payment: GMP messages (register-coin-metadata, link-coin) now split gas coins and call gas_service::pay_gas with estimateITSFee.
  • Example script (sui/its-example.js):
    • For origin tokens with mint_burn, use existing wallet coins (merge/split) instead of minting; default tokenManagerMode saved per token.
  • Utils:
    • registerCustomCoinUtil supports fixed salt; createSaltAddress made configurable; saveTokenDeployment records tokenManagerType; minor payload cleanup in estimateITSFee call site.
  • Docs (releases/sui/2025-09-ITS-v1.2.0.md):
    • Substantial edits: clearer steps, admin caps table, updated commands/examples, detailed custom token linking workflows.
  • Config:
    • Update chains.sui.rpc to https://sui-testnet-rpc.publicnode.com.

Written by Cursor Bugbot for commit 6a54b07. This will update automatically on new commits. Configure here.

@blockchainguyy blockchainguyy requested review from a team as code owners September 30, 2025 14:33
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 files reviewed, no comments

Edit Code Review Agent Settings | Greptile

@blockchainguyy blockchainguyy changed the title Fix/sui its mint burn fix: sui ITS mint_burn scripts Sep 30, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@drewstaylor drewstaylor merged commit 44e101d into main Oct 3, 2025
11 checks passed
@drewstaylor drewstaylor deleted the fix/sui-its-mint-burn branch October 3, 2025 19:32
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.

4 participants