Skip to content

Add stellar token decimals subcommand - #2713

Merged
fnando merged 1 commit into
mainfrom
token-decimals
Sep 8, 2026
Merged

fnando merged 1 commit into
mainfrom
token-decimals

Conversation

@fnando

@fnando fnando commented Sep 4, 2026

Copy link
Copy Markdown
Member

What

Adds stellar token decimals, a read-only subcommand returning a token's SEP-41 decimals() metadata as a u32. Resolves a token by --id (contract id, alias, native, or CODE:ISSUER) and prints the value as text or JSON.

Why

Part of #2620 (typed SEP-41 + SAC client), completing the read-metadata group after name and symbol. Stacked on the token-symbol branch; a thin wrapper over contract invoke reusing args::invoke_by_position and args::not_deployed_error.

Known limitations

N/A

Copilot AI balanced review requested due to automatic review settings September 4, 2026 16:13
@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 stellar token decimals for querying SEP-41 decimal metadata from tokens and SACs.

Changes:

  • Implements text and JSON decimal output.
  • Integrates command routing and structured errors.
  • Adds help documentation and integration coverage.

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 subcommand.
cmd/soroban-cli/src/commands/token/mod.rs Registers and dispatches decimals.
cmd/soroban-cli/src/commands/token/decimals.rs Implements decimal metadata queries.
cmd/soroban-cli/src/cli.rs Enables structured JSON errors.
cmd/crates/soroban-test/tests/it/integration/token/mod.rs Registers integration tests.
cmd/crates/soroban-test/tests/it/integration/token/decimals.rs Tests native, issued-asset, and error cases.

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

@fnando fnando self-assigned this Sep 4, 2026
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Sep 4, 2026
Base automatically changed from token-symbol to main September 8, 2026 16:05
@fnando
fnando merged commit 65f3fa5 into main Sep 8, 2026
233 checks passed
@fnando
fnando deleted the token-decimals branch September 8, 2026 17:14
@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