|
|
|
|
|
|
|
*Submitted for verification at Etherscan.io on 2022-07-29
|
|
*/
|
|
|
|
|
|
|
|
pragma solidity ^0.8.14;
|
|
|
|
import "./Context.sol";
|
|
|
|
abstract contract Pausable is Context {
|
|
|
|
event Paused(address account);
|
|
event Unpaused(address account);
|
|
|
|
bool private _paused;
|
|
|
|
constructor() {
|
|
_paused = false;
|
|
}
|
|
|
|
function paused() public view virtual returns (bool) {
|
|
return _paused;
|
|
}
|
|
|
|
modifier whenNotPaused() {
|
|
require(!paused(), "Pausable: paused");
|
|
_;
|
|
}
|
|
|
|
modifier whenPaused() {
|
|
require(paused(), "Pausable: not paused");
|
|
_;
|
|
}
|
|
|
|
function _pause() internal virtual whenNotPaused {
|
|
_paused = true;
|
|
emit Paused(_msgSender());
|
|
}
|
|
|
|
function _unpause() internal virtual whenPaused {
|
|
_paused = false;
|
|
emit Unpaused(_msgSender());
|
|
}
|
|
}
|
|
|