Skip to content

[Contract] Automated Contract Emergency Halt Interface #393

Description

@gabito1451

Independence Note: Provide the interface and storage flag only. No actual halting of other functions yet.

Context:
In case of an emergency, admins need a single "Big Red Button" to stop all contract interactions globally while they investigate a potential issue.

Objective:
Implement a global 'Halt' flag and interface.

Acceptance Criteria:

  • In the state, add an is_halted boolean flag.
  • Implement halt_contract(env) and resume_contract(env) secured by require_admin().
  • Create a utility ensure_not_halted(env) that panics if the flag is true.
  • Write unit tests for setting and clearing the flag.

Technical Pointers:

  • This interface is the foundation for the circuit breaker pattern mentioned in other tasks.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions