Merge branch 'master' into bounty_with_factory_merged
This commit is contained in:
@ -2,7 +2,7 @@ pragma solidity ^0.4.0;
|
||||
/*
|
||||
* Stoppable
|
||||
* Abstract contract that allows children to implement an
|
||||
* emergency stop mechanism.
|
||||
* emergency stop mechanism.
|
||||
*/
|
||||
contract Stoppable {
|
||||
address public curator;
|
||||
@ -21,4 +21,9 @@ contract Stoppable {
|
||||
stopped = true;
|
||||
}
|
||||
|
||||
function release() external onlyInEmergency {
|
||||
if (msg.sender != curator) throw;
|
||||
stopped = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
11
contracts/test-helpers/StandardTokenMock.sol
Normal file
11
contracts/test-helpers/StandardTokenMock.sol
Normal file
@ -0,0 +1,11 @@
|
||||
pragma solidity ^0.4.0;
|
||||
import '../StandardToken.sol';
|
||||
|
||||
// mock class using StandardToken
|
||||
contract StandardTokenMock is StandardToken {
|
||||
|
||||
function StandardTokenMock(address initialAccount, uint initialBalance) {
|
||||
balances[initialAccount] = initialBalance;
|
||||
}
|
||||
|
||||
}
|
||||
22
contracts/test-helpers/StoppableMock.sol
Normal file
22
contracts/test-helpers/StoppableMock.sol
Normal file
@ -0,0 +1,22 @@
|
||||
pragma solidity ^0.4.0;
|
||||
import '../Stoppable.sol';
|
||||
|
||||
// mock class using Stoppable
|
||||
contract StoppableMock is Stoppable(msg.sender) {
|
||||
bool public drasticMeasureTaken;
|
||||
uint public count;
|
||||
|
||||
function StoppableMock() Stoppable(msg.sender){
|
||||
drasticMeasureTaken = false;
|
||||
count = 0;
|
||||
}
|
||||
|
||||
function normalProcess() external stopInEmergency {
|
||||
count++;
|
||||
}
|
||||
|
||||
function drasticMeasure() external onlyInEmergency {
|
||||
drasticMeasureTaken = true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user