{
    "Function": "slitherConstructorConstantVariables",
    "File": "src/ConfigurablePause.sol",
    "Parent Contracts": [],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract ConfigurablePause {\n    /// ---------------------------------------------------------\n    /// ---------------------------------------------------------\n    /// ------------------- STORAGE VARIABLES -------------------\n    /// ---------------------------------------------------------\n    /// ---------------------------------------------------------\n\n    /// @notice pause start time, starts at 0 so contract is unpaused\n    uint128 public pauseStartTime;\n\n    /// @notice pause duration\n    uint128 public pauseDuration;\n\n    /// @notice address of the pause guardian\n    address public pauseGuardian;\n\n    /// ---------------------------------------------------------\n    /// ---------------------------------------------------------\n    /// ------------------ CONSTANT VARIABLES -------------------\n    /// ---------------------------------------------------------\n    /// ---------------------------------------------------------\n\n    /// @notice minimum pause duration\n    uint256 public constant MIN_PAUSE_DURATION = 1 days;\n\n    /// @notice maximum pause duration\n    uint256 public constant MAX_PAUSE_DURATION = 30 days;\n\n    /// @notice emitted when the pause guardian is updated\n    /// @param oldPauseGuardian old pause guardian\n    /// @param newPauseGuardian new pause guardian\n    event PauseGuardianUpdated(\n        address indexed oldPauseGuardian, address indexed newPauseGuardian\n    );\n\n    /// @notice event emitted when pause start time is updated\n    /// @param newPauseStartTime new pause start time\n    event PauseTimeUpdated(uint256 indexed newPauseStartTime);\n\n    /// @notice event emitted when pause duration is updated\n    /// @param oldPauseDuration old pause duration\n    /// @param newPauseDuration new pause duration\n    event PauseDurationUpdated(\n        uint256 indexed oldPauseDuration, uint256 newPauseDuration\n    );\n\n    /// @dev Emitted when the pause is triggered by `account`.\n    event Paused(address indexed account);\n\n    /// @dev Modifier to make a function callable only when the contract is not paused.\n    modifier whenNotPaused() {\n        require(!paused(), \"Pausable: paused\");\n        _;\n    }\n\n    /// ------------- VIEW ONLY FUNCTIONS -------------\n\n    /// @notice return the current pause status\n    /// if pauseStartTime is 0, contract is not paused\n    /// if pauseStartTime is not 0, contract could be paused in the pauseDuration window\n    function paused() public view returns (bool) {\n        return block.timestamp <= pauseStartTime + pauseDuration;\n    }\n\n    /// ------------- PAUSE FUNCTION -------------\n\n    /// @notice pause the contracts, can only pause while the contracts are unpaused\n    /// uses up the pause, and starts the pause timer\n    /// calling removes the pause guardian\n    function pause() public virtual whenNotPaused {\n        /// if msg.sender == pause guardian, contract is not paused\n        /// this implies that pause is not used\n        require(\n            msg.sender == pauseGuardian,\n            \"ConfigurablePauseGuardian: only pause guardian\"\n        );\n\n        /// pause, set pauseStartTime to current block timestamp\n        /// safe unchecked downcast because maximum would be 2^128 - 1 which is\n        /// a very large number and very far in the future\n        _setPauseTime(uint128(block.timestamp));\n\n        address previousPauseGuardian = pauseGuardian;\n        /// kick the pause guardian\n        pauseGuardian = address(0);\n\n        emit PauseGuardianUpdated(previousPauseGuardian, address(0));\n        emit Paused(msg.sender);\n    }\n\n    /// ------------- INTERNAL/PRIVATE HELPERS -------------\n\n    /// @notice helper function to update the pause duration\n    /// should only be called when the contract is unpaused\n    /// @param newPauseDuration new pause duration\n    function _updatePauseDuration(uint128 newPauseDuration) internal {\n        require(\n            newPauseDuration >= MIN_PAUSE_DURATION\n                && newPauseDuration <= MAX_PAUSE_DURATION,\n            \"ConfigurablePause: pause duration out of bounds\"\n        );\n\n        /// if the contract was already paused, reset the pauseStartTime to 0\n        /// so that this function cannot pause the contract again\n        _setPauseTime(0);\n\n        uint256 oldPauseDuration = pauseDuration;\n        pauseDuration = newPauseDuration;\n\n        emit PauseDurationUpdated(oldPauseDuration, pauseDuration);\n    }\n\n    /// @notice helper function to update the pause start time. used to pause the contract\n    /// @param newPauseStartTime new pause start time\n    function _setPauseTime(uint128 newPauseStartTime) internal {\n        pauseStartTime = newPauseStartTime;\n\n        emit PauseTimeUpdated(newPauseStartTime);\n    }\n\n    /// @dev when a new guardian is granted, the contract is automatically unpaused\n    /// @notice grant pause guardian role to a new address\n    /// this should be done after the previous pause guardian has been kicked,\n    /// however there are no checks on this as only the owner will call this function\n    /// and the owner is assumed to be non-malicious\n    function _grantGuardian(address newPauseGuardian) internal {\n        address previousPauseGuardian = pauseGuardian;\n        pauseGuardian = newPauseGuardian;\n\n        emit PauseGuardianUpdated(previousPauseGuardian, newPauseGuardian);\n    }\n}"
}