From 5bf973951c8ed11891b5d21d880626af8a36d6b7 Mon Sep 17 00:00:00 2001 From: Oksana Kryschuk Date: Thu, 20 Feb 2025 08:34:55 +0000 Subject: [PATCH] docs: update EMERGENCY_PAUSE_USAGE.md --- docs/EMERGENCY_PAUSE_USAGE.md | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/EMERGENCY_PAUSE_USAGE.md diff --git a/docs/EMERGENCY_PAUSE_USAGE.md b/docs/EMERGENCY_PAUSE_USAGE.md new file mode 100644 index 0000000..c3f7f9b --- /dev/null +++ b/docs/EMERGENCY_PAUSE_USAGE.md @@ -0,0 +1,39 @@ +# Emergency Pause and Guarded Wallet usage + +This project includes a lightweight pause mechanism provided by the OwnablePause pattern. The contract can be paused by the owner to prevent certain operations from executing during emergencies or maintenance windows. + +Key concepts: + +- Pausable by owner: The contract exposes pause/unpause controls via OwnablePause. When paused, sensitive operations can be restricted. +- Guarded wallet (extension): A guarded wallet address can be configured to enable additional admin-like workflows or offload certain administrative tasks. This is designed to be extended by future code paths. + +How to use during development and in production: + +1) Pause the contract (safest first): + +- Ensure you are the contract owner. +- Call pause() to suspend operations guarded by the pause modifier. + +2) Configure a guarded wallet (optional extension): + +- Provide a guarded wallet address that your deployment uses for admin tasks. +- This can help separate concerns and enable safer operational flows. + +3) Unpause when ready: + +- After investigations or maintenance, call unpause() to resume normal operations. + +Example concepts (not a direct call surface, depends on your contract wiring): + +- Pausable actions typically decorate sensitive functions with a modifier like whenNotPaused. While paused, those functions revert. +- Guarded wallet can be used to implement admin-specific logic in future function paths or in external scripts that interact with the ledger. + +Notes: + +- This document describes the intended usage pattern and does not replace your own security reviews. +- If you extend the contract to expose more pause-protected entry points, ensure you update tests to cover pause/unpause behavior and access control. + +For developers + +- Review contracts/OwnablePause.sol to understand how pause control is implemented. +- Consider adding unit tests that verify that when paused, only privileged actions fail and that unpause restores functionality.