Reject muxed accounts when minting tokens - #2783
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
All reviewed changes address the stated validation and documentation goals with integration coverage.
Review effort: Lite
Findings: None
What changed in this PR
Rejects unsupported muxed accounts early for token minting, clawback, and admin changes, with clearer errors and corrected help text.
Changes:
- Adds upfront muxed-recipient validation for mint.
- Reorders clawback and set-admin guards before network calls.
- Updates mint documentation and adds integration coverage.
| File | Description |
|---|---|
FULL_HELP_DOCS.md |
Removes incorrect muxed-account support claim. |
cmd/soroban-cli/src/commands/token/set_admin.rs |
Moves muxed-admin validation before network warnings. |
cmd/soroban-cli/src/commands/token/mint.rs |
Adds early muxed-recipient rejection. |
cmd/soroban-cli/src/commands/token/clawback.rs |
Moves muxed-holder validation before network warnings. |
cmd/crates/soroban-test/tests/it/integration/token/mint.rs |
Adds muxed-recipient regression coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
leighmcculloch
approved these changes
Oct 1, 2026
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
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.
What
stellar token mint --toadvertised muxed (M…) accounts in its--helpbut rejected them only mid-simulation with an opaqueHostError(Value, UnexpectedType). It now rejects a muxed--toup front — before any network round-trip — with a clear message (muxed (M…) recipient accounts are not yet supported for \token mint`), and the help text no longer claimsM…support. The same up-front reordering is applied to the existing muxed guards intoken clawback(--from) andtoken set-admin(--new-admin`) so all three reject muxed recipients before touching the network.Why
Fixes #2772. The command promised something it couldn't do and failed with an error that gave users no indication muxed recipients are unsupported, matching the clearer behaviour
token clawbackalready gives. Moving each guard ahead of the SAC warning (which makes an RPC call) also avoids a wasted network round-trip when the input is already invalid.Known limitations
Muxed (
M…) accounts remain unsupported as mint/clawback/set-admin targets (and as transaction sources, see #2645); this change only surfaces that clearly rather than adding support.