Bounty docs

pull/87/head
Manuel Araoz 8 years ago
parent 726840b8de
commit 47d979aa72
  1. 3
      README.md
  2. 6
      contracts/Bounty.sol

@ -216,7 +216,8 @@ contract YourBounty is Bounty {
} }
``` ```
Next, implement invariant logic into your smart contract Next, implement invariant logic into your smart contract.
Your main contract should inherit from the Target class and implement the checkInvariant method. This is a function that should check everything your contract assumes to be true all the time. If this function returns false, it means your contract was broken in some way and is in an inconsistent state. This is what security researchers will try to acomplish when trying to get the bounty.
At contracts/YourContract.sol At contracts/YourContract.sol

@ -47,7 +47,11 @@ contract Bounty is PullPayment, Killable {
} }
/*
* Target
*
* Your main contract should inherit from this class and implement the checkInvariant method. This is a function that should check everything your contract assumes to be true all the time. If this function returns false, it means your contract was broken in some way and is in an inconsistent state. This is what security researchers will try to acomplish when trying to get the bounty.
*/
contract Target { contract Target {
function checkInvariant() returns(bool); function checkInvariant() returns(bool);
} }

Loading…
Cancel
Save