diff --git a/contracts/bounties/BreakInvariantBounty.sol b/contracts/bounties/BreakInvariantBounty.sol index 016d3f2f5..6fd3b6e67 100644 --- a/contracts/bounties/BreakInvariantBounty.sol +++ b/contracts/bounties/BreakInvariantBounty.sol @@ -45,6 +45,7 @@ contract BreakInvariantBounty is PullPayment, Ownable { * @param target contract */ function claim(Target target) public { + require(!_claimed); address researcher = _researchers[target]; require(researcher != address(0)); // Check Target contract invariants diff --git a/test/BreakInvariantBounty.test.js b/test/BreakInvariantBounty.test.js index ff8e0f7bd..50ae96aaa 100644 --- a/test/BreakInvariantBounty.test.js +++ b/test/BreakInvariantBounty.test.js @@ -90,6 +90,10 @@ contract('BreakInvariantBounty', function ([_, owner, researcher, anyone, nonTar it('no longer accepts rewards', async function () { await assertRevert(ethSendTransaction({ from: owner, to: this.bounty.address, value: reward })); }); + + it('reverts when reclaimed', async function () { + await assertRevert(this.bounty.claim(this.target.address, { from: researcher })); + }); }); }); });