Stoppable.sol 414 B

12345678910111213141516171819202122232425
  1. /*
  2. * Stoppable
  3. */
  4. contract Stoppable {
  5. address public curator;
  6. bool public stopped;
  7. modifier stopInEmergency { if (!stopped) _ }
  8. modifier onlyInEmergency { if (stopped) _ }
  9. function Stoppable(address _curator) {
  10. if (_curator == 0) {
  11. throw;
  12. }
  13. curator = _curator;
  14. }
  15. function emergencyStop() external {
  16. if (msg.sender != curator) {
  17. throw;
  18. }
  19. stopped = true;
  20. }
  21. }