-
Notifications
You must be signed in to change notification settings - Fork 29
fix(sui): fix support for mint_burn tokens in sui its scripts #1054
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
…stering coin, in command deploy-token
…urn token manager types
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.
3 files reviewed, 1 comment
Example tx for auto minted coins when calling https://suiscan.xyz/testnet/tx/3aRuSdDj4LXbvVYdzLbfkh5NNjfHP4eWn3eGmZtVgo4K |
Example logs for # lock_unlock
ts-node sui/its link-coin LNKL --tokenManagerMode lock_unlock "Custom link coin (lock / unlock)" 10 ethereum-sepolia 0x3fc29836e84e471a053d2d9e80494a867d670ead
# > Wallet address: 0x4cdab023fcddcf492891b9d72ce7b523c5b465883d02fedd1bbe81f4598cf40b
# > Wallet balance: 0.879896622 SUI
# > Confirm Published LNKL Tx? (y/n) y
# > Published LNKL: 4bQ4G6iqJX1eu64VFw6XxDHKjtKhRiwa9C5eqW9iAbka
# > Confirm Register Token Metadata (LNKL) Tx? (y/n) y
# > Register Token Metadata (LNKL): 9bgFRCXVRci9trhsPpD7Bc6G6JBCiA8brWLtBLtj5TVu
# > Confirm Register Custom Coin (LNKL) in InterchainTokenService Tx? (y/n) y
# > Register Custom Coin (LNKL) in InterchainTokenService: CeABHaKzjgw5E9fyX7FTnsp6dUy6YPjqtz6nM1KdBUAA
# > Confirm Link Coin (LNKL) Tx? (y/n) y
# > Link Coin (LNKL): 66LNGyLytgpY3hxk63A9LSwv8Njma8H8zL865WndS1rb
# mint_burn
ts-node sui/its link-coin --tokenManagerMode mint_burn --destinationOperator 0x13f8C723AeB8CA762c652c553a11a11483846d8B LNKM "Custom link coin (mint / burn)" 10 ethereum-sepolia 0x3fc29836e84e471a053d2d9e80494a867d670ead
# > Wallet address: 0x4cdab023fcddcf492891b9d72ce7b523c5b465883d02fedd1bbe81f4598cf40b
# > Wallet balance: 1.855284594 SUI
# > Confirm Published LNKM Tx? (y/n) y
# > Published LNKM: 8xeq3dCGtFUWkF4yr5mrYDbXJ6CTUjLatZd55Wy5SsZB
# > Confirm Register Token Metadata (LNKM) Tx? (y/n) y
# > Register Token Metadata (LNKM): EMBDsvZ831RkySvyWZ2BveAs1ooGBAnMK7rAuhCH59z9
# > Confirm Register Custom Coin (LNKM) in InterchainTokenService Tx? (y/n) y
# > Register Custom Coin (LNKM) in InterchainTokenService: CJonnPLnizqdrAuhJBGQebzFDqv5tt4TLGbzA6Q434MX
# > Confirm Link Coin (LNKM) Tx? (y/n) y
# > Link Coin (LNKM): Bmmkn4Hn8PsJBUyBuQ2e3Hxcj4ZCAMg9qTx8Sy9KwceG |
…es bug in link-coin command for mint_burn tokens
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.
4 files reviewed, 1 comment
This PR adds support for custom token linking for tokens with mint / burn as token manager type in the ITS scripts. Additionally, it applies a temp fix to the Example contract scripts that makes the
send-token
script work for tokens with mint / burn token manager type. More work will need to be done to make themint-token
work for the Example contract scripts.Note
Enable mint/burn token support across Sui ITS scripts with pre-mint on deploy and updated link-coin options/flow, plus doc updates.
sui/its-example.js
--mintAmount
before registration.register_coin_with_cap
when--tokenManagerMode mint_burn
; default remainslock_unlock
.sui/its.js
link-coin
: dynamic token manager type (--tokenManagerMode
), optional--destinationOperator
passed as link params, improved errors.treasuryCap
to custom registration when using mint/burn.sui/utils/its-utils.js
treasuryCap
flag/arg to extract and transferTreasuryCapReclaimer
(instead of config flag).releases/sui/2025-09-ITS-v1.2.0.md
):lock_unlock
andmint_burn
flows; clarify steps and sample commands.Written by Cursor Bugbot for commit ea5bc83. This will update automatically on new commits. Configure here.
Greptile Overview
Updated On: 2025-09-29 21:46:23 UTC
Summary
This PR adds comprehensive support for mint/burn tokens in Sui ITS scripts. The changes enable custom token linking for both lock/unlock and mint/burn token manager types, with enhanced script functionality for the Example contract.
Key changes include:
--mintAmount
option todeploy-token
command for pre-minting tokens before registrationlink-coin
functionality with--tokenManagerMode
and--destinationOperator
parametersThe implementation correctly handles the different registration paths based on token manager type and maintains backward compatibility with existing lock/unlock functionality.
Confidence Score: 4/5
Important Files Changed
File Analysis
Sequence Diagram