comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"insufficient funds"
//SPDX-License-Identifier: MIT /* * MIT License * =========== * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity 0.5.17; contract TreasuryV2 is Ownable, ITreasury { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public defaultToken; IERC20 public boostToken; SwapRouter public swapRouter; address public ecoFund; address public gov; address internal govSetter; mapping(address => uint256) public ecoFundAmts; // 1% = 100 uint256 public constant MAX_FUND_PERCENTAGE = 1500; // 15% uint256 public constant DENOM = 10000; // 100% uint256 public fundPercentage = 500; // 5% uint256 public burnPercentage = 2500; // 25% constructor(SwapRouter _swapRouter, IERC20 _defaultToken, IERC20 _boostToken, address _ecoFund) public { } function setGov(address _gov) external { } function setSwapRouter(SwapRouter _swapRouter) external onlyOwner { } function setEcoFund(address _ecoFund) external onlyOwner { } function setFundPercentage(uint256 _fundPercentage) external onlyOwner { } function setBurnPercentage(uint256 _burnPercentage) external onlyOwner { } function balanceOf(IERC20 token) public view returns (uint256) { } function deposit(IERC20 token, uint256 amount) external { } // only default token withdrawals allowed function withdraw(uint256 amount, address withdrawAddress) external { } function convertToDefaultToken(address[] calldata routeDetails, uint256 amount) external { require(routeDetails[0] != address(boostToken), "src can't be boost"); require(routeDetails[0] != address(defaultToken), "src can't be defaultToken"); require(routeDetails[routeDetails.length - 1] == address(defaultToken), "dest not defaultToken"); IERC20 srcToken = IERC20(routeDetails[0]); require(<FILL_ME>) if (srcToken.allowance(address(this), address(swapRouter)) <= amount) { srcToken.safeApprove(address(swapRouter), 0); srcToken.safeApprove(address(swapRouter), uint256(-1)); } swapRouter.swapExactTokensForTokens( amount, 0, routeDetails, address(this), block.timestamp + 100 ); } function convertToBoostToken(address[] calldata routeDetails, uint256 amount) external { } function rewardVoters() external { } function withdrawEcoFund(IERC20 token, uint256 amount) external { } }
balanceOf(srcToken)>=amount,"insufficient funds"
354,032
balanceOf(srcToken)>=amount
"dest not boostToken"
//SPDX-License-Identifier: MIT /* * MIT License * =========== * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ pragma solidity 0.5.17; contract TreasuryV2 is Ownable, ITreasury { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public defaultToken; IERC20 public boostToken; SwapRouter public swapRouter; address public ecoFund; address public gov; address internal govSetter; mapping(address => uint256) public ecoFundAmts; // 1% = 100 uint256 public constant MAX_FUND_PERCENTAGE = 1500; // 15% uint256 public constant DENOM = 10000; // 100% uint256 public fundPercentage = 500; // 5% uint256 public burnPercentage = 2500; // 25% constructor(SwapRouter _swapRouter, IERC20 _defaultToken, IERC20 _boostToken, address _ecoFund) public { } function setGov(address _gov) external { } function setSwapRouter(SwapRouter _swapRouter) external onlyOwner { } function setEcoFund(address _ecoFund) external onlyOwner { } function setFundPercentage(uint256 _fundPercentage) external onlyOwner { } function setBurnPercentage(uint256 _burnPercentage) external onlyOwner { } function balanceOf(IERC20 token) public view returns (uint256) { } function deposit(IERC20 token, uint256 amount) external { } // only default token withdrawals allowed function withdraw(uint256 amount, address withdrawAddress) external { } function convertToDefaultToken(address[] calldata routeDetails, uint256 amount) external { } function convertToBoostToken(address[] calldata routeDetails, uint256 amount) external { require(routeDetails[0] != address(boostToken), "src can't be boost"); require(routeDetails[0] != address(defaultToken), "src can't be defaultToken"); require(<FILL_ME>) IERC20 srcToken = IERC20(routeDetails[0]); require(balanceOf(srcToken) >= amount, "insufficient funds"); if (srcToken.allowance(address(this), address(swapRouter)) <= amount) { srcToken.safeApprove(address(swapRouter), 0); srcToken.safeApprove(address(swapRouter), uint256(-1)); } swapRouter.swapExactTokensForTokens( amount, 0, routeDetails, address(this), block.timestamp + 100 ); } function rewardVoters() external { } function withdrawEcoFund(IERC20 token, uint256 amount) external { } }
routeDetails[routeDetails.length-1]==address(boostToken),"dest not boostToken"
354,032
routeDetails[routeDetails.length-1]==address(boostToken)
"sorry, not cfo/admin"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { require(<FILL_ME>) _; } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
((msg.sender==_cfo)||(msg.sender==_admin)),"sorry, not cfo/admin"
354,078
((msg.sender==_cfo)||(msg.sender==_admin))
"sorry, demand more than balance"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { require(<FILL_ME>) require((ethPay > 0), "sorry, pay zero"); addr.transfer(ethPay); emit onSendEth ( addr, ethPay, now ); } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
(ethPay<=address(this).balance),"sorry, demand more than balance"
354,078
(ethPay<=address(this).balance)
"sorry, pay zero"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { require((ethPay <= address(this).balance), "sorry, demand more than balance"); require(<FILL_ME>) addr.transfer(ethPay); emit onSendEth ( addr, ethPay, now ); } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
(ethPay>0),"sorry, pay zero"
354,078
(ethPay>0)
"sorry, buy before start"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { uint256 _now = now; if (activated_ == false) { require(<FILL_ME>) activated_ = true; } require((msg.value > 0), "sorry, buy zero eth"); address buyer = msg.sender; plyr_[buyer].ethIn = (plyr_[buyer].ethIn).add(msg.value); totalETHin = totalETHin.add(msg.value); emit onRecieveEth ( buyer, msg.value, _now ); } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
(_now>=plan_active_time),"sorry, buy before start"
354,078
(_now>=plan_active_time)
"sorry, buy zero eth"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { uint256 _now = now; if (activated_ == false) { require((_now >= plan_active_time), "sorry, buy before start"); activated_ = true; } require(<FILL_ME>) address buyer = msg.sender; plyr_[buyer].ethIn = (plyr_[buyer].ethIn).add(msg.value); totalETHin = totalETHin.add(msg.value); emit onRecieveEth ( buyer, msg.value, _now ); } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
(msg.value>0),"sorry, buy zero eth"
354,078
(msg.value>0)
"sorry, not user"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { require(<FILL_ME>) require((txRec_[hashCode].used != true), "sorry, user replay withdraw"); txRec_[hashCode].user = msg.sender; txRec_[hashCode].todo = true; txRec_[hashCode].used = true; } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
(plyr_[msg.sender].ethIn>0),"sorry, not user"
354,078
(plyr_[msg.sender].ethIn>0)
"sorry, user replay withdraw"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { require((plyr_[msg.sender].ethIn > 0), "sorry, not user"); require(<FILL_ME>) txRec_[hashCode].user = msg.sender; txRec_[hashCode].todo = true; txRec_[hashCode].used = true; } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
(txRec_[hashCode].used!=true),"sorry, user replay withdraw"
354,078
(txRec_[hashCode].used!=true)
"sorry, hashcode error"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { address user; bytes32 hashCode; uint256 ethOut; user = parseAddr(addr); hashCode = sha256(orderid, addr, amt, txtime); require(<FILL_ME>) require((txRec_[hashCode].todo == true), "sorry, hashcode replay"); txRec_[hashCode].todo = false; ethOut = amount; // wei format require(((ethOut > 0) && (ethOut <= address(this).balance)), "sorry, approve amount error"); totalETHout = totalETHout.add(ethOut); plyr_[user].ethOut = (plyr_[user].ethOut).add(ethOut); user.transfer(ethOut); emit onSendEth ( user, ethOut, now ); } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
(txRec_[hashCode].user==user),"sorry, hashcode error"
354,078
(txRec_[hashCode].user==user)
"sorry, hashcode replay"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { address user; bytes32 hashCode; uint256 ethOut; user = parseAddr(addr); hashCode = sha256(orderid, addr, amt, txtime); require((txRec_[hashCode].user == user), "sorry, hashcode error"); require(<FILL_ME>) txRec_[hashCode].todo = false; ethOut = amount; // wei format require(((ethOut > 0) && (ethOut <= address(this).balance)), "sorry, approve amount error"); totalETHout = totalETHout.add(ethOut); plyr_[user].ethOut = (plyr_[user].ethOut).add(ethOut); user.transfer(ethOut); emit onSendEth ( user, ethOut, now ); } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
(txRec_[hashCode].todo==true),"sorry, hashcode replay"
354,078
(txRec_[hashCode].todo==true)
"sorry, approve amount error"
pragma solidity ^0.4.24; /*-------------------------------------------------- ____ ____ _ / ___| _ _ _ __ ___ _ __ / ___|__ _ _ __ __| | \___ \| | | | '_ \ / _ \ '__| | | / _` | '__/ _` | ___) | |_| | |_) | __/ | | |__| (_| | | | (_| | |____/ \__,_| .__/ \___|_| \____\__,_|_| \__,_| |_| 2018-08-31 V1.0 ---------------------------------------------------*/ contract SuperCard { event onRecieveEth ( address user, uint256 ethIn, uint256 timeStamp ); event onSendEth ( address user, uint256 ethOut, uint256 timeStamp ); event onPotAddup ( address operator, uint256 amount ); using SafeMath for *; string constant public name = "SuperCard"; string constant public symbol = "SPC"; struct Player { uint256 ethIn; // total input uint256 ethOut; // total output } struct txRecord { address user; // player address bool used; // replay bool todo; // } mapping( address => Player) public plyr_; // (address => data) player data mapping( bytes32 => txRecord) public txRec_; // (hashCode => data) hashCode data address _admin; address _cfo; bool public activated_ = false; //uint256 public plan_active_time = now + 7200 seconds; uint256 public plan_active_time = 1535709600; // total received uint256 totalETHin = 0; // total sendout uint256 totalETHout = 0; uint256 _pot = 0; //============================================================================== // _ _ _ __|_ _ __|_ _ _ . // (_(_)| |_\ | | |_|(_ | (_)| . (initial data setup upon contract deploy) //============================================================================== constructor() public { } modifier onlyCFOAndAdmin() { } modifier onlyCFO() { } modifier isHuman() { } modifier isActivated() { } function setPlanActiveTime(uint256 _time) onlyCFOAndAdmin() public { } function getPlanActiveTime() public view returns(uint256, uint256) { } function newCFO(string addr) onlyCFOAndAdmin() public returns (bool) { } function distribute(address addr, uint256 ethPay) public onlyCFOAndAdmin() isActivated() { } function potAddup() external onlyCFOAndAdmin() payable { } function buy() public isHuman() payable { } function() public isHuman() isActivated() payable { } function queryhashcodeused(bytes32 hashCode) public view isActivated() isHuman() returns(bool) { } function query2noactive(bytes32 hashCode) public view isHuman() returns(bool) { } function withdraw(bytes32 hashCode) public isActivated() isHuman() { } // uint256 amount, wei format function approve(string orderid, string addr, string amt, string txtime, uint256 amount) public onlyCFO() isActivated() { address user; bytes32 hashCode; uint256 ethOut; user = parseAddr(addr); hashCode = sha256(orderid, addr, amt, txtime); require((txRec_[hashCode].user == user), "sorry, hashcode error"); require((txRec_[hashCode].todo == true), "sorry, hashcode replay"); txRec_[hashCode].todo = false; ethOut = amount; // wei format require(<FILL_ME>) totalETHout = totalETHout.add(ethOut); plyr_[user].ethOut = (plyr_[user].ethOut).add(ethOut); user.transfer(ethOut); emit onSendEth ( user, ethOut, now ); } function getUserInfo(string useraddress) public view onlyCFOAndAdmin() returns(address, uint256, uint256) { } function parseAddr(string _a) internal returns (address) { } } /** * @title SafeMath v0.1.9 * @dev Math operations with safety checks that throw on error * change notes: original SafeMath library from OpenZeppelin modified by Inventor * - added sqrt * - added sq * - added pwr * - changed asserts to requires with error log outputs * - removed div, its useless */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } }
((ethOut>0)&&(ethOut<=address(this).balance)),"sorry, approve amount error"
354,078
((ethOut>0)&&(ethOut<=address(this).balance))
null
pragma solidity 0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract PreSaleToken { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AllowExchanger(address indexed exchanger); event RevokeExchanger(address indexed exchanger); event Mint(address indexed to, uint256 amount); event MintFinished(); event Exchange(address indexed from, uint256 exchangedValue, string symbol, uint256 grantedValue); event Transfer(address indexed from, address indexed to, uint256 value); /// The owner of the contract. address public owner; /// The total number of minted tokens, excluding destroyed tokens. uint256 public totalSupply; /// The token balance of each address. mapping(address => uint256) balances; /// The full list of addresses we have minted tokens for, stored for /// exchange purposes. address[] public holders; /// Whether the token is still mintable. bool public mintingFinished = false; /// Addresses allowed to exchange the presale tokens for the final /// and/or intermediary tokens. mapping(address => bool) public exchangers; modifier onlyOwner() { } modifier onlyExchanger() { require(<FILL_ME>) _; } function PreSaleToken() public { } function allowExchanger(address _exchanger) onlyOwner public { } function exchange( address _from, uint256 _amount, string _symbol, uint256 _grantedValue ) onlyExchanger public returns (bool) { } function finishMinting() onlyOwner public returns (bool) { } function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { } function revokeExchanger(address _exchanger) onlyOwner public { } function transferOwnership(address _to) onlyOwner public { } function balanceOf(address _owner) public constant returns (uint256) { } } contract PreSale { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event WalletChanged(address indexed previousWallet, address indexed newWallet); event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event Pause(); event Unpause(); event Withdrawal(address indexed wallet, uint256 weiAmount); event Extended(uint256 until); event Finalized(); event Refunding(); event Refunded(address indexed beneficiary, uint256 weiAmount); event Whitelisted(address indexed participant, uint256 weiAmount, uint32 bonusRate); /// The owner of the contract. address public owner; /// The token we're selling. PreSaleToken public token; /// The minimum goal to reach. If the goal is not reached, finishing /// the sale will enable refunds. uint256 public goal; /// The sale period. uint256 public startTime; uint256 public endTime; uint256 public timeExtension; /// The numnber of tokens to mint per wei. uint256 public rate; /// The total number of wei raised. Note that the contract's balance may /// differ from this value if someone has decided to forcefully send us /// ether. uint256 public weiRaised; /// The wallet that will receive the contract's balance once the sale /// finishes and the minimum goal is met. address public wallet; /// The list of addresses that are allowed to participate in the sale, /// up to what amount, and any special rate they may have. mapping(address => uint256) public whitelisted; mapping(address => uint32) public bonusRates; /// The amount of wei invested by each investor. mapping(address => uint256) public deposited; /// An enumerable list of investors. address[] public investors; /// Whether the sale is paused. bool public paused = false; /// Whether the sale has finished, and when. bool public finished = false; uint256 public finishedAt; /// Whether we're accepting refunds. bool public refunding = false; /// The total number of wei refunded. uint256 public weiRefunded; modifier onlyOwner() { } modifier saleOpen() { } function PreSale( uint256 _goal, uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet ) public payable { } function () public payable { } function buyTokens(address _beneficiary) saleOpen public payable { } function changeWallet(address _wallet) onlyOwner public payable { } function extendTime(uint256 _timeExtension) onlyOwner public { } function finish() onlyOwner public { } function pause() onlyOwner public { } function refund(address _investor) public { } function transferOwnership(address _to) onlyOwner public { } function unpause() onlyOwner public { } function whitelist( address _participant, uint256 _weiAmount, uint32 _bonusRate ) onlyOwner public { } function withdraw() onlyOwner public { } function goalReached() public constant returns (bool) { } }
exchangers[msg.sender]
354,176
exchangers[msg.sender]
null
pragma solidity 0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract PreSaleToken { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AllowExchanger(address indexed exchanger); event RevokeExchanger(address indexed exchanger); event Mint(address indexed to, uint256 amount); event MintFinished(); event Exchange(address indexed from, uint256 exchangedValue, string symbol, uint256 grantedValue); event Transfer(address indexed from, address indexed to, uint256 value); /// The owner of the contract. address public owner; /// The total number of minted tokens, excluding destroyed tokens. uint256 public totalSupply; /// The token balance of each address. mapping(address => uint256) balances; /// The full list of addresses we have minted tokens for, stored for /// exchange purposes. address[] public holders; /// Whether the token is still mintable. bool public mintingFinished = false; /// Addresses allowed to exchange the presale tokens for the final /// and/or intermediary tokens. mapping(address => bool) public exchangers; modifier onlyOwner() { } modifier onlyExchanger() { } function PreSaleToken() public { } function allowExchanger(address _exchanger) onlyOwner public { require(mintingFinished); require(_exchanger != 0x0); require(<FILL_ME>) exchangers[_exchanger] = true; AllowExchanger(_exchanger); } function exchange( address _from, uint256 _amount, string _symbol, uint256 _grantedValue ) onlyExchanger public returns (bool) { } function finishMinting() onlyOwner public returns (bool) { } function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { } function revokeExchanger(address _exchanger) onlyOwner public { } function transferOwnership(address _to) onlyOwner public { } function balanceOf(address _owner) public constant returns (uint256) { } } contract PreSale { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event WalletChanged(address indexed previousWallet, address indexed newWallet); event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event Pause(); event Unpause(); event Withdrawal(address indexed wallet, uint256 weiAmount); event Extended(uint256 until); event Finalized(); event Refunding(); event Refunded(address indexed beneficiary, uint256 weiAmount); event Whitelisted(address indexed participant, uint256 weiAmount, uint32 bonusRate); /// The owner of the contract. address public owner; /// The token we're selling. PreSaleToken public token; /// The minimum goal to reach. If the goal is not reached, finishing /// the sale will enable refunds. uint256 public goal; /// The sale period. uint256 public startTime; uint256 public endTime; uint256 public timeExtension; /// The numnber of tokens to mint per wei. uint256 public rate; /// The total number of wei raised. Note that the contract's balance may /// differ from this value if someone has decided to forcefully send us /// ether. uint256 public weiRaised; /// The wallet that will receive the contract's balance once the sale /// finishes and the minimum goal is met. address public wallet; /// The list of addresses that are allowed to participate in the sale, /// up to what amount, and any special rate they may have. mapping(address => uint256) public whitelisted; mapping(address => uint32) public bonusRates; /// The amount of wei invested by each investor. mapping(address => uint256) public deposited; /// An enumerable list of investors. address[] public investors; /// Whether the sale is paused. bool public paused = false; /// Whether the sale has finished, and when. bool public finished = false; uint256 public finishedAt; /// Whether we're accepting refunds. bool public refunding = false; /// The total number of wei refunded. uint256 public weiRefunded; modifier onlyOwner() { } modifier saleOpen() { } function PreSale( uint256 _goal, uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet ) public payable { } function () public payable { } function buyTokens(address _beneficiary) saleOpen public payable { } function changeWallet(address _wallet) onlyOwner public payable { } function extendTime(uint256 _timeExtension) onlyOwner public { } function finish() onlyOwner public { } function pause() onlyOwner public { } function refund(address _investor) public { } function transferOwnership(address _to) onlyOwner public { } function unpause() onlyOwner public { } function whitelist( address _participant, uint256 _weiAmount, uint32 _bonusRate ) onlyOwner public { } function withdraw() onlyOwner public { } function goalReached() public constant returns (bool) { } }
!exchangers[_exchanger]
354,176
!exchangers[_exchanger]
null
pragma solidity 0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract PreSaleToken { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AllowExchanger(address indexed exchanger); event RevokeExchanger(address indexed exchanger); event Mint(address indexed to, uint256 amount); event MintFinished(); event Exchange(address indexed from, uint256 exchangedValue, string symbol, uint256 grantedValue); event Transfer(address indexed from, address indexed to, uint256 value); /// The owner of the contract. address public owner; /// The total number of minted tokens, excluding destroyed tokens. uint256 public totalSupply; /// The token balance of each address. mapping(address => uint256) balances; /// The full list of addresses we have minted tokens for, stored for /// exchange purposes. address[] public holders; /// Whether the token is still mintable. bool public mintingFinished = false; /// Addresses allowed to exchange the presale tokens for the final /// and/or intermediary tokens. mapping(address => bool) public exchangers; modifier onlyOwner() { } modifier onlyExchanger() { } function PreSaleToken() public { } function allowExchanger(address _exchanger) onlyOwner public { } function exchange( address _from, uint256 _amount, string _symbol, uint256 _grantedValue ) onlyExchanger public returns (bool) { require(mintingFinished); // Always true due to exchangers requiring the same condition require(_from != 0x0); require(<FILL_ME>) require(_amount > 0); require(_amount <= balances[_from]); balances[_from] = balances[_from].sub(_amount); balances[msg.sender] = balances[msg.sender].add(_amount); Exchange( _from, _amount, _symbol, _grantedValue ); Transfer(_from, msg.sender, _amount); return true; } function finishMinting() onlyOwner public returns (bool) { } function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { } function revokeExchanger(address _exchanger) onlyOwner public { } function transferOwnership(address _to) onlyOwner public { } function balanceOf(address _owner) public constant returns (uint256) { } } contract PreSale { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event WalletChanged(address indexed previousWallet, address indexed newWallet); event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event Pause(); event Unpause(); event Withdrawal(address indexed wallet, uint256 weiAmount); event Extended(uint256 until); event Finalized(); event Refunding(); event Refunded(address indexed beneficiary, uint256 weiAmount); event Whitelisted(address indexed participant, uint256 weiAmount, uint32 bonusRate); /// The owner of the contract. address public owner; /// The token we're selling. PreSaleToken public token; /// The minimum goal to reach. If the goal is not reached, finishing /// the sale will enable refunds. uint256 public goal; /// The sale period. uint256 public startTime; uint256 public endTime; uint256 public timeExtension; /// The numnber of tokens to mint per wei. uint256 public rate; /// The total number of wei raised. Note that the contract's balance may /// differ from this value if someone has decided to forcefully send us /// ether. uint256 public weiRaised; /// The wallet that will receive the contract's balance once the sale /// finishes and the minimum goal is met. address public wallet; /// The list of addresses that are allowed to participate in the sale, /// up to what amount, and any special rate they may have. mapping(address => uint256) public whitelisted; mapping(address => uint32) public bonusRates; /// The amount of wei invested by each investor. mapping(address => uint256) public deposited; /// An enumerable list of investors. address[] public investors; /// Whether the sale is paused. bool public paused = false; /// Whether the sale has finished, and when. bool public finished = false; uint256 public finishedAt; /// Whether we're accepting refunds. bool public refunding = false; /// The total number of wei refunded. uint256 public weiRefunded; modifier onlyOwner() { } modifier saleOpen() { } function PreSale( uint256 _goal, uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet ) public payable { } function () public payable { } function buyTokens(address _beneficiary) saleOpen public payable { } function changeWallet(address _wallet) onlyOwner public payable { } function extendTime(uint256 _timeExtension) onlyOwner public { } function finish() onlyOwner public { } function pause() onlyOwner public { } function refund(address _investor) public { } function transferOwnership(address _to) onlyOwner public { } function unpause() onlyOwner public { } function whitelist( address _participant, uint256 _weiAmount, uint32 _bonusRate ) onlyOwner public { } function withdraw() onlyOwner public { } function goalReached() public constant returns (bool) { } }
!exchangers[_from]
354,176
!exchangers[_from]
null
pragma solidity 0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract PreSaleToken { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AllowExchanger(address indexed exchanger); event RevokeExchanger(address indexed exchanger); event Mint(address indexed to, uint256 amount); event MintFinished(); event Exchange(address indexed from, uint256 exchangedValue, string symbol, uint256 grantedValue); event Transfer(address indexed from, address indexed to, uint256 value); /// The owner of the contract. address public owner; /// The total number of minted tokens, excluding destroyed tokens. uint256 public totalSupply; /// The token balance of each address. mapping(address => uint256) balances; /// The full list of addresses we have minted tokens for, stored for /// exchange purposes. address[] public holders; /// Whether the token is still mintable. bool public mintingFinished = false; /// Addresses allowed to exchange the presale tokens for the final /// and/or intermediary tokens. mapping(address => bool) public exchangers; modifier onlyOwner() { } modifier onlyExchanger() { } function PreSaleToken() public { } function allowExchanger(address _exchanger) onlyOwner public { } function exchange( address _from, uint256 _amount, string _symbol, uint256 _grantedValue ) onlyExchanger public returns (bool) { } function finishMinting() onlyOwner public returns (bool) { } function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { } function revokeExchanger(address _exchanger) onlyOwner public { require(mintingFinished); require(_exchanger != 0x0); require(<FILL_ME>) delete exchangers[_exchanger]; RevokeExchanger(_exchanger); } function transferOwnership(address _to) onlyOwner public { } function balanceOf(address _owner) public constant returns (uint256) { } } contract PreSale { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event WalletChanged(address indexed previousWallet, address indexed newWallet); event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event Pause(); event Unpause(); event Withdrawal(address indexed wallet, uint256 weiAmount); event Extended(uint256 until); event Finalized(); event Refunding(); event Refunded(address indexed beneficiary, uint256 weiAmount); event Whitelisted(address indexed participant, uint256 weiAmount, uint32 bonusRate); /// The owner of the contract. address public owner; /// The token we're selling. PreSaleToken public token; /// The minimum goal to reach. If the goal is not reached, finishing /// the sale will enable refunds. uint256 public goal; /// The sale period. uint256 public startTime; uint256 public endTime; uint256 public timeExtension; /// The numnber of tokens to mint per wei. uint256 public rate; /// The total number of wei raised. Note that the contract's balance may /// differ from this value if someone has decided to forcefully send us /// ether. uint256 public weiRaised; /// The wallet that will receive the contract's balance once the sale /// finishes and the minimum goal is met. address public wallet; /// The list of addresses that are allowed to participate in the sale, /// up to what amount, and any special rate they may have. mapping(address => uint256) public whitelisted; mapping(address => uint32) public bonusRates; /// The amount of wei invested by each investor. mapping(address => uint256) public deposited; /// An enumerable list of investors. address[] public investors; /// Whether the sale is paused. bool public paused = false; /// Whether the sale has finished, and when. bool public finished = false; uint256 public finishedAt; /// Whether we're accepting refunds. bool public refunding = false; /// The total number of wei refunded. uint256 public weiRefunded; modifier onlyOwner() { } modifier saleOpen() { } function PreSale( uint256 _goal, uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet ) public payable { } function () public payable { } function buyTokens(address _beneficiary) saleOpen public payable { } function changeWallet(address _wallet) onlyOwner public payable { } function extendTime(uint256 _timeExtension) onlyOwner public { } function finish() onlyOwner public { } function pause() onlyOwner public { } function refund(address _investor) public { } function transferOwnership(address _to) onlyOwner public { } function unpause() onlyOwner public { } function whitelist( address _participant, uint256 _weiAmount, uint32 _bonusRate ) onlyOwner public { } function withdraw() onlyOwner public { } function goalReached() public constant returns (bool) { } }
exchangers[_exchanger]
354,176
exchangers[_exchanger]
null
pragma solidity 0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract PreSaleToken { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AllowExchanger(address indexed exchanger); event RevokeExchanger(address indexed exchanger); event Mint(address indexed to, uint256 amount); event MintFinished(); event Exchange(address indexed from, uint256 exchangedValue, string symbol, uint256 grantedValue); event Transfer(address indexed from, address indexed to, uint256 value); /// The owner of the contract. address public owner; /// The total number of minted tokens, excluding destroyed tokens. uint256 public totalSupply; /// The token balance of each address. mapping(address => uint256) balances; /// The full list of addresses we have minted tokens for, stored for /// exchange purposes. address[] public holders; /// Whether the token is still mintable. bool public mintingFinished = false; /// Addresses allowed to exchange the presale tokens for the final /// and/or intermediary tokens. mapping(address => bool) public exchangers; modifier onlyOwner() { } modifier onlyExchanger() { } function PreSaleToken() public { } function allowExchanger(address _exchanger) onlyOwner public { } function exchange( address _from, uint256 _amount, string _symbol, uint256 _grantedValue ) onlyExchanger public returns (bool) { } function finishMinting() onlyOwner public returns (bool) { } function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { } function revokeExchanger(address _exchanger) onlyOwner public { } function transferOwnership(address _to) onlyOwner public { } function balanceOf(address _owner) public constant returns (uint256) { } } contract PreSale { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event WalletChanged(address indexed previousWallet, address indexed newWallet); event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event Pause(); event Unpause(); event Withdrawal(address indexed wallet, uint256 weiAmount); event Extended(uint256 until); event Finalized(); event Refunding(); event Refunded(address indexed beneficiary, uint256 weiAmount); event Whitelisted(address indexed participant, uint256 weiAmount, uint32 bonusRate); /// The owner of the contract. address public owner; /// The token we're selling. PreSaleToken public token; /// The minimum goal to reach. If the goal is not reached, finishing /// the sale will enable refunds. uint256 public goal; /// The sale period. uint256 public startTime; uint256 public endTime; uint256 public timeExtension; /// The numnber of tokens to mint per wei. uint256 public rate; /// The total number of wei raised. Note that the contract's balance may /// differ from this value if someone has decided to forcefully send us /// ether. uint256 public weiRaised; /// The wallet that will receive the contract's balance once the sale /// finishes and the minimum goal is met. address public wallet; /// The list of addresses that are allowed to participate in the sale, /// up to what amount, and any special rate they may have. mapping(address => uint256) public whitelisted; mapping(address => uint32) public bonusRates; /// The amount of wei invested by each investor. mapping(address => uint256) public deposited; /// An enumerable list of investors. address[] public investors; /// Whether the sale is paused. bool public paused = false; /// Whether the sale has finished, and when. bool public finished = false; uint256 public finishedAt; /// Whether we're accepting refunds. bool public refunding = false; /// The total number of wei refunded. uint256 public weiRefunded; modifier onlyOwner() { } modifier saleOpen() { require(<FILL_ME>) require(!paused); require(now >= startTime); require(now <= endTime + timeExtension); _; } function PreSale( uint256 _goal, uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet ) public payable { } function () public payable { } function buyTokens(address _beneficiary) saleOpen public payable { } function changeWallet(address _wallet) onlyOwner public payable { } function extendTime(uint256 _timeExtension) onlyOwner public { } function finish() onlyOwner public { } function pause() onlyOwner public { } function refund(address _investor) public { } function transferOwnership(address _to) onlyOwner public { } function unpause() onlyOwner public { } function whitelist( address _participant, uint256 _weiAmount, uint32 _bonusRate ) onlyOwner public { } function withdraw() onlyOwner public { } function goalReached() public constant returns (bool) { } }
!finished
354,176
!finished
null
pragma solidity 0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract PreSaleToken { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AllowExchanger(address indexed exchanger); event RevokeExchanger(address indexed exchanger); event Mint(address indexed to, uint256 amount); event MintFinished(); event Exchange(address indexed from, uint256 exchangedValue, string symbol, uint256 grantedValue); event Transfer(address indexed from, address indexed to, uint256 value); /// The owner of the contract. address public owner; /// The total number of minted tokens, excluding destroyed tokens. uint256 public totalSupply; /// The token balance of each address. mapping(address => uint256) balances; /// The full list of addresses we have minted tokens for, stored for /// exchange purposes. address[] public holders; /// Whether the token is still mintable. bool public mintingFinished = false; /// Addresses allowed to exchange the presale tokens for the final /// and/or intermediary tokens. mapping(address => bool) public exchangers; modifier onlyOwner() { } modifier onlyExchanger() { } function PreSaleToken() public { } function allowExchanger(address _exchanger) onlyOwner public { } function exchange( address _from, uint256 _amount, string _symbol, uint256 _grantedValue ) onlyExchanger public returns (bool) { } function finishMinting() onlyOwner public returns (bool) { } function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { } function revokeExchanger(address _exchanger) onlyOwner public { } function transferOwnership(address _to) onlyOwner public { } function balanceOf(address _owner) public constant returns (uint256) { } } contract PreSale { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event WalletChanged(address indexed previousWallet, address indexed newWallet); event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event Pause(); event Unpause(); event Withdrawal(address indexed wallet, uint256 weiAmount); event Extended(uint256 until); event Finalized(); event Refunding(); event Refunded(address indexed beneficiary, uint256 weiAmount); event Whitelisted(address indexed participant, uint256 weiAmount, uint32 bonusRate); /// The owner of the contract. address public owner; /// The token we're selling. PreSaleToken public token; /// The minimum goal to reach. If the goal is not reached, finishing /// the sale will enable refunds. uint256 public goal; /// The sale period. uint256 public startTime; uint256 public endTime; uint256 public timeExtension; /// The numnber of tokens to mint per wei. uint256 public rate; /// The total number of wei raised. Note that the contract's balance may /// differ from this value if someone has decided to forcefully send us /// ether. uint256 public weiRaised; /// The wallet that will receive the contract's balance once the sale /// finishes and the minimum goal is met. address public wallet; /// The list of addresses that are allowed to participate in the sale, /// up to what amount, and any special rate they may have. mapping(address => uint256) public whitelisted; mapping(address => uint32) public bonusRates; /// The amount of wei invested by each investor. mapping(address => uint256) public deposited; /// An enumerable list of investors. address[] public investors; /// Whether the sale is paused. bool public paused = false; /// Whether the sale has finished, and when. bool public finished = false; uint256 public finishedAt; /// Whether we're accepting refunds. bool public refunding = false; /// The total number of wei refunded. uint256 public weiRefunded; modifier onlyOwner() { } modifier saleOpen() { } function PreSale( uint256 _goal, uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet ) public payable { } function () public payable { } function buyTokens(address _beneficiary) saleOpen public payable { } function changeWallet(address _wallet) onlyOwner public payable { } function extendTime(uint256 _timeExtension) onlyOwner public { } function finish() onlyOwner public { } function pause() onlyOwner public { } function refund(address _investor) public { require(finished); require(refunding); require(<FILL_ME>) uint256 weiAmount = deposited[_investor]; deposited[_investor] = 0; weiRefunded = weiRefunded.add(weiAmount); Refunded(_investor, weiAmount); _investor.transfer(weiAmount); } function transferOwnership(address _to) onlyOwner public { } function unpause() onlyOwner public { } function whitelist( address _participant, uint256 _weiAmount, uint32 _bonusRate ) onlyOwner public { } function withdraw() onlyOwner public { } function goalReached() public constant returns (bool) { } }
deposited[_investor]>0
354,176
deposited[_investor]>0
null
pragma solidity 0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract PreSaleToken { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event AllowExchanger(address indexed exchanger); event RevokeExchanger(address indexed exchanger); event Mint(address indexed to, uint256 amount); event MintFinished(); event Exchange(address indexed from, uint256 exchangedValue, string symbol, uint256 grantedValue); event Transfer(address indexed from, address indexed to, uint256 value); /// The owner of the contract. address public owner; /// The total number of minted tokens, excluding destroyed tokens. uint256 public totalSupply; /// The token balance of each address. mapping(address => uint256) balances; /// The full list of addresses we have minted tokens for, stored for /// exchange purposes. address[] public holders; /// Whether the token is still mintable. bool public mintingFinished = false; /// Addresses allowed to exchange the presale tokens for the final /// and/or intermediary tokens. mapping(address => bool) public exchangers; modifier onlyOwner() { } modifier onlyExchanger() { } function PreSaleToken() public { } function allowExchanger(address _exchanger) onlyOwner public { } function exchange( address _from, uint256 _amount, string _symbol, uint256 _grantedValue ) onlyExchanger public returns (bool) { } function finishMinting() onlyOwner public returns (bool) { } function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { } function revokeExchanger(address _exchanger) onlyOwner public { } function transferOwnership(address _to) onlyOwner public { } function balanceOf(address _owner) public constant returns (uint256) { } } contract PreSale { using SafeMath for uint256; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event WalletChanged(address indexed previousWallet, address indexed newWallet); event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event Pause(); event Unpause(); event Withdrawal(address indexed wallet, uint256 weiAmount); event Extended(uint256 until); event Finalized(); event Refunding(); event Refunded(address indexed beneficiary, uint256 weiAmount); event Whitelisted(address indexed participant, uint256 weiAmount, uint32 bonusRate); /// The owner of the contract. address public owner; /// The token we're selling. PreSaleToken public token; /// The minimum goal to reach. If the goal is not reached, finishing /// the sale will enable refunds. uint256 public goal; /// The sale period. uint256 public startTime; uint256 public endTime; uint256 public timeExtension; /// The numnber of tokens to mint per wei. uint256 public rate; /// The total number of wei raised. Note that the contract's balance may /// differ from this value if someone has decided to forcefully send us /// ether. uint256 public weiRaised; /// The wallet that will receive the contract's balance once the sale /// finishes and the minimum goal is met. address public wallet; /// The list of addresses that are allowed to participate in the sale, /// up to what amount, and any special rate they may have. mapping(address => uint256) public whitelisted; mapping(address => uint32) public bonusRates; /// The amount of wei invested by each investor. mapping(address => uint256) public deposited; /// An enumerable list of investors. address[] public investors; /// Whether the sale is paused. bool public paused = false; /// Whether the sale has finished, and when. bool public finished = false; uint256 public finishedAt; /// Whether we're accepting refunds. bool public refunding = false; /// The total number of wei refunded. uint256 public weiRefunded; modifier onlyOwner() { } modifier saleOpen() { } function PreSale( uint256 _goal, uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet ) public payable { } function () public payable { } function buyTokens(address _beneficiary) saleOpen public payable { } function changeWallet(address _wallet) onlyOwner public payable { } function extendTime(uint256 _timeExtension) onlyOwner public { } function finish() onlyOwner public { } function pause() onlyOwner public { } function refund(address _investor) public { } function transferOwnership(address _to) onlyOwner public { } function unpause() onlyOwner public { } function whitelist( address _participant, uint256 _weiAmount, uint32 _bonusRate ) onlyOwner public { } function withdraw() onlyOwner public { require(<FILL_ME>) uint256 weiAmount = this.balance; if (weiAmount > 0) { wallet.transfer(weiAmount); Withdrawal(wallet, weiAmount); } } function goalReached() public constant returns (bool) { } }
goalReached()||(finished&&now>finishedAt+14days)
354,176
goalReached()||(finished&&now>finishedAt+14days)
null
pragma solidity ^0.5.7; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error. */ library SafeMath { /** * @dev Multiplies two unsigned integers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two unsigned integers truncating the quotient, * reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two unsigned integers, reverts on overflow * (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { } } /** * @title Blacklistable Token * @dev Allows accounts to be blacklisted by a "blacklister" role */ contract Blacklistable is Pausable { address public blacklister; mapping(address => bool) internal blacklisted; event Blacklisted(address indexed _account); event UnBlacklisted(address indexed _account); event BlacklisterChanged(address indexed newBlacklister); constructor() public { } /** * @dev Throws if called by any account other than the blacklister */ modifier onlyBlacklister() { } /** * @dev Throws if argument account is blacklisted * @param _account The address to check */ modifier notBlacklisted(address _account) { require(<FILL_ME>) _; } /** * @dev Checks if account is blacklisted * @param _account The address to check */ function isBlacklisted(address _account) public view returns (bool) { } /** * @dev Adds account to blacklist * @param _account The address to blacklist */ function blacklist(address _account) public onlyBlacklister { } /** * @dev Removes account from blacklist * @param _account The address to remove from the blacklist */ function unBlacklist(address _account) public onlyBlacklister { } function updateBlacklister(address _newBlacklister) public onlyOwner { } } contract StandardToken is IERC20, Pausable, Blacklistable { uint256 public totalSupply; using SafeMath for uint; mapping (address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; function balanceOf(address _owner) public view returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) whenNotPaused notBlacklisted(_to) notBlacklisted(msg.sender) notBlacklisted(_from) public returns (bool) { } function approve(address _spender, uint256 _value) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_spender) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint _addedValue) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_spender) public returns (bool) { } function decreaseApproval(address _spender, uint _subtractedValue) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_spender) public returns (bool) { } function transfer(address _to, uint _value) whenNotPaused notBlacklisted(msg.sender) notBlacklisted(_to) public returns (bool success) { } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { } function _burn(address _who, uint256 _value) internal { } } contract XBASE is BurnableToken { string public constant name = "Eterbase Utility Token"; string public constant symbol = "XBASE"; uint8 public constant decimals = 18; uint256 public constant initialSupply = 1000000 * 10 ** uint256(decimals); constructor () public { } }
blacklisted[_account]==false
354,180
blacklisted[_account]==false
"Max token supply exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract Toroids is ERC721, ERC721Enumerable, Pausable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public constant MAX_TOKENS = 3080; uint256 public constant MAX_TOKENS_PER_ADDRESS = 500; uint256 public constant PRICE = 0.1 ether; uint256 public constant MINT_LIMIT = 20; uint256 public constant PRESALE_MINT_LIMIT = 2; uint256 public constant PREPRESALE_MINT_LIMIT = 4; bool public isPrepresaleActive = false; bool public isPresaleActive = false; bool public isSaleActive = false; mapping(address => uint256) public prepresaleList; mapping(address => uint256) public presaleList; mapping(uint256 => bytes32) public tokenIdToHash; string private baseURI = "https://us-central1-toroids-by-lip.cloudfunctions.net/getMetadata?index="; constructor() ERC721("Toroids", "TOROIDS") { } function _hashmint(address to) internal { } function prepresaleMint(uint256 amount) external payable { require(isPrepresaleActive, "Prepresale is not active"); require(amount <= PREPRESALE_MINT_LIMIT, "More tokens at a time than allowed"); uint256 senderLimit = prepresaleList[msg.sender]; require(senderLimit > 0, "You have no tokens left"); require(amount <= senderLimit, "Your max token holding exceeded"); require(<FILL_ME>) require(msg.value >= amount * PRICE, "Insufficient funds"); for (uint256 i = 0; i < amount; i++) { _hashmint(msg.sender); senderLimit -= 1; } prepresaleList[msg.sender] = senderLimit; } function presaleMint(uint256 amount) external payable { } function mint(uint256 amount) external payable { } function gift(address to, uint256 amount) external onlyOwner { } function addPresaleList( address[] calldata _addrs ) external onlyOwner { } function addPrepresaleList( address[] calldata _addrs ) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function togglePrepresale() external onlyOwner { } function togglePresale() external onlyOwner { } function toggleSale() external onlyOwner { } function withdraw() public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata URI) external onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
_tokenIdCounter.current()+amount<=MAX_TOKENS,"Max token supply exceeded"
354,198
_tokenIdCounter.current()+amount<=MAX_TOKENS
"Your max token holding exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract Toroids is ERC721, ERC721Enumerable, Pausable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public constant MAX_TOKENS = 3080; uint256 public constant MAX_TOKENS_PER_ADDRESS = 500; uint256 public constant PRICE = 0.1 ether; uint256 public constant MINT_LIMIT = 20; uint256 public constant PRESALE_MINT_LIMIT = 2; uint256 public constant PREPRESALE_MINT_LIMIT = 4; bool public isPrepresaleActive = false; bool public isPresaleActive = false; bool public isSaleActive = false; mapping(address => uint256) public prepresaleList; mapping(address => uint256) public presaleList; mapping(uint256 => bytes32) public tokenIdToHash; string private baseURI = "https://us-central1-toroids-by-lip.cloudfunctions.net/getMetadata?index="; constructor() ERC721("Toroids", "TOROIDS") { } function _hashmint(address to) internal { } function prepresaleMint(uint256 amount) external payable { } function presaleMint(uint256 amount) external payable { } function mint(uint256 amount) external payable { require(isSaleActive, "Sale is not active"); require(amount <= MINT_LIMIT, "More tokens at a time than allowed"); require(<FILL_ME>) require( _tokenIdCounter.current() + amount <= MAX_TOKENS, "Max token supply exceeded" ); require(msg.value >= amount * PRICE, "Insufficient funds"); for (uint256 i = 0; i < amount; i++) { _hashmint(msg.sender); } } function gift(address to, uint256 amount) external onlyOwner { } function addPresaleList( address[] calldata _addrs ) external onlyOwner { } function addPrepresaleList( address[] calldata _addrs ) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function togglePrepresale() external onlyOwner { } function togglePresale() external onlyOwner { } function toggleSale() external onlyOwner { } function withdraw() public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata URI) external onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { } // The following functions are overrides required by Solidity. function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
balanceOf(msg.sender)+amount<=MAX_TOKENS_PER_ADDRESS,"Your max token holding exceeded"
354,198
balanceOf(msg.sender)+amount<=MAX_TOKENS_PER_ADDRESS
"investor blacklisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./BokkyPooBahsDateTimeLibrary.sol"; /** * @title DistributionContract * @dev A simple contract that distributes tokens across investors */ contract DistributionContract is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; event InvestorAdded(address indexed investor, uint256 allocation); event InvestorBlacklisted(address indexed investor); event WithdrawnTokens(address indexed investor, uint256 value); event RecoverToken(address indexed token, uint256 indexed amount); IERC20 public token; uint256 public totalAllocatedAmount; uint256 public initialTimestamp; uint256 public noOfRemaingDays; address[] public investors; struct Investor { bool exists; uint256 withdrawnTokens; uint256 tokensAllotment; } mapping(address => Investor) public investorsInfo; mapping(address => bool) public isBlacklisted; modifier onlyInvestor() { } constructor( address _token, uint256 _timestamp, uint256 _noOfRemaingDays ) { } /// @dev Adds investors. This function doesn't limit max gas consumption, /// so adding too many investors can cause it to reach the out-of-gas error. /// @param _investors The addresses of new investors. /// @param _tokenAllocations The amounts of the tokens that belong to each investor. function addInvestors( address[] calldata _investors, uint256[] calldata _tokenAllocations ) external onlyOwner { } function blacklistInvestor(address _investor) external onlyOwner { } /// @dev Adds investor. This function doesn't limit max gas consumption, /// so adding too many investors can cause it to reach the out-of-gas error. /// @param _investor The addresses of new investors. /// @param _tokensAllotment The amounts of the tokens that belong to each investor. function _addInvestor(address _investor, uint256 _tokensAllotment) internal onlyOwner { } function withdrawTokens() external onlyInvestor { } function withdrawableTokens(address _investor) public view returns (uint256 tokens) { require(<FILL_ME>) Investor storage investor = investorsInfo[_investor]; uint256 availablePercentage = _calculateAvailablePercentage(); uint256 noOfTokens = _calculatePercentage( investor.tokensAllotment, availablePercentage ); uint256 tokensAvailable = noOfTokens.sub(investor.withdrawnTokens); return tokensAvailable; } function _calculatePercentage(uint256 _amount, uint256 _percentage) private pure returns (uint256 percentage) { } function _calculateAvailablePercentage() private view returns (uint256 availablePercentage) { } function recoverToken(address _token, uint256 _amount) external onlyOwner { } }
!isBlacklisted[_investor],"investor blacklisted"
354,205
!isBlacklisted[_investor]
"M0: not for sale"
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; // @author: canvasartists.io // /* (////////////////////// & & %(/////////////////////////// /.///& & & &% //(//////////////////////////// /.*****.// %% &%&& (((///////////////////////////// /.********.//// &%&&##& (////////////////////////////////// /.**,,,*,**./////& &%#%##%& #/////////// ,//////////////// /. /., .*,/////// /.##(##%(# (/////////// /////// /.***((/#(( #///////////// ////// /.***,,///(( (//////////////. .//// /.****,,,,*(/ %//////////////// / /.,,,,,,,*******,** // /. /.**,,,,,,,./ ///////////////// *,,,,,,,,,********./. / /. /.,,,,,,,,**** ////////////////// /.****,*** /.********. /.*,,,,,,,,******& (///////////////// ////////////////////. *,,,,,,,*,,******* ////////////////// ////////// /.******** ,,,,,,,*,,******** (///////////////// ,,,,,*********,,,,,* ,,,,,,,,*,******** (//////////// /.,, ,,,,,*,,******** //////// /.,*,,,, ,**,************ &//// /.***,,*,,, ,*********, .*************** (/ /.****,,,,,,,,*,*,*****.////// /.****************************** (****,,,,,*,,,*,**.//// /.*,*********************************** (((,*,,,/,,,* /..// /.***,**,// /.*./ /.************************** ((/(*,*,,* /.****,,,** /. / ,* * *,,.* ****************** &///#( /.****,,,.//////////// /. ********* ** ************** %(/%((&##,*,./////// / . /.* * * ./ /.,* * . *.********* %&%&##(#& /////////// /.**************************** &&&%%%& .//// /.************************** &&& #*********************% & ... . , Welcome to CanvasArtists the new home for premier artists! */ contract CAArtistRCatapano is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable { // Keep track of the minting counters, nft types and proces using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; // this is all 721, so there is a token ID // NFT Coonfiguration uint256 private _nftSupply = 55; // how many nfts uint256 private _reservedSupply = 0; // how mant are reserved uint256 private _forSaleSupply = 55; // how many available for sale uint256 private _nftPrice = 0.1 ether; // TODO nft price bool private _nftAvailableForSale = true; // available for sale? // # Token Supply uint256 private _totalMintedCount = 0; uint256 private _reservedMintedCount = 0; uint256 private _saleMintedCount = 0; // Where the funds will go address private _caTreasury; // CanvasArtists treasury address private _artistTreasury; // Artist treasury address private _costsTreasury; // where the costs go // Setup the token URI for all nft types string private _baseTokenURI = "https://gateway.pinata.cloud/ipfs/"; string private _preRevealURI = "QmY19FtMX7NR8vDSAv2aTnnp3htk5LV3Ctud13wRZWXCxd"; // TODO switch for live string public _provenanceHash; // provanace proof string public _artistName = "Robert Catapano"; // artist name // you need some previous token from one of these contracts to mint mapping(uint256 => address) private _presaleContracts; // contracts that allow presale uint256 private _preSalePhase; // what level of presale // events that the contract emits event WelcomeToTheCollection(uint256 id); // ---------------------------------------------------------------------------------------------- // Construct this... constructor() ERC721("CAArtistRCatapano", "CARCAP") { } // ---------------------------------------------------------------------------------------------- // These are all configuration funbctions // setup nft and allow for future expansion function pause() public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function unpause() public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPreRevealURI(string memory _preURI) public onlyOwner { } function setProvenance(string memory _proof) public onlyOwner { } // ---------------------------------------------------------------------------------------------- // Price management and how much supply is available, and what is contract state function setPrice( uint256 _price ) public onlyOwner { } function getPrice() public view returns (uint256) { } function getTotalSupply() public view returns (uint256) { } function getAvailableSupply() public view returns (uint256) { } // ---------------------------------------------------------------------------------------------- // Sale and Token managment function getPreSalePhase() public view returns (uint256) { } function setPreSalePhase( uint256 _phase ) public onlyOwner { } function loadPreSaleSlots(address[] memory _contractAddress) public onlyOwner { } function setAvailableForSale( bool _avail ) public onlyOwner { } function isAvailableForSale() public view returns (bool) { } function isSoldOut() public view returns (bool) { } function howManyCanMint() public pure returns (uint256) { } // ---------------------------------------------------------------------------------------------- // Mint Mangment and making sure it all works right // emergancy token URI swapping out - It's needed - sometimes your IPFS provider is down and you need to // send a hardcoded URL into mint function and then fix it later function setTokenURI( uint256 tokenId, string memory _uri ) public onlyOwner { } function _mintTokens( uint _quantity, address _to ) private { } function giftNFT( uint _quantity, address _to ) public onlyOwner { } function mintNFT( uint _preSaleSlot, uint _passTokenId, uint _quantity, address _to ) public payable { // is the nft type available for sale require(<FILL_ME>) // depending one the mint phase, there are restrictions on who can mint if ( _preSalePhase != 0 ) { require( _preSaleSlot < _preSalePhase, "M10: you need a valid membership to mint" ); require( IERC721(_presaleContracts[_preSaleSlot]).ownerOf(_passTokenId) == msg.sender, "M11: you need a valid membership to mint" ); } // trying to mint zero tokens require( _quantity != 0, "M3: zero tokens" ); // make sure not trying to mint too many require( _quantity <= howManyCanMint(), "M4: too many" ); // is there enough supply available require( _forSaleSupply >= _quantity, "M5: mint fewer" ); // did they give us enough money uint cost = _quantity * _nftPrice; require( msg.value >= cost, "M6: not enough ETH" ); // Mint it! _mintTokens( _quantity, _to ); } // deflationary tactic if ever needed /* Not needed here function burnNFT(uint256 _tokenId) public onlyOwner { _burn( _tokenId ); } */ // ---------------------------------------------------------------------------------------------- // allow switching of treasury and withdrawall of funds function setTreasury( address _newCaTreasury, address _newArtistTreasury, address _newCostsTreasury ) public onlyOwner { } function withdrawAll() public onlyOwner { } function _widthdraw(address _address, uint256 _amount) private { } // ---------------------------------------------------------------------------------------------- // Managment functions provided by OpenZepplin that were not touched function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } function totalToken() public view returns (uint256) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } }
isAvailableForSale(),"M0: not for sale"
354,226
isAvailableForSale()
"M11: you need a valid membership to mint"
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; // @author: canvasartists.io // /* (////////////////////// & & %(/////////////////////////// /.///& & & &% //(//////////////////////////// /.*****.// %% &%&& (((///////////////////////////// /.********.//// &%&&##& (////////////////////////////////// /.**,,,*,**./////& &%#%##%& #/////////// ,//////////////// /. /., .*,/////// /.##(##%(# (/////////// /////// /.***((/#(( #///////////// ////// /.***,,///(( (//////////////. .//// /.****,,,,*(/ %//////////////// / /.,,,,,,,*******,** // /. /.**,,,,,,,./ ///////////////// *,,,,,,,,,********./. / /. /.,,,,,,,,**** ////////////////// /.****,*** /.********. /.*,,,,,,,,******& (///////////////// ////////////////////. *,,,,,,,*,,******* ////////////////// ////////// /.******** ,,,,,,,*,,******** (///////////////// ,,,,,*********,,,,,* ,,,,,,,,*,******** (//////////// /.,, ,,,,,*,,******** //////// /.,*,,,, ,**,************ &//// /.***,,*,,, ,*********, .*************** (/ /.****,,,,,,,,*,*,*****.////// /.****************************** (****,,,,,*,,,*,**.//// /.*,*********************************** (((,*,,,/,,,* /..// /.***,**,// /.*./ /.************************** ((/(*,*,,* /.****,,,** /. / ,* * *,,.* ****************** &///#( /.****,,,.//////////// /. ********* ** ************** %(/%((&##,*,./////// / . /.* * * ./ /.,* * . *.********* %&%&##(#& /////////// /.**************************** &&&%%%& .//// /.************************** &&& #*********************% & ... . , Welcome to CanvasArtists the new home for premier artists! */ contract CAArtistRCatapano is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable { // Keep track of the minting counters, nft types and proces using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; // this is all 721, so there is a token ID // NFT Coonfiguration uint256 private _nftSupply = 55; // how many nfts uint256 private _reservedSupply = 0; // how mant are reserved uint256 private _forSaleSupply = 55; // how many available for sale uint256 private _nftPrice = 0.1 ether; // TODO nft price bool private _nftAvailableForSale = true; // available for sale? // # Token Supply uint256 private _totalMintedCount = 0; uint256 private _reservedMintedCount = 0; uint256 private _saleMintedCount = 0; // Where the funds will go address private _caTreasury; // CanvasArtists treasury address private _artistTreasury; // Artist treasury address private _costsTreasury; // where the costs go // Setup the token URI for all nft types string private _baseTokenURI = "https://gateway.pinata.cloud/ipfs/"; string private _preRevealURI = "QmY19FtMX7NR8vDSAv2aTnnp3htk5LV3Ctud13wRZWXCxd"; // TODO switch for live string public _provenanceHash; // provanace proof string public _artistName = "Robert Catapano"; // artist name // you need some previous token from one of these contracts to mint mapping(uint256 => address) private _presaleContracts; // contracts that allow presale uint256 private _preSalePhase; // what level of presale // events that the contract emits event WelcomeToTheCollection(uint256 id); // ---------------------------------------------------------------------------------------------- // Construct this... constructor() ERC721("CAArtistRCatapano", "CARCAP") { } // ---------------------------------------------------------------------------------------------- // These are all configuration funbctions // setup nft and allow for future expansion function pause() public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function unpause() public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPreRevealURI(string memory _preURI) public onlyOwner { } function setProvenance(string memory _proof) public onlyOwner { } // ---------------------------------------------------------------------------------------------- // Price management and how much supply is available, and what is contract state function setPrice( uint256 _price ) public onlyOwner { } function getPrice() public view returns (uint256) { } function getTotalSupply() public view returns (uint256) { } function getAvailableSupply() public view returns (uint256) { } // ---------------------------------------------------------------------------------------------- // Sale and Token managment function getPreSalePhase() public view returns (uint256) { } function setPreSalePhase( uint256 _phase ) public onlyOwner { } function loadPreSaleSlots(address[] memory _contractAddress) public onlyOwner { } function setAvailableForSale( bool _avail ) public onlyOwner { } function isAvailableForSale() public view returns (bool) { } function isSoldOut() public view returns (bool) { } function howManyCanMint() public pure returns (uint256) { } // ---------------------------------------------------------------------------------------------- // Mint Mangment and making sure it all works right // emergancy token URI swapping out - It's needed - sometimes your IPFS provider is down and you need to // send a hardcoded URL into mint function and then fix it later function setTokenURI( uint256 tokenId, string memory _uri ) public onlyOwner { } function _mintTokens( uint _quantity, address _to ) private { } function giftNFT( uint _quantity, address _to ) public onlyOwner { } function mintNFT( uint _preSaleSlot, uint _passTokenId, uint _quantity, address _to ) public payable { // is the nft type available for sale require( isAvailableForSale(), "M0: not for sale" ); // depending one the mint phase, there are restrictions on who can mint if ( _preSalePhase != 0 ) { require( _preSaleSlot < _preSalePhase, "M10: you need a valid membership to mint" ); require(<FILL_ME>) } // trying to mint zero tokens require( _quantity != 0, "M3: zero tokens" ); // make sure not trying to mint too many require( _quantity <= howManyCanMint(), "M4: too many" ); // is there enough supply available require( _forSaleSupply >= _quantity, "M5: mint fewer" ); // did they give us enough money uint cost = _quantity * _nftPrice; require( msg.value >= cost, "M6: not enough ETH" ); // Mint it! _mintTokens( _quantity, _to ); } // deflationary tactic if ever needed /* Not needed here function burnNFT(uint256 _tokenId) public onlyOwner { _burn( _tokenId ); } */ // ---------------------------------------------------------------------------------------------- // allow switching of treasury and withdrawall of funds function setTreasury( address _newCaTreasury, address _newArtistTreasury, address _newCostsTreasury ) public onlyOwner { } function withdrawAll() public onlyOwner { } function _widthdraw(address _address, uint256 _amount) private { } // ---------------------------------------------------------------------------------------------- // Managment functions provided by OpenZepplin that were not touched function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } function totalToken() public view returns (uint256) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } }
IERC721(_presaleContracts[_preSaleSlot]).ownerOf(_passTokenId)==msg.sender,"M11: you need a valid membership to mint"
354,226
IERC721(_presaleContracts[_preSaleSlot]).ownerOf(_passTokenId)==msg.sender
"Only creator can mint token"
pragma solidity ^0.8.0; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn(address account, uint256 id, uint256 value) public virtual { } function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { } } pragma solidity ^0.8.0; contract FourArtNFT is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // Contract name string public name; // id => creators mapping (uint256 => address) public creators; // A nonce to ensure we have a unique id each time we mint. uint256 public nonce; /** * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that * deploys the contract. */ constructor(string memory _uri) ERC1155(_uri) { } /** * @dev Creates `amount` new tokens for `to`, of token type `id`. * * See {ERC1155-_mint}. * * Requirements: * * - the caller must have the `MINTER_ROLE`. */ function mint(address to, uint256 id, uint256 amount, bytes memory data) public virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); if (id > nonce) { nonce = id; } if(creators[id] != address(0)) { require(<FILL_ME>) } else { creators[id] = to; } _mint(to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}. */ function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public virtual { } /** Allow the owner to update the metadata URI @param _uri The new URI to update to. */ function setURI(string memory _uri) external { } /** * @dev Pauses all token transfers. * * See {ERC1155Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() public virtual { } /** * @dev Unpauses all token transfers. * * See {ERC1155Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() public virtual { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC1155) returns (bool) { } /** * @dev See {ERC1155-_beforeTokenTransfer} */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Pausable) { } }
creators[id]==_msgSender(),"Only creator can mint token"
354,247
creators[id]==_msgSender()
"Only creator can mint token"
pragma solidity ^0.8.0; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn(address account, uint256 id, uint256 value) public virtual { } function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual { } } pragma solidity ^0.8.0; contract FourArtNFT is Context, AccessControlEnumerable, ERC1155Burnable, ERC1155Pausable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); // Contract name string public name; // id => creators mapping (uint256 => address) public creators; // A nonce to ensure we have a unique id each time we mint. uint256 public nonce; /** * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE`, and `PAUSER_ROLE` to the account that * deploys the contract. */ constructor(string memory _uri) ERC1155(_uri) { } /** * @dev Creates `amount` new tokens for `to`, of token type `id`. * * See {ERC1155-_mint}. * * Requirements: * * - the caller must have the `MINTER_ROLE`. */ function mint(address to, uint256 id, uint256 amount, bytes memory data) public virtual { } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] variant of {mint}. */ function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(hasRole(MINTER_ROLE, _msgSender()), "ERC1155PresetMinterPauser: must have minter role to mint"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); for (uint i = 0; i < ids.length; i++) { if (ids[i] > nonce) { nonce = ids[i]; } if (creators[ids[i]] != address(0)) { require(<FILL_ME>) } else { creators[ids[i]] = to; } } _mintBatch(to, ids, amounts, data); } /** Allow the owner to update the metadata URI @param _uri The new URI to update to. */ function setURI(string memory _uri) external { } /** * @dev Pauses all token transfers. * * See {ERC1155Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() public virtual { } /** * @dev Unpauses all token transfers. * * See {ERC1155Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() public virtual { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC1155) returns (bool) { } /** * @dev See {ERC1155-_beforeTokenTransfer} */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Pausable) { } }
creators[ids[i]]==to,"Only creator can mint token"
354,247
creators[ids[i]]==to
null
/* safeMath.sol v1.0.0 Safe mathematical operations This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; library SafeMath { /* Internals */ function add(uint256 a, uint256 b) internal pure returns(uint256 c) { } function sub(uint256 a, uint256 b) internal pure returns(uint256 c) { } function mul(uint256 a, uint256 b) internal pure returns(uint256 c) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function pow(uint256 a, uint256 b) internal pure returns(uint256 c) { } } /* owner.sol v1.0.0 Owner This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract Owned { /* Variables */ address public owner = msg.sender; /* Constructor */ constructor(address _owner) public { } /* Externals */ function replaceOwner(address _owner) external returns(bool) { } /* Internals */ function isOwner() internal view returns(bool) { } /* Modifiers */ modifier forOwner { } } /* tokenDB.sol v1.0.0 Token Database - ABSTRACT This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract TokenDB is Owned { /* Declarations */ using SafeMath for uint256; /* Structures */ struct balances_s { uint256 amount; bool valid; } struct vesting_s { uint256 amount; uint256 startBlock; uint256 endBlock; uint256 claimedAmount; bool valid; } /* Variables */ mapping(address => mapping(address => uint256)) private allowance; mapping(address => balances_s) private balances; mapping(address => vesting_s) public vesting; uint256 public totalSupply; address public tokenAddress; address public oldDBAddress; uint256 public totalVesting; /* Constructor */ constructor(address _owner, address _tokenAddress, address _oldDBAddress) Owned(_owner) public {} /* Externals */ function changeTokenAddress(address _tokenAddress) external forOwner {} function mint(address _to, uint256 _amount) external returns(bool _success) {} function transfer(address _from, address _to, uint256 _amount) external returns(bool _success) {} function bulkTransfer(address _from, address[] memory _to, uint256[] memory _amount) public returns(bool _success) {} function setAllowance(address _owner, address _spender, uint256 _amount) external returns(bool _success) {} function setVesting(address _owner, uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount) external returns(bool _success) {} /* Constants */ function getAllowance(address _owner, address _spender) public view returns(bool _success, uint256 _remaining) {} function getBalance(address _owner) public view returns(bool _success, uint256 _balance) {} function getTotalSupply() public view returns(bool _success, uint256 _totalSupply) {} function getTotalVesting() public view returns(bool _success, uint256 _totalVesting) {} function getVesting(address _owner) public view returns(bool _success, uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount, bool _valid) {} /* Internals */ function _getBalance(address _owner) internal view returns(uint256 _balance) {} function _getTotalSupply() internal view returns(uint256 _totalSupply) {} function _getTotalVesting() internal view returns(uint256 _totalVesting) {} } /* token.sol v1.0.0 Token Proxy This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract Token is Owned { /* Declarations */ using SafeMath for uint256; /* Variables */ string public name = "Screenist Token"; string public symbol = "NIS"; uint8 public decimals = 8; address public libAddress; address public freezeAdmin; address public vestingAdmin; TokenDB public db; bool public underFreeze; /* Constructor */ constructor(address _owner, address _freezeAdmin, address _vestingAdmin, address _libAddress, address _dbAddress, bool _isLib) Owned(_owner) public { if ( ! _isLib ) { db = TokenDB(_dbAddress); libAddress = _libAddress; vestingAdmin = _vestingAdmin; freezeAdmin = _freezeAdmin; require(<FILL_ME>) require( db.mint(address(this), 1.55e16) ); emit Mint(address(this), 1.55e16); } } /* Fallback */ function () external payable { } /* Externals */ function changeLibAddress(address _libAddress) public forOwner { } function changeDBAddress(address _dbAddress) public forOwner { } function setFreezeStatus(bool _newStatus) public forFreezeAdmin { } function approve(address _spender, uint256 _value) public returns (bool _success) { } function transfer(address _to, uint256 _amount) public isNotFrozen returns(bool _success) { } function bulkTransfer(address[] memory _to, uint256[] memory _amount) public isNotFrozen returns(bool _success) { } function transferFrom(address _from, address _to, uint256 _amount) public isNotFrozen returns (bool _success) { } function setVesting(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock) public forVestingAdmin { } function claimVesting() public isNotFrozen { } /* Constants */ function allowance(address _owner, address _spender) public constant returns (uint256 _remaining) { } function balanceOf(address _owner) public constant returns (uint256 _balance) { } function totalSupply() public constant returns (uint256 _totalSupply) { } function getVesting(address _owner) public constant returns(uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount) { } function totalVesting() public constant returns(uint256 _amount) { } function calcVesting(address _owner) public constant returns(uint256 _reward) { } /* Events */ event AllowanceUsed(address indexed _spender, address indexed _owner, uint256 indexed _value); event Mint(address indexed _addr, uint256 indexed _value); event Approval(address indexed _owner, address indexed _spender, uint _value); event Transfer(address indexed _from, address indexed _to, uint _value); event VestingDefined(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock); event VestingClaimed(address _beneficiary, uint256 _amount); /* Modifiers */ modifier isNotFrozen { } modifier forOwner { } modifier forVestingAdmin { } modifier forFreezeAdmin { } }
db.setAllowance(address(this),_owner,uint256(0)-1)
354,271
db.setAllowance(address(this),_owner,uint256(0)-1)
null
/* safeMath.sol v1.0.0 Safe mathematical operations This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; library SafeMath { /* Internals */ function add(uint256 a, uint256 b) internal pure returns(uint256 c) { } function sub(uint256 a, uint256 b) internal pure returns(uint256 c) { } function mul(uint256 a, uint256 b) internal pure returns(uint256 c) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function pow(uint256 a, uint256 b) internal pure returns(uint256 c) { } } /* owner.sol v1.0.0 Owner This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract Owned { /* Variables */ address public owner = msg.sender; /* Constructor */ constructor(address _owner) public { } /* Externals */ function replaceOwner(address _owner) external returns(bool) { } /* Internals */ function isOwner() internal view returns(bool) { } /* Modifiers */ modifier forOwner { } } /* tokenDB.sol v1.0.0 Token Database - ABSTRACT This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract TokenDB is Owned { /* Declarations */ using SafeMath for uint256; /* Structures */ struct balances_s { uint256 amount; bool valid; } struct vesting_s { uint256 amount; uint256 startBlock; uint256 endBlock; uint256 claimedAmount; bool valid; } /* Variables */ mapping(address => mapping(address => uint256)) private allowance; mapping(address => balances_s) private balances; mapping(address => vesting_s) public vesting; uint256 public totalSupply; address public tokenAddress; address public oldDBAddress; uint256 public totalVesting; /* Constructor */ constructor(address _owner, address _tokenAddress, address _oldDBAddress) Owned(_owner) public {} /* Externals */ function changeTokenAddress(address _tokenAddress) external forOwner {} function mint(address _to, uint256 _amount) external returns(bool _success) {} function transfer(address _from, address _to, uint256 _amount) external returns(bool _success) {} function bulkTransfer(address _from, address[] memory _to, uint256[] memory _amount) public returns(bool _success) {} function setAllowance(address _owner, address _spender, uint256 _amount) external returns(bool _success) {} function setVesting(address _owner, uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount) external returns(bool _success) {} /* Constants */ function getAllowance(address _owner, address _spender) public view returns(bool _success, uint256 _remaining) {} function getBalance(address _owner) public view returns(bool _success, uint256 _balance) {} function getTotalSupply() public view returns(bool _success, uint256 _totalSupply) {} function getTotalVesting() public view returns(bool _success, uint256 _totalVesting) {} function getVesting(address _owner) public view returns(bool _success, uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount, bool _valid) {} /* Internals */ function _getBalance(address _owner) internal view returns(uint256 _balance) {} function _getTotalSupply() internal view returns(uint256 _totalSupply) {} function _getTotalVesting() internal view returns(uint256 _totalVesting) {} } /* token.sol v1.0.0 Token Proxy This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract Token is Owned { /* Declarations */ using SafeMath for uint256; /* Variables */ string public name = "Screenist Token"; string public symbol = "NIS"; uint8 public decimals = 8; address public libAddress; address public freezeAdmin; address public vestingAdmin; TokenDB public db; bool public underFreeze; /* Constructor */ constructor(address _owner, address _freezeAdmin, address _vestingAdmin, address _libAddress, address _dbAddress, bool _isLib) Owned(_owner) public { if ( ! _isLib ) { db = TokenDB(_dbAddress); libAddress = _libAddress; vestingAdmin = _vestingAdmin; freezeAdmin = _freezeAdmin; require( db.setAllowance(address(this), _owner, uint256(0)-1) ); require(<FILL_ME>) emit Mint(address(this), 1.55e16); } } /* Fallback */ function () external payable { } /* Externals */ function changeLibAddress(address _libAddress) public forOwner { } function changeDBAddress(address _dbAddress) public forOwner { } function setFreezeStatus(bool _newStatus) public forFreezeAdmin { } function approve(address _spender, uint256 _value) public returns (bool _success) { } function transfer(address _to, uint256 _amount) public isNotFrozen returns(bool _success) { } function bulkTransfer(address[] memory _to, uint256[] memory _amount) public isNotFrozen returns(bool _success) { } function transferFrom(address _from, address _to, uint256 _amount) public isNotFrozen returns (bool _success) { } function setVesting(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock) public forVestingAdmin { } function claimVesting() public isNotFrozen { } /* Constants */ function allowance(address _owner, address _spender) public constant returns (uint256 _remaining) { } function balanceOf(address _owner) public constant returns (uint256 _balance) { } function totalSupply() public constant returns (uint256 _totalSupply) { } function getVesting(address _owner) public constant returns(uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount) { } function totalVesting() public constant returns(uint256 _amount) { } function calcVesting(address _owner) public constant returns(uint256 _reward) { } /* Events */ event AllowanceUsed(address indexed _spender, address indexed _owner, uint256 indexed _value); event Mint(address indexed _addr, uint256 indexed _value); event Approval(address indexed _owner, address indexed _spender, uint _value); event Transfer(address indexed _from, address indexed _to, uint _value); event VestingDefined(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock); event VestingClaimed(address _beneficiary, uint256 _amount); /* Modifiers */ modifier isNotFrozen { } modifier forOwner { } modifier forVestingAdmin { } modifier forFreezeAdmin { } }
db.mint(address(this),1.55e16)
354,271
db.mint(address(this),1.55e16)
null
/* safeMath.sol v1.0.0 Safe mathematical operations This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; library SafeMath { /* Internals */ function add(uint256 a, uint256 b) internal pure returns(uint256 c) { } function sub(uint256 a, uint256 b) internal pure returns(uint256 c) { } function mul(uint256 a, uint256 b) internal pure returns(uint256 c) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function pow(uint256 a, uint256 b) internal pure returns(uint256 c) { } } /* owner.sol v1.0.0 Owner This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract Owned { /* Variables */ address public owner = msg.sender; /* Constructor */ constructor(address _owner) public { } /* Externals */ function replaceOwner(address _owner) external returns(bool) { } /* Internals */ function isOwner() internal view returns(bool) { } /* Modifiers */ modifier forOwner { } } /* tokenDB.sol v1.0.0 Token Database - ABSTRACT This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract TokenDB is Owned { /* Declarations */ using SafeMath for uint256; /* Structures */ struct balances_s { uint256 amount; bool valid; } struct vesting_s { uint256 amount; uint256 startBlock; uint256 endBlock; uint256 claimedAmount; bool valid; } /* Variables */ mapping(address => mapping(address => uint256)) private allowance; mapping(address => balances_s) private balances; mapping(address => vesting_s) public vesting; uint256 public totalSupply; address public tokenAddress; address public oldDBAddress; uint256 public totalVesting; /* Constructor */ constructor(address _owner, address _tokenAddress, address _oldDBAddress) Owned(_owner) public {} /* Externals */ function changeTokenAddress(address _tokenAddress) external forOwner {} function mint(address _to, uint256 _amount) external returns(bool _success) {} function transfer(address _from, address _to, uint256 _amount) external returns(bool _success) {} function bulkTransfer(address _from, address[] memory _to, uint256[] memory _amount) public returns(bool _success) {} function setAllowance(address _owner, address _spender, uint256 _amount) external returns(bool _success) {} function setVesting(address _owner, uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount) external returns(bool _success) {} /* Constants */ function getAllowance(address _owner, address _spender) public view returns(bool _success, uint256 _remaining) {} function getBalance(address _owner) public view returns(bool _success, uint256 _balance) {} function getTotalSupply() public view returns(bool _success, uint256 _totalSupply) {} function getTotalVesting() public view returns(bool _success, uint256 _totalVesting) {} function getVesting(address _owner) public view returns(bool _success, uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount, bool _valid) {} /* Internals */ function _getBalance(address _owner) internal view returns(uint256 _balance) {} function _getTotalSupply() internal view returns(uint256 _totalSupply) {} function _getTotalVesting() internal view returns(uint256 _totalVesting) {} } /* token.sol v1.0.0 Token Proxy This file is part of Screenist [NIS] token project. Author: Andor 'iFA' Rajci, Fusion Solutions KFT @ [email protected] */ pragma solidity 0.4.26; contract Token is Owned { /* Declarations */ using SafeMath for uint256; /* Variables */ string public name = "Screenist Token"; string public symbol = "NIS"; uint8 public decimals = 8; address public libAddress; address public freezeAdmin; address public vestingAdmin; TokenDB public db; bool public underFreeze; /* Constructor */ constructor(address _owner, address _freezeAdmin, address _vestingAdmin, address _libAddress, address _dbAddress, bool _isLib) Owned(_owner) public { } /* Fallback */ function () external payable { } /* Externals */ function changeLibAddress(address _libAddress) public forOwner { } function changeDBAddress(address _dbAddress) public forOwner { } function setFreezeStatus(bool _newStatus) public forFreezeAdmin { } function approve(address _spender, uint256 _value) public returns (bool _success) { } function transfer(address _to, uint256 _amount) public isNotFrozen returns(bool _success) { } function bulkTransfer(address[] memory _to, uint256[] memory _amount) public isNotFrozen returns(bool _success) { } function transferFrom(address _from, address _to, uint256 _amount) public isNotFrozen returns (bool _success) { } function setVesting(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock) public forVestingAdmin { } function claimVesting() public isNotFrozen { } /* Constants */ function allowance(address _owner, address _spender) public constant returns (uint256 _remaining) { } function balanceOf(address _owner) public constant returns (uint256 _balance) { } function totalSupply() public constant returns (uint256 _totalSupply) { } function getVesting(address _owner) public constant returns(uint256 _amount, uint256 _startBlock, uint256 _endBlock, uint256 _claimedAmount) { } function totalVesting() public constant returns(uint256 _amount) { } function calcVesting(address _owner) public constant returns(uint256 _reward) { } /* Events */ event AllowanceUsed(address indexed _spender, address indexed _owner, uint256 indexed _value); event Mint(address indexed _addr, uint256 indexed _value); event Approval(address indexed _owner, address indexed _spender, uint _value); event Transfer(address indexed _from, address indexed _to, uint _value); event VestingDefined(address _beneficiary, uint256 _amount, uint256 _startBlock, uint256 _endBlock); event VestingClaimed(address _beneficiary, uint256 _amount); /* Modifiers */ modifier isNotFrozen { require(<FILL_ME>) _; } modifier forOwner { } modifier forVestingAdmin { } modifier forFreezeAdmin { } }
!underFreeze
354,271
!underFreeze
null
pragma solidity ^0.4.24; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event GeneratedToken(address indexed requester); } /** * @title ERC20 token with user-minting feature. * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract ColumbusToken is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; mapping (address => bool) private _requested; uint256 private _totalSupply; string public constant name = "Columbus Token"; string public constant symbol = "CBUS"; // 18 Decimals is standard for ERC20 uint8 public constant decimals = 18; // Columbus population 2018: 879,170 uint256 public constant max_supply = 879170 * 10**uint(decimals); constructor() public { } function getToken() public { // Don't allow more tokens to be created than the maximum supply require(_totalSupply < max_supply); // Don't allow the requesting address to request more than one token. require(<FILL_ME>) _requested[msg.sender] = true; _balances[msg.sender] += _tokens(1); _totalSupply += _tokens(1); emit GeneratedToken(msg.sender); } function _tokens(uint256 token) internal pure returns (uint256) { } /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { } /** * @dev Gets the balance of the caller's address. * @return An uint256 representing the amount owned by the caller address. */ function getBalance() public view returns (uint256) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param owner address The address which owns the funds. * @param spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address owner, address spender) public view returns (uint256) { } /** * @dev Transfer token for a specified address * @param to The address to transfer to. * @param value The amount to be transferred. */ function transfer(address to, uint256 value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. */ function approve(address spender, uint256 value) public returns (bool) { } /** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom(address from, address to, uint256 value) public returns (bool) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed_[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param spender The address which will spend the funds. * @param subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { } } /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } }
_requested[msg.sender]==false
354,326
_requested[msg.sender]==false
"Caller is not the Governor"
pragma solidity 0.5.11; /** * @title OUSD Governable Contract * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change * from owner to governor and renounce methods removed. Does not use * Context.sol like Ownable.sol does for simplification. * @author Origin Protocol Inc */ contract Governable { // Storage position of the owner and pendingOwner of the contract bytes32 private constant governorPosition = 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a; //keccak256("OUSD.governor"); bytes32 private constant pendingGovernorPosition = 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db; //keccak256("OUSD.pending.governor"); event PendingGovernorshipTransfer( address indexed previousGovernor, address indexed newGovernor ); event GovernorshipTransferred( address indexed previousGovernor, address indexed newGovernor ); /** * @dev Initializes the contract setting the deployer as the initial Governor. */ constructor() internal { } /** * @dev Returns the address of the current Governor. */ function governor() public view returns (address) { } function _governor() internal view returns (address governorOut) { } function _pendingGovernor() internal view returns (address pendingGovernor) { } /** * @dev Throws if called by any account other than the Governor. */ modifier onlyGovernor() { require(<FILL_ME>) _; } /** * @dev Returns true if the caller is the current Governor. */ function isGovernor() public view returns (bool) { } function _setGovernor(address newGovernor) internal { } function _setPendingGovernor(address newGovernor) internal { } /** * @dev Transfers Governance of the contract to a new account (`newGovernor`). * Can only be called by the current Governor. Must be claimed for this to complete * @param _newGovernor Address of the new Governor */ function transferGovernance(address _newGovernor) external onlyGovernor { } /** * @dev Claim Governance of the contract to a new account (`newGovernor`). * Can only be called by the new Governor. */ function claimGovernance() external { } /** * @dev Change Governance of the contract to a new account (`newGovernor`). * @param _newGovernor Address of the new Governor */ function _changeGovernor(address _newGovernor) internal { } }
isGovernor(),"Caller is not the Governor"
354,383
isGovernor()
"Purchase would exceed supply"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; /* _____ ____ _____ ___ / ___// __ \/ ___/ / | ____ ___ _____ \__ \/ / / /\__ \ / /| | / __ \/ _ \/ ___/ ___/ / /_/ /___/ / / ___ |/ /_/ / __(__ ) /____/\____//____/ /_/ |_/ .___/\___/____/ /_/ */ contract SOSApes is ERC721, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public maxTokenSupply; uint256 public constant MAX_MINTS_PER_TXN = 15; uint256 public mintPrice = 10000000; bool public saleIsActive = false; string public baseURI; IERC20 public sosTokenContractInstance; uint256[3] public winnerTokens; uint256 currentWinner = 0; constructor(string memory name, string memory symbol, uint256 maxSosGameSupply, address sosTokenAddress) ERC721(name, symbol) { } function setTokenAddress(address sosTokenAddress) public onlyOwner { } function setMaxTokenSupply(uint256 maxSosGameSupply) public onlyOwner { } function setMintPrice(uint256 newPrice) public onlyOwner { } function withdraw(uint256 tokenAmount) public onlyOwner { } /* * Mint reserved NFTs for giveaways, devs, etc. */ function reserveMint(uint256 reservedAmount, address mintAddress) public onlyOwner { } function totalSupply() external view returns (uint256) { } /* * Pause sale if active, make active if paused. */ function flipSaleState() public onlyOwner { } function mint(uint256 numberOfTokens) public payable { require(saleIsActive, "Sale not live yet"); require(numberOfTokens <= MAX_MINTS_PER_TXN, "Max 15 mints per txn"); require(<FILL_ME>) sosTokenContractInstance.transferFrom(msg.sender, address(this), mintPrice * numberOfTokens * 10 ** 18); for(uint256 i = 0; i < numberOfTokens; i++) { _tokenIdCounter.increment(); _safeMint(msg.sender, _tokenIdCounter.current()); } } function selectWinner(uint256 min, uint256 max) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } }
_tokenIdCounter.current()+numberOfTokens<=maxTokenSupply,"Purchase would exceed supply"
354,417
_tokenIdCounter.current()+numberOfTokens<=maxTokenSupply
"TacosCrowdsale: Address not allowed for this round."
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./SafeERC20.sol"; import "./Ownable.sol"; import "./IUniswapV2Router.sol"; interface Pauseable { function unpause() external; } /** * @title TacosCrowdsale * @dev Crowdsale contract for $TACO. * Pre-Sale done in this manner: * 1st Round: Early Cooks (2 ETH contribution max during round, CAP 70 ETH) * 2nd Round: $KARMA holders (2 ETH contribution max during round, CAP 70 ETH) * 3rd Round: Public Sale (2 ETH contribution max during round, CAP 70 ETH) * - Any single address can contribute at most 2 ETH - * 1 ETH = 20000 $TACO (during the entire sale) * Hardcap = 210 ETH * Once hardcap is reached: * All liquidity is added to Uniswap and locked automatically, 0% risk of rug pull. * * @author [email protected] ($TEND) * @author @Onchained ($TACO) */ contract TacosCrowdsale is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; //===============================================// // Contract Variables // //===============================================// // Caps uint256 public constant ROUND_1_CAP = 70 ether; // CAP = 70 uint256 public constant ROUND_2_CAP = 140 ether; // CAP = 70 uint256 public constant ROUND_3_CAP = 210 ether; // CAP = 70 // HARDCAP = ROUND_3_CAP // During tests, we should use 12 ether instead given that by default we only have 20 addresses. uint256 public constant CAP_PER_ADDRESS = 2 ether; uint256 public constant MIN_CONTRIBUTION = 0.1 ether; // Start time 08/09/2020 @ 6:00am (UTC) // For Cooks uint256 public constant CROWDSALE_START_TIME = 1596952800; // Start time 08/10/2020 @ 4:00pm (UTC) uint256 public constant KARMASALE_START_TIME = 1597075200; // Start time 08/11/2020 @ 4:00pm (UTC) uint256 public constant PUBLICSALE_START_TIME = 1597161600; // End time uint256 public constant CROWDSALE_END_TIME = PUBLICSALE_START_TIME + 1 days; // Karma Membership = 200 Karma uint256 public constant KARMA_MEMBERSHIP_AMOUNT = 2000000; // Early cooks list for round 1 // Too many cooks? https://www.youtube.com/watch?v=QrGrOK8oZG8 mapping(address => bool) public cookslist; // Contributions state mapping(address => uint256) public contributions; // Total wei raised (ETH) uint256 public weiRaised; // Flag to know if liquidity has been locked bool public liquidityLocked = false; // Pointer to the TacoToken IERC20 public tacoToken; // Pointer to the KarmaToken IERC20 public karmaToken; // How many tacos do we send per ETH contributed. uint256 public tacosPerEth; // Pointer to the UniswapRouter IUniswapV2Router02 internal uniswapRouter; //===============================================// // Constructor // //===============================================// constructor( IERC20 _tacoToken, IERC20 _karmaToken, uint256 _tacosPerEth, address _uniswapRouter ) public Ownable() { } //===============================================// // Events // //===============================================// event TokenPurchase( address indexed beneficiary, uint256 weiAmount, uint256 tokenAmount ); //===============================================// // Methods // //===============================================// // Main entry point for buying into the Pre-Sale. Contract Receives $ETH receive() external payable { // Prevent owner from buying tokens, but allow them to add pre-sale ETH to the contract for Uniswap liquidity if (owner() != msg.sender) { // Validations. require( msg.sender != address(0), "TacosCrowdsale: beneficiary is the zero address" ); require(isOpen(), "TacosCrowdsale: sale did not start yet."); require(!hasEnded(), "TacosCrowdsale: sale is over."); require( weiRaised < _totalCapForCurrentRound(), "TacosCrowdsale: The cap for the current round has been filled." ); require(<FILL_ME>) require( contributions[msg.sender] < CAP_PER_ADDRESS, "TacosCrowdsale: Individual cap has been filled." ); // If we've passed most validations, let's get them $TACOs _buyTokens(msg.sender); } } /** * Function to calculate how many `weiAmount` can the sender purchase * based on total available cap for this round, and how many eth they've contributed. * * At the end of the function we refund the remaining ETH not used for purchase. */ function _buyTokens(address beneficiary) internal { } /** * Function that validates the minimum wei amount, then perform the actual transfer of $TACOs */ function _buyTokens(address beneficiary, uint256 weiAmount, uint256 weiAllowanceForRound) internal { } // Calculate how many tacos do they get given the amount of wei function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) { } // CONTROL FUNCTIONS // Is the sale open now? function isOpen() public view returns (bool) { } // Has the sale ended? function hasEnded() public view returns (bool) { } // Has the *Karma* sale started? function karmaSaleStarted() public view returns (bool) { } // Has the *Public* sale started? function publicSaleStarted() public view returns (bool) { } // Is the beneficiary allowed in the current Round? function _allowedInCurrentRound(address beneficiary) internal view returns (bool) { } // Checks wether the beneficiary is a Karma member. // Karma membership is defined as owning 200 $KARMA // Thank you KarmaDAO for getting us together. function _isKarmaMember(address beneficiary) internal view returns (bool) { } // What's the total cap for the current round? function _totalCapForCurrentRound() internal view returns (uint256) { } // Return human-readable currentRound function getCurrentRound() public view returns (string memory) { } // Set the cooks list function setCooksList(address[] calldata accounts) external onlyOwner { } /** * Function that once sale is complete add the liquidity to Uniswap * then locks the liquidity by burning the UNI tokens. */ function addAndLockLiquidity() external { } }
_allowedInCurrentRound(msg.sender),"TacosCrowdsale: Address not allowed for this round."
354,425
_allowedInCurrentRound(msg.sender)
"TacosCrowdsale: Individual cap has been filled."
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./SafeERC20.sol"; import "./Ownable.sol"; import "./IUniswapV2Router.sol"; interface Pauseable { function unpause() external; } /** * @title TacosCrowdsale * @dev Crowdsale contract for $TACO. * Pre-Sale done in this manner: * 1st Round: Early Cooks (2 ETH contribution max during round, CAP 70 ETH) * 2nd Round: $KARMA holders (2 ETH contribution max during round, CAP 70 ETH) * 3rd Round: Public Sale (2 ETH contribution max during round, CAP 70 ETH) * - Any single address can contribute at most 2 ETH - * 1 ETH = 20000 $TACO (during the entire sale) * Hardcap = 210 ETH * Once hardcap is reached: * All liquidity is added to Uniswap and locked automatically, 0% risk of rug pull. * * @author [email protected] ($TEND) * @author @Onchained ($TACO) */ contract TacosCrowdsale is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; //===============================================// // Contract Variables // //===============================================// // Caps uint256 public constant ROUND_1_CAP = 70 ether; // CAP = 70 uint256 public constant ROUND_2_CAP = 140 ether; // CAP = 70 uint256 public constant ROUND_3_CAP = 210 ether; // CAP = 70 // HARDCAP = ROUND_3_CAP // During tests, we should use 12 ether instead given that by default we only have 20 addresses. uint256 public constant CAP_PER_ADDRESS = 2 ether; uint256 public constant MIN_CONTRIBUTION = 0.1 ether; // Start time 08/09/2020 @ 6:00am (UTC) // For Cooks uint256 public constant CROWDSALE_START_TIME = 1596952800; // Start time 08/10/2020 @ 4:00pm (UTC) uint256 public constant KARMASALE_START_TIME = 1597075200; // Start time 08/11/2020 @ 4:00pm (UTC) uint256 public constant PUBLICSALE_START_TIME = 1597161600; // End time uint256 public constant CROWDSALE_END_TIME = PUBLICSALE_START_TIME + 1 days; // Karma Membership = 200 Karma uint256 public constant KARMA_MEMBERSHIP_AMOUNT = 2000000; // Early cooks list for round 1 // Too many cooks? https://www.youtube.com/watch?v=QrGrOK8oZG8 mapping(address => bool) public cookslist; // Contributions state mapping(address => uint256) public contributions; // Total wei raised (ETH) uint256 public weiRaised; // Flag to know if liquidity has been locked bool public liquidityLocked = false; // Pointer to the TacoToken IERC20 public tacoToken; // Pointer to the KarmaToken IERC20 public karmaToken; // How many tacos do we send per ETH contributed. uint256 public tacosPerEth; // Pointer to the UniswapRouter IUniswapV2Router02 internal uniswapRouter; //===============================================// // Constructor // //===============================================// constructor( IERC20 _tacoToken, IERC20 _karmaToken, uint256 _tacosPerEth, address _uniswapRouter ) public Ownable() { } //===============================================// // Events // //===============================================// event TokenPurchase( address indexed beneficiary, uint256 weiAmount, uint256 tokenAmount ); //===============================================// // Methods // //===============================================// // Main entry point for buying into the Pre-Sale. Contract Receives $ETH receive() external payable { // Prevent owner from buying tokens, but allow them to add pre-sale ETH to the contract for Uniswap liquidity if (owner() != msg.sender) { // Validations. require( msg.sender != address(0), "TacosCrowdsale: beneficiary is the zero address" ); require(isOpen(), "TacosCrowdsale: sale did not start yet."); require(!hasEnded(), "TacosCrowdsale: sale is over."); require( weiRaised < _totalCapForCurrentRound(), "TacosCrowdsale: The cap for the current round has been filled." ); require( _allowedInCurrentRound(msg.sender), "TacosCrowdsale: Address not allowed for this round." ); require(<FILL_ME>) // If we've passed most validations, let's get them $TACOs _buyTokens(msg.sender); } } /** * Function to calculate how many `weiAmount` can the sender purchase * based on total available cap for this round, and how many eth they've contributed. * * At the end of the function we refund the remaining ETH not used for purchase. */ function _buyTokens(address beneficiary) internal { } /** * Function that validates the minimum wei amount, then perform the actual transfer of $TACOs */ function _buyTokens(address beneficiary, uint256 weiAmount, uint256 weiAllowanceForRound) internal { } // Calculate how many tacos do they get given the amount of wei function _getTokenAmount(uint256 weiAmount) internal view returns (uint256) { } // CONTROL FUNCTIONS // Is the sale open now? function isOpen() public view returns (bool) { } // Has the sale ended? function hasEnded() public view returns (bool) { } // Has the *Karma* sale started? function karmaSaleStarted() public view returns (bool) { } // Has the *Public* sale started? function publicSaleStarted() public view returns (bool) { } // Is the beneficiary allowed in the current Round? function _allowedInCurrentRound(address beneficiary) internal view returns (bool) { } // Checks wether the beneficiary is a Karma member. // Karma membership is defined as owning 200 $KARMA // Thank you KarmaDAO for getting us together. function _isKarmaMember(address beneficiary) internal view returns (bool) { } // What's the total cap for the current round? function _totalCapForCurrentRound() internal view returns (uint256) { } // Return human-readable currentRound function getCurrentRound() public view returns (string memory) { } // Set the cooks list function setCooksList(address[] calldata accounts) external onlyOwner { } /** * Function that once sale is complete add the liquidity to Uniswap * then locks the liquidity by burning the UNI tokens. */ function addAndLockLiquidity() external { } }
contributions[msg.sender]<CAP_PER_ADDRESS,"TacosCrowdsale: Individual cap has been filled."
354,425
contributions[msg.sender]<CAP_PER_ADDRESS
null
pragma solidity 0.4.24; /** * @title Vivalid Token Contract * @dev ViV is an ERC-20 Standar Compliant Token * For more info https://vivalid.io */ /** * @title SafeMath by OpenZeppelin (partially) * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title Admin parameters * @dev Define administration parameters for this contract */ contract admined { //This token contract is administered address public admin; //Admin address is public bool public lockSupply; //Burn Lock flag /** * @dev Contract constructor * define initial administrator */ constructor() internal { } modifier onlyAdmin() { } modifier supplyLock() { } /** * @dev Function to set new admin address * @param _newAdmin The address to transfer administration to */ function transferAdminship(address _newAdmin) onlyAdmin public { } /** * @dev Function to set burn lock * This function will be used after the burn process finish */ function setSupplyLock(bool _flag) onlyAdmin public { } //All admin actions have a log for public review event SetSupplyLock(bool _set); event TransferAdminship(address newAdminister); event Admined(address administer); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title ERC20Token * @notice Token definition contract */ contract ERC20Token is admined, ERC20 { //Standar definition of an ERC20Token using SafeMath for uint256; //SafeMath is used for uint256 operations mapping (address => uint256) internal balances; //A mapping of all balances per address mapping (address => mapping (address => uint256)) internal allowed; //A mapping of all allowances uint256 internal totalSupply_; /** * A mapping of frozen accounts and unfreeze dates * * In case your account balance is fronzen and you * think it's an error please contact the support team * * This function is only intended to lock specific wallets * as explained on project white paper */ mapping (address => bool) frozen; mapping (address => uint256) unfreezeDate; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @notice Get the balance of an _who address. * @param _who The address to be query. */ function balanceOf(address _who) public view returns (uint256) { } /** * @notice transfer _value tokens to address _to * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return success with boolean value true if done */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); //Invalid transfer require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @notice Get the allowance of an specified address to use another address balance. * @param _owner The address of the owner of the tokens. * @param _spender The address of the allowed spender. * @return remaining with the allowance value */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @notice Transfer _value tokens from address _from to address _to using allowance msg.sender allowance on _from * @param _from The address where tokens comes. * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return success with boolean value true if done */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @notice Assign allowance _value to _spender address to use the msg.sender balance * @param _spender The address to be allowed to spend. * @param _value The amount to be allowed. * @return success with boolean value true */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Burn token of an specified address. * @param _burnedAmount amount to burn. */ function burnToken(uint256 _burnedAmount) onlyAdmin supplyLock public { } /** * @dev Frozen account handler * @param _target The address to being frozen. * @param _flag The status of the frozen * @param _timeInDays The amount of time the account becomes locked */ function setFrozen(address _target,bool _flag,uint256 _timeInDays) public { } event Burned(address indexed _target, uint256 _value); event FrozenStatus(address indexed _target,bool _flag,uint256 _unfreezeDate); } /** * @title AssetViV * @notice ViV Token creation. * @dev ERC20 Token compliant */ contract AssetViV is ERC20Token { string public name = 'VIVALID'; uint8 public decimals = 18; string public symbol = 'ViV'; string public version = '1'; /** * @notice token contructor. */ constructor() public { } /** * @notice Function to claim ANY token accidentally stuck on contract * In case of claim of stuck tokens please contact contract owners * Tokens to be claimed has to been strictly erc20 compliant * We use the ERC20 interface declared before */ function claimTokens(ERC20 _address, address _to) onlyAdmin public{ } /** * @notice this contract will revert on direct non-function calls, also it's not payable * @dev Function to handle callback calls to contract */ function() public { } }
frozen[msg.sender]==false
354,427
frozen[msg.sender]==false
null
pragma solidity 0.4.24; /** * @title Vivalid Token Contract * @dev ViV is an ERC-20 Standar Compliant Token * For more info https://vivalid.io */ /** * @title SafeMath by OpenZeppelin (partially) * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title Admin parameters * @dev Define administration parameters for this contract */ contract admined { //This token contract is administered address public admin; //Admin address is public bool public lockSupply; //Burn Lock flag /** * @dev Contract constructor * define initial administrator */ constructor() internal { } modifier onlyAdmin() { } modifier supplyLock() { } /** * @dev Function to set new admin address * @param _newAdmin The address to transfer administration to */ function transferAdminship(address _newAdmin) onlyAdmin public { } /** * @dev Function to set burn lock * This function will be used after the burn process finish */ function setSupplyLock(bool _flag) onlyAdmin public { } //All admin actions have a log for public review event SetSupplyLock(bool _set); event TransferAdminship(address newAdminister); event Admined(address administer); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title ERC20Token * @notice Token definition contract */ contract ERC20Token is admined, ERC20 { //Standar definition of an ERC20Token using SafeMath for uint256; //SafeMath is used for uint256 operations mapping (address => uint256) internal balances; //A mapping of all balances per address mapping (address => mapping (address => uint256)) internal allowed; //A mapping of all allowances uint256 internal totalSupply_; /** * A mapping of frozen accounts and unfreeze dates * * In case your account balance is fronzen and you * think it's an error please contact the support team * * This function is only intended to lock specific wallets * as explained on project white paper */ mapping (address => bool) frozen; mapping (address => uint256) unfreezeDate; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @notice Get the balance of an _who address. * @param _who The address to be query. */ function balanceOf(address _who) public view returns (uint256) { } /** * @notice transfer _value tokens to address _to * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return success with boolean value true if done */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @notice Get the allowance of an specified address to use another address balance. * @param _owner The address of the owner of the tokens. * @param _spender The address of the allowed spender. * @return remaining with the allowance value */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @notice Transfer _value tokens from address _from to address _to using allowance msg.sender allowance on _from * @param _from The address where tokens comes. * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return success with boolean value true if done */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); //Invalid transfer require(<FILL_ME>) balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(_from, _to, _value); return true; } /** * @notice Assign allowance _value to _spender address to use the msg.sender balance * @param _spender The address to be allowed to spend. * @param _value The amount to be allowed. * @return success with boolean value true */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Burn token of an specified address. * @param _burnedAmount amount to burn. */ function burnToken(uint256 _burnedAmount) onlyAdmin supplyLock public { } /** * @dev Frozen account handler * @param _target The address to being frozen. * @param _flag The status of the frozen * @param _timeInDays The amount of time the account becomes locked */ function setFrozen(address _target,bool _flag,uint256 _timeInDays) public { } event Burned(address indexed _target, uint256 _value); event FrozenStatus(address indexed _target,bool _flag,uint256 _unfreezeDate); } /** * @title AssetViV * @notice ViV Token creation. * @dev ERC20 Token compliant */ contract AssetViV is ERC20Token { string public name = 'VIVALID'; uint8 public decimals = 18; string public symbol = 'ViV'; string public version = '1'; /** * @notice token contructor. */ constructor() public { } /** * @notice Function to claim ANY token accidentally stuck on contract * In case of claim of stuck tokens please contact contract owners * Tokens to be claimed has to been strictly erc20 compliant * We use the ERC20 interface declared before */ function claimTokens(ERC20 _address, address _to) onlyAdmin public{ } /** * @notice this contract will revert on direct non-function calls, also it's not payable * @dev Function to handle callback calls to contract */ function() public { } }
frozen[_from]==false
354,427
frozen[_from]==false
null
pragma solidity 0.4.24; /** * @title Vivalid Token Contract * @dev ViV is an ERC-20 Standar Compliant Token * For more info https://vivalid.io */ /** * @title SafeMath by OpenZeppelin (partially) * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title Admin parameters * @dev Define administration parameters for this contract */ contract admined { //This token contract is administered address public admin; //Admin address is public bool public lockSupply; //Burn Lock flag /** * @dev Contract constructor * define initial administrator */ constructor() internal { } modifier onlyAdmin() { } modifier supplyLock() { } /** * @dev Function to set new admin address * @param _newAdmin The address to transfer administration to */ function transferAdminship(address _newAdmin) onlyAdmin public { } /** * @dev Function to set burn lock * This function will be used after the burn process finish */ function setSupplyLock(bool _flag) onlyAdmin public { } //All admin actions have a log for public review event SetSupplyLock(bool _set); event TransferAdminship(address newAdminister); event Admined(address administer); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title ERC20Token * @notice Token definition contract */ contract ERC20Token is admined, ERC20 { //Standar definition of an ERC20Token using SafeMath for uint256; //SafeMath is used for uint256 operations mapping (address => uint256) internal balances; //A mapping of all balances per address mapping (address => mapping (address => uint256)) internal allowed; //A mapping of all allowances uint256 internal totalSupply_; /** * A mapping of frozen accounts and unfreeze dates * * In case your account balance is fronzen and you * think it's an error please contact the support team * * This function is only intended to lock specific wallets * as explained on project white paper */ mapping (address => bool) frozen; mapping (address => uint256) unfreezeDate; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @notice Get the balance of an _who address. * @param _who The address to be query. */ function balanceOf(address _who) public view returns (uint256) { } /** * @notice transfer _value tokens to address _to * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return success with boolean value true if done */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @notice Get the allowance of an specified address to use another address balance. * @param _owner The address of the owner of the tokens. * @param _spender The address of the allowed spender. * @return remaining with the allowance value */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @notice Transfer _value tokens from address _from to address _to using allowance msg.sender allowance on _from * @param _from The address where tokens comes. * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return success with boolean value true if done */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @notice Assign allowance _value to _spender address to use the msg.sender balance * @param _spender The address to be allowed to spend. * @param _value The amount to be allowed. * @return success with boolean value true */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Burn token of an specified address. * @param _burnedAmount amount to burn. */ function burnToken(uint256 _burnedAmount) onlyAdmin supplyLock public { } /** * @dev Frozen account handler * @param _target The address to being frozen. * @param _flag The status of the frozen * @param _timeInDays The amount of time the account becomes locked */ function setFrozen(address _target,bool _flag,uint256 _timeInDays) public { if(_flag == true){ require(msg.sender == admin); //Only admin require(<FILL_ME>) //Not already frozen frozen[_target] = _flag; unfreezeDate[_target] = now.add(_timeInDays * 1 days); emit FrozenStatus(_target,_flag,unfreezeDate[_target]); } else { require(now >= unfreezeDate[_target]); frozen[_target] = _flag; emit FrozenStatus(_target,_flag,unfreezeDate[_target]); } } event Burned(address indexed _target, uint256 _value); event FrozenStatus(address indexed _target,bool _flag,uint256 _unfreezeDate); } /** * @title AssetViV * @notice ViV Token creation. * @dev ERC20 Token compliant */ contract AssetViV is ERC20Token { string public name = 'VIVALID'; uint8 public decimals = 18; string public symbol = 'ViV'; string public version = '1'; /** * @notice token contructor. */ constructor() public { } /** * @notice Function to claim ANY token accidentally stuck on contract * In case of claim of stuck tokens please contact contract owners * Tokens to be claimed has to been strictly erc20 compliant * We use the ERC20 interface declared before */ function claimTokens(ERC20 _address, address _to) onlyAdmin public{ } /** * @notice this contract will revert on direct non-function calls, also it's not payable * @dev Function to handle callback calls to contract */ function() public { } }
frozen[_target]==false
354,427
frozen[_target]==false
_parentsError
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; interface IKittyButts { function ownerOf(uint256 tokenId) external view returns (address); function safeTransferFrom(address from, address to, uint256 tokenId) external; function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); } contract FluffyButts is ERC721, ERC721Enumerable, ERC721Burnable, IERC721Receiver, Ownable { using Counters for Counters.Counter; enum BreedType { NONE, SAFE, PURE, BURN } address public KittyButtContractAddress = 0x18d4db77f362557563051821952C9aE32a403ab8; IKittyButts private _parentContract; Counters.Counter private _tokenIdCounter; uint256 PURE_BREED_COST = 0.025 ether; uint256 MAX_TOKENS = 2000; uint256 SUMMONS_AMOUNT = 25; bool summonsReserved = false; string finalProvenance; bool provenanceSet = false; string private baseURI; //Cooldown periods uint128 SAFE_COOLDOWN = 18 hours; uint128 PURE_COOLDOWN = 1 hours; uint128 BURN_COOLDOWN = 18 hours; struct FluffyButtData { BreedType breedType; uint128[2] parents; } struct KittyButtData { uint128 cooldownExpiresAt; uint128 cooldownPeriod; } mapping(uint256 => KittyButtData) public kittyButtData; mapping(uint256 => FluffyButtData) public fluffyButtData; uint256[] public burnedKittyButts; //Sale and Presale bool private _isPresale = true; bool private _isBreeding = false; mapping(address => bool) private _whitelist; string private _parentsError = "You do not own these parents"; string private _cooldownError = "Parents in cooldown"; constructor() ERC721("The FluffyButts", "FBUTTS") { } //KittyButts sent to this contract when burned function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external pure override returns(bytes4){ } function _mint() private returns (uint256) { } function setParentContract(address parentAddress) public onlyOwner { } function retrieveMintDetails(uint256 tokenId) public view returns (FluffyButtData memory) { } function getPresaleState() public view returns (bool) { } function setPresaleState(bool presaleState) public onlyOwner { } function getBreedingState() public view returns (bool) { } function setBreedingState(bool breedingState) public onlyOwner{ } function isWhitelisted(address addr) public view returns (bool) { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function safeBreed(uint128[2] calldata parents) public returns (uint256) { require(<FILL_ME>) require( _isOutOfCooldown(parents), _cooldownError ); _saveFluffyButtData(parents, _tokenIdCounter.current(), BreedType.SAFE); _saveParentData(parents, SAFE_COOLDOWN); _mint(); return _tokenIdCounter.current() - 1; } function pureBreed(uint128[2] calldata parents) public payable returns (uint256) { } function burnBreed(uint128[2] calldata parents) public returns (uint256) { } function _verifyParents(uint128[2] calldata parents) private view returns (bool) { } function _saveFluffyButtData(uint128[2] calldata parents, uint256 tokenId, BreedType breedType) private { } function _saveParentData(uint128[2] calldata parents, uint128 cooldownPeriod) private { } function getCooldownFor(uint256 parentId) public view returns (KittyButtData memory){ } function setCooldownFor(uint256 parentId, uint128 cooldownExpiry) public view onlyOwner { } function _isOutOfCooldown(uint128[2] calldata parents) private view returns (bool) { } function reserveSummons() public onlyOwner { } function withdraw() public onlyOwner { } function setFinalProvenanceHash(string memory provenanceHash) public onlyOwner { } function setPureBreedPrice (uint256 amount) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
_verifyParents(parents),_parentsError
354,484
_verifyParents(parents)
_cooldownError
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; interface IKittyButts { function ownerOf(uint256 tokenId) external view returns (address); function safeTransferFrom(address from, address to, uint256 tokenId) external; function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); } contract FluffyButts is ERC721, ERC721Enumerable, ERC721Burnable, IERC721Receiver, Ownable { using Counters for Counters.Counter; enum BreedType { NONE, SAFE, PURE, BURN } address public KittyButtContractAddress = 0x18d4db77f362557563051821952C9aE32a403ab8; IKittyButts private _parentContract; Counters.Counter private _tokenIdCounter; uint256 PURE_BREED_COST = 0.025 ether; uint256 MAX_TOKENS = 2000; uint256 SUMMONS_AMOUNT = 25; bool summonsReserved = false; string finalProvenance; bool provenanceSet = false; string private baseURI; //Cooldown periods uint128 SAFE_COOLDOWN = 18 hours; uint128 PURE_COOLDOWN = 1 hours; uint128 BURN_COOLDOWN = 18 hours; struct FluffyButtData { BreedType breedType; uint128[2] parents; } struct KittyButtData { uint128 cooldownExpiresAt; uint128 cooldownPeriod; } mapping(uint256 => KittyButtData) public kittyButtData; mapping(uint256 => FluffyButtData) public fluffyButtData; uint256[] public burnedKittyButts; //Sale and Presale bool private _isPresale = true; bool private _isBreeding = false; mapping(address => bool) private _whitelist; string private _parentsError = "You do not own these parents"; string private _cooldownError = "Parents in cooldown"; constructor() ERC721("The FluffyButts", "FBUTTS") { } //KittyButts sent to this contract when burned function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external pure override returns(bytes4){ } function _mint() private returns (uint256) { } function setParentContract(address parentAddress) public onlyOwner { } function retrieveMintDetails(uint256 tokenId) public view returns (FluffyButtData memory) { } function getPresaleState() public view returns (bool) { } function setPresaleState(bool presaleState) public onlyOwner { } function getBreedingState() public view returns (bool) { } function setBreedingState(bool breedingState) public onlyOwner{ } function isWhitelisted(address addr) public view returns (bool) { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function safeBreed(uint128[2] calldata parents) public returns (uint256) { require(_verifyParents(parents), _parentsError); require(<FILL_ME>) _saveFluffyButtData(parents, _tokenIdCounter.current(), BreedType.SAFE); _saveParentData(parents, SAFE_COOLDOWN); _mint(); return _tokenIdCounter.current() - 1; } function pureBreed(uint128[2] calldata parents) public payable returns (uint256) { } function burnBreed(uint128[2] calldata parents) public returns (uint256) { } function _verifyParents(uint128[2] calldata parents) private view returns (bool) { } function _saveFluffyButtData(uint128[2] calldata parents, uint256 tokenId, BreedType breedType) private { } function _saveParentData(uint128[2] calldata parents, uint128 cooldownPeriod) private { } function getCooldownFor(uint256 parentId) public view returns (KittyButtData memory){ } function setCooldownFor(uint256 parentId, uint128 cooldownExpiry) public view onlyOwner { } function _isOutOfCooldown(uint128[2] calldata parents) private view returns (bool) { } function reserveSummons() public onlyOwner { } function withdraw() public onlyOwner { } function setFinalProvenanceHash(string memory provenanceHash) public onlyOwner { } function setPureBreedPrice (uint256 amount) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
_isOutOfCooldown(parents),_cooldownError
354,484
_isOutOfCooldown(parents)
"Need approval first"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; interface IKittyButts { function ownerOf(uint256 tokenId) external view returns (address); function safeTransferFrom(address from, address to, uint256 tokenId) external; function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); } contract FluffyButts is ERC721, ERC721Enumerable, ERC721Burnable, IERC721Receiver, Ownable { using Counters for Counters.Counter; enum BreedType { NONE, SAFE, PURE, BURN } address public KittyButtContractAddress = 0x18d4db77f362557563051821952C9aE32a403ab8; IKittyButts private _parentContract; Counters.Counter private _tokenIdCounter; uint256 PURE_BREED_COST = 0.025 ether; uint256 MAX_TOKENS = 2000; uint256 SUMMONS_AMOUNT = 25; bool summonsReserved = false; string finalProvenance; bool provenanceSet = false; string private baseURI; //Cooldown periods uint128 SAFE_COOLDOWN = 18 hours; uint128 PURE_COOLDOWN = 1 hours; uint128 BURN_COOLDOWN = 18 hours; struct FluffyButtData { BreedType breedType; uint128[2] parents; } struct KittyButtData { uint128 cooldownExpiresAt; uint128 cooldownPeriod; } mapping(uint256 => KittyButtData) public kittyButtData; mapping(uint256 => FluffyButtData) public fluffyButtData; uint256[] public burnedKittyButts; //Sale and Presale bool private _isPresale = true; bool private _isBreeding = false; mapping(address => bool) private _whitelist; string private _parentsError = "You do not own these parents"; string private _cooldownError = "Parents in cooldown"; constructor() ERC721("The FluffyButts", "FBUTTS") { } //KittyButts sent to this contract when burned function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external pure override returns(bytes4){ } function _mint() private returns (uint256) { } function setParentContract(address parentAddress) public onlyOwner { } function retrieveMintDetails(uint256 tokenId) public view returns (FluffyButtData memory) { } function getPresaleState() public view returns (bool) { } function setPresaleState(bool presaleState) public onlyOwner { } function getBreedingState() public view returns (bool) { } function setBreedingState(bool breedingState) public onlyOwner{ } function isWhitelisted(address addr) public view returns (bool) { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function safeBreed(uint128[2] calldata parents) public returns (uint256) { } function pureBreed(uint128[2] calldata parents) public payable returns (uint256) { } function burnBreed(uint128[2] calldata parents) public returns (uint256) { require(_verifyParents(parents), _parentsError); require( _isOutOfCooldown(parents), _cooldownError ); require(<FILL_ME>) //Send KittyButt tokens to this contract for(uint i = 0; i < 2; i++){ _parentContract.safeTransferFrom(tx.origin, address(this), parents[i]); burnedKittyButts.push(parents[i]); } _saveFluffyButtData(parents, _tokenIdCounter.current(), BreedType.BURN); _saveParentData(parents, BURN_COOLDOWN); _mint(); return _tokenIdCounter.current() - 1; } function _verifyParents(uint128[2] calldata parents) private view returns (bool) { } function _saveFluffyButtData(uint128[2] calldata parents, uint256 tokenId, BreedType breedType) private { } function _saveParentData(uint128[2] calldata parents, uint128 cooldownPeriod) private { } function getCooldownFor(uint256 parentId) public view returns (KittyButtData memory){ } function setCooldownFor(uint256 parentId, uint128 cooldownExpiry) public view onlyOwner { } function _isOutOfCooldown(uint128[2] calldata parents) private view returns (bool) { } function reserveSummons() public onlyOwner { } function withdraw() public onlyOwner { } function setFinalProvenanceHash(string memory provenanceHash) public onlyOwner { } function setPureBreedPrice (uint256 amount) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
_parentContract.isApprovedForAll(tx.origin,address(this)),"Need approval first"
354,484
_parentContract.isApprovedForAll(tx.origin,address(this))
"Summons already reserved"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; interface IKittyButts { function ownerOf(uint256 tokenId) external view returns (address); function safeTransferFrom(address from, address to, uint256 tokenId) external; function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); } contract FluffyButts is ERC721, ERC721Enumerable, ERC721Burnable, IERC721Receiver, Ownable { using Counters for Counters.Counter; enum BreedType { NONE, SAFE, PURE, BURN } address public KittyButtContractAddress = 0x18d4db77f362557563051821952C9aE32a403ab8; IKittyButts private _parentContract; Counters.Counter private _tokenIdCounter; uint256 PURE_BREED_COST = 0.025 ether; uint256 MAX_TOKENS = 2000; uint256 SUMMONS_AMOUNT = 25; bool summonsReserved = false; string finalProvenance; bool provenanceSet = false; string private baseURI; //Cooldown periods uint128 SAFE_COOLDOWN = 18 hours; uint128 PURE_COOLDOWN = 1 hours; uint128 BURN_COOLDOWN = 18 hours; struct FluffyButtData { BreedType breedType; uint128[2] parents; } struct KittyButtData { uint128 cooldownExpiresAt; uint128 cooldownPeriod; } mapping(uint256 => KittyButtData) public kittyButtData; mapping(uint256 => FluffyButtData) public fluffyButtData; uint256[] public burnedKittyButts; //Sale and Presale bool private _isPresale = true; bool private _isBreeding = false; mapping(address => bool) private _whitelist; string private _parentsError = "You do not own these parents"; string private _cooldownError = "Parents in cooldown"; constructor() ERC721("The FluffyButts", "FBUTTS") { } //KittyButts sent to this contract when burned function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external pure override returns(bytes4){ } function _mint() private returns (uint256) { } function setParentContract(address parentAddress) public onlyOwner { } function retrieveMintDetails(uint256 tokenId) public view returns (FluffyButtData memory) { } function getPresaleState() public view returns (bool) { } function setPresaleState(bool presaleState) public onlyOwner { } function getBreedingState() public view returns (bool) { } function setBreedingState(bool breedingState) public onlyOwner{ } function isWhitelisted(address addr) public view returns (bool) { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function safeBreed(uint128[2] calldata parents) public returns (uint256) { } function pureBreed(uint128[2] calldata parents) public payable returns (uint256) { } function burnBreed(uint128[2] calldata parents) public returns (uint256) { } function _verifyParents(uint128[2] calldata parents) private view returns (bool) { } function _saveFluffyButtData(uint128[2] calldata parents, uint256 tokenId, BreedType breedType) private { } function _saveParentData(uint128[2] calldata parents, uint128 cooldownPeriod) private { } function getCooldownFor(uint256 parentId) public view returns (KittyButtData memory){ } function setCooldownFor(uint256 parentId, uint128 cooldownExpiry) public view onlyOwner { } function _isOutOfCooldown(uint128[2] calldata parents) private view returns (bool) { } function reserveSummons() public onlyOwner { require(<FILL_ME>) summonsReserved = true; for (uint256 i; i < SUMMONS_AMOUNT; i++){ _safeMint(msg.sender, _tokenIdCounter.current()); _tokenIdCounter.increment(); } } function withdraw() public onlyOwner { } function setFinalProvenanceHash(string memory provenanceHash) public onlyOwner { } function setPureBreedPrice (uint256 amount) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
!summonsReserved,"Summons already reserved"
354,484
!summonsReserved
"Provenance already set"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; interface IKittyButts { function ownerOf(uint256 tokenId) external view returns (address); function safeTransferFrom(address from, address to, uint256 tokenId) external; function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); } contract FluffyButts is ERC721, ERC721Enumerable, ERC721Burnable, IERC721Receiver, Ownable { using Counters for Counters.Counter; enum BreedType { NONE, SAFE, PURE, BURN } address public KittyButtContractAddress = 0x18d4db77f362557563051821952C9aE32a403ab8; IKittyButts private _parentContract; Counters.Counter private _tokenIdCounter; uint256 PURE_BREED_COST = 0.025 ether; uint256 MAX_TOKENS = 2000; uint256 SUMMONS_AMOUNT = 25; bool summonsReserved = false; string finalProvenance; bool provenanceSet = false; string private baseURI; //Cooldown periods uint128 SAFE_COOLDOWN = 18 hours; uint128 PURE_COOLDOWN = 1 hours; uint128 BURN_COOLDOWN = 18 hours; struct FluffyButtData { BreedType breedType; uint128[2] parents; } struct KittyButtData { uint128 cooldownExpiresAt; uint128 cooldownPeriod; } mapping(uint256 => KittyButtData) public kittyButtData; mapping(uint256 => FluffyButtData) public fluffyButtData; uint256[] public burnedKittyButts; //Sale and Presale bool private _isPresale = true; bool private _isBreeding = false; mapping(address => bool) private _whitelist; string private _parentsError = "You do not own these parents"; string private _cooldownError = "Parents in cooldown"; constructor() ERC721("The FluffyButts", "FBUTTS") { } //KittyButts sent to this contract when burned function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external pure override returns(bytes4){ } function _mint() private returns (uint256) { } function setParentContract(address parentAddress) public onlyOwner { } function retrieveMintDetails(uint256 tokenId) public view returns (FluffyButtData memory) { } function getPresaleState() public view returns (bool) { } function setPresaleState(bool presaleState) public onlyOwner { } function getBreedingState() public view returns (bool) { } function setBreedingState(bool breedingState) public onlyOwner{ } function isWhitelisted(address addr) public view returns (bool) { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function safeBreed(uint128[2] calldata parents) public returns (uint256) { } function pureBreed(uint128[2] calldata parents) public payable returns (uint256) { } function burnBreed(uint128[2] calldata parents) public returns (uint256) { } function _verifyParents(uint128[2] calldata parents) private view returns (bool) { } function _saveFluffyButtData(uint128[2] calldata parents, uint256 tokenId, BreedType breedType) private { } function _saveParentData(uint128[2] calldata parents, uint128 cooldownPeriod) private { } function getCooldownFor(uint256 parentId) public view returns (KittyButtData memory){ } function setCooldownFor(uint256 parentId, uint128 cooldownExpiry) public view onlyOwner { } function _isOutOfCooldown(uint128[2] calldata parents) private view returns (bool) { } function reserveSummons() public onlyOwner { } function withdraw() public onlyOwner { } function setFinalProvenanceHash(string memory provenanceHash) public onlyOwner { require(<FILL_ME>) provenanceSet = true; finalProvenance = provenanceHash; } function setPureBreedPrice (uint256 amount) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
!provenanceSet,"Provenance already set"
354,484
!provenanceSet
'Can not recover this token'
pragma solidity 0.4.23; contract ERC20BasicInterface { function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); } /** * @title ERC20Lock * * This contract keeps particular token till the unlock date and sends it to predefined destination. */ contract DLSDLockAdvisors3 { ERC20BasicInterface constant TOKEN = ERC20BasicInterface(0x8458d484572cEB89ce70EEBBe17Dc84707b241eD); address constant OWNER = 0x603F65F7Fc4f650c2F025800F882CFb62BF23580; address constant DESTINATION = 0x309F0716701f346F2aE84ec9a45ce7E69E747f18; uint constant UNLOCK_DATE = 1548547199; // Saturday, January 26, 2019 11:59:59 PM function unlock() public returns(bool) { } function recoverTokens(ERC20BasicInterface _token, address _to, uint _value) public returns(bool) { require(msg.sender == OWNER, 'Access denied'); // This token meant to be recovered by calling unlock(). require(<FILL_ME>) return _token.transfer(_to, _value); } }
address(_token)!=address(TOKEN),'Can not recover this token'
354,568
address(_token)!=address(TOKEN)
"Transfer failed"
//SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract SmtDistributor is Ownable { using SafeMath for uint256; struct Reward { address beneficiary; uint256 amount; } /// @dev Emitted when `beneficiary` claims its `reward`. event Claim(address indexed beneficiary, uint256 reward); /// @dev ERC20 basic token contract being held IERC20 public token; /// @dev Beneficiaries of reward tokens mapping(address => uint256) public beneficiaries; /** * @dev Sets the value for {token}. * * Sets ownership to the account that deploys the contract. * */ constructor(address _token, address _owner) { } /** * @dev Deposits a new `totalAmount` to be claimed by beneficiaries distrubuted in `rewards`. * * Requirements: * * - the caller must be the owner. * - the accumulated rewards' amount should be equal to `totalAmount`. * * @param rewards Array indicating each benaficiary reward from the total to be deposited. * @param totalAmount Total amount to be deposited. */ function depositRewards(Reward[] memory rewards, uint256 totalAmount) external onlyOwner returns (bool) { require(totalAmount > 0, "totalAmount is zero"); require(rewards.length > 0, "rewards can not be empty"); require(<FILL_ME>) uint256 accByRewards = 0; for (uint256 i = 0; i < rewards.length; i++) { Reward memory reward = rewards[i]; accByRewards += reward.amount; beneficiaries[reward.beneficiary] += reward.amount; } require(accByRewards == totalAmount, "total amount mismatch"); return true; } /** * @dev Claims beneficiary reward. */ function claim() external returns (bool) { } }
token.transferFrom(_msgSender(),address(this),totalAmount),"Transfer failed"
354,641
token.transferFrom(_msgSender(),address(this),totalAmount)
"Transfer failed"
//SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract SmtDistributor is Ownable { using SafeMath for uint256; struct Reward { address beneficiary; uint256 amount; } /// @dev Emitted when `beneficiary` claims its `reward`. event Claim(address indexed beneficiary, uint256 reward); /// @dev ERC20 basic token contract being held IERC20 public token; /// @dev Beneficiaries of reward tokens mapping(address => uint256) public beneficiaries; /** * @dev Sets the value for {token}. * * Sets ownership to the account that deploys the contract. * */ constructor(address _token, address _owner) { } /** * @dev Deposits a new `totalAmount` to be claimed by beneficiaries distrubuted in `rewards`. * * Requirements: * * - the caller must be the owner. * - the accumulated rewards' amount should be equal to `totalAmount`. * * @param rewards Array indicating each benaficiary reward from the total to be deposited. * @param totalAmount Total amount to be deposited. */ function depositRewards(Reward[] memory rewards, uint256 totalAmount) external onlyOwner returns (bool) { } /** * @dev Claims beneficiary reward. */ function claim() external returns (bool) { uint256 amount = beneficiaries[_msgSender()]; require(amount > 0, "no rewards"); beneficiaries[_msgSender()] = 0; emit Claim(_msgSender(), amount); require(<FILL_ME>) return true; } }
token.transfer(_msgSender(),amount),"Transfer failed"
354,641
token.transfer(_msgSender(),amount)
null
/** * @title The MORIART ROUND 2 contracts concept. * @author www.grox.solutions */ pragma solidity 0.5.10; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract MORIART_2 { using SafeMath for uint256; uint256 constant public ONE_HUNDRED = 10000; uint256 constant public ENTER_FEE = 1000; uint256 constant public FINAL_WAVE = 1500; uint256 constant public ONE_DAY = 1 days; uint256 constant public MINIMUM = 0.1 ether; uint16[5] public refPercent = [400, 300, 200, 100, 0]; uint256 public EXIT_FEE_1 = 1000; uint256 public EXIT_FEE_2 = 2000; uint256 constant public REF_TRIGGER = 0 ether; uint256 constant public REIN_TRIGGER = 0.00000333 ether; uint256 constant public EXIT_TRIGGER = 0.00000777 ether; struct Deposit { uint256 amount; uint256 time; } struct User { Deposit[] deposits; address referrer; uint256 bonus; } mapping (address => User) public users; address payable public admin = 0x9C14a7882f635acebbC7f0EfFC0E2b78B9Aa4858; uint256 public maxBalance; uint256 public start = 1584662400; mapping (uint256 => int256) week; uint256 period = 7 days; bool public finalized; event InvestorAdded(address indexed investor); event ReferrerAdded(address indexed investor, address indexed referrer); event DepositAdded(address indexed investor, uint256 amount); event Withdrawn(address indexed investor, uint256 amount); event RefBonusAdded(address indexed investor, address indexed referrer, uint256 amount, uint256 indexed level); event RefBonusPayed(address indexed investor, uint256 amount); event Reinvested(address indexed investor, uint256 amount); event Finalized(uint256 amount); event GasRefund(uint256 amount); modifier notOnPause() { } function() external payable { } function invest() public payable notOnPause { } function reinvest() public notOnPause { } function reinvestProfit() public notOnPause { } function reinvestBonus() public notOnPause { } function withdrawBonus() public { } function withdrawProfit() public { } function exit() public { } function setRefPercent(uint16[5] memory newRefPercents) public { require(msg.sender == admin); for (uint256 i = 0; i < 5; i++) { require(<FILL_ME>) } refPercent = newRefPercents; } function setExitFee(uint256 fee_1, uint256 fee_2) public { } function _bytesToAddress(bytes memory source) internal pure returns(address parsedReferrer) { } function _addReferrer(address addr, address refAddr) internal { } function _refSystem(address addr) internal { } function _refund(uint256 amount) internal { } function _finalize() internal { } function _getFinalWave() internal view returns(uint256) { } function _getIndex() internal view returns(uint256) { } function getPercent() public view returns(uint256) { } function getAvailable(address addr) public view returns(uint256) { } function getFee(address addr) public view returns(uint256) { } function getDeposits(address addr) public view returns(uint256) { } function getDeposit(address addr, uint256 index) public view returns(uint256) { } function getProfit(address addr) public view returns(uint256) { } function getRefBonus(address addr) public view returns(uint256) { } function getNextDate() public view returns(uint256) { } function getCurrentTurnover() public view returns(int256) { } function getTurnover(uint256 index) public view returns(int256) { } function getCurrentGoal() public view returns(int256) { } function getBalance() public view returns(uint256) { } }
newRefPercents[i]<=1000
354,657
newRefPercents[i]<=1000
"Insufficient supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; contract EtherTulipsV2 is ERC721, ERC721Enumerable, Ownable { using Strings for uint256; event SalesStart(); address public bridgeAddress; uint256 public constant price1 = 75000000000000000 wei; // 0.075 ETH uint256 public constant price2 = 150000000000000000 wei; // 0.15 ETH uint256 public constant maxHiddenAttrBlocks = 19350; // around 72 hours uint256 public constant v1Supply = 7251; uint256 public constant v2MaxSupply = 5094; uint256 public constant maxPurchaseAmount = 30; uint16 public constant numReserved = 24; uint256 public mostRecentSaleBlock = 0; uint256 public startSalesBlock = 0; uint256 private v2Supply = 0; uint256 private numUnimportedTokens = v1Supply; bool[v1Supply] private tokenImported; constructor(address _bridgeAddress) ERC721("EtherTulips", "TULIP") { } function mint(uint16 _numTokens) public payable { require(<FILL_ME>) require(salesOpen(), "The sales period is not open"); require(_numTokens <= maxPurchaseAmount, "Too many purchases at once"); uint256 totalCost = price() * _numTokens; require(msg.value == totalCost, "Incorrect amount sent"); _mintTokens(_numTokens); } function maxSupply() public pure returns (uint256 max) { } function price() public view returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /* Overridden ERC721 for unimported tokens */ function balanceOf(address _owner) public view override returns (uint256 balance) { } function ownerOf(uint256 _tokenId) public view override returns (address owner) { } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) public virtual override { } // called in safeTransferFrom and transferFrom function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal override(ERC721, ERC721Enumerable) { } function _exists(uint256 _tokenId) internal view override returns (bool) { } /* Overridden ERC721Enumerable for unimported tokens */ function totalSupply() public view override returns (uint256 supply) { } function tokenByIndex(uint256 _index) public view override returns (uint256 tokenId) { } function tokenOfOwnerByIndex(address _owner, uint256 _index) public view override returns (uint256 tokenId) { } /* State checking */ function salesStarted() public view returns (bool isStarted) { } function salesOpen() public view returns (bool isOpen) { } function attributesAvailable() public view returns (bool isAvailable) { } /* Owner ownly */ function startSales() external onlyOwner { } function withdrawBalance(uint256 _amount) external onlyOwner { } /* Internal */ function _isV1(uint256 _tokenId) internal pure returns (bool) { } function _isUnimportedV1(uint256 _tokenId) internal view returns (bool) { } function _numImported() internal view returns (uint256) { } function _getDesign(uint256 _tokenId) internal view returns (uint256 design) { } function _baseURI() internal pure override returns (string memory) { } function _mintTokens(uint16 _numTokens) internal { } function _safeMint(address to) internal { } /* Provided by Open Zeppelin */ function supportsInterface( bytes4 interfaceId ) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
totalSupply()+_numTokens<=maxSupply(),"Insufficient supply"
354,794
totalSupply()+_numTokens<=maxSupply()
"The sales period is not open"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; contract EtherTulipsV2 is ERC721, ERC721Enumerable, Ownable { using Strings for uint256; event SalesStart(); address public bridgeAddress; uint256 public constant price1 = 75000000000000000 wei; // 0.075 ETH uint256 public constant price2 = 150000000000000000 wei; // 0.15 ETH uint256 public constant maxHiddenAttrBlocks = 19350; // around 72 hours uint256 public constant v1Supply = 7251; uint256 public constant v2MaxSupply = 5094; uint256 public constant maxPurchaseAmount = 30; uint16 public constant numReserved = 24; uint256 public mostRecentSaleBlock = 0; uint256 public startSalesBlock = 0; uint256 private v2Supply = 0; uint256 private numUnimportedTokens = v1Supply; bool[v1Supply] private tokenImported; constructor(address _bridgeAddress) ERC721("EtherTulips", "TULIP") { } function mint(uint16 _numTokens) public payable { require(totalSupply() + _numTokens <= maxSupply(), "Insufficient supply"); require(<FILL_ME>) require(_numTokens <= maxPurchaseAmount, "Too many purchases at once"); uint256 totalCost = price() * _numTokens; require(msg.value == totalCost, "Incorrect amount sent"); _mintTokens(_numTokens); } function maxSupply() public pure returns (uint256 max) { } function price() public view returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /* Overridden ERC721 for unimported tokens */ function balanceOf(address _owner) public view override returns (uint256 balance) { } function ownerOf(uint256 _tokenId) public view override returns (address owner) { } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) public virtual override { } // called in safeTransferFrom and transferFrom function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal override(ERC721, ERC721Enumerable) { } function _exists(uint256 _tokenId) internal view override returns (bool) { } /* Overridden ERC721Enumerable for unimported tokens */ function totalSupply() public view override returns (uint256 supply) { } function tokenByIndex(uint256 _index) public view override returns (uint256 tokenId) { } function tokenOfOwnerByIndex(address _owner, uint256 _index) public view override returns (uint256 tokenId) { } /* State checking */ function salesStarted() public view returns (bool isStarted) { } function salesOpen() public view returns (bool isOpen) { } function attributesAvailable() public view returns (bool isAvailable) { } /* Owner ownly */ function startSales() external onlyOwner { } function withdrawBalance(uint256 _amount) external onlyOwner { } /* Internal */ function _isV1(uint256 _tokenId) internal pure returns (bool) { } function _isUnimportedV1(uint256 _tokenId) internal view returns (bool) { } function _numImported() internal view returns (uint256) { } function _getDesign(uint256 _tokenId) internal view returns (uint256 design) { } function _baseURI() internal pure override returns (string memory) { } function _mintTokens(uint16 _numTokens) internal { } function _safeMint(address to) internal { } /* Provided by Open Zeppelin */ function supportsInterface( bytes4 interfaceId ) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
salesOpen(),"The sales period is not open"
354,794
salesOpen()
"ERC721: transfer to non ERC721Receiver implementer"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; contract EtherTulipsV2 is ERC721, ERC721Enumerable, Ownable { using Strings for uint256; event SalesStart(); address public bridgeAddress; uint256 public constant price1 = 75000000000000000 wei; // 0.075 ETH uint256 public constant price2 = 150000000000000000 wei; // 0.15 ETH uint256 public constant maxHiddenAttrBlocks = 19350; // around 72 hours uint256 public constant v1Supply = 7251; uint256 public constant v2MaxSupply = 5094; uint256 public constant maxPurchaseAmount = 30; uint16 public constant numReserved = 24; uint256 public mostRecentSaleBlock = 0; uint256 public startSalesBlock = 0; uint256 private v2Supply = 0; uint256 private numUnimportedTokens = v1Supply; bool[v1Supply] private tokenImported; constructor(address _bridgeAddress) ERC721("EtherTulips", "TULIP") { } function mint(uint16 _numTokens) public payable { } function maxSupply() public pure returns (uint256 max) { } function price() public view returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /* Overridden ERC721 for unimported tokens */ function balanceOf(address _owner) public view override returns (uint256 balance) { } function ownerOf(uint256 _tokenId) public view override returns (address owner) { } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) public virtual override { if (_isUnimportedV1(_tokenId)) { require(_isApprovedOrOwner(_msgSender(), _tokenId), "ERC721: transfer caller is not owner nor approved"); ERC721._importTransfer(_from, _to, _tokenId); require(<FILL_ME>) } else { ERC721._safeTransfer(_from, _to, _tokenId, _data); } } // called in safeTransferFrom and transferFrom function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal override(ERC721, ERC721Enumerable) { } function _exists(uint256 _tokenId) internal view override returns (bool) { } /* Overridden ERC721Enumerable for unimported tokens */ function totalSupply() public view override returns (uint256 supply) { } function tokenByIndex(uint256 _index) public view override returns (uint256 tokenId) { } function tokenOfOwnerByIndex(address _owner, uint256 _index) public view override returns (uint256 tokenId) { } /* State checking */ function salesStarted() public view returns (bool isStarted) { } function salesOpen() public view returns (bool isOpen) { } function attributesAvailable() public view returns (bool isAvailable) { } /* Owner ownly */ function startSales() external onlyOwner { } function withdrawBalance(uint256 _amount) external onlyOwner { } /* Internal */ function _isV1(uint256 _tokenId) internal pure returns (bool) { } function _isUnimportedV1(uint256 _tokenId) internal view returns (bool) { } function _numImported() internal view returns (uint256) { } function _getDesign(uint256 _tokenId) internal view returns (uint256 design) { } function _baseURI() internal pure override returns (string memory) { } function _mintTokens(uint16 _numTokens) internal { } function _safeMint(address to) internal { } /* Provided by Open Zeppelin */ function supportsInterface( bytes4 interfaceId ) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
_checkOnERC721Received(_from,_to,_tokenId,_data),"ERC721: transfer to non ERC721Receiver implementer"
354,794
_checkOnERC721Received(_from,_to,_tokenId,_data)
"tokens minted with EtherTulips V2 cannot be bridged to EtherTulips V1"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; contract EtherTulipsV2 is ERC721, ERC721Enumerable, Ownable { using Strings for uint256; event SalesStart(); address public bridgeAddress; uint256 public constant price1 = 75000000000000000 wei; // 0.075 ETH uint256 public constant price2 = 150000000000000000 wei; // 0.15 ETH uint256 public constant maxHiddenAttrBlocks = 19350; // around 72 hours uint256 public constant v1Supply = 7251; uint256 public constant v2MaxSupply = 5094; uint256 public constant maxPurchaseAmount = 30; uint16 public constant numReserved = 24; uint256 public mostRecentSaleBlock = 0; uint256 public startSalesBlock = 0; uint256 private v2Supply = 0; uint256 private numUnimportedTokens = v1Supply; bool[v1Supply] private tokenImported; constructor(address _bridgeAddress) ERC721("EtherTulips", "TULIP") { } function mint(uint16 _numTokens) public payable { } function maxSupply() public pure returns (uint256 max) { } function price() public view returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /* Overridden ERC721 for unimported tokens */ function balanceOf(address _owner) public view override returns (uint256 balance) { } function ownerOf(uint256 _tokenId) public view override returns (address owner) { } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) public virtual override { } // called in safeTransferFrom and transferFrom function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal override(ERC721, ERC721Enumerable) { require(_to != address(0), "Cannot send to null address"); // prevents burning if (_from == bridgeAddress && _isUnimportedV1(_tokenId)) { tokenImported[_tokenId] = true; numUnimportedTokens--; } else if (_from != _to && _from != address(0)) { _removeTokenFromOwnerEnumeration(_from, _tokenId); } if (_to == bridgeAddress) { require(<FILL_ME>) } if (_to != _from) { _addTokenToOwnerEnumeration(_to, _tokenId); } } function _exists(uint256 _tokenId) internal view override returns (bool) { } /* Overridden ERC721Enumerable for unimported tokens */ function totalSupply() public view override returns (uint256 supply) { } function tokenByIndex(uint256 _index) public view override returns (uint256 tokenId) { } function tokenOfOwnerByIndex(address _owner, uint256 _index) public view override returns (uint256 tokenId) { } /* State checking */ function salesStarted() public view returns (bool isStarted) { } function salesOpen() public view returns (bool isOpen) { } function attributesAvailable() public view returns (bool isAvailable) { } /* Owner ownly */ function startSales() external onlyOwner { } function withdrawBalance(uint256 _amount) external onlyOwner { } /* Internal */ function _isV1(uint256 _tokenId) internal pure returns (bool) { } function _isUnimportedV1(uint256 _tokenId) internal view returns (bool) { } function _numImported() internal view returns (uint256) { } function _getDesign(uint256 _tokenId) internal view returns (uint256 design) { } function _baseURI() internal pure override returns (string memory) { } function _mintTokens(uint16 _numTokens) internal { } function _safeMint(address to) internal { } /* Provided by Open Zeppelin */ function supportsInterface( bytes4 interfaceId ) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
_isV1(_tokenId),"tokens minted with EtherTulips V2 cannot be bridged to EtherTulips V1"
354,794
_isV1(_tokenId)
"Sales already started"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; contract EtherTulipsV2 is ERC721, ERC721Enumerable, Ownable { using Strings for uint256; event SalesStart(); address public bridgeAddress; uint256 public constant price1 = 75000000000000000 wei; // 0.075 ETH uint256 public constant price2 = 150000000000000000 wei; // 0.15 ETH uint256 public constant maxHiddenAttrBlocks = 19350; // around 72 hours uint256 public constant v1Supply = 7251; uint256 public constant v2MaxSupply = 5094; uint256 public constant maxPurchaseAmount = 30; uint16 public constant numReserved = 24; uint256 public mostRecentSaleBlock = 0; uint256 public startSalesBlock = 0; uint256 private v2Supply = 0; uint256 private numUnimportedTokens = v1Supply; bool[v1Supply] private tokenImported; constructor(address _bridgeAddress) ERC721("EtherTulips", "TULIP") { } function mint(uint16 _numTokens) public payable { } function maxSupply() public pure returns (uint256 max) { } function price() public view returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /* Overridden ERC721 for unimported tokens */ function balanceOf(address _owner) public view override returns (uint256 balance) { } function ownerOf(uint256 _tokenId) public view override returns (address owner) { } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) public virtual override { } // called in safeTransferFrom and transferFrom function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal override(ERC721, ERC721Enumerable) { } function _exists(uint256 _tokenId) internal view override returns (bool) { } /* Overridden ERC721Enumerable for unimported tokens */ function totalSupply() public view override returns (uint256 supply) { } function tokenByIndex(uint256 _index) public view override returns (uint256 tokenId) { } function tokenOfOwnerByIndex(address _owner, uint256 _index) public view override returns (uint256 tokenId) { } /* State checking */ function salesStarted() public view returns (bool isStarted) { } function salesOpen() public view returns (bool isOpen) { } function attributesAvailable() public view returns (bool isAvailable) { } /* Owner ownly */ function startSales() external onlyOwner { require(<FILL_ME>) startSalesBlock = block.number; emit SalesStart(); } function withdrawBalance(uint256 _amount) external onlyOwner { } /* Internal */ function _isV1(uint256 _tokenId) internal pure returns (bool) { } function _isUnimportedV1(uint256 _tokenId) internal view returns (bool) { } function _numImported() internal view returns (uint256) { } function _getDesign(uint256 _tokenId) internal view returns (uint256 design) { } function _baseURI() internal pure override returns (string memory) { } function _mintTokens(uint16 _numTokens) internal { } function _safeMint(address to) internal { } /* Provided by Open Zeppelin */ function supportsInterface( bytes4 interfaceId ) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
!salesStarted(),"Sales already started"
354,794
!salesStarted()
"Attributes are not yet available"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; contract EtherTulipsV2 is ERC721, ERC721Enumerable, Ownable { using Strings for uint256; event SalesStart(); address public bridgeAddress; uint256 public constant price1 = 75000000000000000 wei; // 0.075 ETH uint256 public constant price2 = 150000000000000000 wei; // 0.15 ETH uint256 public constant maxHiddenAttrBlocks = 19350; // around 72 hours uint256 public constant v1Supply = 7251; uint256 public constant v2MaxSupply = 5094; uint256 public constant maxPurchaseAmount = 30; uint16 public constant numReserved = 24; uint256 public mostRecentSaleBlock = 0; uint256 public startSalesBlock = 0; uint256 private v2Supply = 0; uint256 private numUnimportedTokens = v1Supply; bool[v1Supply] private tokenImported; constructor(address _bridgeAddress) ERC721("EtherTulips", "TULIP") { } function mint(uint16 _numTokens) public payable { } function maxSupply() public pure returns (uint256 max) { } function price() public view returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /* Overridden ERC721 for unimported tokens */ function balanceOf(address _owner) public view override returns (uint256 balance) { } function ownerOf(uint256 _tokenId) public view override returns (address owner) { } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) public virtual override { } // called in safeTransferFrom and transferFrom function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal override(ERC721, ERC721Enumerable) { } function _exists(uint256 _tokenId) internal view override returns (bool) { } /* Overridden ERC721Enumerable for unimported tokens */ function totalSupply() public view override returns (uint256 supply) { } function tokenByIndex(uint256 _index) public view override returns (uint256 tokenId) { } function tokenOfOwnerByIndex(address _owner, uint256 _index) public view override returns (uint256 tokenId) { } /* State checking */ function salesStarted() public view returns (bool isStarted) { } function salesOpen() public view returns (bool isOpen) { } function attributesAvailable() public view returns (bool isAvailable) { } /* Owner ownly */ function startSales() external onlyOwner { } function withdrawBalance(uint256 _amount) external onlyOwner { } /* Internal */ function _isV1(uint256 _tokenId) internal pure returns (bool) { } function _isUnimportedV1(uint256 _tokenId) internal view returns (bool) { } function _numImported() internal view returns (uint256) { } function _getDesign(uint256 _tokenId) internal view returns (uint256 design) { require(<FILL_ME>) require(!_isV1(_tokenId), "_getDesign is only valid for v2 tokens"); design = (_tokenId + mostRecentSaleBlock) % v2MaxSupply; } function _baseURI() internal pure override returns (string memory) { } function _mintTokens(uint16 _numTokens) internal { } function _safeMint(address to) internal { } /* Provided by Open Zeppelin */ function supportsInterface( bytes4 interfaceId ) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
attributesAvailable(),"Attributes are not yet available"
354,794
attributesAvailable()
"_getDesign is only valid for v2 tokens"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; contract EtherTulipsV2 is ERC721, ERC721Enumerable, Ownable { using Strings for uint256; event SalesStart(); address public bridgeAddress; uint256 public constant price1 = 75000000000000000 wei; // 0.075 ETH uint256 public constant price2 = 150000000000000000 wei; // 0.15 ETH uint256 public constant maxHiddenAttrBlocks = 19350; // around 72 hours uint256 public constant v1Supply = 7251; uint256 public constant v2MaxSupply = 5094; uint256 public constant maxPurchaseAmount = 30; uint16 public constant numReserved = 24; uint256 public mostRecentSaleBlock = 0; uint256 public startSalesBlock = 0; uint256 private v2Supply = 0; uint256 private numUnimportedTokens = v1Supply; bool[v1Supply] private tokenImported; constructor(address _bridgeAddress) ERC721("EtherTulips", "TULIP") { } function mint(uint16 _numTokens) public payable { } function maxSupply() public pure returns (uint256 max) { } function price() public view returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /* Overridden ERC721 for unimported tokens */ function balanceOf(address _owner) public view override returns (uint256 balance) { } function ownerOf(uint256 _tokenId) public view override returns (address owner) { } function safeTransferFrom( address _from, address _to, uint256 _tokenId, bytes memory _data ) public virtual override { } // called in safeTransferFrom and transferFrom function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal override(ERC721, ERC721Enumerable) { } function _exists(uint256 _tokenId) internal view override returns (bool) { } /* Overridden ERC721Enumerable for unimported tokens */ function totalSupply() public view override returns (uint256 supply) { } function tokenByIndex(uint256 _index) public view override returns (uint256 tokenId) { } function tokenOfOwnerByIndex(address _owner, uint256 _index) public view override returns (uint256 tokenId) { } /* State checking */ function salesStarted() public view returns (bool isStarted) { } function salesOpen() public view returns (bool isOpen) { } function attributesAvailable() public view returns (bool isAvailable) { } /* Owner ownly */ function startSales() external onlyOwner { } function withdrawBalance(uint256 _amount) external onlyOwner { } /* Internal */ function _isV1(uint256 _tokenId) internal pure returns (bool) { } function _isUnimportedV1(uint256 _tokenId) internal view returns (bool) { } function _numImported() internal view returns (uint256) { } function _getDesign(uint256 _tokenId) internal view returns (uint256 design) { require(attributesAvailable(), "Attributes are not yet available"); require(<FILL_ME>) design = (_tokenId + mostRecentSaleBlock) % v2MaxSupply; } function _baseURI() internal pure override returns (string memory) { } function _mintTokens(uint16 _numTokens) internal { } function _safeMint(address to) internal { } /* Provided by Open Zeppelin */ function supportsInterface( bytes4 interfaceId ) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
!_isV1(_tokenId),"_getDesign is only valid for v2 tokens"
354,794
!_isV1(_tokenId)
"Minting would exceed supply"
/* @@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@@@@@ @@@@ @@@@ *** @@@@ /@@@@ @@@@ *** @@ /@@ @@@@@ *** @@ @@@@@@@@@@@@@@@@@@ *** @@ @@@@@@ @@@@@@**. ** @@ @@ @@@@#****** @@@@ @@@@@ @@@@@@@@@@@@@@ @@ @@ @@ @@@@/ @@@@@ @@ @@@@@@ @@@@@ @@@@@ @@@@@@@@@@@ @@@@@ @@@@@ @@@@ @@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ /@@@@@@@@ @@@@@@@ @@@@@@@@@ @@@@@@@@@ @@ @@@@@@@@@ @@@@@@@@@ @@ @@ @@@@@ @@@@ @@@@@@@ @@@@@@@ */ pragma solidity >=0.6.0 <0.8.0; interface nftInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view virtual returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view virtual returns (uint256); } pragma solidity >=0.6.0 <0.8.0; /** * @title CryptoFlyz contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract CryptoFlyz is ERC721, Ownable, PaymentSplitter { bool public mintIsActive = true; uint256 public tokenPrice = 0; uint256 public publicTokenPrice = 42000000000000000; uint256 public constant maxTokens = 7025; uint256 public constant maxMintsPerTx = 10; string private _contractURI; uint256 public tokenCount=1; bool public devMintLocked = false; bool private initialized = false; bool public publicMintLocked = true; //Parent NFT Contract //mainnet address address public nftAddress = 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6; //rinkeby address //address public nftAddress = 0x70BC4cCb9bC9eF1B7E9dc465a38EEbc5d73740FB; nftInterface nftContract = nftInterface(nftAddress); constructor() public ERC721("CryptoFlyz", "FLYZ") {} function initializePaymentSplitter (address[] memory payees, uint256[] memory shares_) external onlyOwner { } //Set Base URI function setBaseURI(string memory _baseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function setContractURI(string memory contractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Private sale minting (reserved for Toadz) function mintWithToad(uint256 nftId) external { require(mintIsActive, "CryptoFlyz must be active to mint"); require(<FILL_ME>) require(nftContract.ownerOf(nftId) == msg.sender, "Not the owner of this Toad"); if (nftId >= 1000000) { uint256 newID = SafeMath.div(nftId, 1000000); newID = SafeMath.add(newID, 6969); require(!_exists(newID), "This Toad has already been used."); _safeMint(msg.sender, newID); tokenCount++; } else { require(!_exists(nftId), "This Toad has already been used."); _safeMint(msg.sender, nftId); tokenCount++; } } function multiMintWithnft(uint256 [] memory nftIds) public { } function mintAllToadz() external { } //Dev mint special tokens function mintSpecial(uint256 [] memory specialId) external onlyOwner { } function lockDevMint() public onlyOwner { } function unlockPublicMint() public onlyOwner { } function updatePublicPrice(uint256 newPrice) public onlyOwner { } function mintPublic(uint256 quantity) external payable { } function multiMintPublic(uint256 [] memory nftIds, uint256 quantity) external payable { } }
tokenCount-1+1<=maxTokens,"Minting would exceed supply"
354,806
tokenCount-1+1<=maxTokens
"This Toad has already been used."
/* @@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@@@@@ @@@@ @@@@ *** @@@@ /@@@@ @@@@ *** @@ /@@ @@@@@ *** @@ @@@@@@@@@@@@@@@@@@ *** @@ @@@@@@ @@@@@@**. ** @@ @@ @@@@#****** @@@@ @@@@@ @@@@@@@@@@@@@@ @@ @@ @@ @@@@/ @@@@@ @@ @@@@@@ @@@@@ @@@@@ @@@@@@@@@@@ @@@@@ @@@@@ @@@@ @@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ /@@@@@@@@ @@@@@@@ @@@@@@@@@ @@@@@@@@@ @@ @@@@@@@@@ @@@@@@@@@ @@ @@ @@@@@ @@@@ @@@@@@@ @@@@@@@ */ pragma solidity >=0.6.0 <0.8.0; interface nftInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view virtual returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view virtual returns (uint256); } pragma solidity >=0.6.0 <0.8.0; /** * @title CryptoFlyz contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract CryptoFlyz is ERC721, Ownable, PaymentSplitter { bool public mintIsActive = true; uint256 public tokenPrice = 0; uint256 public publicTokenPrice = 42000000000000000; uint256 public constant maxTokens = 7025; uint256 public constant maxMintsPerTx = 10; string private _contractURI; uint256 public tokenCount=1; bool public devMintLocked = false; bool private initialized = false; bool public publicMintLocked = true; //Parent NFT Contract //mainnet address address public nftAddress = 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6; //rinkeby address //address public nftAddress = 0x70BC4cCb9bC9eF1B7E9dc465a38EEbc5d73740FB; nftInterface nftContract = nftInterface(nftAddress); constructor() public ERC721("CryptoFlyz", "FLYZ") {} function initializePaymentSplitter (address[] memory payees, uint256[] memory shares_) external onlyOwner { } //Set Base URI function setBaseURI(string memory _baseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function setContractURI(string memory contractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Private sale minting (reserved for Toadz) function mintWithToad(uint256 nftId) external { require(mintIsActive, "CryptoFlyz must be active to mint"); require(tokenCount - 1 + 1 <= maxTokens, "Minting would exceed supply"); require(nftContract.ownerOf(nftId) == msg.sender, "Not the owner of this Toad"); if (nftId >= 1000000) { uint256 newID = SafeMath.div(nftId, 1000000); newID = SafeMath.add(newID, 6969); require(<FILL_ME>) _safeMint(msg.sender, newID); tokenCount++; } else { require(!_exists(nftId), "This Toad has already been used."); _safeMint(msg.sender, nftId); tokenCount++; } } function multiMintWithnft(uint256 [] memory nftIds) public { } function mintAllToadz() external { } //Dev mint special tokens function mintSpecial(uint256 [] memory specialId) external onlyOwner { } function lockDevMint() public onlyOwner { } function unlockPublicMint() public onlyOwner { } function updatePublicPrice(uint256 newPrice) public onlyOwner { } function mintPublic(uint256 quantity) external payable { } function multiMintPublic(uint256 [] memory nftIds, uint256 quantity) external payable { } }
!_exists(newID),"This Toad has already been used."
354,806
!_exists(newID)
"This Toad has already been used."
/* @@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@@@@@ @@@@ @@@@ *** @@@@ /@@@@ @@@@ *** @@ /@@ @@@@@ *** @@ @@@@@@@@@@@@@@@@@@ *** @@ @@@@@@ @@@@@@**. ** @@ @@ @@@@#****** @@@@ @@@@@ @@@@@@@@@@@@@@ @@ @@ @@ @@@@/ @@@@@ @@ @@@@@@ @@@@@ @@@@@ @@@@@@@@@@@ @@@@@ @@@@@ @@@@ @@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ /@@@@@@@@ @@@@@@@ @@@@@@@@@ @@@@@@@@@ @@ @@@@@@@@@ @@@@@@@@@ @@ @@ @@@@@ @@@@ @@@@@@@ @@@@@@@ */ pragma solidity >=0.6.0 <0.8.0; interface nftInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view virtual returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view virtual returns (uint256); } pragma solidity >=0.6.0 <0.8.0; /** * @title CryptoFlyz contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract CryptoFlyz is ERC721, Ownable, PaymentSplitter { bool public mintIsActive = true; uint256 public tokenPrice = 0; uint256 public publicTokenPrice = 42000000000000000; uint256 public constant maxTokens = 7025; uint256 public constant maxMintsPerTx = 10; string private _contractURI; uint256 public tokenCount=1; bool public devMintLocked = false; bool private initialized = false; bool public publicMintLocked = true; //Parent NFT Contract //mainnet address address public nftAddress = 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6; //rinkeby address //address public nftAddress = 0x70BC4cCb9bC9eF1B7E9dc465a38EEbc5d73740FB; nftInterface nftContract = nftInterface(nftAddress); constructor() public ERC721("CryptoFlyz", "FLYZ") {} function initializePaymentSplitter (address[] memory payees, uint256[] memory shares_) external onlyOwner { } //Set Base URI function setBaseURI(string memory _baseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function setContractURI(string memory contractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Private sale minting (reserved for Toadz) function mintWithToad(uint256 nftId) external { require(mintIsActive, "CryptoFlyz must be active to mint"); require(tokenCount - 1 + 1 <= maxTokens, "Minting would exceed supply"); require(nftContract.ownerOf(nftId) == msg.sender, "Not the owner of this Toad"); if (nftId >= 1000000) { uint256 newID = SafeMath.div(nftId, 1000000); newID = SafeMath.add(newID, 6969); require(!_exists(newID), "This Toad has already been used."); _safeMint(msg.sender, newID); tokenCount++; } else { require(<FILL_ME>) _safeMint(msg.sender, nftId); tokenCount++; } } function multiMintWithnft(uint256 [] memory nftIds) public { } function mintAllToadz() external { } //Dev mint special tokens function mintSpecial(uint256 [] memory specialId) external onlyOwner { } function lockDevMint() public onlyOwner { } function unlockPublicMint() public onlyOwner { } function updatePublicPrice(uint256 newPrice) public onlyOwner { } function mintPublic(uint256 quantity) external payable { } function multiMintPublic(uint256 [] memory nftIds, uint256 quantity) external payable { } }
!_exists(nftId),"This Toad has already been used."
354,806
!_exists(nftId)
null
/* @@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@@@@@ @@@@ @@@@ *** @@@@ /@@@@ @@@@ *** @@ /@@ @@@@@ *** @@ @@@@@@@@@@@@@@@@@@ *** @@ @@@@@@ @@@@@@**. ** @@ @@ @@@@#****** @@@@ @@@@@ @@@@@@@@@@@@@@ @@ @@ @@ @@@@/ @@@@@ @@ @@@@@@ @@@@@ @@@@@ @@@@@@@@@@@ @@@@@ @@@@@ @@@@ @@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ /@@@@@@@@ @@@@@@@ @@@@@@@@@ @@@@@@@@@ @@ @@@@@@@@@ @@@@@@@@@ @@ @@ @@@@@ @@@@ @@@@@@@ @@@@@@@ */ pragma solidity >=0.6.0 <0.8.0; interface nftInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view virtual returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view virtual returns (uint256); } pragma solidity >=0.6.0 <0.8.0; /** * @title CryptoFlyz contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract CryptoFlyz is ERC721, Ownable, PaymentSplitter { bool public mintIsActive = true; uint256 public tokenPrice = 0; uint256 public publicTokenPrice = 42000000000000000; uint256 public constant maxTokens = 7025; uint256 public constant maxMintsPerTx = 10; string private _contractURI; uint256 public tokenCount=1; bool public devMintLocked = false; bool private initialized = false; bool public publicMintLocked = true; //Parent NFT Contract //mainnet address address public nftAddress = 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6; //rinkeby address //address public nftAddress = 0x70BC4cCb9bC9eF1B7E9dc465a38EEbc5d73740FB; nftInterface nftContract = nftInterface(nftAddress); constructor() public ERC721("CryptoFlyz", "FLYZ") {} function initializePaymentSplitter (address[] memory payees, uint256[] memory shares_) external onlyOwner { } //Set Base URI function setBaseURI(string memory _baseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function setContractURI(string memory contractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Private sale minting (reserved for Toadz) function mintWithToad(uint256 nftId) external { } function multiMintWithnft(uint256 [] memory nftIds) public { } function mintAllToadz() external { } //Dev mint special tokens function mintSpecial(uint256 [] memory specialId) external onlyOwner { require (!devMintLocked, "Dev Mint Permanently Locked"); for (uint256 i = 0; i < specialId.length; i++) { require(<FILL_ME>) _mint(msg.sender,specialId[i]); } } function lockDevMint() public onlyOwner { } function unlockPublicMint() public onlyOwner { } function updatePublicPrice(uint256 newPrice) public onlyOwner { } function mintPublic(uint256 quantity) external payable { } function multiMintPublic(uint256 [] memory nftIds, uint256 quantity) external payable { } }
specialId[i]!=0
354,806
specialId[i]!=0
"minting this many would exceed supply"
/* @@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@@@@@ @@@@ @@@@ *** @@@@ /@@@@ @@@@ *** @@ /@@ @@@@@ *** @@ @@@@@@@@@@@@@@@@@@ *** @@ @@@@@@ @@@@@@**. ** @@ @@ @@@@#****** @@@@ @@@@@ @@@@@@@@@@@@@@ @@ @@ @@ @@@@/ @@@@@ @@ @@@@@@ @@@@@ @@@@@ @@@@@@@@@@@ @@@@@ @@@@@ @@@@ @@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ /@@@@@@@@ @@@@@@@ @@@@@@@@@ @@@@@@@@@ @@ @@@@@@@@@ @@@@@@@@@ @@ @@ @@@@@ @@@@ @@@@@@@ @@@@@@@ */ pragma solidity >=0.6.0 <0.8.0; interface nftInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view virtual returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view virtual returns (uint256); } pragma solidity >=0.6.0 <0.8.0; /** * @title CryptoFlyz contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract CryptoFlyz is ERC721, Ownable, PaymentSplitter { bool public mintIsActive = true; uint256 public tokenPrice = 0; uint256 public publicTokenPrice = 42000000000000000; uint256 public constant maxTokens = 7025; uint256 public constant maxMintsPerTx = 10; string private _contractURI; uint256 public tokenCount=1; bool public devMintLocked = false; bool private initialized = false; bool public publicMintLocked = true; //Parent NFT Contract //mainnet address address public nftAddress = 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6; //rinkeby address //address public nftAddress = 0x70BC4cCb9bC9eF1B7E9dc465a38EEbc5d73740FB; nftInterface nftContract = nftInterface(nftAddress); constructor() public ERC721("CryptoFlyz", "FLYZ") {} function initializePaymentSplitter (address[] memory payees, uint256[] memory shares_) external onlyOwner { } //Set Base URI function setBaseURI(string memory _baseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function setContractURI(string memory contractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Private sale minting (reserved for Toadz) function mintWithToad(uint256 nftId) external { } function multiMintWithnft(uint256 [] memory nftIds) public { } function mintAllToadz() external { } //Dev mint special tokens function mintSpecial(uint256 [] memory specialId) external onlyOwner { } function lockDevMint() public onlyOwner { } function unlockPublicMint() public onlyOwner { } function updatePublicPrice(uint256 newPrice) public onlyOwner { } function mintPublic(uint256 quantity) external payable { require(quantity <= maxMintsPerTx, "trying to mint too many at a time!"); require(<FILL_ME>) require(msg.value >= publicTokenPrice * quantity, "not enough ether sent!"); require(msg.sender == tx.origin, "no contracts please!"); require(!publicMintLocked, "minting is not open to the public yet!"); uint256 i = 0; for (uint256 j = 1; j < maxTokens + 1; j++) { if (i == quantity) { break; } else { if (!_exists(j) && i < quantity) { _safeMint(msg.sender, j); i++; tokenCount++; } } } } function multiMintPublic(uint256 [] memory nftIds, uint256 quantity) external payable { } }
tokenCount-1+quantity<=maxTokens,"minting this many would exceed supply"
354,806
tokenCount-1+quantity<=maxTokens
"minting is not open to the public yet!"
/* @@@@@@@@@@@@@@@@@@@@@@ @@@@ @@@@@@@@@@@@@@@@@@@@ @@@@ @@@@ *** @@@@ /@@@@ @@@@ *** @@ /@@ @@@@@ *** @@ @@@@@@@@@@@@@@@@@@ *** @@ @@@@@@ @@@@@@**. ** @@ @@ @@@@#****** @@@@ @@@@@ @@@@@@@@@@@@@@ @@ @@ @@ @@@@/ @@@@@ @@ @@@@@@ @@@@@ @@@@@ @@@@@@@@@@@ @@@@@ @@@@@ @@@@ @@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ /@@@@@@@@ @@@@@@@ @@@@@@@@@ @@@@@@@@@ @@ @@@@@@@@@ @@@@@@@@@ @@ @@ @@@@@ @@@@ @@@@@@@ @@@@@@@ */ pragma solidity >=0.6.0 <0.8.0; interface nftInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view virtual returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view virtual returns (uint256); } pragma solidity >=0.6.0 <0.8.0; /** * @title CryptoFlyz contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract CryptoFlyz is ERC721, Ownable, PaymentSplitter { bool public mintIsActive = true; uint256 public tokenPrice = 0; uint256 public publicTokenPrice = 42000000000000000; uint256 public constant maxTokens = 7025; uint256 public constant maxMintsPerTx = 10; string private _contractURI; uint256 public tokenCount=1; bool public devMintLocked = false; bool private initialized = false; bool public publicMintLocked = true; //Parent NFT Contract //mainnet address address public nftAddress = 0x1CB1A5e65610AEFF2551A50f76a87a7d3fB649C6; //rinkeby address //address public nftAddress = 0x70BC4cCb9bC9eF1B7E9dc465a38EEbc5d73740FB; nftInterface nftContract = nftInterface(nftAddress); constructor() public ERC721("CryptoFlyz", "FLYZ") {} function initializePaymentSplitter (address[] memory payees, uint256[] memory shares_) external onlyOwner { } //Set Base URI function setBaseURI(string memory _baseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function setContractURI(string memory contractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Private sale minting (reserved for Toadz) function mintWithToad(uint256 nftId) external { } function multiMintWithnft(uint256 [] memory nftIds) public { } function mintAllToadz() external { } //Dev mint special tokens function mintSpecial(uint256 [] memory specialId) external onlyOwner { } function lockDevMint() public onlyOwner { } function unlockPublicMint() public onlyOwner { } function updatePublicPrice(uint256 newPrice) public onlyOwner { } function mintPublic(uint256 quantity) external payable { require(quantity <= maxMintsPerTx, "trying to mint too many at a time!"); require(tokenCount - 1 + quantity <= maxTokens, "minting this many would exceed supply"); require(msg.value >= publicTokenPrice * quantity, "not enough ether sent!"); require(msg.sender == tx.origin, "no contracts please!"); require(<FILL_ME>) uint256 i = 0; for (uint256 j = 1; j < maxTokens + 1; j++) { if (i == quantity) { break; } else { if (!_exists(j) && i < quantity) { _safeMint(msg.sender, j); i++; tokenCount++; } } } } function multiMintPublic(uint256 [] memory nftIds, uint256 quantity) external payable { } }
!publicMintLocked,"minting is not open to the public yet!"
354,806
!publicMintLocked
null
pragma solidity ^0.4.16; contract owned { address public owner; function owned() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract SECToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ function SECToken( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen //about lock coins uint start = 1520956799; uint256 SECtotalAmount = 1500000000 * 10 ** 18; address teamaccount = 0xC32b1519A0d4E883FE136AbB3198cbC402b5503F; uint256 amount = _value; address sender = _from; uint256 balance = balanceOf[_from]; if(teamaccount == sender){ if (now < start + 365 * 1 days) { require(<FILL_ME>) } else if (now < start + (2*365+1) * 1 days){ require((balance - amount) >= SECtotalAmount/10 * 2/4); }else if (now < start + (3*365+1) * 1 days){ require((balance - amount) >= SECtotalAmount/10 * 1/4); } } balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(_from, _to, _value); } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public { } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { } /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { } /// @notice Buy tokens from contract by sending ether function buy() payable public { } /// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold function sell(uint256 amount) public { } } contract SEC is SECToken(1500000000, "SEC", "SEC") {}
(balance-amount)>=SECtotalAmount/10*3/4
354,854
(balance-amount)>=SECtotalAmount/10*3/4
null
pragma solidity ^0.4.16; contract owned { address public owner; function owned() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract SECToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ function SECToken( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen //about lock coins uint start = 1520956799; uint256 SECtotalAmount = 1500000000 * 10 ** 18; address teamaccount = 0xC32b1519A0d4E883FE136AbB3198cbC402b5503F; uint256 amount = _value; address sender = _from; uint256 balance = balanceOf[_from]; if(teamaccount == sender){ if (now < start + 365 * 1 days) { require((balance - amount) >= SECtotalAmount/10 * 3/4); } else if (now < start + (2*365+1) * 1 days){ require(<FILL_ME>) }else if (now < start + (3*365+1) * 1 days){ require((balance - amount) >= SECtotalAmount/10 * 1/4); } } balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(_from, _to, _value); } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public { } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { } /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { } /// @notice Buy tokens from contract by sending ether function buy() payable public { } /// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold function sell(uint256 amount) public { } } contract SEC is SECToken(1500000000, "SEC", "SEC") {}
(balance-amount)>=SECtotalAmount/10*2/4
354,854
(balance-amount)>=SECtotalAmount/10*2/4
null
pragma solidity ^0.4.16; contract owned { address public owner; function owned() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract SECToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ function SECToken( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen //about lock coins uint start = 1520956799; uint256 SECtotalAmount = 1500000000 * 10 ** 18; address teamaccount = 0xC32b1519A0d4E883FE136AbB3198cbC402b5503F; uint256 amount = _value; address sender = _from; uint256 balance = balanceOf[_from]; if(teamaccount == sender){ if (now < start + 365 * 1 days) { require((balance - amount) >= SECtotalAmount/10 * 3/4); } else if (now < start + (2*365+1) * 1 days){ require((balance - amount) >= SECtotalAmount/10 * 2/4); }else if (now < start + (3*365+1) * 1 days){ require(<FILL_ME>) } } balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(_from, _to, _value); } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public { } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { } /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { } /// @notice Buy tokens from contract by sending ether function buy() payable public { } /// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold function sell(uint256 amount) public { } } contract SEC is SECToken(1500000000, "SEC", "SEC") {}
(balance-amount)>=SECtotalAmount/10*1/4
354,854
(balance-amount)>=SECtotalAmount/10*1/4
"Customer has no active lobby entries for this time period"
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { ContractStateCache memory state = ContractStateCache(_getHexContractDay(), contractNextPendingDay); uint256 _day = day > 0 ? day : state.currentDay; require(<FILL_ME>) _leaveLobbies(state, _day); // next pending day was updated as part of leaveLobbies contractNextPendingDay = state.nextPendingDay; _distributeShare(customer, _day); } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
customerData[customer].nextPendingDay<_day,"Customer has no active lobby entries for this time period"
354,856
customerData[customer].nextPendingDay<_day
"Affiliate contract is already registered"
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { require(<FILL_ME>) registeredAffiliates[affiliateContract] = affiliateRank; } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
registeredAffiliates[affiliateContract]==0,"Affiliate contract is already registered"
354,856
registeredAffiliates[affiliateContract]==0
"Cannot set an affiliateRank with lower percentage than previous"
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { require(affiliateRank != registeredAffiliates[affiliateContract], "New Affiliate rank must be different than previous"); require(<FILL_ME>) registeredAffiliates[affiliateContract] = affiliateRank; } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
affiliateRankPercentages[affiliateRank]>=affiliateRankPercentages[registeredAffiliates[affiliateContract]],"Cannot set an affiliateRank with lower percentage than previous"
354,856
affiliateRankPercentages[affiliateRank]>=affiliateRankPercentages[registeredAffiliates[affiliateContract]]
"Affiliate rank already exists"
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { require(<FILL_ME>) require(rankSplitPercentage > 0 && rankSplitPercentage <= 100, "Affiliate Split must be between 0-100%"); affiliateRankPercentages[affiliateRank] = rankSplitPercentage; } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
affiliateRankPercentages[affiliateRank]==0,"Affiliate rank already exists"
354,856
affiliateRankPercentages[affiliateRank]==0
"You may only leave lobbies with active entries"
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { require(day < _getHexContractDay(), "You must only leave lobbies that have ended"); uint256[XF_LOBBY_DAY_WORDS] memory joinedDays = hx.xfLobbyPendingDays(address(this)); require(<FILL_ME>) uint256 balance = hx.balanceOf(address(this)); _leaveLobby(day, batchSize, balance); } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
(joinedDays[day>>8]&(1<<(day&255)))>>(day&255)==1,"You may only leave lobbies with active entries"
354,856
(joinedDays[day>>8]&(1<<(day&255)))>>(day&255)==1
"Hearts received for a lobby is 0"
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { hx.xfLobbyExit(lobby, numEntries); uint256 oldBalance = balance; balance = hx.balanceOf(address(this)); totalValueByDay[lobby].heartsReceived += balance - oldBalance; require(<FILL_ME>) return balance; } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
totalValueByDay[lobby].heartsReceived>0,"Hearts received for a lobby is 0"
354,856
totalValueByDay[lobby].heartsReceived>0
"Hearts received must be > 0, leave lobby for day"
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { uint256 totalShare = 0; CustomerState storage user = customerData[customer]; uint256 nextDay = user.nextPendingDay; if(nextDay > 0 && nextDay < endDay){ while(nextDay < endDay){ if(totalValueByDay[nextDay].totalValue > 0 && totalValueByDay[nextDay].heartsReceived > 0){ require(<FILL_ME>) totalShare += user.contributionByDay[nextDay] * totalValueByDay[nextDay].heartsReceived / totalValueByDay[nextDay].totalValue; } nextDay++; } if(totalShare > 0){ require(hx.transfer(customer, totalShare), strConcat("Failed to transfer ",uint2str(totalShare),", insufficient balance")); //mint HEX Money if(hexMoneyAddress != address(0) && totalShare >= 1000 && customer != SPLITTER){ require(hexMoney.mintHXY(totalShare, customer), "could not mint HXY"); } } } if(nextDay != user.nextPendingDay){ user.nextPendingDay = uint16(nextDay); } return totalShare; } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
totalValueByDay[nextDay].heartsReceived>0,"Hearts received must be > 0, leave lobby for day"
354,856
totalValueByDay[nextDay].heartsReceived>0
strConcat("Failed to transfer ",uint2str(totalShare),", insufficient balance")
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { uint256 totalShare = 0; CustomerState storage user = customerData[customer]; uint256 nextDay = user.nextPendingDay; if(nextDay > 0 && nextDay < endDay){ while(nextDay < endDay){ if(totalValueByDay[nextDay].totalValue > 0 && totalValueByDay[nextDay].heartsReceived > 0){ require(totalValueByDay[nextDay].heartsReceived > 0, "Hearts received must be > 0, leave lobby for day"); totalShare += user.contributionByDay[nextDay] * totalValueByDay[nextDay].heartsReceived / totalValueByDay[nextDay].totalValue; } nextDay++; } if(totalShare > 0){ require(<FILL_ME>) //mint HEX Money if(hexMoneyAddress != address(0) && totalShare >= 1000 && customer != SPLITTER){ require(hexMoney.mintHXY(totalShare, customer), "could not mint HXY"); } } } if(nextDay != user.nextPendingDay){ user.nextPendingDay = uint16(nextDay); } return totalShare; } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
hx.transfer(customer,totalShare),strConcat("Failed to transfer ",uint2str(totalShare),", insufficient balance")
354,856
hx.transfer(customer,totalShare)
"could not mint HXY"
pragma solidity 0.5.12; interface HexMoneyInterface{ function mintHXY(uint hearts, address receiver) external returns (bool); } contract HEX { function xfLobbyEnter(address referrerAddr) external payable; function xfLobbyExit(uint256 enterDay, uint256 count) external; function xfLobbyPendingDays(address memberAddr) external view returns (uint256[2] memory words); function balanceOf (address account) external view returns (uint256); function transfer (address recipient, uint256 amount) external returns (bool); function currentDay () external view returns (uint256); } contract Router { struct CustomerState { uint16 nextPendingDay; mapping(uint256 => uint256) contributionByDay; } struct LobbyContributionState { uint256 totalValue; uint256 heartsReceived; } struct ContractStateCache { uint256 currentDay; uint256 nextPendingDay; } event LobbyJoined( uint40 timestamp, uint16 day, uint256 amount, address indexed customer, address indexed affiliate ); event LobbyLeft( uint40 timestamp, uint16 day, uint256 hearts ); event MissedLobby( uint40 timestamp, uint16 day ); address internal hexMoneyAddress = address(0x44F00918A540774b422a1A340B75e055fF816d83); HexMoneyInterface internal hexMoney = HexMoneyInterface(hexMoneyAddress); // from HEX uint16 private constant LAUNCH_PHASE_DAYS = 350; uint16 private constant LAUNCH_PHASE_END_DAY = 351; uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8; // constants & mappings we need HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39); address private operatorOne; address private operatorTwo; address private operatorThree; address private operatorFour; address private operatorFive; address private constant SPLITTER = address(0x889c65411DeA4df35eF6F62252944409FD78054C); uint256 private contractNextPendingDay; uint256 public constant HEX_LAUNCH_TIME = 1575331200; mapping(address => uint8) private registeredAffiliates; mapping(uint256 => LobbyContributionState) private totalValueByDay; mapping(address => CustomerState) private customerData; mapping(uint8 => uint8) public affiliateRankPercentages; modifier operatorOnly() { } constructor() public { } function enterLobby(address customer, address affiliate) public payable { } function exitLobbiesBeforeDay(address customer, uint256 day) public { } function updateOperatorOne(address newOperator) public { } function updateOperatorTwo(address newOperator) public { } function updateOperatorThree(address newOperator) public { } function updateOperatorFour(address newOperator) public { } function updateOperatorFive(address newOperator) public { } function registerAffiliate(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function updateAffiliateRank(address affiliateContract, uint8 affiliateRank) public operatorOnly { } function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage) public operatorOnly { } function verifyAffiliate(address affiliateContract) public view returns (bool, uint8) { } function batchLeaveLobby(uint256 day, uint256 batchSize) public { } function () external payable { } function _getHexContractDay() private view returns (uint256) { } function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay) private { } function _leaveLobby(uint256 lobby, uint256 numEntries, uint256 balance) private returns (uint256) { } function _distributeShare(address customer, uint256 endDay) private returns (uint256) { uint256 totalShare = 0; CustomerState storage user = customerData[customer]; uint256 nextDay = user.nextPendingDay; if(nextDay > 0 && nextDay < endDay){ while(nextDay < endDay){ if(totalValueByDay[nextDay].totalValue > 0 && totalValueByDay[nextDay].heartsReceived > 0){ require(totalValueByDay[nextDay].heartsReceived > 0, "Hearts received must be > 0, leave lobby for day"); totalShare += user.contributionByDay[nextDay] * totalValueByDay[nextDay].heartsReceived / totalValueByDay[nextDay].totalValue; } nextDay++; } if(totalShare > 0){ require(hx.transfer(customer, totalShare), strConcat("Failed to transfer ",uint2str(totalShare),", insufficient balance")); //mint HEX Money if(hexMoneyAddress != address(0) && totalShare >= 1000 && customer != SPLITTER){ require(<FILL_ME>) } } } if(nextDay != user.nextPendingDay){ user.nextPendingDay = uint16(nextDay); } return totalShare; } function setHexMoneyAddress(address _hexMoneyAddress) operatorOnly public { } function uint2str(uint i) internal pure returns (string memory _uintAsString) { } function strConcat(string memory _a, string memory _b, string memory _c , string memory _d, string memory _e) private pure returns (string memory){ } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b, string memory _c) private pure returns (string memory) { } function strConcat(string memory _a, string memory _b) private pure returns (string memory) { } }
hexMoney.mintHXY(totalShare,customer),"could not mint HXY"
354,856
hexMoney.mintHXY(totalShare,customer)
'Cannot mint over supply cap of 5000'
pragma solidity ^0.8.0; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @title ERC721Tradable * ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality. */ abstract contract ERC721Tradable is ContextMixin, ERC721, NativeMetaTransaction, Ownable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; address proxyRegistryAddress; address public RAMPPADDRESS = 0xa9dAC8f3aEDC55D0FE707B86B8A45d246858d2E1; bool public mintingOpen = true; uint256 public SUPPLYCAP = 5000; uint256 public PRICE = 0.01 ether; address[] public payableAddresses = [RAMPPADDRESS]; uint256[] public payableFees = [5]; uint256 public payableAddressCount = 2; constructor( string memory _name, string memory _symbol, address _proxyRegistryAddress ) ERC721(_name, _symbol) { } modifier isRampp() { } /** * @dev Mints a token to an address with a tokenURI. * This is owner only and allows a fee-free drop * @param _to address of the future owner of the token */ function mintToAdmin(address _to) public onlyOwner { require(<FILL_ME>) uint256 newTokenId = _getNextTokenId(); _mint(_to, newTokenId); _incrementTokenId(); } /** * @dev Mints a token to an address with a tokenURI. * fee may or may not be required* * @param _to address of the future owner of the token */ function mintTo(address _to) public payable { } function openMinting() public onlyOwner { } function stopMinting() public onlyOwner { } function setPrice(uint256 _feeInWei) public onlyOwner { } function withdrawAll() public onlyOwner { } function withdrawAllRampp() public isRampp { } function _withdrawAll() private { } function _widthdraw(address _address, uint256 _amount) private { } /** * @dev calculates the next token ID based on value of Counter _tokenSupply * @return uint256 for the next token ID */ function _getNextTokenId() private view returns (uint256) { } /** * @dev increments the value of Counter _tokenSupply */ function _incrementTokenId() private { } function baseTokenURI() public pure virtual returns (string memory); function tokenURI(uint256 _tokenId) public pure override returns (string memory) { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } /** * This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea. */ function _msgSender() internal view override returns (address sender) { } }
_getNextTokenId()<=SUPPLYCAP,'Cannot mint over supply cap of 5000'
354,958
_getNextTokenId()<=SUPPLYCAP
"The accepted token address must be a deployed contract"
pragma solidity ^0.7.6; contract Marketplace is Ownable, Pausable, MarketplaceStorage, NativeMetaTransaction { using SafeMath for uint256; using Address for address; address sellerAddress; /** * @dev Initialize this contract. Acts as a constructor * @param _acceptedToken - Address of the ERC20 accepted for this marketplace * @param _ownerCutPerMillion - owner cut per million */ constructor ( address _acceptedToken, uint256 _ownerCutPerMillion, address _owner, address _seller ) { // EIP712 init _initializeEIP712('SpaceY Marketplace', '1'); // Fee init setOwnerCutPerMillion(_ownerCutPerMillion); require(_owner != address(0), "Invalid owner"); transferOwnership(_owner); require(<FILL_ME>) acceptedToken = ERC20Interface(_acceptedToken); sellerAddress = _seller; } /** * @dev Sets the publication fee that's charged to users to publish items * @param _publicationFee - Fee amount in wei this contract charges to publish an item */ function setPublicationFee(uint256 _publicationFee) external onlyOwner { } /** * @dev Sets the share cut for the owner of the contract that's * charged to the seller on a successful sale * @param _ownerCutPerMillion - Share amount, from 0 to 999,999 */ function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) public whenNotPaused { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function cancelOrder(address nftAddress, uint256 assetId) public whenNotPaused { } /** * @dev Executes the sale for a published NFT and checks for the asset fingerprint * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function safeExecuteOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) public whenNotPaused { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price */ function executeOrder( address nftAddress, uint256 assetId, uint256 price ) public whenNotPaused { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function _createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) internal { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function _cancelOrder(address nftAddress, uint256 assetId) internal returns (Order memory) { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function _executeOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) internal returns (Order memory) { } function _requireERC721(address nftAddress) internal view { } }
_acceptedToken.isContract(),"The accepted token address must be a deployed contract"
355,008
_acceptedToken.isContract()
"The contract is not authorized to manage the asset"
pragma solidity ^0.7.6; contract Marketplace is Ownable, Pausable, MarketplaceStorage, NativeMetaTransaction { using SafeMath for uint256; using Address for address; address sellerAddress; /** * @dev Initialize this contract. Acts as a constructor * @param _acceptedToken - Address of the ERC20 accepted for this marketplace * @param _ownerCutPerMillion - owner cut per million */ constructor ( address _acceptedToken, uint256 _ownerCutPerMillion, address _owner, address _seller ) { } /** * @dev Sets the publication fee that's charged to users to publish items * @param _publicationFee - Fee amount in wei this contract charges to publish an item */ function setPublicationFee(uint256 _publicationFee) external onlyOwner { } /** * @dev Sets the share cut for the owner of the contract that's * charged to the seller on a successful sale * @param _ownerCutPerMillion - Share amount, from 0 to 999,999 */ function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) public whenNotPaused { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function cancelOrder(address nftAddress, uint256 assetId) public whenNotPaused { } /** * @dev Executes the sale for a published NFT and checks for the asset fingerprint * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function safeExecuteOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) public whenNotPaused { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price */ function executeOrder( address nftAddress, uint256 assetId, uint256 price ) public whenNotPaused { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function _createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) internal { _requireERC721(nftAddress); address sender = _msgSender(); ERC721Interface nftRegistry = ERC721Interface(nftAddress); address assetOwner = nftRegistry.ownerOf(assetId); require(sender == assetOwner, "Only the owner can create orders"); require(<FILL_ME>) require(priceInWei > 0, "Price should be bigger than 0"); require(expiresAt > block.timestamp.add(1 minutes), "Publication should be more than 1 minute in the future"); bytes32 orderId = keccak256( abi.encodePacked( block.timestamp, assetOwner, assetId, nftAddress, priceInWei ) ); orderByAssetId[nftAddress][assetId] = Order({ id: orderId, seller: assetOwner, nftAddress: nftAddress, price: priceInWei, expiresAt: expiresAt }); // Check if there's a publication fee and // transfer the amount to marketplace owner if (publicationFeeInWei > 0) { require( acceptedToken.transferFrom(sender, owner(), publicationFeeInWei), "Transfering the publication fee to the Marketplace owner failed" ); } emit OrderCreated( orderId, assetId, assetOwner, nftAddress, priceInWei, expiresAt ); } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function _cancelOrder(address nftAddress, uint256 assetId) internal returns (Order memory) { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function _executeOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) internal returns (Order memory) { } function _requireERC721(address nftAddress) internal view { } }
nftRegistry.getApproved(assetId)==address(this)||nftRegistry.isApprovedForAll(assetOwner,address(this)),"The contract is not authorized to manage the asset"
355,008
nftRegistry.getApproved(assetId)==address(this)||nftRegistry.isApprovedForAll(assetOwner,address(this))
"Transfering the publication fee to the Marketplace owner failed"
pragma solidity ^0.7.6; contract Marketplace is Ownable, Pausable, MarketplaceStorage, NativeMetaTransaction { using SafeMath for uint256; using Address for address; address sellerAddress; /** * @dev Initialize this contract. Acts as a constructor * @param _acceptedToken - Address of the ERC20 accepted for this marketplace * @param _ownerCutPerMillion - owner cut per million */ constructor ( address _acceptedToken, uint256 _ownerCutPerMillion, address _owner, address _seller ) { } /** * @dev Sets the publication fee that's charged to users to publish items * @param _publicationFee - Fee amount in wei this contract charges to publish an item */ function setPublicationFee(uint256 _publicationFee) external onlyOwner { } /** * @dev Sets the share cut for the owner of the contract that's * charged to the seller on a successful sale * @param _ownerCutPerMillion - Share amount, from 0 to 999,999 */ function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) public whenNotPaused { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function cancelOrder(address nftAddress, uint256 assetId) public whenNotPaused { } /** * @dev Executes the sale for a published NFT and checks for the asset fingerprint * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function safeExecuteOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) public whenNotPaused { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price */ function executeOrder( address nftAddress, uint256 assetId, uint256 price ) public whenNotPaused { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function _createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) internal { _requireERC721(nftAddress); address sender = _msgSender(); ERC721Interface nftRegistry = ERC721Interface(nftAddress); address assetOwner = nftRegistry.ownerOf(assetId); require(sender == assetOwner, "Only the owner can create orders"); require( nftRegistry.getApproved(assetId) == address(this) || nftRegistry.isApprovedForAll(assetOwner, address(this)), "The contract is not authorized to manage the asset" ); require(priceInWei > 0, "Price should be bigger than 0"); require(expiresAt > block.timestamp.add(1 minutes), "Publication should be more than 1 minute in the future"); bytes32 orderId = keccak256( abi.encodePacked( block.timestamp, assetOwner, assetId, nftAddress, priceInWei ) ); orderByAssetId[nftAddress][assetId] = Order({ id: orderId, seller: assetOwner, nftAddress: nftAddress, price: priceInWei, expiresAt: expiresAt }); // Check if there's a publication fee and // transfer the amount to marketplace owner if (publicationFeeInWei > 0) { require(<FILL_ME>) } emit OrderCreated( orderId, assetId, assetOwner, nftAddress, priceInWei, expiresAt ); } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function _cancelOrder(address nftAddress, uint256 assetId) internal returns (Order memory) { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function _executeOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) internal returns (Order memory) { } function _requireERC721(address nftAddress) internal view { } }
acceptedToken.transferFrom(sender,owner(),publicationFeeInWei),"Transfering the publication fee to the Marketplace owner failed"
355,008
acceptedToken.transferFrom(sender,owner(),publicationFeeInWei)
"The asset fingerprint is not valid"
pragma solidity ^0.7.6; contract Marketplace is Ownable, Pausable, MarketplaceStorage, NativeMetaTransaction { using SafeMath for uint256; using Address for address; address sellerAddress; /** * @dev Initialize this contract. Acts as a constructor * @param _acceptedToken - Address of the ERC20 accepted for this marketplace * @param _ownerCutPerMillion - owner cut per million */ constructor ( address _acceptedToken, uint256 _ownerCutPerMillion, address _owner, address _seller ) { } /** * @dev Sets the publication fee that's charged to users to publish items * @param _publicationFee - Fee amount in wei this contract charges to publish an item */ function setPublicationFee(uint256 _publicationFee) external onlyOwner { } /** * @dev Sets the share cut for the owner of the contract that's * charged to the seller on a successful sale * @param _ownerCutPerMillion - Share amount, from 0 to 999,999 */ function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) public whenNotPaused { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function cancelOrder(address nftAddress, uint256 assetId) public whenNotPaused { } /** * @dev Executes the sale for a published NFT and checks for the asset fingerprint * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function safeExecuteOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) public whenNotPaused { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price */ function executeOrder( address nftAddress, uint256 assetId, uint256 price ) public whenNotPaused { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function _createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) internal { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function _cancelOrder(address nftAddress, uint256 assetId) internal returns (Order memory) { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function _executeOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) internal returns (Order memory) { _requireERC721(nftAddress); address sender = _msgSender(); ERC721Verifiable nftRegistry = ERC721Verifiable(nftAddress); if (nftRegistry.supportsInterface(InterfaceId_ValidateFingerprint)) { require(<FILL_ME>) } Order memory order = orderByAssetId[nftAddress][assetId]; require(order.id != 0, "Asset not published"); address seller = order.seller; require(seller != address(0), "Invalid address"); require(seller != sender, "Unauthorized user"); require(order.price == price, "The price is not correct"); require(block.timestamp < order.expiresAt, "The order expired"); require(seller == nftRegistry.ownerOf(assetId), "The seller is no longer the owner"); uint mineShareAmount = 0; bytes32 orderId = order.id; delete orderByAssetId[nftAddress][assetId]; if (ownerCutPerMillion > 0 && seller == sellerAddress) { // Calculate sale share mineShareAmount = price.mul(ownerCutPerMillion).div(1000000); emit SpayMining( orderId, assetId, seller, sender, nftAddress, price, mineShareAmount ); } // Transfer sale amount to seller require( acceptedToken.transferFrom(sender, seller, price), "Transfering the sale amount to the seller failed" ); // Transfer asset owner nftRegistry.safeTransferFrom( seller, sender, assetId ); emit OrderSuccessful( orderId, assetId, seller, nftAddress, price, sender ); return order; } function _requireERC721(address nftAddress) internal view { } }
nftRegistry.verifyFingerprint(assetId,fingerprint),"The asset fingerprint is not valid"
355,008
nftRegistry.verifyFingerprint(assetId,fingerprint)
"Transfering the sale amount to the seller failed"
pragma solidity ^0.7.6; contract Marketplace is Ownable, Pausable, MarketplaceStorage, NativeMetaTransaction { using SafeMath for uint256; using Address for address; address sellerAddress; /** * @dev Initialize this contract. Acts as a constructor * @param _acceptedToken - Address of the ERC20 accepted for this marketplace * @param _ownerCutPerMillion - owner cut per million */ constructor ( address _acceptedToken, uint256 _ownerCutPerMillion, address _owner, address _seller ) { } /** * @dev Sets the publication fee that's charged to users to publish items * @param _publicationFee - Fee amount in wei this contract charges to publish an item */ function setPublicationFee(uint256 _publicationFee) external onlyOwner { } /** * @dev Sets the share cut for the owner of the contract that's * charged to the seller on a successful sale * @param _ownerCutPerMillion - Share amount, from 0 to 999,999 */ function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) public whenNotPaused { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function cancelOrder(address nftAddress, uint256 assetId) public whenNotPaused { } /** * @dev Executes the sale for a published NFT and checks for the asset fingerprint * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function safeExecuteOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) public whenNotPaused { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price */ function executeOrder( address nftAddress, uint256 assetId, uint256 price ) public whenNotPaused { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function _createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) internal { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function _cancelOrder(address nftAddress, uint256 assetId) internal returns (Order memory) { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function _executeOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) internal returns (Order memory) { _requireERC721(nftAddress); address sender = _msgSender(); ERC721Verifiable nftRegistry = ERC721Verifiable(nftAddress); if (nftRegistry.supportsInterface(InterfaceId_ValidateFingerprint)) { require( nftRegistry.verifyFingerprint(assetId, fingerprint), "The asset fingerprint is not valid" ); } Order memory order = orderByAssetId[nftAddress][assetId]; require(order.id != 0, "Asset not published"); address seller = order.seller; require(seller != address(0), "Invalid address"); require(seller != sender, "Unauthorized user"); require(order.price == price, "The price is not correct"); require(block.timestamp < order.expiresAt, "The order expired"); require(seller == nftRegistry.ownerOf(assetId), "The seller is no longer the owner"); uint mineShareAmount = 0; bytes32 orderId = order.id; delete orderByAssetId[nftAddress][assetId]; if (ownerCutPerMillion > 0 && seller == sellerAddress) { // Calculate sale share mineShareAmount = price.mul(ownerCutPerMillion).div(1000000); emit SpayMining( orderId, assetId, seller, sender, nftAddress, price, mineShareAmount ); } // Transfer sale amount to seller require(<FILL_ME>) // Transfer asset owner nftRegistry.safeTransferFrom( seller, sender, assetId ); emit OrderSuccessful( orderId, assetId, seller, nftAddress, price, sender ); return order; } function _requireERC721(address nftAddress) internal view { } }
acceptedToken.transferFrom(sender,seller,price),"Transfering the sale amount to the seller failed"
355,008
acceptedToken.transferFrom(sender,seller,price)
"The NFT Address should be a contract"
pragma solidity ^0.7.6; contract Marketplace is Ownable, Pausable, MarketplaceStorage, NativeMetaTransaction { using SafeMath for uint256; using Address for address; address sellerAddress; /** * @dev Initialize this contract. Acts as a constructor * @param _acceptedToken - Address of the ERC20 accepted for this marketplace * @param _ownerCutPerMillion - owner cut per million */ constructor ( address _acceptedToken, uint256 _ownerCutPerMillion, address _owner, address _seller ) { } /** * @dev Sets the publication fee that's charged to users to publish items * @param _publicationFee - Fee amount in wei this contract charges to publish an item */ function setPublicationFee(uint256 _publicationFee) external onlyOwner { } /** * @dev Sets the share cut for the owner of the contract that's * charged to the seller on a successful sale * @param _ownerCutPerMillion - Share amount, from 0 to 999,999 */ function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) public whenNotPaused { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function cancelOrder(address nftAddress, uint256 assetId) public whenNotPaused { } /** * @dev Executes the sale for a published NFT and checks for the asset fingerprint * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function safeExecuteOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) public whenNotPaused { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price */ function executeOrder( address nftAddress, uint256 assetId, uint256 price ) public whenNotPaused { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function _createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) internal { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function _cancelOrder(address nftAddress, uint256 assetId) internal returns (Order memory) { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function _executeOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) internal returns (Order memory) { } function _requireERC721(address nftAddress) internal view { require(<FILL_ME>) ERC721Interface nftRegistry = ERC721Interface(nftAddress); require( nftRegistry.supportsInterface(ERC721_Interface), "The NFT contract has an invalid ERC721 implementation" ); } }
nftAddress.isContract(),"The NFT Address should be a contract"
355,008
nftAddress.isContract()
"The NFT contract has an invalid ERC721 implementation"
pragma solidity ^0.7.6; contract Marketplace is Ownable, Pausable, MarketplaceStorage, NativeMetaTransaction { using SafeMath for uint256; using Address for address; address sellerAddress; /** * @dev Initialize this contract. Acts as a constructor * @param _acceptedToken - Address of the ERC20 accepted for this marketplace * @param _ownerCutPerMillion - owner cut per million */ constructor ( address _acceptedToken, uint256 _ownerCutPerMillion, address _owner, address _seller ) { } /** * @dev Sets the publication fee that's charged to users to publish items * @param _publicationFee - Fee amount in wei this contract charges to publish an item */ function setPublicationFee(uint256 _publicationFee) external onlyOwner { } /** * @dev Sets the share cut for the owner of the contract that's * charged to the seller on a successful sale * @param _ownerCutPerMillion - Share amount, from 0 to 999,999 */ function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) public whenNotPaused { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function cancelOrder(address nftAddress, uint256 assetId) public whenNotPaused { } /** * @dev Executes the sale for a published NFT and checks for the asset fingerprint * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function safeExecuteOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) public whenNotPaused { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price */ function executeOrder( address nftAddress, uint256 assetId, uint256 price ) public whenNotPaused { } /** * @dev Creates a new order * @param nftAddress - Non fungible registry address * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin * @param expiresAt - Duration of the order (in hours) */ function _createOrder( address nftAddress, uint256 assetId, uint256 priceInWei, uint256 expiresAt ) internal { } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT */ function _cancelOrder(address nftAddress, uint256 assetId) internal returns (Order memory) { } /** * @dev Executes the sale for a published NFT * @param nftAddress - Address of the NFT registry * @param assetId - ID of the published NFT * @param price - Order price * @param fingerprint - Verification info for the asset */ function _executeOrder( address nftAddress, uint256 assetId, uint256 price, bytes memory fingerprint ) internal returns (Order memory) { } function _requireERC721(address nftAddress) internal view { require(nftAddress.isContract(), "The NFT Address should be a contract"); ERC721Interface nftRegistry = ERC721Interface(nftAddress); require(<FILL_ME>) } }
nftRegistry.supportsInterface(ERC721_Interface),"The NFT contract has an invalid ERC721 implementation"
355,008
nftRegistry.supportsInterface(ERC721_Interface)
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; interface IRevenueContract { function distributeRewards(uint16 sectionId, uint256 _amount) external payable; } contract SensationGenesisComicsCovers is ERC721Enumerable, Ownable { using SafeMath for uint256; /** * Private state */ uint16 private sectionId; uint256 private basePrice = 20000000000000000; //0.02 uint256 private MAX_MINTSUPPLY = 1998; uint256 private reserveAtATime = 25; uint256 private reservedCount = 0; uint256 private maxReserveCount = 100; address private associateAddress = 0xAa0D34B3Ac6420B769DDe4783bB1a95F157ddDF5; address private secondAssociateAddress = 0x2fea18841E5846f1A827DC3d986F76B6773bdf45; address private creatorAddress = 0x379a669CF423448fB8F0B35A22BACd18c722d8a7; string _baseTokenURI; IRevenueContract revenueContract; address payable revenueContractAddress; mapping(address => uint256) private withdrawalBalances; /** * Public state */ uint256 public maximumAllowedTokensPerPurchase = 25; bool public isActive = false; /** * Modifiers */ modifier saleIsOpen() { } modifier onlyAuthorized() { } /** * Constructor */ constructor(string memory baseURI, address _revenueContract, uint16 _sectionId) ERC721("Genesis Comics Sensation Limited Covers", "SSC") { require(<FILL_ME>) setBaseURI(baseURI); revenueContract = IRevenueContract(_revenueContract); revenueContractAddress = payable(_revenueContract); sectionId = _sectionId; } /** * Public functions */ function setBaseURI(string memory baseURI) public onlyAuthorized { } function setReserveAtATime(uint256 val) public onlyAuthorized { } function setMaxReserve(uint256 val) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setActive(bool val) public onlyAuthorized { } function reserveNft() public onlyAuthorized { } function setRevenueContract(address _revenueContract) public onlyAuthorized { } /** * Payables */ function mint(address _to, uint256 _count) public payable saleIsOpen { } function selfWithdraw(uint256 amount) external onlyAuthorized { } function withdrawAll() external onlyAuthorized { } function withdrawalFallback() public onlyOwner { } /** * Private functions */ function distributeRewards(uint256 _count) private { } function distributeEarnings() private returns (uint256) { } function resetRewards() private { } /** * Views */ function walletOfOwner(address _owner) external view returns (uint256[] memory) { } function getMaximumAllowedTokens() public view onlyAuthorized returns (uint256) { } function getPrice() external view returns (uint256) { } function getReserveAtATime() external view returns (uint256) { } function getMaxMintSupply() external view returns (uint256) { } function getTotalSupply() external view returns (uint256) { } function getContractOwner() public view returns (address) { } function _baseURI() internal view virtual override returns (string memory) { } function withdrawBalanceOf(address assosciate) public view returns (uint256) { } function isContract(address _addr) internal view returns (bool) { } }
isContract(_revenueContract)
355,141
isContract(_revenueContract)
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; interface IRevenueContract { function distributeRewards(uint16 sectionId, uint256 _amount) external payable; } contract SensationGenesisComicsCovers is ERC721Enumerable, Ownable { using SafeMath for uint256; /** * Private state */ uint16 private sectionId; uint256 private basePrice = 20000000000000000; //0.02 uint256 private MAX_MINTSUPPLY = 1998; uint256 private reserveAtATime = 25; uint256 private reservedCount = 0; uint256 private maxReserveCount = 100; address private associateAddress = 0xAa0D34B3Ac6420B769DDe4783bB1a95F157ddDF5; address private secondAssociateAddress = 0x2fea18841E5846f1A827DC3d986F76B6773bdf45; address private creatorAddress = 0x379a669CF423448fB8F0B35A22BACd18c722d8a7; string _baseTokenURI; IRevenueContract revenueContract; address payable revenueContractAddress; mapping(address => uint256) private withdrawalBalances; /** * Public state */ uint256 public maximumAllowedTokensPerPurchase = 25; bool public isActive = false; /** * Modifiers */ modifier saleIsOpen() { } modifier onlyAuthorized() { } /** * Constructor */ constructor(string memory baseURI, address _revenueContract, uint16 _sectionId) ERC721("Genesis Comics Sensation Limited Covers", "SSC") { } /** * Public functions */ function setBaseURI(string memory baseURI) public onlyAuthorized { } function setReserveAtATime(uint256 val) public onlyAuthorized { } function setMaxReserve(uint256 val) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setActive(bool val) public onlyAuthorized { } function reserveNft() public onlyAuthorized { } function setRevenueContract(address _revenueContract) public onlyAuthorized { } /** * Payables */ function mint(address _to, uint256 _count) public payable saleIsOpen { } function selfWithdraw(uint256 amount) external onlyAuthorized { uint256 currentBalance = address(this).balance; require(currentBalance >= amount); require(<FILL_ME>) payable(msg.sender).transfer(amount); withdrawalBalances[msg.sender] -= amount; } function withdrawAll() external onlyAuthorized { } function withdrawalFallback() public onlyOwner { } /** * Private functions */ function distributeRewards(uint256 _count) private { } function distributeEarnings() private returns (uint256) { } function resetRewards() private { } /** * Views */ function walletOfOwner(address _owner) external view returns (uint256[] memory) { } function getMaximumAllowedTokens() public view onlyAuthorized returns (uint256) { } function getPrice() external view returns (uint256) { } function getReserveAtATime() external view returns (uint256) { } function getMaxMintSupply() external view returns (uint256) { } function getTotalSupply() external view returns (uint256) { } function getContractOwner() public view returns (address) { } function _baseURI() internal view virtual override returns (string memory) { } function withdrawBalanceOf(address assosciate) public view returns (uint256) { } function isContract(address _addr) internal view returns (bool) { } }
withdrawalBalances[msg.sender]>=amount
355,141
withdrawalBalances[msg.sender]>=amount
"Starting index set"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; // @title: HAPE PRIME // @desc: NEXT-GEN, HIGH FASHION HAPES // @artist: https://twitter.com/DigimentalLDN // @team: https://twitter.com/TheCarlbrutal // @team: https://twitter.com/_trouvelot // @author: https://twitter.com/rickeccak // @url: https://www.hapeprime.com/ /* * ██╗░░██╗░█████╗░██████╗░███████╗ * ██║░░██║██╔══██╗██╔══██╗██╔════╝ * ███████║███████║██████╔╝█████╗░░ * ██╔══██║██╔══██║██╔═══╝░██╔══╝░░ * ██║░░██║██║░░██║██║░░░░░███████╗ * ╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░░░░╚══════╝ */ import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "./IHapebeastToken.sol"; import "./IHapebeastMetadata.sol"; contract HapebeastToken is IHapebeastToken, IERC2981, Ownable { // ======== Supply ========= uint256 public tokenSupply; // ======== Provenance ========= string public provenanceHash; uint256 public startingIndex; bool public isStartingIndexLocked; // ======== Metadata ========= // Seperate contract to allow eventual move to on-chain metadata. "The Future". IHapebeastMetadata public metadata; bool public isMetadataLocked = false; // ======== Minter ========= address public minter; bool public isMinterLocked = false; // ======== Burning ========= bool public isBurningActive = false; // ======== Royalties ========= address public royaltyAddress; uint256 public royaltyPercent; modifier onlyMinter() { } // ======== Constructor ========= constructor(address metadataAddress) ERC721("HAPE PRIME", "HAPE") { } // ======== Minting ========= function mint(uint256 _count, address _recipient) public override onlyMinter { } function totalSupply() public view override returns (uint256) { } // ======== Minter ========= function updateMinter(address _minter) external override onlyOwner { } function lockMinter() external override onlyOwner { } // ======== Metadata ========= function tokenURI(uint256 tokenId) public view override returns (string memory) { } function updateMetadata(address _metadata) external onlyOwner { } function lockMetadata() public onlyOwner { } // ======== Provenance ========= function setProvenanceHash(string memory _provenanceHash) public override onlyOwner { } /** * Set a random starting index for the collection. We could have included something with user provided entropy, but that doesn't * make it any more random in practice. There's still nothing exclusively on-chain we can use for completely undeterminstic randomness * - only VRF. But with a provenance hash this should provide the basis for verifiable and transparent random metadata assignment. * * NOTE: Ahead of time an agreed date/timestamp will be selected with the community for when the transaction for `setStartingIndex` * is submitted, this is to avoid scenarios such as waiting for a favourable blockhash + submitting a high gas tx. */ function setStartingIndex() public override onlyOwner { require(<FILL_ME>) isStartingIndexLocked = true; startingIndex = uint(blockhash(block.number - 1)) % totalSupply(); } // ======== Burning ========= function burn(uint256 tokenId) public { } function toggleBurningActive() public onlyOwner { } // ======== Royalties ========= function setRoyaltyReceiver(address royaltyReceiver) public onlyOwner { } function setRoyaltyPercentage(uint256 royaltyPercentage) public onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, IERC165) returns (bool) { } // ======== Withdraw ========= function withdraw() public onlyOwner { } }
!isStartingIndexLocked,"Starting index set"
355,158
!isStartingIndexLocked
'Already registered.'
pragma solidity 0.5.17; /*************** ** ** ** INTERFACES ** ** ** ***************/ /** * @title Interface for Kong ERC20 Token Contract. */ interface KongERC20Interface { function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function mint(uint256 mintedAmount, address recipient) external; function getMintingLimit() external returns(uint256); } /** * @title Interface for EllipticCurve contract. */ interface EllipticCurveInterface { function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool); } /**************************** ** ** ** OPEN ZEPPELIN CONTRACTS ** ** ** ****************************/ /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } /** * @dev These functions deal with verification of Merkle trees (hash trees), */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { } } /********************************** ** ** ** REGISTER MERKLE CONTRACT ** ** ** **********************************/ /** * @title Register Contract. */ contract RegisterMerkleRoot { using SafeMath for uint256; // Account with the right to adjust the set of minters. address public _owner; // Address of the Kong ERC20 account. address public _kongERC20Address; // Address of future registry. address public _upgradeContract; // Sum of Kong amounts marked as mintable for registered devices. uint256 public _totalMintable; // Minters. mapping (address => bool) public _minters; // Minting caps. mapping (address => uint256) public _mintingCaps; // Minted device. struct Device { uint256 kongAmount; address contractAddress; } // Minted devices. mapping(bytes32 => Device) internal _devices; // Signers. mapping(address => bool) public _signers; struct DeviceRoot { bytes32 deviceRoot; uint256 deviceKongAmount; uint256 totalDevices; uint256 totalMintableKong; uint256 mintableTime; string ipfsCid; string arwId; uint256 rootTimestamp; uint256 rootIndex; } mapping(bytes32 => DeviceRoot) internal _deviceRoots; uint256 public _deviceRootCount; struct DeviceRootIndex { bytes32 deviceRoot; } mapping(uint256 => DeviceRootIndex) internal _deviceRootIndices; /** * @dev Emit when a device merkle root is added. */ event RootAddition( bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string ipfsCid, string arwId, uint256 rootTimestamp, uint256 rootIndex ); event MintKong( bytes32 hardwareHash, uint256 kongAmount ); /** * @dev Emit when minting rights are delegated / removed. */ event MinterAddition ( address minter, uint256 mintingCap ); event MinterRemoval ( address minter ); /** * @dev Emit when contract reference added to a device. */ event AddressAdded ( bytes32 hardwareHash, address contractAddress ); /** * @dev Emit when contract reference added to a device. */ event UpgradeAddressAdded ( address upgradeAddress ); /** * @dev Emit when signers are added / removed. */ event SignerAddition ( address signer ); event SignerRemoval ( address signer ); /** * @dev Constructor. */ constructor(address owner, address kongAddress) public { } /** * @dev Throws if called by any account but owner. */ modifier onlyOwner() { } /** * @dev Throws if called by any account but owner or registered minter. */ modifier onlyOwnerOrMinter() { } /** * @dev Throws if called by any account but owner or registered signer. */ modifier onlyOwnerOrSigner() { } /** * @dev Throws if called by any account but registered signer. */ // modifier onlySigner() { // require(_signers[msg.sender] == true, 'Can only be called by signer.'); // _; // } /** * @dev Endow `newMinter` with right to add mintable devices up to `mintingCap`. */ function delegateMintingRights( address newMinter, uint256 mintingCap ) public onlyOwner { } /** * @dev Remove address from the mapping of _minters. */ function removeMintingRights( address minter ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function addSigner( address newSigner ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function removeSigner( address signer ) public onlyOwner { } /** * @dev Add upgrade contract address. */ function addUpgradeAddress( address upgradeAddress ) public onlyOwner { } /** * @dev Add a new device merkle root. */ function addRoot( bytes32 deviceRootHash, bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string memory ipfsCid, string memory arwId ) public onlyOwnerOrMinter { // Hash the device root which is the key to the mapping. bytes32 calculatedRootHash = sha256(abi.encodePacked(deviceRoot)); require(deviceRootHash == calculatedRootHash, 'Invalid root hash.'); // Verify that this root has not been registered yet. require(<FILL_ME>) // Verify the cumulative limit for mintable Kong has not been exceeded. We can also register devices that are not Kong mintable. if (totalMintableKong > 0 && deviceKongAmount > 0) { require(totalMintableKong == deviceKongAmount * totalDevices, 'Incorrect Kong per device.'); uint256 _maxMinted = KongERC20Interface(_kongERC20Address).getMintingLimit(); require(_totalMintable.add(totalMintableKong) <= _maxMinted, 'Exceeds cumulative limit.'); // Increment _totalMintable. _totalMintable += totalMintableKong; // Adjust minting cap. Throws on underflow / Guarantees minter does not exceed its limit. _mintingCaps[msg.sender] = _mintingCaps[msg.sender].sub(totalMintableKong); } // Increment the device root count. _deviceRootCount++; // Set rootCount. uint256 rootIndex = _deviceRootCount; // Set timestamp for when we added this root. uint256 rootTimestamp = block.timestamp; // Create device struct. _deviceRoots[deviceRootHash] = DeviceRoot( deviceRoot, deviceKongAmount, totalDevices, totalMintableKong, mintableTime, ipfsCid, arwId, rootTimestamp, rootIndex ); // Create device index struct. _deviceRootIndices[rootIndex] = DeviceRootIndex( deviceRoot ); emit RootAddition( deviceRoot, deviceKongAmount, totalDevices, totalMintableKong, mintableTime, ipfsCid, arwId, rootTimestamp, rootIndex ); } /** * @dev Mint root Kong amount to `recipient`. */ function mintKong( bytes32[] calldata proof, bytes32 root, bytes32 hardwareHash, address recipient ) external onlyOwnerOrMinter { } /** * @dev Associate a smart contract address with the device. */ function addAddress( bytes32 primaryPublicKeyHash, bytes32 secondaryPublicKeyHash, bytes32 tertiaryPublicKeyHash, bytes32 hardwareSerial, address contractAddress ) external onlyOwnerOrSigner { } function isDeviceMintable( bytes32 hardwareHash ) public view returns (bool) { } function getDeviceAddress( bytes32 hardwareHash ) external view returns (address) { } function verifyRoot(bytes32 root ) public view returns (bytes32) { } function verifyProof( bytes32[] memory proof, bytes32 root, bytes32 hardwareHash, uint256 kongAmount ) public view returns (bool) { } /** * @dev Return root registration information. */ function getRootDetails( bytes32 root ) external view returns (uint256, uint256, uint256, uint256, string memory, string memory, uint256, uint256) { } /** * @dev Return root registration information. */ function getRootByIndex( uint256 rootIndex ) external view returns (bytes32) { } }
_deviceRoots[deviceRootHash].deviceRoot==0,'Already registered.'
355,173
_deviceRoots[deviceRootHash].deviceRoot==0
'Exceeds cumulative limit.'
pragma solidity 0.5.17; /*************** ** ** ** INTERFACES ** ** ** ***************/ /** * @title Interface for Kong ERC20 Token Contract. */ interface KongERC20Interface { function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function mint(uint256 mintedAmount, address recipient) external; function getMintingLimit() external returns(uint256); } /** * @title Interface for EllipticCurve contract. */ interface EllipticCurveInterface { function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool); } /**************************** ** ** ** OPEN ZEPPELIN CONTRACTS ** ** ** ****************************/ /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } /** * @dev These functions deal with verification of Merkle trees (hash trees), */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { } } /********************************** ** ** ** REGISTER MERKLE CONTRACT ** ** ** **********************************/ /** * @title Register Contract. */ contract RegisterMerkleRoot { using SafeMath for uint256; // Account with the right to adjust the set of minters. address public _owner; // Address of the Kong ERC20 account. address public _kongERC20Address; // Address of future registry. address public _upgradeContract; // Sum of Kong amounts marked as mintable for registered devices. uint256 public _totalMintable; // Minters. mapping (address => bool) public _minters; // Minting caps. mapping (address => uint256) public _mintingCaps; // Minted device. struct Device { uint256 kongAmount; address contractAddress; } // Minted devices. mapping(bytes32 => Device) internal _devices; // Signers. mapping(address => bool) public _signers; struct DeviceRoot { bytes32 deviceRoot; uint256 deviceKongAmount; uint256 totalDevices; uint256 totalMintableKong; uint256 mintableTime; string ipfsCid; string arwId; uint256 rootTimestamp; uint256 rootIndex; } mapping(bytes32 => DeviceRoot) internal _deviceRoots; uint256 public _deviceRootCount; struct DeviceRootIndex { bytes32 deviceRoot; } mapping(uint256 => DeviceRootIndex) internal _deviceRootIndices; /** * @dev Emit when a device merkle root is added. */ event RootAddition( bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string ipfsCid, string arwId, uint256 rootTimestamp, uint256 rootIndex ); event MintKong( bytes32 hardwareHash, uint256 kongAmount ); /** * @dev Emit when minting rights are delegated / removed. */ event MinterAddition ( address minter, uint256 mintingCap ); event MinterRemoval ( address minter ); /** * @dev Emit when contract reference added to a device. */ event AddressAdded ( bytes32 hardwareHash, address contractAddress ); /** * @dev Emit when contract reference added to a device. */ event UpgradeAddressAdded ( address upgradeAddress ); /** * @dev Emit when signers are added / removed. */ event SignerAddition ( address signer ); event SignerRemoval ( address signer ); /** * @dev Constructor. */ constructor(address owner, address kongAddress) public { } /** * @dev Throws if called by any account but owner. */ modifier onlyOwner() { } /** * @dev Throws if called by any account but owner or registered minter. */ modifier onlyOwnerOrMinter() { } /** * @dev Throws if called by any account but owner or registered signer. */ modifier onlyOwnerOrSigner() { } /** * @dev Throws if called by any account but registered signer. */ // modifier onlySigner() { // require(_signers[msg.sender] == true, 'Can only be called by signer.'); // _; // } /** * @dev Endow `newMinter` with right to add mintable devices up to `mintingCap`. */ function delegateMintingRights( address newMinter, uint256 mintingCap ) public onlyOwner { } /** * @dev Remove address from the mapping of _minters. */ function removeMintingRights( address minter ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function addSigner( address newSigner ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function removeSigner( address signer ) public onlyOwner { } /** * @dev Add upgrade contract address. */ function addUpgradeAddress( address upgradeAddress ) public onlyOwner { } /** * @dev Add a new device merkle root. */ function addRoot( bytes32 deviceRootHash, bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string memory ipfsCid, string memory arwId ) public onlyOwnerOrMinter { // Hash the device root which is the key to the mapping. bytes32 calculatedRootHash = sha256(abi.encodePacked(deviceRoot)); require(deviceRootHash == calculatedRootHash, 'Invalid root hash.'); // Verify that this root has not been registered yet. require(_deviceRoots[deviceRootHash].deviceRoot == 0, 'Already registered.'); // Verify the cumulative limit for mintable Kong has not been exceeded. We can also register devices that are not Kong mintable. if (totalMintableKong > 0 && deviceKongAmount > 0) { require(totalMintableKong == deviceKongAmount * totalDevices, 'Incorrect Kong per device.'); uint256 _maxMinted = KongERC20Interface(_kongERC20Address).getMintingLimit(); require(<FILL_ME>) // Increment _totalMintable. _totalMintable += totalMintableKong; // Adjust minting cap. Throws on underflow / Guarantees minter does not exceed its limit. _mintingCaps[msg.sender] = _mintingCaps[msg.sender].sub(totalMintableKong); } // Increment the device root count. _deviceRootCount++; // Set rootCount. uint256 rootIndex = _deviceRootCount; // Set timestamp for when we added this root. uint256 rootTimestamp = block.timestamp; // Create device struct. _deviceRoots[deviceRootHash] = DeviceRoot( deviceRoot, deviceKongAmount, totalDevices, totalMintableKong, mintableTime, ipfsCid, arwId, rootTimestamp, rootIndex ); // Create device index struct. _deviceRootIndices[rootIndex] = DeviceRootIndex( deviceRoot ); emit RootAddition( deviceRoot, deviceKongAmount, totalDevices, totalMintableKong, mintableTime, ipfsCid, arwId, rootTimestamp, rootIndex ); } /** * @dev Mint root Kong amount to `recipient`. */ function mintKong( bytes32[] calldata proof, bytes32 root, bytes32 hardwareHash, address recipient ) external onlyOwnerOrMinter { } /** * @dev Associate a smart contract address with the device. */ function addAddress( bytes32 primaryPublicKeyHash, bytes32 secondaryPublicKeyHash, bytes32 tertiaryPublicKeyHash, bytes32 hardwareSerial, address contractAddress ) external onlyOwnerOrSigner { } function isDeviceMintable( bytes32 hardwareHash ) public view returns (bool) { } function getDeviceAddress( bytes32 hardwareHash ) external view returns (address) { } function verifyRoot(bytes32 root ) public view returns (bytes32) { } function verifyProof( bytes32[] memory proof, bytes32 root, bytes32 hardwareHash, uint256 kongAmount ) public view returns (bool) { } /** * @dev Return root registration information. */ function getRootDetails( bytes32 root ) external view returns (uint256, uint256, uint256, uint256, string memory, string memory, uint256, uint256) { } /** * @dev Return root registration information. */ function getRootByIndex( uint256 rootIndex ) external view returns (bytes32) { } }
_totalMintable.add(totalMintableKong)<=_maxMinted,'Exceeds cumulative limit.'
355,173
_totalMintable.add(totalMintableKong)<=_maxMinted
'Device not found in root.'
pragma solidity 0.5.17; /*************** ** ** ** INTERFACES ** ** ** ***************/ /** * @title Interface for Kong ERC20 Token Contract. */ interface KongERC20Interface { function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function mint(uint256 mintedAmount, address recipient) external; function getMintingLimit() external returns(uint256); } /** * @title Interface for EllipticCurve contract. */ interface EllipticCurveInterface { function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool); } /**************************** ** ** ** OPEN ZEPPELIN CONTRACTS ** ** ** ****************************/ /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } /** * @dev These functions deal with verification of Merkle trees (hash trees), */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { } } /********************************** ** ** ** REGISTER MERKLE CONTRACT ** ** ** **********************************/ /** * @title Register Contract. */ contract RegisterMerkleRoot { using SafeMath for uint256; // Account with the right to adjust the set of minters. address public _owner; // Address of the Kong ERC20 account. address public _kongERC20Address; // Address of future registry. address public _upgradeContract; // Sum of Kong amounts marked as mintable for registered devices. uint256 public _totalMintable; // Minters. mapping (address => bool) public _minters; // Minting caps. mapping (address => uint256) public _mintingCaps; // Minted device. struct Device { uint256 kongAmount; address contractAddress; } // Minted devices. mapping(bytes32 => Device) internal _devices; // Signers. mapping(address => bool) public _signers; struct DeviceRoot { bytes32 deviceRoot; uint256 deviceKongAmount; uint256 totalDevices; uint256 totalMintableKong; uint256 mintableTime; string ipfsCid; string arwId; uint256 rootTimestamp; uint256 rootIndex; } mapping(bytes32 => DeviceRoot) internal _deviceRoots; uint256 public _deviceRootCount; struct DeviceRootIndex { bytes32 deviceRoot; } mapping(uint256 => DeviceRootIndex) internal _deviceRootIndices; /** * @dev Emit when a device merkle root is added. */ event RootAddition( bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string ipfsCid, string arwId, uint256 rootTimestamp, uint256 rootIndex ); event MintKong( bytes32 hardwareHash, uint256 kongAmount ); /** * @dev Emit when minting rights are delegated / removed. */ event MinterAddition ( address minter, uint256 mintingCap ); event MinterRemoval ( address minter ); /** * @dev Emit when contract reference added to a device. */ event AddressAdded ( bytes32 hardwareHash, address contractAddress ); /** * @dev Emit when contract reference added to a device. */ event UpgradeAddressAdded ( address upgradeAddress ); /** * @dev Emit when signers are added / removed. */ event SignerAddition ( address signer ); event SignerRemoval ( address signer ); /** * @dev Constructor. */ constructor(address owner, address kongAddress) public { } /** * @dev Throws if called by any account but owner. */ modifier onlyOwner() { } /** * @dev Throws if called by any account but owner or registered minter. */ modifier onlyOwnerOrMinter() { } /** * @dev Throws if called by any account but owner or registered signer. */ modifier onlyOwnerOrSigner() { } /** * @dev Throws if called by any account but registered signer. */ // modifier onlySigner() { // require(_signers[msg.sender] == true, 'Can only be called by signer.'); // _; // } /** * @dev Endow `newMinter` with right to add mintable devices up to `mintingCap`. */ function delegateMintingRights( address newMinter, uint256 mintingCap ) public onlyOwner { } /** * @dev Remove address from the mapping of _minters. */ function removeMintingRights( address minter ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function addSigner( address newSigner ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function removeSigner( address signer ) public onlyOwner { } /** * @dev Add upgrade contract address. */ function addUpgradeAddress( address upgradeAddress ) public onlyOwner { } /** * @dev Add a new device merkle root. */ function addRoot( bytes32 deviceRootHash, bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string memory ipfsCid, string memory arwId ) public onlyOwnerOrMinter { } /** * @dev Mint root Kong amount to `recipient`. */ function mintKong( bytes32[] calldata proof, bytes32 root, bytes32 hardwareHash, address recipient ) external onlyOwnerOrMinter { // Hash the device root which is the key to the mapping. bytes32 rootHash = sha256(abi.encodePacked(root)); // Get associated device root. DeviceRoot memory r = _deviceRoots[rootHash]; require(r.deviceRoot == root, 'Invalid root.'); // Make sure proof time is mintable require(block.timestamp >= r.mintableTime, 'Cannot mint yet.'); // Verify device is in proof. require(<FILL_ME>) // Check minter contract to see if device is minted. require(_devices[hardwareHash].kongAmount == 0, 'Already minted.'); // Set value of Kong amount, implicitly indicating minted. _devices[hardwareHash].kongAmount = r.deviceKongAmount; // Get associated device root to store changes. DeviceRoot storage s = _deviceRoots[rootHash]; // Decrement totalMintableKong and devices. s.totalMintableKong = s.totalMintableKong.sub(r.deviceKongAmount); s.totalDevices = s.totalDevices.sub(1); // Mint. KongERC20Interface(_kongERC20Address).mint(r.deviceKongAmount, recipient); emit MintKong( hardwareHash, r.deviceKongAmount ); } /** * @dev Associate a smart contract address with the device. */ function addAddress( bytes32 primaryPublicKeyHash, bytes32 secondaryPublicKeyHash, bytes32 tertiaryPublicKeyHash, bytes32 hardwareSerial, address contractAddress ) external onlyOwnerOrSigner { } function isDeviceMintable( bytes32 hardwareHash ) public view returns (bool) { } function getDeviceAddress( bytes32 hardwareHash ) external view returns (address) { } function verifyRoot(bytes32 root ) public view returns (bytes32) { } function verifyProof( bytes32[] memory proof, bytes32 root, bytes32 hardwareHash, uint256 kongAmount ) public view returns (bool) { } /** * @dev Return root registration information. */ function getRootDetails( bytes32 root ) external view returns (uint256, uint256, uint256, uint256, string memory, string memory, uint256, uint256) { } /** * @dev Return root registration information. */ function getRootByIndex( uint256 rootIndex ) external view returns (bytes32) { } }
verifyProof(proof,r.deviceRoot,hardwareHash,r.deviceKongAmount),'Device not found in root.'
355,173
verifyProof(proof,r.deviceRoot,hardwareHash,r.deviceKongAmount)
'Already minted.'
pragma solidity 0.5.17; /*************** ** ** ** INTERFACES ** ** ** ***************/ /** * @title Interface for Kong ERC20 Token Contract. */ interface KongERC20Interface { function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function mint(uint256 mintedAmount, address recipient) external; function getMintingLimit() external returns(uint256); } /** * @title Interface for EllipticCurve contract. */ interface EllipticCurveInterface { function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool); } /**************************** ** ** ** OPEN ZEPPELIN CONTRACTS ** ** ** ****************************/ /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } /** * @dev These functions deal with verification of Merkle trees (hash trees), */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { } } /********************************** ** ** ** REGISTER MERKLE CONTRACT ** ** ** **********************************/ /** * @title Register Contract. */ contract RegisterMerkleRoot { using SafeMath for uint256; // Account with the right to adjust the set of minters. address public _owner; // Address of the Kong ERC20 account. address public _kongERC20Address; // Address of future registry. address public _upgradeContract; // Sum of Kong amounts marked as mintable for registered devices. uint256 public _totalMintable; // Minters. mapping (address => bool) public _minters; // Minting caps. mapping (address => uint256) public _mintingCaps; // Minted device. struct Device { uint256 kongAmount; address contractAddress; } // Minted devices. mapping(bytes32 => Device) internal _devices; // Signers. mapping(address => bool) public _signers; struct DeviceRoot { bytes32 deviceRoot; uint256 deviceKongAmount; uint256 totalDevices; uint256 totalMintableKong; uint256 mintableTime; string ipfsCid; string arwId; uint256 rootTimestamp; uint256 rootIndex; } mapping(bytes32 => DeviceRoot) internal _deviceRoots; uint256 public _deviceRootCount; struct DeviceRootIndex { bytes32 deviceRoot; } mapping(uint256 => DeviceRootIndex) internal _deviceRootIndices; /** * @dev Emit when a device merkle root is added. */ event RootAddition( bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string ipfsCid, string arwId, uint256 rootTimestamp, uint256 rootIndex ); event MintKong( bytes32 hardwareHash, uint256 kongAmount ); /** * @dev Emit when minting rights are delegated / removed. */ event MinterAddition ( address minter, uint256 mintingCap ); event MinterRemoval ( address minter ); /** * @dev Emit when contract reference added to a device. */ event AddressAdded ( bytes32 hardwareHash, address contractAddress ); /** * @dev Emit when contract reference added to a device. */ event UpgradeAddressAdded ( address upgradeAddress ); /** * @dev Emit when signers are added / removed. */ event SignerAddition ( address signer ); event SignerRemoval ( address signer ); /** * @dev Constructor. */ constructor(address owner, address kongAddress) public { } /** * @dev Throws if called by any account but owner. */ modifier onlyOwner() { } /** * @dev Throws if called by any account but owner or registered minter. */ modifier onlyOwnerOrMinter() { } /** * @dev Throws if called by any account but owner or registered signer. */ modifier onlyOwnerOrSigner() { } /** * @dev Throws if called by any account but registered signer. */ // modifier onlySigner() { // require(_signers[msg.sender] == true, 'Can only be called by signer.'); // _; // } /** * @dev Endow `newMinter` with right to add mintable devices up to `mintingCap`. */ function delegateMintingRights( address newMinter, uint256 mintingCap ) public onlyOwner { } /** * @dev Remove address from the mapping of _minters. */ function removeMintingRights( address minter ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function addSigner( address newSigner ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function removeSigner( address signer ) public onlyOwner { } /** * @dev Add upgrade contract address. */ function addUpgradeAddress( address upgradeAddress ) public onlyOwner { } /** * @dev Add a new device merkle root. */ function addRoot( bytes32 deviceRootHash, bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string memory ipfsCid, string memory arwId ) public onlyOwnerOrMinter { } /** * @dev Mint root Kong amount to `recipient`. */ function mintKong( bytes32[] calldata proof, bytes32 root, bytes32 hardwareHash, address recipient ) external onlyOwnerOrMinter { // Hash the device root which is the key to the mapping. bytes32 rootHash = sha256(abi.encodePacked(root)); // Get associated device root. DeviceRoot memory r = _deviceRoots[rootHash]; require(r.deviceRoot == root, 'Invalid root.'); // Make sure proof time is mintable require(block.timestamp >= r.mintableTime, 'Cannot mint yet.'); // Verify device is in proof. require(verifyProof(proof, r.deviceRoot, hardwareHash, r.deviceKongAmount), 'Device not found in root.'); // Check minter contract to see if device is minted. require(<FILL_ME>) // Set value of Kong amount, implicitly indicating minted. _devices[hardwareHash].kongAmount = r.deviceKongAmount; // Get associated device root to store changes. DeviceRoot storage s = _deviceRoots[rootHash]; // Decrement totalMintableKong and devices. s.totalMintableKong = s.totalMintableKong.sub(r.deviceKongAmount); s.totalDevices = s.totalDevices.sub(1); // Mint. KongERC20Interface(_kongERC20Address).mint(r.deviceKongAmount, recipient); emit MintKong( hardwareHash, r.deviceKongAmount ); } /** * @dev Associate a smart contract address with the device. */ function addAddress( bytes32 primaryPublicKeyHash, bytes32 secondaryPublicKeyHash, bytes32 tertiaryPublicKeyHash, bytes32 hardwareSerial, address contractAddress ) external onlyOwnerOrSigner { } function isDeviceMintable( bytes32 hardwareHash ) public view returns (bool) { } function getDeviceAddress( bytes32 hardwareHash ) external view returns (address) { } function verifyRoot(bytes32 root ) public view returns (bytes32) { } function verifyProof( bytes32[] memory proof, bytes32 root, bytes32 hardwareHash, uint256 kongAmount ) public view returns (bool) { } /** * @dev Return root registration information. */ function getRootDetails( bytes32 root ) external view returns (uint256, uint256, uint256, uint256, string memory, string memory, uint256, uint256) { } /** * @dev Return root registration information. */ function getRootByIndex( uint256 rootIndex ) external view returns (bytes32) { } }
_devices[hardwareHash].kongAmount==0,'Already minted.'
355,173
_devices[hardwareHash].kongAmount==0
'Already has address.'
pragma solidity 0.5.17; /*************** ** ** ** INTERFACES ** ** ** ***************/ /** * @title Interface for Kong ERC20 Token Contract. */ interface KongERC20Interface { function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function mint(uint256 mintedAmount, address recipient) external; function getMintingLimit() external returns(uint256); } /** * @title Interface for EllipticCurve contract. */ interface EllipticCurveInterface { function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool); } /**************************** ** ** ** OPEN ZEPPELIN CONTRACTS ** ** ** ****************************/ /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } /** * @dev These functions deal with verification of Merkle trees (hash trees), */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { } } /********************************** ** ** ** REGISTER MERKLE CONTRACT ** ** ** **********************************/ /** * @title Register Contract. */ contract RegisterMerkleRoot { using SafeMath for uint256; // Account with the right to adjust the set of minters. address public _owner; // Address of the Kong ERC20 account. address public _kongERC20Address; // Address of future registry. address public _upgradeContract; // Sum of Kong amounts marked as mintable for registered devices. uint256 public _totalMintable; // Minters. mapping (address => bool) public _minters; // Minting caps. mapping (address => uint256) public _mintingCaps; // Minted device. struct Device { uint256 kongAmount; address contractAddress; } // Minted devices. mapping(bytes32 => Device) internal _devices; // Signers. mapping(address => bool) public _signers; struct DeviceRoot { bytes32 deviceRoot; uint256 deviceKongAmount; uint256 totalDevices; uint256 totalMintableKong; uint256 mintableTime; string ipfsCid; string arwId; uint256 rootTimestamp; uint256 rootIndex; } mapping(bytes32 => DeviceRoot) internal _deviceRoots; uint256 public _deviceRootCount; struct DeviceRootIndex { bytes32 deviceRoot; } mapping(uint256 => DeviceRootIndex) internal _deviceRootIndices; /** * @dev Emit when a device merkle root is added. */ event RootAddition( bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string ipfsCid, string arwId, uint256 rootTimestamp, uint256 rootIndex ); event MintKong( bytes32 hardwareHash, uint256 kongAmount ); /** * @dev Emit when minting rights are delegated / removed. */ event MinterAddition ( address minter, uint256 mintingCap ); event MinterRemoval ( address minter ); /** * @dev Emit when contract reference added to a device. */ event AddressAdded ( bytes32 hardwareHash, address contractAddress ); /** * @dev Emit when contract reference added to a device. */ event UpgradeAddressAdded ( address upgradeAddress ); /** * @dev Emit when signers are added / removed. */ event SignerAddition ( address signer ); event SignerRemoval ( address signer ); /** * @dev Constructor. */ constructor(address owner, address kongAddress) public { } /** * @dev Throws if called by any account but owner. */ modifier onlyOwner() { } /** * @dev Throws if called by any account but owner or registered minter. */ modifier onlyOwnerOrMinter() { } /** * @dev Throws if called by any account but owner or registered signer. */ modifier onlyOwnerOrSigner() { } /** * @dev Throws if called by any account but registered signer. */ // modifier onlySigner() { // require(_signers[msg.sender] == true, 'Can only be called by signer.'); // _; // } /** * @dev Endow `newMinter` with right to add mintable devices up to `mintingCap`. */ function delegateMintingRights( address newMinter, uint256 mintingCap ) public onlyOwner { } /** * @dev Remove address from the mapping of _minters. */ function removeMintingRights( address minter ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function addSigner( address newSigner ) public onlyOwner { } /** * @dev Add a new signer contract which can carry out specific tasks. */ function removeSigner( address signer ) public onlyOwner { } /** * @dev Add upgrade contract address. */ function addUpgradeAddress( address upgradeAddress ) public onlyOwner { } /** * @dev Add a new device merkle root. */ function addRoot( bytes32 deviceRootHash, bytes32 deviceRoot, uint256 deviceKongAmount, uint256 totalDevices, uint256 totalMintableKong, uint256 mintableTime, string memory ipfsCid, string memory arwId ) public onlyOwnerOrMinter { } /** * @dev Mint root Kong amount to `recipient`. */ function mintKong( bytes32[] calldata proof, bytes32 root, bytes32 hardwareHash, address recipient ) external onlyOwnerOrMinter { } /** * @dev Associate a smart contract address with the device. */ function addAddress( bytes32 primaryPublicKeyHash, bytes32 secondaryPublicKeyHash, bytes32 tertiaryPublicKeyHash, bytes32 hardwareSerial, address contractAddress ) external onlyOwnerOrSigner { // Hash all the keys in order to calculate the hardwareHash. bytes32 hardwareHash = sha256(abi.encodePacked(primaryPublicKeyHash, secondaryPublicKeyHash, tertiaryPublicKeyHash, hardwareSerial)); require(<FILL_ME>) _devices[hardwareHash].contractAddress = contractAddress; emit AddressAdded( hardwareHash, contractAddress ); } function isDeviceMintable( bytes32 hardwareHash ) public view returns (bool) { } function getDeviceAddress( bytes32 hardwareHash ) external view returns (address) { } function verifyRoot(bytes32 root ) public view returns (bytes32) { } function verifyProof( bytes32[] memory proof, bytes32 root, bytes32 hardwareHash, uint256 kongAmount ) public view returns (bool) { } /** * @dev Return root registration information. */ function getRootDetails( bytes32 root ) external view returns (uint256, uint256, uint256, uint256, string memory, string memory, uint256, uint256) { } /** * @dev Return root registration information. */ function getRootByIndex( uint256 rootIndex ) external view returns (bytes32) { } }
_devices[hardwareHash].contractAddress==address(0),'Already has address.'
355,173
_devices[hardwareHash].contractAddress==address(0)
"Caller is not partner"
pragma solidity =0.5.16; import "./Ownable.sol"; import "./libraries/SafeMath.sol"; contract MonetAirdrop is Ownable { using SafeMath for uint256; address public tokenCards; uint256 public laveCards; mapping(uint256 => uint256) cardNums; mapping(address => bool) public partner; constructor(address cards) public { } // EXTERNAL function notify(address[] calldata accounts, uint256[] calldata cards) external onlyOwner { } function setPartner(address[] memory accounts) public onlyOwner { } function setCards(uint256[] memory cards) public onlyOwner { } function airdrop() external onlyCaller(msg.sender) { require(laveCards > 0, "lave cards is zero"); require(<FILL_ME>) uint256 seed = uint256( keccak256(abi.encodePacked(block.difficulty, now)) ); uint256 num = 0; uint256 random = seed % laveCards; for (uint256 i = 10; i > 4; i--) { if (cardNums[i] == 0) continue; num = num.add(cardNums[i]); if (random <= num) { partner[msg.sender] = false; laveCards = laveCards.sub(1); cardNums[i] = cardNums[i].sub(1); uint256 color = (seed / 10 - seed) % 4; uint256[] memory cards = new uint256[](1); cards[0] = i.mul(10).add(color).add(1000); ICardERC(tokenCards).cardsBatchMint(msg.sender, cards); emit Airdrop(msg.sender, cards[0]); return; } } } // MODIFIER modifier onlyCaller(address account) { } // EVENT event Airdrop(address indexed sender, uint256 card); } interface ICardERC { function cardsBatchMint(address _to, uint256[] calldata _cards) external; }
partner[msg.sender],"Caller is not partner"
355,220
partner[msg.sender]
"nc"
pragma experimental ABIEncoderV2; pragma solidity ^0.8.10; //SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; // GET LISTED ON OPENSEA: https://testnets.opensea.io/get-listed/step-two contract ETHDubaiTicket { using Counters for Counters.Counter; using EnumerableSet for EnumerableSet.AddressSet; Counters.Counter private _tokenIds; address payable public owner; uint256[20] public ticketOptions; Settings public settings; event Log(address indexed sender, string message); event Lint(uint256 indexed tokenId, string message); event LDiscount(address indexed sender, Discount discount, string message); event LMint(address indexed sender, MintInfo[] mintInfo, string message); enum Ticket { CONFERENCE, HOTEL_CONFERENCE, WORKSHOP1_AND_PRE_PARTY, WORKSHOP2_AND_PRE_PARTY, WORKSHOP3_AND_PRE_PARTY, HOTEL_WORKSHOP1_AND_PRE_PARTY, HOTEL_WORKSHOP2_AND_PRE_PARTY, HOTEL_WORKSHOP3_AND_PRE_PARTY } EnumerableSet.AddressSet private daosAddresses; mapping(address => uint256) public daosQty; mapping(address => Counters.Counter) public daosUsed; mapping(address => uint256) public daosMinBalance; mapping(address => uint256) public daosDiscount; mapping(address => uint256) public daosMinTotal; mapping(address => Discount) public discounts; event LTicketSettings( TicketSettings indexed ticketSettings, string message ); uint256[] private initDiscounts; constructor() { } struct Discount { uint256[] ticketOptions; uint256 amount; } struct TicketSettings { string name; } struct MintInfo { string ticketCode; uint256 ticketOption; string specialStatus; } struct Settings { TicketSettings ticketSettings; uint256 maxMint; } function setDiscount( address buyer, uint256[] memory newDiscounts, uint256 amount ) public returns (bool) { } function setMaxMint(uint256 max) public returns (uint256) { } function setTicketOptions(uint256 ticketOptionId, uint256 amount) public returns (bool) { } function setDao( address dao, uint256 qty, uint256 discount, uint256 minBalance, uint256 minTotal ) public returns (bool) { require(msg.sender == owner, "only owner"); require(<FILL_ME>) if (!daosAddresses.contains(dao)) { daosAddresses.add(dao); } daosQty[dao] = qty; daosMinBalance[dao] = minBalance; daosDiscount[dao] = discount; daosMinTotal[dao] = minTotal; return true; } function setTicketSettings(string memory name) public returns (bool) { } function cmpStr(string memory idopt, string memory opt) internal pure returns (bool) { } function getDiscount(address sender, uint256 ticketOption) public view returns (uint256[2] memory) { } function getDaoDiscountView(uint256 amount) internal view returns (uint256[2] memory) { } function getDaoDiscount(uint256 amount) internal returns (uint256[2] memory) { } function getPrice(address sender, uint256 ticketOption) public returns (uint256) { } function getPriceView(address sender, uint256 ticketOption) public view returns (uint256) { } function totalPrice(MintInfo[] memory mIs) public view returns (uint256) { } function totalPriceInternal(MintInfo[] memory mIs) internal returns (uint256) { } function mintItem(MintInfo[] memory mintInfos) public payable returns (string memory) { } function mintItemNoDiscount(MintInfo[] memory mintInfos) public payable returns (string memory) { } function withdraw() public { } }
Address.isContract(dao),"nc"
355,267
Address.isContract(dao)
"sold out"
pragma experimental ABIEncoderV2; pragma solidity ^0.8.10; //SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; // GET LISTED ON OPENSEA: https://testnets.opensea.io/get-listed/step-two contract ETHDubaiTicket { using Counters for Counters.Counter; using EnumerableSet for EnumerableSet.AddressSet; Counters.Counter private _tokenIds; address payable public owner; uint256[20] public ticketOptions; Settings public settings; event Log(address indexed sender, string message); event Lint(uint256 indexed tokenId, string message); event LDiscount(address indexed sender, Discount discount, string message); event LMint(address indexed sender, MintInfo[] mintInfo, string message); enum Ticket { CONFERENCE, HOTEL_CONFERENCE, WORKSHOP1_AND_PRE_PARTY, WORKSHOP2_AND_PRE_PARTY, WORKSHOP3_AND_PRE_PARTY, HOTEL_WORKSHOP1_AND_PRE_PARTY, HOTEL_WORKSHOP2_AND_PRE_PARTY, HOTEL_WORKSHOP3_AND_PRE_PARTY } EnumerableSet.AddressSet private daosAddresses; mapping(address => uint256) public daosQty; mapping(address => Counters.Counter) public daosUsed; mapping(address => uint256) public daosMinBalance; mapping(address => uint256) public daosDiscount; mapping(address => uint256) public daosMinTotal; mapping(address => Discount) public discounts; event LTicketSettings( TicketSettings indexed ticketSettings, string message ); uint256[] private initDiscounts; constructor() { } struct Discount { uint256[] ticketOptions; uint256 amount; } struct TicketSettings { string name; } struct MintInfo { string ticketCode; uint256 ticketOption; string specialStatus; } struct Settings { TicketSettings ticketSettings; uint256 maxMint; } function setDiscount( address buyer, uint256[] memory newDiscounts, uint256 amount ) public returns (bool) { } function setMaxMint(uint256 max) public returns (uint256) { } function setTicketOptions(uint256 ticketOptionId, uint256 amount) public returns (bool) { } function setDao( address dao, uint256 qty, uint256 discount, uint256 minBalance, uint256 minTotal ) public returns (bool) { } function setTicketSettings(string memory name) public returns (bool) { } function cmpStr(string memory idopt, string memory opt) internal pure returns (bool) { } function getDiscount(address sender, uint256 ticketOption) public view returns (uint256[2] memory) { } function getDaoDiscountView(uint256 amount) internal view returns (uint256[2] memory) { } function getDaoDiscount(uint256 amount) internal returns (uint256[2] memory) { } function getPrice(address sender, uint256 ticketOption) public returns (uint256) { } function getPriceView(address sender, uint256 ticketOption) public view returns (uint256) { } function totalPrice(MintInfo[] memory mIs) public view returns (uint256) { } function totalPriceInternal(MintInfo[] memory mIs) internal returns (uint256) { } function mintItem(MintInfo[] memory mintInfos) public payable returns (string memory) { require(<FILL_ME>) uint256 total = 0; string memory ids = ""; for (uint256 i = 0; i < mintInfos.length; i++) { require( keccak256(abi.encodePacked(mintInfos[i].specialStatus)) == keccak256(abi.encodePacked("")) || msg.sender == owner, "only owner" ); total += getPrice(msg.sender, mintInfos[i].ticketOption); _tokenIds.increment(); } require(msg.value >= total, "price too low"); //emit LMint(msg.sender, mintInfos, "minted"); return ids; } function mintItemNoDiscount(MintInfo[] memory mintInfos) public payable returns (string memory) { } function withdraw() public { } }
_tokenIds.current()+mintInfos.length<=settings.maxMint,"sold out"
355,267
_tokenIds.current()+mintInfos.length<=settings.maxMint
"only owner"
pragma experimental ABIEncoderV2; pragma solidity ^0.8.10; //SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; // GET LISTED ON OPENSEA: https://testnets.opensea.io/get-listed/step-two contract ETHDubaiTicket { using Counters for Counters.Counter; using EnumerableSet for EnumerableSet.AddressSet; Counters.Counter private _tokenIds; address payable public owner; uint256[20] public ticketOptions; Settings public settings; event Log(address indexed sender, string message); event Lint(uint256 indexed tokenId, string message); event LDiscount(address indexed sender, Discount discount, string message); event LMint(address indexed sender, MintInfo[] mintInfo, string message); enum Ticket { CONFERENCE, HOTEL_CONFERENCE, WORKSHOP1_AND_PRE_PARTY, WORKSHOP2_AND_PRE_PARTY, WORKSHOP3_AND_PRE_PARTY, HOTEL_WORKSHOP1_AND_PRE_PARTY, HOTEL_WORKSHOP2_AND_PRE_PARTY, HOTEL_WORKSHOP3_AND_PRE_PARTY } EnumerableSet.AddressSet private daosAddresses; mapping(address => uint256) public daosQty; mapping(address => Counters.Counter) public daosUsed; mapping(address => uint256) public daosMinBalance; mapping(address => uint256) public daosDiscount; mapping(address => uint256) public daosMinTotal; mapping(address => Discount) public discounts; event LTicketSettings( TicketSettings indexed ticketSettings, string message ); uint256[] private initDiscounts; constructor() { } struct Discount { uint256[] ticketOptions; uint256 amount; } struct TicketSettings { string name; } struct MintInfo { string ticketCode; uint256 ticketOption; string specialStatus; } struct Settings { TicketSettings ticketSettings; uint256 maxMint; } function setDiscount( address buyer, uint256[] memory newDiscounts, uint256 amount ) public returns (bool) { } function setMaxMint(uint256 max) public returns (uint256) { } function setTicketOptions(uint256 ticketOptionId, uint256 amount) public returns (bool) { } function setDao( address dao, uint256 qty, uint256 discount, uint256 minBalance, uint256 minTotal ) public returns (bool) { } function setTicketSettings(string memory name) public returns (bool) { } function cmpStr(string memory idopt, string memory opt) internal pure returns (bool) { } function getDiscount(address sender, uint256 ticketOption) public view returns (uint256[2] memory) { } function getDaoDiscountView(uint256 amount) internal view returns (uint256[2] memory) { } function getDaoDiscount(uint256 amount) internal returns (uint256[2] memory) { } function getPrice(address sender, uint256 ticketOption) public returns (uint256) { } function getPriceView(address sender, uint256 ticketOption) public view returns (uint256) { } function totalPrice(MintInfo[] memory mIs) public view returns (uint256) { } function totalPriceInternal(MintInfo[] memory mIs) internal returns (uint256) { } function mintItem(MintInfo[] memory mintInfos) public payable returns (string memory) { require( _tokenIds.current() + mintInfos.length <= settings.maxMint, "sold out" ); uint256 total = 0; string memory ids = ""; for (uint256 i = 0; i < mintInfos.length; i++) { require(<FILL_ME>) total += getPrice(msg.sender, mintInfos[i].ticketOption); _tokenIds.increment(); } require(msg.value >= total, "price too low"); //emit LMint(msg.sender, mintInfos, "minted"); return ids; } function mintItemNoDiscount(MintInfo[] memory mintInfos) public payable returns (string memory) { } function withdraw() public { } }
keccak256(abi.encodePacked(mintInfos[i].specialStatus))==keccak256(abi.encodePacked(""))||msg.sender==owner,"only owner"
355,267
keccak256(abi.encodePacked(mintInfos[i].specialStatus))==keccak256(abi.encodePacked(""))||msg.sender==owner
"Edition disabled"
pragma solidity ^0.5.0; contract RendarToken is CustomERC721Metadata, WhitelistedRole { using SafeMath for uint256; //////////// // Events // //////////// // Emitted on every edition created event EditionCreated( uint256 indexed _editionId ); /////////////// // Variables // /////////////// string public tokenBaseURI = "https://ipfs.infura.io/ipfs/"; // Edition construct struct EditionDetails { uint256 editionId; // top level edition identifier uint256 editionSize; // max size of the edition uint256 editionSupply; // number of tokens purchased from the edition uint256 priceInWei; // price per token for this edition uint256 artistCommission; // commission the artist wants for this editions address payable artistAccount; // the account the send the commission to bool active; // Edition is active or not string tokenURI; // NFT token metadata URL } // Edition step uint256 public editionStep = 10000; // A count of the total number of token minted uint256 public totalTokensMinted; // A pointer to the last/highest edition number created uint256 public highestEditionNumber; // A list of all created editions uint256[] public createdEditions; // Rendar commission account address payable public rendarAddress; // tokenId : editionId mapping(uint256 => uint256) internal tokenIdToEditionId; // editionId : EditionDetails mapping(uint256 => EditionDetails) internal editionIdToEditionDetails; // artistAccount : [editionId, editionId] mapping(address => uint256[]) internal artistToEditionIds; // editionId => editionId mapping(uint256 => uint256) internal editionIdToArtistIndex; /////////////// // Modifiers // /////////////// modifier onlyActiveEdition(uint256 _editionId) { require(<FILL_ME>) _; } modifier onlyValidEdition(uint256 _editionId) { } modifier onlyAvailableEdition(uint256 _editionId) { } modifier onlyValidTokenId(uint256 _tokenId) { } ///////////////// // Constructor // ///////////////// constructor(address payable _rendarAddress) CustomERC721Metadata("RendarToken", "RDR") public { } ////////////////////////////// // Token Creation Functions // ////////////////////////////// function purchase(uint256 _editionId) public payable returns (uint256 _tokenId) { } function purchaseTo(address _to, uint256 _editionId) onlyActiveEdition(_editionId) onlyAvailableEdition(_editionId) public payable returns (uint256 _tokenId) { } function _splitFunds(uint256 _priceInWei, address payable _artistsAccount, uint256 _artistsCommission) internal { } /* * Whitelist only function for minting tokens from an edition to the callers address, does not require payment */ function mint(uint256 _editionId) public returns (uint256 _tokenId) { } /* * Whitelist only function for minting tokens from an edition to a specific address, does not require payment */ function mintTo(address _to, uint256 _editionId) onlyWhitelisted onlyValidEdition(_editionId) onlyAvailableEdition(_editionId) public returns (uint256 _tokenId) { } /* * Whitelist only function for minting multiple tokens from an edition to a specific address, does not require payment */ function mintMultipleTo(address _to, uint256 _editionId, uint256 _total) onlyWhitelisted onlyValidEdition(_editionId) public returns (uint256[] memory _tokenIds) { } function _internalMint(address _to, uint256 _editionId) internal returns (uint256 _tokenId) { } /* * Function for burning tokens if you are the owner */ function burn(uint256 tokenId) public { } /* * Admin only function for burning tokens */ function adminBurn(uint256 tokenId) onlyWhitelisted public { } ////////////////////////////////// // Edition Management Functions // ////////////////////////////////// function createEdition( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI ) public onlyWhitelisted returns (bool _created) { } function createEditionInactive( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI ) public onlyWhitelisted returns (bool _created) { } function _createEdition( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI, bool active ) internal returns (bool _created){ } function _nextTokenId(uint256 _editionId) internal returns (uint256) { } function disableEdition(uint256 _editionId) external onlyWhitelisted onlyValidEdition(_editionId) { } function enableEdition(uint256 _editionId) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistAccount(uint256 _editionId, address payable _artistAccount) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistCommission(uint256 _editionId, uint256 _artistCommission) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateEditionTokenUri(uint256 _editionId, string calldata _tokenURI) external onlyWhitelisted onlyValidEdition(_editionId) { } function updatePrice(uint256 _editionId, uint256 _priceInWei) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistLookupData(address artistAccount, uint256 editionId) internal { } ////////////////////////// // Management functions // ////////////////////////// function updateTokenBaseURI(string calldata _newBaseURI) external onlyWhitelisted { } function updateRendarAddress(address payable _rendarAddress) external onlyWhitelisted { } //////////////////////// // Accessor functions // //////////////////////// function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } function editionTokenUri(uint256 _editionId) public view returns (string memory _tokenUri) { } function editionSize(uint256 _editionId) public view returns (uint256 _totalRemaining) { } function editionSupply(uint256 _editionId) public view returns (uint256 _editionSupply) { } function editionPrice(uint256 _editionId) public view returns (uint256 _priceInWei) { } function artistInfo(uint256 _editionId) public view returns (address _artistAccount, uint256 _artistCommission) { } function artistCommission(uint256 _editionId) public view returns (uint256 _artistCommission) { } function artistAccount(uint256 _editionId) public view returns (address _artistAccount) { } function active(uint256 _editionId) public view returns (bool _active) { } function allEditions() public view returns (uint256[] memory _editionIds) { } function artistsEditions(address _artistsAccount) public view returns (uint256[] memory _editionIds) { } function editionDetails(uint256 _editionId) public view onlyValidEdition(_editionId) returns ( uint256 _editionSize, uint256 _editionSupply, uint256 _priceInWei, uint256 _artistCommission, address _artistAccount, bool _active, string memory _tokenURI ) { } function totalRemaining(uint256 _editionId) public view returns (uint256) { } function tokenDetails(uint256 _tokenId) public view onlyValidTokenId(_tokenId) returns ( uint256 _editionId, uint256 _editionSize, uint256 _editionSupply, address _artistAccount, address _owner, string memory _tokenURI ) { } }
editionIdToEditionDetails[_editionId].active,"Edition disabled"
355,293
editionIdToEditionDetails[_editionId].active
"Edition ID invalid"
pragma solidity ^0.5.0; contract RendarToken is CustomERC721Metadata, WhitelistedRole { using SafeMath for uint256; //////////// // Events // //////////// // Emitted on every edition created event EditionCreated( uint256 indexed _editionId ); /////////////// // Variables // /////////////// string public tokenBaseURI = "https://ipfs.infura.io/ipfs/"; // Edition construct struct EditionDetails { uint256 editionId; // top level edition identifier uint256 editionSize; // max size of the edition uint256 editionSupply; // number of tokens purchased from the edition uint256 priceInWei; // price per token for this edition uint256 artistCommission; // commission the artist wants for this editions address payable artistAccount; // the account the send the commission to bool active; // Edition is active or not string tokenURI; // NFT token metadata URL } // Edition step uint256 public editionStep = 10000; // A count of the total number of token minted uint256 public totalTokensMinted; // A pointer to the last/highest edition number created uint256 public highestEditionNumber; // A list of all created editions uint256[] public createdEditions; // Rendar commission account address payable public rendarAddress; // tokenId : editionId mapping(uint256 => uint256) internal tokenIdToEditionId; // editionId : EditionDetails mapping(uint256 => EditionDetails) internal editionIdToEditionDetails; // artistAccount : [editionId, editionId] mapping(address => uint256[]) internal artistToEditionIds; // editionId => editionId mapping(uint256 => uint256) internal editionIdToArtistIndex; /////////////// // Modifiers // /////////////// modifier onlyActiveEdition(uint256 _editionId) { } modifier onlyValidEdition(uint256 _editionId) { require(<FILL_ME>) _; } modifier onlyAvailableEdition(uint256 _editionId) { } modifier onlyValidTokenId(uint256 _tokenId) { } ///////////////// // Constructor // ///////////////// constructor(address payable _rendarAddress) CustomERC721Metadata("RendarToken", "RDR") public { } ////////////////////////////// // Token Creation Functions // ////////////////////////////// function purchase(uint256 _editionId) public payable returns (uint256 _tokenId) { } function purchaseTo(address _to, uint256 _editionId) onlyActiveEdition(_editionId) onlyAvailableEdition(_editionId) public payable returns (uint256 _tokenId) { } function _splitFunds(uint256 _priceInWei, address payable _artistsAccount, uint256 _artistsCommission) internal { } /* * Whitelist only function for minting tokens from an edition to the callers address, does not require payment */ function mint(uint256 _editionId) public returns (uint256 _tokenId) { } /* * Whitelist only function for minting tokens from an edition to a specific address, does not require payment */ function mintTo(address _to, uint256 _editionId) onlyWhitelisted onlyValidEdition(_editionId) onlyAvailableEdition(_editionId) public returns (uint256 _tokenId) { } /* * Whitelist only function for minting multiple tokens from an edition to a specific address, does not require payment */ function mintMultipleTo(address _to, uint256 _editionId, uint256 _total) onlyWhitelisted onlyValidEdition(_editionId) public returns (uint256[] memory _tokenIds) { } function _internalMint(address _to, uint256 _editionId) internal returns (uint256 _tokenId) { } /* * Function for burning tokens if you are the owner */ function burn(uint256 tokenId) public { } /* * Admin only function for burning tokens */ function adminBurn(uint256 tokenId) onlyWhitelisted public { } ////////////////////////////////// // Edition Management Functions // ////////////////////////////////// function createEdition( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI ) public onlyWhitelisted returns (bool _created) { } function createEditionInactive( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI ) public onlyWhitelisted returns (bool _created) { } function _createEdition( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI, bool active ) internal returns (bool _created){ } function _nextTokenId(uint256 _editionId) internal returns (uint256) { } function disableEdition(uint256 _editionId) external onlyWhitelisted onlyValidEdition(_editionId) { } function enableEdition(uint256 _editionId) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistAccount(uint256 _editionId, address payable _artistAccount) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistCommission(uint256 _editionId, uint256 _artistCommission) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateEditionTokenUri(uint256 _editionId, string calldata _tokenURI) external onlyWhitelisted onlyValidEdition(_editionId) { } function updatePrice(uint256 _editionId, uint256 _priceInWei) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistLookupData(address artistAccount, uint256 editionId) internal { } ////////////////////////// // Management functions // ////////////////////////// function updateTokenBaseURI(string calldata _newBaseURI) external onlyWhitelisted { } function updateRendarAddress(address payable _rendarAddress) external onlyWhitelisted { } //////////////////////// // Accessor functions // //////////////////////// function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } function editionTokenUri(uint256 _editionId) public view returns (string memory _tokenUri) { } function editionSize(uint256 _editionId) public view returns (uint256 _totalRemaining) { } function editionSupply(uint256 _editionId) public view returns (uint256 _editionSupply) { } function editionPrice(uint256 _editionId) public view returns (uint256 _priceInWei) { } function artistInfo(uint256 _editionId) public view returns (address _artistAccount, uint256 _artistCommission) { } function artistCommission(uint256 _editionId) public view returns (uint256 _artistCommission) { } function artistAccount(uint256 _editionId) public view returns (address _artistAccount) { } function active(uint256 _editionId) public view returns (bool _active) { } function allEditions() public view returns (uint256[] memory _editionIds) { } function artistsEditions(address _artistsAccount) public view returns (uint256[] memory _editionIds) { } function editionDetails(uint256 _editionId) public view onlyValidEdition(_editionId) returns ( uint256 _editionSize, uint256 _editionSupply, uint256 _priceInWei, uint256 _artistCommission, address _artistAccount, bool _active, string memory _tokenURI ) { } function totalRemaining(uint256 _editionId) public view returns (uint256) { } function tokenDetails(uint256 _tokenId) public view onlyValidTokenId(_tokenId) returns ( uint256 _editionId, uint256 _editionSize, uint256 _editionSupply, address _artistAccount, address _owner, string memory _tokenURI ) { } }
editionIdToEditionDetails[_editionId].editionId>0,"Edition ID invalid"
355,293
editionIdToEditionDetails[_editionId].editionId>0
"Edition sold out"
pragma solidity ^0.5.0; contract RendarToken is CustomERC721Metadata, WhitelistedRole { using SafeMath for uint256; //////////// // Events // //////////// // Emitted on every edition created event EditionCreated( uint256 indexed _editionId ); /////////////// // Variables // /////////////// string public tokenBaseURI = "https://ipfs.infura.io/ipfs/"; // Edition construct struct EditionDetails { uint256 editionId; // top level edition identifier uint256 editionSize; // max size of the edition uint256 editionSupply; // number of tokens purchased from the edition uint256 priceInWei; // price per token for this edition uint256 artistCommission; // commission the artist wants for this editions address payable artistAccount; // the account the send the commission to bool active; // Edition is active or not string tokenURI; // NFT token metadata URL } // Edition step uint256 public editionStep = 10000; // A count of the total number of token minted uint256 public totalTokensMinted; // A pointer to the last/highest edition number created uint256 public highestEditionNumber; // A list of all created editions uint256[] public createdEditions; // Rendar commission account address payable public rendarAddress; // tokenId : editionId mapping(uint256 => uint256) internal tokenIdToEditionId; // editionId : EditionDetails mapping(uint256 => EditionDetails) internal editionIdToEditionDetails; // artistAccount : [editionId, editionId] mapping(address => uint256[]) internal artistToEditionIds; // editionId => editionId mapping(uint256 => uint256) internal editionIdToArtistIndex; /////////////// // Modifiers // /////////////// modifier onlyActiveEdition(uint256 _editionId) { } modifier onlyValidEdition(uint256 _editionId) { } modifier onlyAvailableEdition(uint256 _editionId) { require(<FILL_ME>) _; } modifier onlyValidTokenId(uint256 _tokenId) { } ///////////////// // Constructor // ///////////////// constructor(address payable _rendarAddress) CustomERC721Metadata("RendarToken", "RDR") public { } ////////////////////////////// // Token Creation Functions // ////////////////////////////// function purchase(uint256 _editionId) public payable returns (uint256 _tokenId) { } function purchaseTo(address _to, uint256 _editionId) onlyActiveEdition(_editionId) onlyAvailableEdition(_editionId) public payable returns (uint256 _tokenId) { } function _splitFunds(uint256 _priceInWei, address payable _artistsAccount, uint256 _artistsCommission) internal { } /* * Whitelist only function for minting tokens from an edition to the callers address, does not require payment */ function mint(uint256 _editionId) public returns (uint256 _tokenId) { } /* * Whitelist only function for minting tokens from an edition to a specific address, does not require payment */ function mintTo(address _to, uint256 _editionId) onlyWhitelisted onlyValidEdition(_editionId) onlyAvailableEdition(_editionId) public returns (uint256 _tokenId) { } /* * Whitelist only function for minting multiple tokens from an edition to a specific address, does not require payment */ function mintMultipleTo(address _to, uint256 _editionId, uint256 _total) onlyWhitelisted onlyValidEdition(_editionId) public returns (uint256[] memory _tokenIds) { } function _internalMint(address _to, uint256 _editionId) internal returns (uint256 _tokenId) { } /* * Function for burning tokens if you are the owner */ function burn(uint256 tokenId) public { } /* * Admin only function for burning tokens */ function adminBurn(uint256 tokenId) onlyWhitelisted public { } ////////////////////////////////// // Edition Management Functions // ////////////////////////////////// function createEdition( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI ) public onlyWhitelisted returns (bool _created) { } function createEditionInactive( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI ) public onlyWhitelisted returns (bool _created) { } function _createEdition( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI, bool active ) internal returns (bool _created){ } function _nextTokenId(uint256 _editionId) internal returns (uint256) { } function disableEdition(uint256 _editionId) external onlyWhitelisted onlyValidEdition(_editionId) { } function enableEdition(uint256 _editionId) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistAccount(uint256 _editionId, address payable _artistAccount) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistCommission(uint256 _editionId, uint256 _artistCommission) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateEditionTokenUri(uint256 _editionId, string calldata _tokenURI) external onlyWhitelisted onlyValidEdition(_editionId) { } function updatePrice(uint256 _editionId, uint256 _priceInWei) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistLookupData(address artistAccount, uint256 editionId) internal { } ////////////////////////// // Management functions // ////////////////////////// function updateTokenBaseURI(string calldata _newBaseURI) external onlyWhitelisted { } function updateRendarAddress(address payable _rendarAddress) external onlyWhitelisted { } //////////////////////// // Accessor functions // //////////////////////// function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } function editionTokenUri(uint256 _editionId) public view returns (string memory _tokenUri) { } function editionSize(uint256 _editionId) public view returns (uint256 _totalRemaining) { } function editionSupply(uint256 _editionId) public view returns (uint256 _editionSupply) { } function editionPrice(uint256 _editionId) public view returns (uint256 _priceInWei) { } function artistInfo(uint256 _editionId) public view returns (address _artistAccount, uint256 _artistCommission) { } function artistCommission(uint256 _editionId) public view returns (uint256 _artistCommission) { } function artistAccount(uint256 _editionId) public view returns (address _artistAccount) { } function active(uint256 _editionId) public view returns (bool _active) { } function allEditions() public view returns (uint256[] memory _editionIds) { } function artistsEditions(address _artistsAccount) public view returns (uint256[] memory _editionIds) { } function editionDetails(uint256 _editionId) public view onlyValidEdition(_editionId) returns ( uint256 _editionSize, uint256 _editionSupply, uint256 _priceInWei, uint256 _artistCommission, address _artistAccount, bool _active, string memory _tokenURI ) { } function totalRemaining(uint256 _editionId) public view returns (uint256) { } function tokenDetails(uint256 _tokenId) public view onlyValidTokenId(_tokenId) returns ( uint256 _editionId, uint256 _editionSize, uint256 _editionSupply, address _artistAccount, address _owner, string memory _tokenURI ) { } }
editionIdToEditionDetails[_editionId].editionSupply<editionIdToEditionDetails[_editionId].editionSize,"Edition sold out"
355,293
editionIdToEditionDetails[_editionId].editionSupply<editionIdToEditionDetails[_editionId].editionSize
"Base URI invalid"
pragma solidity ^0.5.0; contract RendarToken is CustomERC721Metadata, WhitelistedRole { using SafeMath for uint256; //////////// // Events // //////////// // Emitted on every edition created event EditionCreated( uint256 indexed _editionId ); /////////////// // Variables // /////////////// string public tokenBaseURI = "https://ipfs.infura.io/ipfs/"; // Edition construct struct EditionDetails { uint256 editionId; // top level edition identifier uint256 editionSize; // max size of the edition uint256 editionSupply; // number of tokens purchased from the edition uint256 priceInWei; // price per token for this edition uint256 artistCommission; // commission the artist wants for this editions address payable artistAccount; // the account the send the commission to bool active; // Edition is active or not string tokenURI; // NFT token metadata URL } // Edition step uint256 public editionStep = 10000; // A count of the total number of token minted uint256 public totalTokensMinted; // A pointer to the last/highest edition number created uint256 public highestEditionNumber; // A list of all created editions uint256[] public createdEditions; // Rendar commission account address payable public rendarAddress; // tokenId : editionId mapping(uint256 => uint256) internal tokenIdToEditionId; // editionId : EditionDetails mapping(uint256 => EditionDetails) internal editionIdToEditionDetails; // artistAccount : [editionId, editionId] mapping(address => uint256[]) internal artistToEditionIds; // editionId => editionId mapping(uint256 => uint256) internal editionIdToArtistIndex; /////////////// // Modifiers // /////////////// modifier onlyActiveEdition(uint256 _editionId) { } modifier onlyValidEdition(uint256 _editionId) { } modifier onlyAvailableEdition(uint256 _editionId) { } modifier onlyValidTokenId(uint256 _tokenId) { } ///////////////// // Constructor // ///////////////// constructor(address payable _rendarAddress) CustomERC721Metadata("RendarToken", "RDR") public { } ////////////////////////////// // Token Creation Functions // ////////////////////////////// function purchase(uint256 _editionId) public payable returns (uint256 _tokenId) { } function purchaseTo(address _to, uint256 _editionId) onlyActiveEdition(_editionId) onlyAvailableEdition(_editionId) public payable returns (uint256 _tokenId) { } function _splitFunds(uint256 _priceInWei, address payable _artistsAccount, uint256 _artistsCommission) internal { } /* * Whitelist only function for minting tokens from an edition to the callers address, does not require payment */ function mint(uint256 _editionId) public returns (uint256 _tokenId) { } /* * Whitelist only function for minting tokens from an edition to a specific address, does not require payment */ function mintTo(address _to, uint256 _editionId) onlyWhitelisted onlyValidEdition(_editionId) onlyAvailableEdition(_editionId) public returns (uint256 _tokenId) { } /* * Whitelist only function for minting multiple tokens from an edition to a specific address, does not require payment */ function mintMultipleTo(address _to, uint256 _editionId, uint256 _total) onlyWhitelisted onlyValidEdition(_editionId) public returns (uint256[] memory _tokenIds) { } function _internalMint(address _to, uint256 _editionId) internal returns (uint256 _tokenId) { } /* * Function for burning tokens if you are the owner */ function burn(uint256 tokenId) public { } /* * Admin only function for burning tokens */ function adminBurn(uint256 tokenId) onlyWhitelisted public { } ////////////////////////////////// // Edition Management Functions // ////////////////////////////////// function createEdition( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI ) public onlyWhitelisted returns (bool _created) { } function createEditionInactive( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI ) public onlyWhitelisted returns (bool _created) { } function _createEdition( uint256 _editionSize, uint256 _priceInWei, uint256 _artistCommission, address payable _artistAccount, string memory _tokenURI, bool active ) internal returns (bool _created){ } function _nextTokenId(uint256 _editionId) internal returns (uint256) { } function disableEdition(uint256 _editionId) external onlyWhitelisted onlyValidEdition(_editionId) { } function enableEdition(uint256 _editionId) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistAccount(uint256 _editionId, address payable _artistAccount) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistCommission(uint256 _editionId, uint256 _artistCommission) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateEditionTokenUri(uint256 _editionId, string calldata _tokenURI) external onlyWhitelisted onlyValidEdition(_editionId) { } function updatePrice(uint256 _editionId, uint256 _priceInWei) external onlyWhitelisted onlyValidEdition(_editionId) { } function updateArtistLookupData(address artistAccount, uint256 editionId) internal { } ////////////////////////// // Management functions // ////////////////////////// function updateTokenBaseURI(string calldata _newBaseURI) external onlyWhitelisted { require(<FILL_ME>) tokenBaseURI = _newBaseURI; } function updateRendarAddress(address payable _rendarAddress) external onlyWhitelisted { } //////////////////////// // Accessor functions // //////////////////////// function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } function editionTokenUri(uint256 _editionId) public view returns (string memory _tokenUri) { } function editionSize(uint256 _editionId) public view returns (uint256 _totalRemaining) { } function editionSupply(uint256 _editionId) public view returns (uint256 _editionSupply) { } function editionPrice(uint256 _editionId) public view returns (uint256 _priceInWei) { } function artistInfo(uint256 _editionId) public view returns (address _artistAccount, uint256 _artistCommission) { } function artistCommission(uint256 _editionId) public view returns (uint256 _artistCommission) { } function artistAccount(uint256 _editionId) public view returns (address _artistAccount) { } function active(uint256 _editionId) public view returns (bool _active) { } function allEditions() public view returns (uint256[] memory _editionIds) { } function artistsEditions(address _artistsAccount) public view returns (uint256[] memory _editionIds) { } function editionDetails(uint256 _editionId) public view onlyValidEdition(_editionId) returns ( uint256 _editionSize, uint256 _editionSupply, uint256 _priceInWei, uint256 _artistCommission, address _artistAccount, bool _active, string memory _tokenURI ) { } function totalRemaining(uint256 _editionId) public view returns (uint256) { } function tokenDetails(uint256 _tokenId) public view onlyValidTokenId(_tokenId) returns ( uint256 _editionId, uint256 _editionSize, uint256 _editionSupply, address _artistAccount, address _owner, string memory _tokenURI ) { } }
bytes(_newBaseURI).length!=0,"Base URI invalid"
355,293
bytes(_newBaseURI).length!=0
"Symbiosis: not enough token left to mint"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** * * S Y M B I O S I S * * _________________ by Lucien Loiseau (MetaPixel.art) * * This file contains the source code for the ERC-721 smart contract driving * the NFT logic for the project "Symbiosis" (https://symbiosis.metapixel.art). * */ contract Symbiosis is Context, Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using Counters for Counters.Counter; string private _name = "Symbiosis"; string private _symbol = "SYMBIOS"; // max supply and price uint256 public constant MAX_TOKENS_PER_PURCHASE = 20; uint256 public constant TOKEN_LIMIT = 2048; uint256 private tokenPrice = 250 * 1000000000000000 wei; // artist uint256 public ARTIST_PRINTS = 128; address payable public constant ARTIST_WALLET = payable(0xde00d5483e685c67E83c0C639322150B0365fFfa); // Total amount of tokens Counters.Counter private _totalMinted; // reference to the generator on IPFS string public generatorIpfsHash = ""; string public playerJsIpfsHash = ""; string public webPlayerIpfsHash = ""; bool public isLocked = false; // ----- Symbiosis NFT's history ----- struct Ownership { address account; uint256 timestamp; } // Mapping token ID to owner's history mapping(uint256 => Ownership[]) private _owners; string public baseURI = "https://assets.symbiosis.metapixel.art/metadata/"; // ----- IERC 721 ENUMERABLE ----- // Mapping address to list of owned tokens mapping(address => uint256[]) private _tokensOf; // Mapping tokenId to index in owner's set mapping(uint256 => uint256) internal _idToOwnerIndex; // ----- IERC 721 APPROVALS ----- // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor() {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function totalSupply() public view override returns (uint256) { } function _exists(uint256 tokenId) internal view returns (bool) { } /** * @dev returns all the token owned by an owner */ function tokensOf(address owner) external view returns (uint256[] memory) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override returns (uint256) { } function tokenByIndex(uint256 index) external pure override returns (uint256) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev ownership history */ function tokenHistory(uint256 tokenId) public view returns (Ownership[] memory) { } /** * @dev seed generates token history as a compact hexadecimal string */ function tokenArtSeed(uint256 tokenId) public view returns (string memory) { } function uintToHexString( bytes memory _output, uint256 _offst, uint256 a, uint256 precision ) internal pure { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { } function artistMint(uint256 quantity, address to) external onlyOwner { require( ARTIST_PRINTS >= quantity, "Symbiosis: not enough artist prints" ); require(<FILL_ME>) ARTIST_PRINTS -= quantity; for (uint256 i = 0; i < quantity; i++) { _createNft(to); } } function mint(uint256 _count) external payable { } function _createNft(address to) private returns (uint256) { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function _transfer( address from, address to, uint256 tokenId ) internal { } function _removeNFTokenFromOwner(address from, uint256 tokenId) internal { } function _addNFTokenToOwner(address to, uint256 tokenId) internal { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function getPrice() public view returns (uint256) { } function setGeneratorIpfsHash(string memory ipfsHash) public onlyOwner { } function setPlayerJsIpfsHash(string memory ipfsHash) public onlyOwner { } function setWebPlayerIpfsHash(string memory ipfsHash) public onlyOwner { } function lock() public onlyOwner { } }
(_totalMinted.current()+quantity)<=TOKEN_LIMIT,"Symbiosis: not enough token left to mint"
355,310
(_totalMinted.current()+quantity)<=TOKEN_LIMIT
"Symbiosis: exceed maximum token limit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** * * S Y M B I O S I S * * _________________ by Lucien Loiseau (MetaPixel.art) * * This file contains the source code for the ERC-721 smart contract driving * the NFT logic for the project "Symbiosis" (https://symbiosis.metapixel.art). * */ contract Symbiosis is Context, Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using Counters for Counters.Counter; string private _name = "Symbiosis"; string private _symbol = "SYMBIOS"; // max supply and price uint256 public constant MAX_TOKENS_PER_PURCHASE = 20; uint256 public constant TOKEN_LIMIT = 2048; uint256 private tokenPrice = 250 * 1000000000000000 wei; // artist uint256 public ARTIST_PRINTS = 128; address payable public constant ARTIST_WALLET = payable(0xde00d5483e685c67E83c0C639322150B0365fFfa); // Total amount of tokens Counters.Counter private _totalMinted; // reference to the generator on IPFS string public generatorIpfsHash = ""; string public playerJsIpfsHash = ""; string public webPlayerIpfsHash = ""; bool public isLocked = false; // ----- Symbiosis NFT's history ----- struct Ownership { address account; uint256 timestamp; } // Mapping token ID to owner's history mapping(uint256 => Ownership[]) private _owners; string public baseURI = "https://assets.symbiosis.metapixel.art/metadata/"; // ----- IERC 721 ENUMERABLE ----- // Mapping address to list of owned tokens mapping(address => uint256[]) private _tokensOf; // Mapping tokenId to index in owner's set mapping(uint256 => uint256) internal _idToOwnerIndex; // ----- IERC 721 APPROVALS ----- // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor() {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function totalSupply() public view override returns (uint256) { } function _exists(uint256 tokenId) internal view returns (bool) { } /** * @dev returns all the token owned by an owner */ function tokensOf(address owner) external view returns (uint256[] memory) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override returns (uint256) { } function tokenByIndex(uint256 index) external pure override returns (uint256) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev ownership history */ function tokenHistory(uint256 tokenId) public view returns (Ownership[] memory) { } /** * @dev seed generates token history as a compact hexadecimal string */ function tokenArtSeed(uint256 tokenId) public view returns (string memory) { } function uintToHexString( bytes memory _output, uint256 _offst, uint256 a, uint256 precision ) internal pure { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { } function artistMint(uint256 quantity, address to) external onlyOwner { } function mint(uint256 _count) external payable { require(<FILL_ME>) require( _count > 0 && _count < MAX_TOKENS_PER_PURCHASE + 1, "Symbiosis: exceeds maximum purchase in a single transaction" ); uint256 mintPrice = tokenPrice * _count; require( msg.value >= mintPrice, "Symbiosis: not enough Ether to mint the art" ); // mint tokens uint256 tokenId; for (uint256 i = 0; i < _count; i++) { tokenId = _createNft(_msgSender()); } // send the change back if any uint256 change = (msg.value - mintPrice); if (change > 0) { (bool changeSent, ) = _msgSender().call{value: change}(""); require(changeSent, "Failed to send change to buyer"); } // pay the artist (bool paymentSent, ) = ARTIST_WALLET.call{value: mintPrice}(""); require(paymentSent, "Failed to send Ether to artist wallet"); require( _checkOnERC721Received(address(0), _msgSender(), tokenId, ""), "Symbiosis: transfer to non ERC721Receiver implementer" ); } function _createNft(address to) private returns (uint256) { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function _transfer( address from, address to, uint256 tokenId ) internal { } function _removeNFTokenFromOwner(address from, uint256 tokenId) internal { } function _addNFTokenToOwner(address to, uint256 tokenId) internal { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function getPrice() public view returns (uint256) { } function setGeneratorIpfsHash(string memory ipfsHash) public onlyOwner { } function setPlayerJsIpfsHash(string memory ipfsHash) public onlyOwner { } function setWebPlayerIpfsHash(string memory ipfsHash) public onlyOwner { } function lock() public onlyOwner { } }
(_totalMinted.current()+_count)<=TOKEN_LIMIT,"Symbiosis: exceed maximum token limit"
355,310
(_totalMinted.current()+_count)<=TOKEN_LIMIT
"Symbiosis: transfer to non ERC721Receiver implementer"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** * * S Y M B I O S I S * * _________________ by Lucien Loiseau (MetaPixel.art) * * This file contains the source code for the ERC-721 smart contract driving * the NFT logic for the project "Symbiosis" (https://symbiosis.metapixel.art). * */ contract Symbiosis is Context, Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using Counters for Counters.Counter; string private _name = "Symbiosis"; string private _symbol = "SYMBIOS"; // max supply and price uint256 public constant MAX_TOKENS_PER_PURCHASE = 20; uint256 public constant TOKEN_LIMIT = 2048; uint256 private tokenPrice = 250 * 1000000000000000 wei; // artist uint256 public ARTIST_PRINTS = 128; address payable public constant ARTIST_WALLET = payable(0xde00d5483e685c67E83c0C639322150B0365fFfa); // Total amount of tokens Counters.Counter private _totalMinted; // reference to the generator on IPFS string public generatorIpfsHash = ""; string public playerJsIpfsHash = ""; string public webPlayerIpfsHash = ""; bool public isLocked = false; // ----- Symbiosis NFT's history ----- struct Ownership { address account; uint256 timestamp; } // Mapping token ID to owner's history mapping(uint256 => Ownership[]) private _owners; string public baseURI = "https://assets.symbiosis.metapixel.art/metadata/"; // ----- IERC 721 ENUMERABLE ----- // Mapping address to list of owned tokens mapping(address => uint256[]) private _tokensOf; // Mapping tokenId to index in owner's set mapping(uint256 => uint256) internal _idToOwnerIndex; // ----- IERC 721 APPROVALS ----- // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor() {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function totalSupply() public view override returns (uint256) { } function _exists(uint256 tokenId) internal view returns (bool) { } /** * @dev returns all the token owned by an owner */ function tokensOf(address owner) external view returns (uint256[] memory) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override returns (uint256) { } function tokenByIndex(uint256 index) external pure override returns (uint256) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev ownership history */ function tokenHistory(uint256 tokenId) public view returns (Ownership[] memory) { } /** * @dev seed generates token history as a compact hexadecimal string */ function tokenArtSeed(uint256 tokenId) public view returns (string memory) { } function uintToHexString( bytes memory _output, uint256 _offst, uint256 a, uint256 precision ) internal pure { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { } function artistMint(uint256 quantity, address to) external onlyOwner { } function mint(uint256 _count) external payable { require( (_totalMinted.current() + _count) <= TOKEN_LIMIT, "Symbiosis: exceed maximum token limit" ); require( _count > 0 && _count < MAX_TOKENS_PER_PURCHASE + 1, "Symbiosis: exceeds maximum purchase in a single transaction" ); uint256 mintPrice = tokenPrice * _count; require( msg.value >= mintPrice, "Symbiosis: not enough Ether to mint the art" ); // mint tokens uint256 tokenId; for (uint256 i = 0; i < _count; i++) { tokenId = _createNft(_msgSender()); } // send the change back if any uint256 change = (msg.value - mintPrice); if (change > 0) { (bool changeSent, ) = _msgSender().call{value: change}(""); require(changeSent, "Failed to send change to buyer"); } // pay the artist (bool paymentSent, ) = ARTIST_WALLET.call{value: mintPrice}(""); require(paymentSent, "Failed to send Ether to artist wallet"); require(<FILL_ME>) } function _createNft(address to) private returns (uint256) { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function _transfer( address from, address to, uint256 tokenId ) internal { } function _removeNFTokenFromOwner(address from, uint256 tokenId) internal { } function _addNFTokenToOwner(address to, uint256 tokenId) internal { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function getPrice() public view returns (uint256) { } function setGeneratorIpfsHash(string memory ipfsHash) public onlyOwner { } function setPlayerJsIpfsHash(string memory ipfsHash) public onlyOwner { } function setWebPlayerIpfsHash(string memory ipfsHash) public onlyOwner { } function lock() public onlyOwner { } }
_checkOnERC721Received(address(0),_msgSender(),tokenId,""),"Symbiosis: transfer to non ERC721Receiver implementer"
355,310
_checkOnERC721Received(address(0),_msgSender(),tokenId,"")
"Symbiosis: transfer from of token that is not own"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /** * * S Y M B I O S I S * * _________________ by Lucien Loiseau (MetaPixel.art) * * This file contains the source code for the ERC-721 smart contract driving * the NFT logic for the project "Symbiosis" (https://symbiosis.metapixel.art). * */ contract Symbiosis is Context, Ownable, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; using Counters for Counters.Counter; string private _name = "Symbiosis"; string private _symbol = "SYMBIOS"; // max supply and price uint256 public constant MAX_TOKENS_PER_PURCHASE = 20; uint256 public constant TOKEN_LIMIT = 2048; uint256 private tokenPrice = 250 * 1000000000000000 wei; // artist uint256 public ARTIST_PRINTS = 128; address payable public constant ARTIST_WALLET = payable(0xde00d5483e685c67E83c0C639322150B0365fFfa); // Total amount of tokens Counters.Counter private _totalMinted; // reference to the generator on IPFS string public generatorIpfsHash = ""; string public playerJsIpfsHash = ""; string public webPlayerIpfsHash = ""; bool public isLocked = false; // ----- Symbiosis NFT's history ----- struct Ownership { address account; uint256 timestamp; } // Mapping token ID to owner's history mapping(uint256 => Ownership[]) private _owners; string public baseURI = "https://assets.symbiosis.metapixel.art/metadata/"; // ----- IERC 721 ENUMERABLE ----- // Mapping address to list of owned tokens mapping(address => uint256[]) private _tokensOf; // Mapping tokenId to index in owner's set mapping(uint256 => uint256) internal _idToOwnerIndex; // ----- IERC 721 APPROVALS ----- // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor() {} /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function totalSupply() public view override returns (uint256) { } function _exists(uint256 tokenId) internal view returns (bool) { } /** * @dev returns all the token owned by an owner */ function tokensOf(address owner) external view returns (uint256[] memory) { } function tokenOfOwnerByIndex(address owner, uint256 index) external view override returns (uint256) { } function tokenByIndex(uint256 index) external pure override returns (uint256) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev ownership history */ function tokenHistory(uint256 tokenId) public view returns (Ownership[] memory) { } /** * @dev seed generates token history as a compact hexadecimal string */ function tokenArtSeed(uint256 tokenId) public view returns (string memory) { } function uintToHexString( bytes memory _output, uint256 _offst, uint256 a, uint256 precision ) internal pure { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { } function artistMint(uint256 quantity, address to) external onlyOwner { } function mint(uint256 _count) external payable { } function _createNft(address to) private returns (uint256) { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function _transfer( address from, address to, uint256 tokenId ) internal { require(<FILL_ME>) require( to != address(0), "Symbiosis: transfer to the zero address" ); require(to != from, "Symbiosis: transfer to the same address"); // Clear approvals from the previous owner _approve(address(0), tokenId); // transfer token _removeNFTokenFromOwner(from, tokenId); _addNFTokenToOwner(to, tokenId); // update token history _owners[tokenId].push( Ownership({account: to, timestamp: block.timestamp}) ); emit Transfer(from, to, tokenId); } function _removeNFTokenFromOwner(address from, uint256 tokenId) internal { } function _addNFTokenToOwner(address to, uint256 tokenId) internal { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function getPrice() public view returns (uint256) { } function setGeneratorIpfsHash(string memory ipfsHash) public onlyOwner { } function setPlayerJsIpfsHash(string memory ipfsHash) public onlyOwner { } function setWebPlayerIpfsHash(string memory ipfsHash) public onlyOwner { } function lock() public onlyOwner { } }
Symbiosis.ownerOf(tokenId)==from,"Symbiosis: transfer from of token that is not own"
355,310
Symbiosis.ownerOf(tokenId)==from