pragma solidity ^0.5.16; import "./Owned.sol"; // https://docs.synthetix.io/contracts/source/contracts/dappmaintenance /** * @title DappMaintenance contract. * @dev When the Synthetix system is on maintenance (upgrade, release...etc) the dApps also need * to be put on maintenance so no transactions can be done. The DappMaintenance contract is here to keep a state of * the dApps which indicates if yes or no, they should be up or down. */ contract DappMaintenance is Owned { bool public isPausedStaking = false; bool public isPausedSX = false; /** * @dev Constructor */ constructor(address _owner) public Owned(_owner) { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function setMaintenanceModeAll(bool isPaused) external onlyOwner { isPausedStaking = isPaused; isPausedSX = isPaused; emit StakingMaintenance(isPaused); emit SXMaintenance(isPaused); } function setMaintenanceModeStaking(bool isPaused) external onlyOwner { isPausedStaking = isPaused; emit StakingMaintenance(isPausedStaking); } function setMaintenanceModeSX(bool isPaused) external onlyOwner { isPausedSX = isPaused; emit SXMaintenance(isPausedSX); } event StakingMaintenance(bool isPaused); event SXMaintenance(bool isPaused); }