Browse Source

Separate bounty contracts from general pattern contracts

Bill Gleim 9 years ago
parent
commit
bb3ebe13fa
1 changed files with 0 additions and 38 deletions
  1. 0 38
      contracts/Bounty.sol

+ 0 - 38
contracts/Bounty.sol

@@ -1,38 +0,0 @@
-pragma solidity ^0.4.0;
-import './PullPayment.sol';
-import './token/SimpleToken.sol';
-
-/*
- * Bounty
- * This bounty will pay out if you can cause a SimpleToken's balance
- * to be lower than its totalSupply, which would mean that it doesn't 
- * have sufficient ether for everyone to withdraw.
- */
-contract Bounty is PullPayment {
-
-  bool public claimed;
-  mapping(address => address) public researchers;
-
-  function() {
-    if (claimed) throw;
-  }
-
-  function createTarget() returns(SimpleToken) {
-    SimpleToken target = new SimpleToken();
-    researchers[target] = msg.sender;
-    return target;
-  }
-
-  function claim(SimpleToken target) {
-    address researcher = researchers[target];
-    if (researcher == 0) throw;
-    // Check SimpleToken contract invariants
-    // Customize this to the specifics of your contract
-    if (target.totalSupply() == target.balance) {
-      throw;
-    }
-    asyncSend(researcher, this.balance);
-    claimed = true;
-  }
-
-}