Contracts that inherit Stateful can have their state modified to meet a system condition.
Modifiers
onlyWhen
This modifier means that the function can only be called when the system is in the specified state. The state is passed as bytes32. This is used to check if the system is live or shut down. Certain methods can only be called when the system is shut down by governance.
Methods
External
function setState(bytes32 name, bool set) external onlyBy("gov")
Sets the state of a given module. Only callable by the governance address.
function setShutdownState() external onlyBy("shutdown")