Skip to content

feat: add invoice templates — reuse recurring configs without deploying new invoices #55

Description

@MarcusDavidG

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

  • Template stored with unique ID
  • Invoice created from template matches template fields
  • test: create template and instantiate
  • test: template not found panics with clear message

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions