Skip to content

feat: implement issues #526 #527 #528 #529 - min recipients, payer history, admin two-step handover, e2e lifecycle test - #649

Open
edwardfavour998-code wants to merge 1 commit into
Stellar-split:mainfrom
edwardfavour998-code:feature/issues-526-527-528-529
Open

feat: implement issues #526 #527 #528 #529 - min recipients, payer history, admin two-step handover, e2e lifecycle test#649
edwardfavour998-code wants to merge 1 commit into
Stellar-split:mainfrom
edwardfavour998-code:feature/issues-526-527-528-529

Conversation

@edwardfavour998-code

Copy link
Copy Markdown

Summary

Implements four Drips Wave issues in a single branch:

#526 — Minimum Recipient Count Enforcement

Added a configurable minimum recipient floor (set_min_recipients / get_min_recipients) stored in instance storage. _create_invoice_inner now panics with
TooFewRecipients when the recipient count falls below the configured minimum (default 2). Prevents the splitting infrastructure from being used as a
plain direct-payment contract.

#527 — Contributor Payment History Query

Introduced PaymentRecord (invoice_id, amount, ledger) in types.rs and a PayerHistory(Address) persistent storage key. Every successful contribution now
appends a record to the payer's history. Added get_payer_history(payer, offset, limit) with pagination support for wallets and dashboards to query full
contribution history without off-chain indexing.

#528 — Contract Admin Transfer with Two-Step Handover

Extended the existing propose_admin / accept_admin flow with event emissions — AdminTransferProposed and AdminTransferCompleted — so off-chain monitors
can track handover state. The two-step pattern (propose → accept with require_auth) was already in place; this completes it with proper observability.

#529 — End-to-End Integration Test for Full Invoice Lifecycle

Created tests/e2e_lifecycle.rs covering the complete invoice lifecycle: three contributors funding a three-way split, token balance assertions before
and after payout, event emission checks, and archival/query verification using MockAuth.

Closes #526
Closes #527
Closes #528
Closes #529

Files Changed

  • contracts/split/src/lib.rs — new methods, storage reads, event calls, payer history append
  • contracts/split/src/types.rs — PaymentRecord struct
  • contracts/split/src/error.rs — TooFewRecipients variant
  • contracts/split/src/events.rs — admin_transfer_proposed, admin_transfer_completed
  • contracts/split/src/storage_keys.rs — MinRecipients, PayerHistory keys
  • tests/e2e_lifecycle.rs — new end-to-end test file
  • .gitignore — added tests/snapshots/ and tests/fixtures/

Notes

  • No existing behaviour is broken — min_recipients defaults to 2 and is only enforced after an admin explicitly calls set_min_recipients.
  • Storage key additions are collision-free and covered by the existing uniqueness tests.
  • No migration is required for existing invoices.

…lit#528 Stellar-split#529 - min recipients, payer history, admin two-step handover, e2e lifecycle test
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@edwardfavour998-code 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

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

Labels

None yet

Projects

None yet

1 participant