From 47d979aa725af88d6316a1fb583702c27bc528c1 Mon Sep 17 00:00:00 2001 From: Manuel Araoz Date: Wed, 23 Nov 2016 17:21:28 -0800 Subject: [PATCH] Bounty docs --- README.md | 3 ++- contracts/Bounty.sol | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index daf458776..67a6a6a9c 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/contracts/Bounty.sol b/contracts/Bounty.sol index faaafad8c..46699b1b3 100644 --- a/contracts/Bounty.sol +++ b/contracts/Bounty.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 { function checkInvariant() returns(bool); }