Skip to content

feat(stellar): implement batch sender contract path - #222

Merged
truthixify merged 6 commits into
wraith-protocol:developfrom
fwseyi:feat/implement-stellar-batch-sender-contract-path
Sep 28, 2026
Merged

truthixify merged 6 commits into
wraith-protocol:developfrom
fwseyi:feat/implement-stellar-batch-sender-contract-path

Conversation

@fwseyi

@fwseyi fwseyi commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Implement the Stellar stealth batch-sender Soroban contract path.
  • Support native XLM and issued-asset transfers.
  • Convert payment amounts to stroops and preserve stealth metadata.
  • Validate contract configuration, asset consistency, and operation limits.
  • Add focused success and regression coverage.

Validation

  • pnpm exec vitest run test/chains/stellar/tx-builder.test.ts — 21 passed
  • pnpm exec vitest run test/chains/stellar — 909 passed, 5 skipped
  • pnpm exec tsc --noEmit — passed
  • pnpm build — passed

Closes #199

@drips-wave

drips-wave Bot commented Sep 25, 2026

Copy link
Copy Markdown

@fwseyi Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@truthixify

Copy link
Copy Markdown
Contributor

The contract call does not match the deployed ABI. batch_send expects sender, a vector of Transfer structs, and asset, but this PR sends seven separate arguments. Please build the Transfer values and regenerate the API report.

@fwseyi

fwseyi commented Sep 26, 2026

Copy link
Copy Markdown
Contributor Author

The API report conflict has been resolved and the accidental CI setup issue was fixed. The latest CI run is now fully green: all regular checks pass, with only the two expected nightly checks skipped. PR #222 is clean and mergeable.

@truthixify

Copy link
Copy Markdown
Contributor

The call now has the right three arguments, but each Transfer still includes scheme_id, which is not part of the contract struct. Please encode exactly the four ABI fields and add a contract simulation or round-trip decode test.

@fwseyi

fwseyi commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback. I removed scheme_id from the Transfer struct so it now encodes exactly the four ABI fields, and added round-trip decoding assertions to verify the payload shape. The changes are pushed in commit 0bfc38c, and all regular CI checks are passing.

@truthixify

Copy link
Copy Markdown
Contributor

The transfer fields now match the contract, but the ScMapEntry keys are not sorted. Soroban requires canonical map order. Use nativeToScVal, scvSortedMap, or sort the keys before building the struct.

@fwseyi

fwseyi commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for catching that. I updated the transfer encoding to use xdr.scvSortedMap() so the ScMapEntry keys are emitted in canonical Soroban order, and updated the round-trip test to verify the exact key order. The fix is pushed in commit 8e20d5f; the focused tests, build, and Stellar API check pass locally. GitHub CI has restarted for the new commit.

@truthixify

Copy link
Copy Markdown
Contributor

The batch path and tests look good. SDK #227 changed the shared API report, so this now conflicts. Please rebase on develop and regenerate the API report.

@fwseyi
fwseyi force-pushed the feat/implement-stellar-batch-sender-contract-path branch from 8e20d5f to 72fd0fd Compare September 28, 2026 17:40
@fwseyi

fwseyi commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Rebased PR #222 onto the latest develop, including SDK #227, and resolved the shared API-report conflict. I regenerated and validated the Stellar API report, and the build passes. The rebased changes are now pushed in commit 72fd0fd; CI has restarted.

@truthixify
truthixify merged commit 705a1f7 into wraith-protocol:develop Sep 28, 2026
22 checks passed
@truthixify

Copy link
Copy Markdown
Contributor

Merged. The batch sender call now matches the Soroban ABI, uses canonical map ordering, and passes the focused tests. Thanks @fwseyi.

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.

[Wave 9] Implement the Stellar batch-sender contract path

2 participants