Repository navigation
Add stellar token burn command - #2744
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Adds stellar token burn for SEP-41-compatible contracts, including validation, JSON errors, documentation, and integration tests.
Changes:
- Implements
burn(from, amount)with muxed-account and negative-amount validation. - Registers the command and structured JSON error handling.
- Adds help documentation and integration coverage.
| File | Description |
|---|---|
FULL_HELP_DOCS.md |
Documents the new command. |
cmd/soroban-cli/src/commands/token/mod.rs |
Registers the burn command and errors. |
cmd/soroban-cli/src/commands/token/burn.rs |
Implements token burning. |
cmd/soroban-cli/src/cli.rs |
Adds JSON error-output support. |
cmd/crates/soroban-test/tests/it/integration/token/mod.rs |
Registers burn tests. |
cmd/crates/soroban-test/tests/it/integration/token/burn.rs |
Tests successful burns and validation behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
leighmcculloch
approved these changes
Sep 23, 2026
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a
stellar token burncommand that destroysamountof a token from an account, implementing SEP-41'sburn(from, amount). The signing account is passed with--from, which also authorizes the call. Mirrors the existingtransfercommand minus the destination.Why
The CLI already exposes most of the SEP-41 token interface under
stellar token …(transfer, transfer-from, approve, allowance, balance, name, symbol, decimals) but had no way to burn tokens. This adds it.Known limitations
M…) source accounts are rejected up front, since the invoke pipeline can't yet source from them (Support muxed (M…) source accounts in the contract invoke pipeline #2645).