Skip to content

Implement emergency pause/unpause for the entire contract #328

Description

@Kingsman-99

Overview

Add a circuit-breaker pattern so the admin can halt all state-changing operations during an incident without upgrading the contract. Read-only functions remain available while paused.

Acceptance Criteria

  • pause() and unpause() functions callable only by the admin
  • While paused, the following functions revert with ContractPaused: create_invoice, pay_invoice, release_funds, claim_refund, raise_dispute, resolve_dispute
  • Read-only functions (get_invoice, get_leaderboard, get_stats) remain usable while paused
  • is_paused() view function returns the current pause state
  • Emits ContractPaused { admin, ledger } and ContractUnpaused { admin, ledger } events
  • Pause state stored in instance storage (survives ledger boundary)
  • Integration tests: pause → verify write blocked → unpause → verify write resumes

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programcomplexity: highComplex feature requiring deep knowledge - 200 ptssecuritySecurity hardening and access control

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions