Summary
Add a create_template() function that stores a reusable invoice configuration on-chain. Templates can be instantiated into live invoices with create_from_template(template_id).
Motivation
Teams and DAOs often send the same invoice structure repeatedly. Templates reduce transaction costs and UI friction.
Proposed Change
- Add
InvoiceTemplate type with same fields as Invoice minus deadline and funded
- Add
template_key(id) storage key
- Add
create_template() and create_from_template(template_id, deadline)
- Template counter separate from invoice counter
Acceptance Criteria
Summary
Add a
create_template()function that stores a reusable invoice configuration on-chain. Templates can be instantiated into live invoices withcreate_from_template(template_id).Motivation
Teams and DAOs often send the same invoice structure repeatedly. Templates reduce transaction costs and UI friction.
Proposed Change
InvoiceTemplatetype with same fields as Invoice minus deadline and fundedtemplate_key(id)storage keycreate_template()andcreate_from_template(template_id, deadline)Acceptance Criteria