Pausable
Pausable - version: 0.1.12
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
andwhenPaused
, 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.
Constants & Variables
bool private _paused;
Emitted when the pause is triggered by a pauser (
account
).Parameters
Name | Type | Description |
---|---|---|
account | address | |
Emitted when the pause is lifted by a pauser (
account
).Parameters
Name | Type | Description |
---|---|---|
account | address | |
Modifier to make a function callable only when the contract is not paused.
modifier whenNotPaused() internal
Arguments
Modifier to make a function callable only when the contract is paused.
modifier whenPaused() internal
Arguments
Initializes the contract in unpaused state. Assigns the Pauser role to the deployer.
function () internal nonpayable
Arguments
Returns true if the contract is paused, and false otherwise.
function paused() public view
returns(bool)
Arguments
Called by a pauser to pause, triggers stopped state.
function pause() public nonpayable onlyPauser whenNotPaused
Arguments
Called by a pauser to unpause, returns to normal state.
function unpause() public nonpayable onlyPauser whenPaused
Arguments
Last modified 1yr ago