Skip to content

[codex] Expose same-multi swap spent amounts#17

Open
caydyan wants to merge 1 commit into
BitflowFinance:mainfrom
caydyan:codex/same-multi-spent-output
Open

[codex] Expose same-multi swap spent amounts#17
caydyan wants to merge 1 commit into
BitflowFinance:mainfrom
caydyan:codex/same-multi-spent-output

Conversation

@caydyan

@caydyan caydyan commented Jun 22, 2026

Copy link
Copy Markdown

Summary

  • add x-amount-spent to swap-x-for-y-same-multi responses
  • add y-amount-spent to swap-y-for-x-same-multi responses
  • update generated Clarigen types and add router tests that compare the new fields with results[].in totals and token balance deltas

Why

The same-token multi-swap helpers already aggregate output and per-hop in/out results, but their top-level response did not expose the aggregate input actually consumed. This makes partial-fill accounting harder for callers and integrators. The simple multi-swap entrypoints already return top-level input/output fields; this brings the same-multi helpers in line with that behavior.

Validation

  • git diff --check
  • clarinet check contracts/dlmm-swap-router-v-1-1.clar passes with the repo's existing warnings
  • npx vitest run tests/routers/swap-router.test.ts is currently blocked before tests execute by an existing trait-signature error: invalid signature for method get-pool-for-add regarding trait's specification <dlmm-pool-trait>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant