Files
openzeppelin-contracts/contracts/mocks/BreakInvariantBountyMock.sol
Nicolás Venturo fa5ecd03cb Improved bounty tests. (#1350)
* Improved bounty tests.

* Fixed linter errors.

* Addressed review comments.

(cherry picked from commit ae109f69cc)
2018-09-26 16:37:31 -03:00

30 lines
659 B
Solidity

pragma solidity ^0.4.24;
// When this line is split, truffle parsing fails.
// See: https://github.com/ethereum/solidity/issues/4871
// solium-disable-next-line max-len
import {BreakInvariantBounty, Target} from "../drafts/BreakInvariantBounty.sol";
contract TargetMock is Target {
bool private exploited;
function exploitVulnerability() public {
exploited = true;
}
function checkInvariant() public returns (bool) {
if (exploited) {
return false;
}
return true;
}
}
contract BreakInvariantBountyMock is BreakInvariantBounty {
function _deployContract() internal returns (address) {
return new TargetMock();
}
}