Label: complexity: high
Points: 200
Description
Adding many recipients one by one via add_recipient() is inefficient for large team invoices. This issue adds add_recipients_batch() allowing the creator to append up to 50 recipients with amounts in a single transaction before any payment is received.
Technical Context
Involves lib.rs — new add_recipients_batch(env, invoice_id: u64, new_recipients: Vec<Address>, new_amounts: Vec<i128>). Requires creator auth. Assert invoice.funded == 0. Assert new_recipients.len() == new_amounts.len(). Assert new_recipients.len() <= 50. Extend both Vecs and save.
Acceptance Criteria
Label: complexity: high
Points: 200
Description
Adding many recipients one by one via
add_recipient()is inefficient for large team invoices. This issue addsadd_recipients_batch()allowing the creator to append up to 50 recipients with amounts in a single transaction before any payment is received.Technical Context
Involves
lib.rs— newadd_recipients_batch(env, invoice_id: u64, new_recipients: Vec<Address>, new_amounts: Vec<i128>). Requires creator auth. Assertinvoice.funded == 0. Assertnew_recipients.len() == new_amounts.len(). Assertnew_recipients.len() <= 50. Extend both Vecs and save.Acceptance Criteria
"payments already received"ifinvoice.funded > 0"batch too large"if more than 50 recipients providedcargo clippypasses with zero warnings