Skip to content

feat(contracts): add emergency pause circuit breaker to payment router#254

Open
oche2920 wants to merge 1 commit into
Fracverse:masterfrom
oche2920:feat/payment-router-emergency-pause
Open

feat(contracts): add emergency pause circuit breaker to payment router#254
oche2920 wants to merge 1 commit into
Fracverse:masterfrom
oche2920:feat/payment-router-emergency-pause

Conversation

@oche2920
Copy link
Copy Markdown

Summary

Adds emergency pause/unpause functionality to the payment router contract as a circuit breaker for security incidents.

Changes

  • KEY_PAUSED storage key in contract instance storage
  • require_not_paused() helper — panics with ContractPaused when active
  • Admin-only pause() and unpause() with require_auth() access control
  • (admin, paused) and (admin, unpaused) events emitted on state change
  • pay() guarded with require_not_paused() check
  • is_paused() view function
  • Full test coverage: initial state, idempotency, auth guards, event assertions, multi-cycle pause/unpause

Closes #174

- Add KEY_PAUSED storage key to contract instance storage
- Implement require_not_paused() helper that panics with ContractPaused
- Add admin-only pause() and unpause() functions with access control
- Emit (admin, paused) and (admin, unpaused) events on state change
- Guard pay() with require_not_paused() check
- Add is_paused() view function
- Full test coverage: initial state, idempotency, auth guards, event assertions, multi-cycle

Closes Fracverse#174
@ONEONUORA
Copy link
Copy Markdown
Contributor

@oche2920 Pls implement your issue description

@ONEONUORA
Copy link
Copy Markdown
Contributor

@oche2920
Pls update on this issue
You will be unassign in 6hrs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contract: Add Emergency Pause to Payment Router

2 participants