pragma solidity ^0.4.24; /** * @title Utility contract to allow pausing and unpausing of certain functions */ contract Pausable { event Pause(uint256 _timestammp); event Unpause(uint256 _timestamp); bool public paused = false; /** * @notice Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused, "Contract is paused"); _; } /** * @notice Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused, "Contract is not paused"); _; } /** * @notice called by the owner to pause, triggers stopped state */ function _pause() whenNotPaused internal { paused = true; emit Pause(now); } /** * @notice called by the owner to unpause, returns to normal state */ function _unpause() whenPaused internal { paused = false; emit Unpause(now); } }