Skip to content

Add stellar token set-admin subcommand - #2718

Merged
fnando merged 1 commit into
mainfrom
token-set-admin
Sep 29, 2026
Merged

fnando merged 1 commit into
mainfrom
token-set-admin

Conversation

@fnando

@fnando fnando commented Sep 4, 2026 •

Copy link
Copy Markdown
Member

What

Adds stellar token set-admin, a SAC-admin write subcommand that transfers administration of a token. --source (the current admin) signs and authorizes the change, and --new-admin is the successor. Returns a JSON receipt with the tx hash.

Why

Part of #2620 (typed SEP-41 + SAC client), a SAC-admin command alongside mint/clawback. A thin wrapper over contract invoke reusing args::invoke_by_position and args::not_deployed_error. Like the other transaction commands it flattens config::Args, so the signer comes from the standard --source (env STELLAR_ACCOUNT, optional with stellar keys use); like the other admin commands, the signer only authorizes and is not a set_admin argument, so only [new_admin] is passed positionally. The happy-path test verifies control transferred behaviorally — after set-admin, the new admin can mint.

Known limitations

Muxed (M…) source accounts are rejected with a clear error (same constraint as transfer, see #2645).

Copilot AI balanced review requested due to automatic review settings September 4, 2026 19:30
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Sep 4, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Sep 4, 2026
@fnando fnando self-assigned this 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 stellar token set-admin for transferring SAC administration through the existing contract invocation pipeline.

Changes:

  • Adds command routing, typed errors, receipts, and help documentation.
  • Adds integration coverage for transfer, undeployed SACs, and muxed sources.

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 subcommand.
cmd/soroban-cli/src/commands/token/set_admin.rs Implements administration transfer.
cmd/soroban-cli/src/commands/token/mod.rs Registers and dispatches the command.
cmd/soroban-cli/src/cli.rs Enables JSON error formatting.
cmd/crates/soroban-test/tests/it/integration/token/set_admin.rs Adds integration tests.
cmd/crates/soroban-test/tests/it/integration/token/mod.rs Registers the test module.

💡 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_admin.rs

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Comment thread FULL_HELP_DOCS.md
Comment thread cmd/soroban-cli/src/commands/token/set_admin.rs
Copilot AI review requested due to automatic review settings September 28, 2026 21:50

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

🟡 Changes recommended

Accepting a muxed successor can leave administration unusable through the current CLI, and the administrator documentation is inaccurate.

Review effort: Balanced
Findings: 1 High severity · 4 Low severity

Open (5)

Comment thread cmd/soroban-cli/src/commands/token/set_admin.rs
Comment thread FULL_HELP_DOCS.md Outdated
Comment thread cmd/soroban-cli/src/commands/token/set_admin.rs Outdated
Copilot AI review requested due to automatic review settings September 28, 2026 22:20

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.

Comment thread FULL_HELP_DOCS.md Outdated
Copilot AI review requested due to automatic review settings September 28, 2026 23:47

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 AI review requested due to automatic review settings September 29, 2026 00:20

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.

Base automatically changed from token-clawback to main September 29, 2026 00:24
Copilot AI review requested due to automatic review settings September 29, 2026 00:53

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

The command is consistently integrated, validates current limitations, and has comprehensive integration coverage.

Review effort: Balanced
Findings: None

Resolved since last review (4)

@fnando
fnando merged commit 9381772 into main Sep 29, 2026
146 checks passed
@fnando
fnando deleted the token-set-admin branch September 29, 2026 08:02
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.

3 participants