Skip to content

Add stellar token set-authorized subcommand - #2719

Open
fnando wants to merge 1 commit into
token-set-adminfrom
token-set-authorized
Open

Add stellar token set-authorized subcommand#2719
fnando wants to merge 1 commit into
token-set-adminfrom
token-set-authorized

Conversation

@fnando

@fnando fnando commented Sep 4, 2026

Copy link
Copy Markdown
Member

What

Adds stellar token set-authorized, a SAC-admin write subcommand that authorizes or deauthorizes an account to hold and transact a token. --admin signs and authorizes the change, --account is the target, and --authorize <true|false> sets the state. Returns a JSON receipt with the tx hash.

Why

Part of #2620 (typed SEP-41 + SAC client), completing the SAC-admin group (mint/set-admin/clawback/set-authorized). A thin wrapper over contract invoke reusing args::invoke_by_position and args::not_deployed_error; the admin only authorizes and is not a set_authorized argument, so only [account, authorize] are passed positionally. set_authorized is part of the SAC StellarAssetInterface, not SEP-41. The happy-path test verifies the change behaviorally via the SAC's authorized getter.

Known limitations

Muxed (M…) source accounts are rejected with a clear error (same constraint as transfer, see #2645). Deauthorizing an existing trustline requires the issuer to have AUTH_REVOCABLE set — an asset-configuration prerequisite, not enforced by the command.

Copilot AI balanced review requested due to automatic review settings September 4, 2026 20:07
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Sep 4, 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.

Pull request overview

Adds the SAC-admin token set-authorized command.

Changes:

  • Implements authorization updates with structured receipts and errors.
  • Registers CLI routing, help documentation, and JSON handling.
  • Adds integration coverage for success and error paths.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
FULL_HELP_DOCS.md Documents the command and options.
cmd/soroban-cli/src/commands/token/set_authorized.rs Implements the command.
cmd/soroban-cli/src/commands/token/mod.rs Registers and dispatches the subcommand.
cmd/soroban-cli/src/cli.rs Enables structured JSON errors.
cmd/crates/soroban-test/tests/it/integration/token/set_authorized.rs Tests behavior and failures.
cmd/crates/soroban-test/tests/it/integration/token/mod.rs Registers the integration tests.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread cmd/soroban-cli/src/commands/token/set_authorized.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog (Not Ready)

Development

Successfully merging this pull request may close these issues.

2 participants