Skip to content

Reject muxed accounts when minting tokens - #2783

Merged
fnando merged 2 commits into
mainfrom
token-mint-reject-muxed-to
Oct 1, 2026
Merged

fnando merged 2 commits into
mainfrom
token-mint-reject-muxed-to

Conversation

@fnando

@fnando fnando commented Oct 1, 2026

Copy link
Copy Markdown
Member

What

stellar token mint --to advertised muxed (M…) accounts in its --help but rejected them only mid-simulation with an opaque HostError(Value, UnexpectedType). It now rejects a muxed --to up 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 claims M…support. The same up-front reordering is applied to the existing muxed guards intoken clawback (--from) and token 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 clawback already 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.

Copilot AI lite review requested due to automatic review settings October 1, 2026 21:15
@fnando fnando self-assigned this Oct 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copilot AI lite review requested due to automatic review settings October 1, 2026 22:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

No unresolved blocking issues were identified in the reviewed changes.

Review effort: Lite
Findings: None

@fnando
fnando enabled auto-merge (squash) October 1, 2026 22:10
@fnando
fnando merged commit 7fcc73f into main Oct 1, 2026
146 of 147 checks passed
@fnando
fnando deleted the token-mint-reject-muxed-to branch October 1, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

token mint --to advertises M… accounts but fails with an opaque host error

3 participants