This contract provides a mechanism to halt the execution of specific functions if a pause condition is activated.
uint256 PAUSE_SLOT
modifier whenNotPaused()
A modifier that throws a Paused custom error if the contract is paused
This modifier should be used with functions that can be paused
modifier whenPaused()
function paused() public view returns (bool paused_)
Check if the contract is paused
Name | Type | Description |
---|---|---|
paused_ | bool | A boolean representing the pause status. True if paused, false otherwise. |
function _pause() internal
Pauses the contract
This function should be callable by the owner/governance.
function _unpause() internal
Unpauses the contract
This function should be callable by the owner/governance.
function _setPaused(bool paused_) internal
Sets the pause status of the contract
This is an internal function, meaning it can only be called from within the contract itself or from derived contracts.
Name | Type | Description |
---|---|---|
paused_ | bool | The new pause status |