From ceeb2f17a0fd1da3f47e28c6a73a026883020c09 Mon Sep 17 00:00:00 2001 From: "stellar-triage-bot[bot]" <333411864+stellar-triage-bot[bot]@users.noreply.github.com> Date: Fri, 6 Nov 2026 18:39:50 +0000 Subject: [PATCH] assets: match the SEP-41 transfer and symbol types The interface list gave transfer an Address destination and symbol() a Symbol return type. SEP-41 and soroban-sdk declare MuxedAddress and String. Add transfer_from to show it keeps a plain Address, use the spec's live_until_ledger name for approve, and note that the generated client takes an &Address directly. --- .../scenarios/assets/06-sep41-interface-types.json | 13 +++++++++++++ skills/assets/SKILL.md | 11 ++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 evals/scenarios/assets/06-sep41-interface-types.json diff --git a/evals/scenarios/assets/06-sep41-interface-types.json b/evals/scenarios/assets/06-sep41-interface-types.json new file mode 100644 index 0000000..319cf2b --- /dev/null +++ b/evals/scenarios/assets/06-sep41-interface-types.json @@ -0,0 +1,13 @@ +{ + "skills": [ + "assets" + ], + "query": "I'm writing a Soroban contract that implements the SEP-41 token interface. What are the exact signatures for transfer, transfer_from and symbol?", + "expected_behavior": [ + "Gives `transfer(from: Address, to: MuxedAddress, amount: i128)`, with a `MuxedAddress` destination", + "Gives `transfer_from(spender: Address, from: Address, to: Address, amount: i128)`, keeping a plain `Address` destination", + "Gives `symbol() -> String`, not `Symbol`", + "Does not claim existing callers must convert an `Address` by hand: the generated client accepts `impl Into`, so `&to` works", + "Does not suggest `&to.into()` for the client call, since it fails type inference (E0283)" + ] +} diff --git a/skills/assets/SKILL.md b/skills/assets/SKILL.md index 1658beb..e649323 100644 --- a/skills/assets/SKILL.md +++ b/skills/assets/SKILL.md @@ -377,12 +377,17 @@ pub fn transfer_asset( SAC implements the standard SEP-41 token interface: - `balance(id: Address) -> i128` -- `transfer(from: Address, to: Address, amount: i128)` -- `approve(from: Address, spender: Address, amount: i128, expiration_ledger: u32)` +- `transfer(from: Address, to: MuxedAddress, amount: i128)` +- `transfer_from(spender: Address, from: Address, to: Address, amount: i128)` +- `approve(from: Address, spender: Address, amount: i128, live_until_ledger: u32)` - `allowance(from: Address, spender: Address) -> i128` - `decimals() -> u32` - `name() -> String` -- `symbol() -> Symbol` +- `symbol() -> String` + +Only `transfer` takes a `MuxedAddress` destination. The generated +`TokenClient` accepts `impl Into` there, so pass an `&Address` +as `&to` (as above), never `&to.into()`, which fails to compile (E0283). ## When to Use What