✅OpenZeppelin Pausable
OpenZeppelin Doc
Contract module which allows children to implement an emergency stop mechanism that can be triggered by an authorized account.
This module is used through inheritance. It will make available the modifiers whenNotPaused
and whenPaused
, which can be applied to the functions of your contract. Note that they will not be pausable by simply including this module, only once the modifiers are put in place.
OpenZeppelin Pausable
State Variables and Constants
There is only one state variable in this contract:
Note that when a contract inherits Pausable, _paused
will be stored in storage slot 0.
Modifiers
_pause() and _unpause()
Note that these two functios are internal functions. If you want to let admin pause the contract externally, you have to implement separate external functions. I learnt this fact from pashov's audit report:
Last updated