-
Notifications
You must be signed in to change notification settings - Fork 29
feat: mint sui coin standalone + in interchain transfer #1034
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63c5907
to
eb4a168
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.
2 files reviewed, 2 comments
milapsheth
reviewed
Sep 27, 2025
drewstaylor
requested changes
Sep 29, 2025
…he interchain transfer function
4526751
to
3a2bdb9
Compare
drewstaylor
approved these changes
Sep 30, 2025
milapsheth
approved these changes
Sep 30, 2025
add safer chainName for `estimateItsFee` Co-authored-by: Milap Sheth <[email protected]>
cleaner query for sui coin balance Co-authored-by: Milap Sheth <[email protected]>
remove hard-coded sui package id Co-authored-by: Milap Sheth <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
why?
how?
testing
tested working interchain transfer without mint
tested mint function works
Greptile Summary
Updated On: 2025-09-22 01:21:34 UTC
This PR adds mint functionality to the Sui blockchain implementation in the Axelar contract deployments repository. The changes introduce two key capabilities:
Automatic minting during interchain transfers: The
interchainTransfer
function now accepts a special zero ID (0x0000000000000000000000000000000000000000000000000000000000000000
) as thecoinObjectId
parameter. When this sentinel value is provided, the system automatically mints the required tokens before proceeding with the transfer, eliminating the need for users to pre-mint tokens.Standalone coin minting: A new
mintCoins
function provides direct minting capability for users who need to mint tokens outside of the transfer workflow.The implementation maintains backward compatibility - existing workflows using actual coin object IDs continue to work unchanged. The zero ID acts as a trigger for the new auto-minting behavior, creating a seamless user experience. The changes integrate well with the existing Sui ITS (Interchain Token Service) architecture, leveraging the same transaction building patterns and configuration management used throughout the codebase.
Documentation has been updated to reflect both the new standalone minting command and the auto-minting capability within interchain transfers, providing clear guidance for users on how to utilize these new features.
Important Files Changed
Changed Files
Confidence score: 4/5
Sequence Diagram
Note
Add Sui coin minting CLI and integrate balance validation and dynamic gas estimation into interchain transfers, with docs updated.
sui/its.js
):mintCoins
function andmint-coins <coinPackageId> <coinPackageName> <coinModName> <amount> <receiver>
command; mints viaTreasuryCap
, prints receiver balance and new coin object ID.checkIfSenderHasSufficientBalance
; dynamically compute gas viaestimateITSFee
instead of fixed amount; minor log message tweak.sui/utils/token-utils.js
):checkIfCoinIsMinted
withcheckIfSenderHasSufficientBalance
to validate ownership and balance of the specified coin object.sui/README.md
):Written by Cursor Bugbot for commit 3f703dc. This will update automatically on new commits. Configure here.