-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved bounty tests. #1350
Improved bounty tests. #1350
Conversation
contract SecureInvariantTargetMock is Target { | ||
function checkInvariant() public returns(bool) { | ||
contract TargetMock is Target { | ||
bool private pwned; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, change to exploited
or something less 1337.
test/BreakInvariantBounty.test.js
Outdated
}); | ||
}); | ||
it('can set reward', async function () { | ||
await sendReward(owner, this.bounty.address, reward); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this sendReward
name. What would you think of dropping the function and just calling web3.eth.sendTransaction?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #1358
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Improved bounty tests. * Fixed linter errors. * Addressed review comments. (cherry picked from commit ae109f6)
The old tests were downright bizarre: the new suite better shows how bounty can be claimed after a vulnerability is exploited. Also, coverage should now be 100%.