Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
bb3ebe13
Commit
bb3ebe13
authored
Oct 21, 2016
by
Bill Gleim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Separate bounty contracts from general pattern contracts
parent
27b156db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
38 deletions
+0
-38
Bounty.sol
contracts/Bounty.sol
+0
-38
No files found.
contracts/Bounty.sol
deleted
100644 → 0
View file @
27b156db
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;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment