Skip to content

Add stellar token burn-from command - #2746

Merged
fnando merged 1 commit into
mainfrom
token-burn-from
Sep 23, 2026
Merged

fnando merged 1 commit into
mainfrom
token-burn-from

Conversation

@fnando

@fnando fnando commented Sep 22, 2026

Copy link
Copy Markdown
Member

What

Adds a stellar token burn-from command that lets a spender destroy amount of an owner's tokens by drawing on a granted allowance, implementing SEP-41's burn_from(spender, from, amount). The spender is passed with --spender (which signs and authorizes), the owner with --from. Mirrors the existing transfer-from command minus the destination.

Why

The CLI has burn (self-signed) but no delegated variant. This adds burn-from, completing the burn pair the same way transfer / transfer-from are paired.

Known limitations

Copilot AI lite review requested due to automatic review settings September 22, 2026 17:10
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Sep 22, 2026
@fnando
fnando added this pull request to stack #2745 September 22, 2026 17:10

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

Preserve or explicitly reject muxed identity aliases to avoid targeting the wrong owner.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Adds the delegated SEP-41 stellar token burn-from command, allowing spenders to burn tokens from an owner's allowance.

Changes:

  • Implements and registers burn-from.
  • Adds JSON errors, documentation, and validation.
  • Adds integration tests.
File Summary
FULL_HELP_DOCS.md Documents the new command.
cmd/​soroban-cli/​src/​commands/​token/​mod.rs Registers the command and errors.
cmd/​soroban-cli/​src/​commands/​token/​burn_from.rs Implements delegated token burning.
cmd/​soroban-cli/​src/​cli.rs Adds JSON error-format support.
cmd/​crates/​soroban-test/​tests/​it/​integration/​token/​mod.rs Registers integration tests.
cmd/​crates/​soroban-test/​tests/​it/​integration/​token/​burn_from.rs Tests successful and invalid cases.

💡 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/burn_from.rs
Copilot AI review requested due to automatic review settings September 22, 2026 17:15

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 review comments were identified.

Review effort: Lite
Findings: 1 High severity

Open (1)

Copilot AI review requested due to automatic review settings September 22, 2026 23:21

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

The muxed-spender workaround does not preserve the exact allowance address and must be corrected.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)

Comment thread cmd/soroban-cli/src/commands/token/burn_from.rs Outdated
Copilot AI review requested due to automatic review settings September 22, 2026 23:27

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

🔵 Needs a closer look

Clarify the fallback message so it does not imply a muxed spender’s underlying account can always use its allowance.

Review effort: Lite
Findings: 1 High severity · 1 Medium severity

Open (2)

Base automatically changed from token-burn to main September 23, 2026 19:34
@fnando fnando self-assigned this Sep 23, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Sep 23, 2026
@fnando
fnando requested review from a team and leighmcculloch September 23, 2026 20:25

@leighmcculloch leighmcculloch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

There's a couple copilot comments that worth a look otherwise lgtm.

Copilot AI review requested due to automatic review settings September 23, 2026 22:25

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

🔵 Needs a closer look

Resolve the alias-versus-muxed-account check so valid contract aliases are not rejected.

Review effort: Lite
Findings: None

Resolved since last review (2)

@fnando
fnando requested a review from a team September 23, 2026 22:44
@fnando
fnando merged commit 5acb463 into main Sep 23, 2026
244 checks passed
@fnando
fnando deleted the token-burn-from branch September 23, 2026 22:45
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX Sep 23, 2026
@fnando fnando mentioned this pull request Oct 7, 2026
4 tasks done
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