Skip to content

Add stellar token transfer-from command - #2743

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

fnando merged 1 commit into
mainfrom
token-transfer-from

Conversation

@fnando

@fnando fnando commented Sep 22, 2026

Copy link
Copy Markdown
Member

What

Adds a new stellar token transfer-from subcommand, implementing SEP-41's transfer_from(spender, from, to, amount). A spender who holds an allowance (granted via token approve) can move tokens out of an owner's balance to a destination. The spender signs and authorizes; --from is the owner whose funds move and --to is the recipient. Both accept a G…/M… account, a C… contract, or an alias.

Why

stellar token covered 7 of SEP-41's 10 interface functions, but not transfer_from, so delegated transfers via an allowance weren't possible from the CLI.

Known limitations

Muxed (M…) source accounts are rejected up front for --spender, matching token transfer/approve, since the invoke pipeline can't yet source a transaction from a muxed account (#2645).

Copilot AI lite review requested due to automatic review settings September 22, 2026 16:37
@github-project-automation github-project-automation Bot moved this to Backlog (Not Ready) in DevX Sep 22, 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.

Copilot review overview

🟢 Approval recommended

No unresolved review issues were identified.

Review effort: Lite
Findings: None

What changed in this PR

Adds stellar token transfer-from for SEP-41 delegated token transfers using allowances.

Changes:

  • Implements spender-signed transfers with account, contract, and alias resolution.
  • Registers the command and structured JSON errors.
  • Adds documentation and integration tests.
File Description
FULL_HELP_DOCS.md Documents the new command.
cmd/​soroban-cli/​src/​commands/​token/​transfer_from.rs Implements delegated transfers.
cmd/​soroban-cli/​src/​commands/​token/​mod.rs Registers the command and errors.
cmd/​soroban-cli/​src/​cli.rs Enables JSON error formatting.
cmd/​crates/​soroban-test/​tests/​it/​integration/​token/​transfer_from.rs Adds integration coverage.
cmd/​crates/​soroban-test/​tests/​it/​integration/​token/​mod.rs Registers integration tests.

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

@fnando
fnando added this pull request to stack #2745 September 22, 2026 17:03
Copilot AI review requested due to automatic review settings September 22, 2026 17:12
@fnando
fnando force-pushed the token-transfer-from branch from 310c5e1 to 5bcf7ad Compare September 22, 2026 17:12
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Sep 22, 2026
@fnando fnando self-assigned this Sep 22, 2026
@fnando
fnando requested review from a team and leighmcculloch September 22, 2026 17:12

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 reviewed changes have no unresolved blocking issues.

Review effort: Lite
Findings: None

Copilot AI review requested due to automatic review settings September 22, 2026 23:21
@fnando
fnando force-pushed the token-transfer-from branch from 5bcf7ad to 30e6aae Compare September 22, 2026 23: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

🟢 Approval recommended

The implementation, documentation, registration, error handling, and integration coverage are complete.

Review effort: Lite
Findings: None

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

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 or remove the incorrect muxed-spender allowance workaround.

Review effort: Lite
Findings: None

@fnando
fnando merged commit b9a2063 into main Sep 23, 2026
244 checks passed
@fnando
fnando deleted the token-transfer-from branch September 23, 2026 00:10
@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