@ -45,7 +45,7 @@ contract MetaCoin is Rejector {
|
|||||||
For more info see [the Truffle Beta package management tutorial](http://truffleframework.com/tutorials/package-management).
|
For more info see [the Truffle Beta package management tutorial](http://truffleframework.com/tutorials/package-management).
|
||||||
|
|
||||||
## Security
|
## Security
|
||||||
Zeppelin is meant to provide secure, tested and community-audited code, but please use common sense when doing anything that deals with real money! We take no responsibility for your implementation decisions.
|
Zeppelin is meant to provide secure, tested and community-audited code, but please use common sense when doing anything that deals with real money! We take no responsibility for your implementation decisions and any security problem you might experience.
|
||||||
|
|
||||||
If you find a security issue, please email [security@openzeppelin.org](mailto:security@openzeppelin.org).
|
If you find a security issue, please email [security@openzeppelin.org](mailto:security@openzeppelin.org).
|
||||||
|
|
||||||
|
|||||||
38
contracts/bounties/CrowdsaleTokenBounty.sol
Normal file
38
contracts/bounties/CrowdsaleTokenBounty.sol
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
pragma solidity ^0.4.0;
|
||||||
|
import '../PullPayment.sol';
|
||||||
|
import '../token/CrowdsaleToken.sol';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Bounty
|
||||||
|
* This bounty will pay out if you can cause a CrowdsaleToken's balance
|
||||||
|
* to be lower than its totalSupply, which would mean that it doesn't
|
||||||
|
* have sufficient ether for everyone to withdraw.
|
||||||
|
*/
|
||||||
|
contract CrowdsaleTokenBounty is PullPayment {
|
||||||
|
|
||||||
|
bool public claimed;
|
||||||
|
mapping(address => address) public researchers;
|
||||||
|
|
||||||
|
function() {
|
||||||
|
if (claimed) throw;
|
||||||
|
}
|
||||||
|
|
||||||
|
function createTarget() returns(CrowdsaleToken) {
|
||||||
|
CrowdsaleToken target = new CrowdsaleToken();
|
||||||
|
researchers[target] = msg.sender;
|
||||||
|
return target;
|
||||||
|
}
|
||||||
|
|
||||||
|
function claim(CrowdsaleToken target) {
|
||||||
|
address researcher = researchers[target];
|
||||||
|
if (researcher == 0) throw;
|
||||||
|
// Check CrowdsaleToken contract invariants
|
||||||
|
// Customize this to the specifics of your contract
|
||||||
|
if (target.totalSupply() == target.balance) {
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
asyncSend(researcher, this.balance);
|
||||||
|
claimed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
pragma solidity ^0.4.0;
|
pragma solidity ^0.4.0;
|
||||||
import './PullPayment.sol';
|
import '../PullPayment.sol';
|
||||||
import './token/SimpleToken.sol';
|
import '../token/SimpleToken.sol';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bounty
|
* Bounty
|
||||||
@ -8,7 +8,7 @@ import './token/SimpleToken.sol';
|
|||||||
* to be lower than its totalSupply, which would mean that it doesn't
|
* to be lower than its totalSupply, which would mean that it doesn't
|
||||||
* have sufficient ether for everyone to withdraw.
|
* have sufficient ether for everyone to withdraw.
|
||||||
*/
|
*/
|
||||||
contract Bounty is PullPayment {
|
contract SimpleTokenBounty is PullPayment {
|
||||||
|
|
||||||
bool public claimed;
|
bool public claimed;
|
||||||
mapping(address => address) public researchers;
|
mapping(address => address) public researchers;
|
||||||
@ -2,7 +2,8 @@ module.exports = function(deployer) {
|
|||||||
deployer.deploy(PullPaymentBid);
|
deployer.deploy(PullPaymentBid);
|
||||||
deployer.deploy(BadArrayUse);
|
deployer.deploy(BadArrayUse);
|
||||||
deployer.deploy(ProofOfExistence);
|
deployer.deploy(ProofOfExistence);
|
||||||
deployer.deploy(Bounty);
|
deployer.deploy(SimpleTokenBounty);
|
||||||
|
deployer.deploy(CrowdsaleTokenBounty);
|
||||||
deployer.deploy(Ownable);
|
deployer.deploy(Ownable);
|
||||||
deployer.deploy(LimitFunds);
|
deployer.deploy(LimitFunds);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user