Files
openzeppelin-contracts/contracts/Stoppable.sol
2016-08-12 11:33:56 -03:00

24 lines
476 B
Solidity

/*
* Stoppable
* Abstract contract that allows children to implement an
* emergency stop mechanism.
*/
contract Stoppable {
address public curator;
bool public stopped;
modifier stopInEmergency { if (!stopped) _ }
modifier onlyInEmergency { if (stopped) _ }
function Stoppable(address _curator) {
if (_curator == 0) throw;
curator = _curator;
}
function emergencyStop() external {
if (msg.sender != curator) throw;
stopped = true;
}
}