Skip to content

Instantly share code, notes, and snippets.

@lhartikk
Last active February 1, 2018 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lhartikk/6f38409940b599240a0438be608f8a6e to your computer and use it in GitHub Desktop.
Save lhartikk/6f38409940b599240a0438be608f8a6e to your computer and use it in GitHub Desktop.
/**
* The function that is used to claim the bounty.
* If the caller is able to provide satisfying values for a,b,c and n
* the balance of the contract (the bounty) is transferred to the caller
*/
function claim(int256 a, int256 b, int256 c, int256 n) public {
uint256 value = solve(a, b, c, n);
if (value == 0) {
msg.sender.transfer(this.balance);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment