Add release method to Stoppable. Create StoppableMock

pull/39/head
Arseniy Klempner 8 years ago
parent 5eea131f1e
commit f0ed649db3
  1. 5
      contracts/Stoppable.sol
  2. 17
      contracts/test-helpers/StoppableMock.sol

@ -21,4 +21,9 @@ contract Stoppable {
stopped = true;
}
function release() external onlyInEmergency {
if (msg.sender != curator) throw;
stopped = false;
}
}

@ -0,0 +1,17 @@
pragma solidity ^0.4.0;
import '../Stoppable.sol';
// mock class using Stoppable
contract StoppableMock is Stoppable {
bool public drasticMeasureTaken;
uint public count = 0;
function normalProcess() external stopInEmergency {
count++;
}
function drasticMeasure() external onlyInEmergency {
drasticMeasureTaken = true;
}
}
Loading…
Cancel
Save