Skip to content

Implement partial fund release to individual recipients #330

Description

@Kingsman-99

Overview

The current release_funds disburses to all recipients at once. Add a partial release function so a creator can pay individual recipients progressively rather than all at once.

Acceptance Criteria

  • release_to_recipient(invoice_id: u64, recipient: Address) callable only by the creator
  • Transfers only that recipient's share; marks them as paid in the invoice state
  • Invoice must be fully funded before any partial release
  • release_funds still available for releasing all remaining unpaid recipients in one call
  • get_invoice adds paid_recipients: Vec<Address> to the invoice struct
  • A recipient cannot be paid twice: second call throws RecipientAlreadyPaid
  • Emits RecipientPaid { invoice_id, recipient, amount, ledger } per partial release
  • Integration tests: pay 1 of 3 recipients, pay remaining 2, full release after partial

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptsfeatureNew contract feature or operation

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions