Skip to content

Add Pause/Unpause Mechanism to Vault #34

@greatest0fallt1me

Description

@greatest0fallt1me

Description
Add a pause flag and only allow deposit/deduct when not paused. Only owner (or admin) can pause and unpause. Emit Paused/Unpaused events. Useful for emergency stop.

Requirements and context

  • Must be secure, tested, and documented
  • Should be efficient and easy to review
  • When paused, deposit and deduct revert; balance and get_meta still readable

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/vault-pause
  • Implement changes
    • Add storage paused: bool; set false in init; add pause() and unpause() (owner-only); in deposit and deduct require !paused
    • Add tests: when paused deposit and deduct panic; unpause restores
  • Test and commit
    • Run tests; include test output and security notes
  • Example commit message: feat: pause and unpause vault

Guidelines

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

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