You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support muxed (M…) source accounts in the contract invoke pipeline #2645
Spun out of review feedback on #2644 (stellar token transfer). SEP-41 supports muxed addresses (CAP-67 ScAddress::MuxedAccount), and --from M… almost works today: UnresolvedMuxedAccount resolves it, and arg parsing + simulation accept it.
Problem
It then fails in the shared contract invoke pipeline at cmd/soroban-cli/src/commands/contract/invoke.rs:349:
The M… strkey is handed to a G-only ed25519 parser, aborting with a raw strkey DecodeError. Because this lives in the shared pipeline, contract invoke --source-account M… hits the same failure — it is not specific to token transfer.
Direction
stellar-xdr already provides xdr::MuxedAccount::account_id(). The pipeline should use the underlying AccountId (e.g. config.source_account()?.account_id().to_string()) for the sequence-number lookup and the classic transaction source in build_invoke_contract_tx, while the muxed form keeps flowing into the SEP-41 transfer(from, …) argument so the mux id is preserved on-chain / in events.
Acceptance
--source-account M… / --from M… works end-to-end through simulate → sign → submit.
Add an integration test with an M… source (signing via an identity / --sign-with-*, since an M-literal carries no secret).
Notes
Pre-existing limitation, not a regression from #2644. Until this lands, token transfer may want a clear "muxed source not yet supported" guard error instead of the raw DecodeError.
Part of the "Improve Agent UX for Wallets" epic (#2620).
@fnando quick design question before #2694 gets a review pass, since it deviates from the Direction here on one point and I'd rather settle it in the issue than in review.
The Direction says the muxed form should keep flowing into the SEP-41 transfer(from, …) argument so the mux id is preserved. Empirically that path fails: on a protocol-27 quickstart, a muxed from fails simulation with HostError: Error(Value, UnexpectedType) — consistent with muxed addresses not being accepted by require_auth (the same ruling #2534 encodes for auth entries). So #2694 currently resolves a muxed --from to the underlying G… for the transfer argument, while a muxed --to still flows through as-is and keeps the mux id in the argument and events.
Activity
feat: support muxed (M…) source accounts in the contract invoke pipeline
Galmanus commentedon Sep 1, 2026
@fnando quick design question before #2694 gets a review pass, since it deviates from the Direction here on one point and I'd rather settle it in the issue than in review.
The Direction says the muxed form should keep flowing into the SEP-41
transfer(from, …)argument so the mux id is preserved. Empirically that path fails: on a protocol-27 quickstart, a muxedfromfails simulation withHostError: Error(Value, UnexpectedType)— consistent with muxed addresses not being accepted byrequire_auth(the same ruling #2534 encodes for auth entries). So #2694 currently resolves a muxed--fromto the underlyingG…for thetransferargument, while a muxed--tostill flows through as-is and keeps the mux id in the argument and events.Two ways to go:
--fromworks end-to-end, mux id preserved on the--toside only.fromside that I missed in CAP-67 / the host, I'll rework the PR to that shape.Happy either way — mostly want the direction confirmed before review time is spent on the wrong shape.
Add `stellar token approve` subcommand (#2714)
Add `stellar token transfer-from` command (#2743)
Add `stellar token burn` command (#2744)
Add `stellar token burn-from` command (#2746)
Add `stellar token mint` subcommand (#2716)
Add `stellar token clawback` subcommand (#2717)
Add `stellar token set-admin` subcommand (#2718)
Add `stellar token set-authorized` subcommand (#2719)