Files
openzeppelin-contracts/contracts/Stoppable.sol
2016-11-08 12:19:07 -03:00

24 lines
467 B
Solidity

pragma solidity ^0.4.4;
import "./Ownable.sol";
/*
* Stoppable
* Abstract contract that allows children to implement an
* emergency stop mechanism.
*/
contract Stoppable is Ownable {
bool public stopped;
modifier stopInEmergency { if (!stopped) _; }
modifier onlyInEmergency { if (stopped) _; }
function emergencyStop() external onlyOwner {
stopped = true;
}
function release() external onlyOwner onlyInEmergency {
stopped = false;
}
}