Skip to content

Implement Invoice Due Date Bounds #328

@Baskarayelu

Description

@Baskarayelu

Description
Enforce max due date (e.g. now + max_due_date_days from protocol config) on store_invoice and upload_invoice so due dates cannot be set arbitrarily far in the future.

Requirements and context

  • Must be secure, tested, and documented
  • Use protocol config or constants
  • Smart contracts only (Soroban/Rust)

Suggested execution

  1. Fork the repo and create a branch
    git checkout -b feature/invoice-due-date-bounds
  2. Implement changes
    • Implement: validation in store_invoice/upload_invoice using init/protocol_limits
    • Add tests for max due date boundary
    • Document in docs/contracts/invoice.md
  3. Test and commit
    • Run cargo test
    • Include test output and security notes

Example commit message
feat: invoice due date bounds with tests and docs

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions