Skip to content

Pair clear_all_invoices with backup and restore safety checks #714

@Baskarayelu

Description

@Baskarayelu

Description

Ensure admin clear operations cannot leave orphan indexes; document restore ordering.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • Align with existing Soroban contract patterns in quicklendx-contracts

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/clear-invoices-restore-safety
  • Implement changes
  • Write contract: src/invoice.rs, src/backup.rs
  • Write comprehensive tests: src/test_backup.rs, src/test_storage.rs
  • Add documentation: docs/contracts/backup.md
  • Include NatSpec-style comments (Rust doc comments on public items)
  • Validate security assumptions

Test and commit

  • Run tests
  • Cover edge cases
  • Include test output and security notes

Example commit message

feat: pair clear_all_invoices with restore safety

Guidelines

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programbackupAuto label for contract issues: backuppriority-mediumAuto label for contract issues: priority-mediumsmart-contractsAuto label for contract issues: smart-contractsstorageAuto label for contract issues: storagetestingAuto label for contract issues: testing

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions