Skip to content

Add stellar token allowance subcommand - #2715

Merged
fnando merged 2 commits into
mainfrom
token-allowance
Sep 8, 2026
Merged

fnando merged 2 commits into
mainfrom
token-allowance

Conversation

@fnando

@fnando fnando commented Sep 4, 2026

Copy link
Copy Markdown
Member

What

Adds stellar token allowance, a read-only subcommand returning the SEP-41 allowance --from granted --spender. Prints the raw smallest-unit value by default, or a decimal-aware value with --decimal (which reads the token's decimals), as text or JSON.

Why

Part of #2620 (typed SEP-41 + SAC client), completing the read group. Mirrors balance, reusing args::invoke_by_position, args::not_deployed_error, and FixedPoint. Stacked on token-approve, so its tests seed state with a clean approve→allowance round-trip.

Known limitations

N/A

Copilot AI balanced review requested due to automatic review settings September 4, 2026 17:27
@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 read-only stellar token allowance command, completing another SEP-41 read operation from #2620.

Changes:

  • Queries raw or decimal-formatted allowances.
  • Supports text, JSON, and structured errors.
  • Adds help documentation and integration tests.

Reviewed changes

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

Show a summary per file
File Description
FULL_HELP_DOCS.md Documents the new command.
cmd/soroban-cli/src/commands/token/mod.rs Registers and dispatches allowance.
cmd/soroban-cli/src/commands/token/allowance.rs Implements allowance querying and formatting.
cmd/soroban-cli/src/cli.rs Enables JSON error output.
cmd/crates/soroban-test/tests/it/integration/token/mod.rs Registers the test module.
cmd/crates/soroban-test/tests/it/integration/token/allowance.rs Tests values, decimals, zero allowance, and deployment errors.

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

@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 review requested due to automatic review settings September 4, 2026 18:36

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 3 comments.

Comment thread cmd/soroban-cli/src/commands/token/allowance.rs Outdated
Comment thread FULL_HELP_DOCS.md Outdated
Comment thread cmd/soroban-cli/src/commands/token/allowance.rs Outdated
Base automatically changed from token-approve to main September 8, 2026 18:01
Copilot AI review requested due to automatic review settings September 8, 2026 18:51

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 9 out of 9 changed files in this pull request and generated no new comments.

@fnando
fnando merged commit f6c372a into main Sep 8, 2026
234 checks passed
@fnando
fnando deleted the token-allowance branch September 8, 2026 19:43
@github-project-automation github-project-automation Bot moved this from Needs Review to Done in DevX Sep 8, 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