Skip to content

Invoice Co-Creator Authorization #490

Description

@Kingsman-99

Description

Some invoices are issued jointly by multiple parties and should allow any of the designated co-creators to perform creator-privileged operations such as extending deadlines or cancelling. A co-creator list should supplement the primary creator.

Technical Context

Add co_creators: Vec<Address> to the Invoice struct in types.rs. Introduce a require_creator_or_cocreator(invoice_id, caller) helper in contracts/split/src/lib.rs that checks membership. Add add_co_creator and remove_co_creator methods restricted to the primary creator. Store the list under CoCreators(invoice_id) in storage::persistent.

Acceptance Criteria

  • Co-creators can call extend_deadline and cancel_invoice
  • Co-creators cannot add or remove other co-creators (primary creator only)
  • The primary creator can remove a co-creator at any time
  • CoCreatorAdded and CoCreatorRemoved events are emitted from events.rs
  • Co-creator list is bounded to prevent unbounded storage growth
  • All CI checks (cargo build --target wasm32-unknown-unknown, cargo test, cargo clippy) pass and the branch has no merge conflicts

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptssecuritySecurity hardening and access control

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions