comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Must setup partnerAddr_."
pragma solidity ^0.4.25; /*********************************************************** * MultiInvest contract * - GAIN 5.3% PER 24 HOURS (every 5900 blocks) 40 days 0.01~500eth * - GAIN 5.6% PER 24 HOURS (every 5900 blocks) 30 days 1~1000eth * - GAIN 6.6% PER 24 HOURS (every 5900 blocks) 20 days 2~10000eth * - GAIN 7.6% PER 24 HOURS (every 5900 blocks) 15 days 5~10000eth * - GAIN 8.5% PER 24 HOURS (every 5900 blocks) 12 days 10~10000eth * - GAIN 3% PER 24 HOURS (every 5900 blocks) forever 0.01~10000eth * * website: https://www.MultiInvest.biz * telegram: https://t.me/MultiInvest ***********************************************************/ /*********************************************************** * @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 Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @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) { } /** * @dev gives square root of given x. */ function sqrt(uint256 x) internal pure returns (uint256 y) { } /** * @dev gives square. multiplies x by x */ function sq(uint256 x) internal pure returns (uint256) { } /** * @dev x to the power of y */ function pwr(uint256 x, uint256 y) internal pure returns (uint256) { } } /*********************************************************** * SDDatasets library ***********************************************************/ library SDDatasets { struct Player { address addr; // player address uint256 aff; // affiliate vault,directly send uint256 laff; // parent id uint256 planCount; mapping(uint256=>PalyerPlan) plans; uint256 aff1sum; //4 level uint256 aff2sum; uint256 aff3sum; uint256 aff4sum; } struct PalyerPlan { uint256 planId; uint256 startTime; uint256 startBlock; uint256 invested; // uint256 atBlock; // uint256 payEth; bool isClose; } struct Plan { uint256 interest; // interest per day %% uint256 dayRange; // days, 0 means No time limit uint256 min; uint256 max; } } contract MultiInvest { using SafeMath for *; address public devAddr_ = address(0xe6CE2a354a0BF26B5b383015B7E61701F6adb39C); address public commuAddr_ = address(0x08F521636a2B117B554d04dc9E54fa4061161859); //partner address address public partnerAddr_ = address(0xEc31176d4df0509115abC8065A8a3F8275aafF2b); bool public activated_ = false; uint256 ruleSum_ = 6; modifier isActivated() { } function activate() isAdmin() public { require(address(devAddr_) != address(0x0), "Must setup devAddr_."); require(<FILL_ME>) require(address(commuAddr_) != address(0x0), "Must setup affiAddr_."); require(activated_ == false, "Only once"); activated_ = true ; } mapping(address => uint256) private g_users ; function initUsers() private { } modifier isAdmin() { } uint256 public G_NowUserId = 1000; //first user uint256 public G_AllEth = 0; uint256 G_DayBlocks = 5900; mapping (address => uint256) public pIDxAddr_; mapping (uint256 => SDDatasets.Player) public player_; mapping (uint256 => SDDatasets.Plan) private plan_; function GetIdByAddr(address addr) public view returns(uint256) { } function GetPlayerByUid(uint256 uid) public view returns(uint256,uint256,uint256,uint256,uint256,uint256,uint256) { } function GetPlanByUid(uint256 uid) public view returns(uint256[],uint256[],uint256[],uint256[],uint256[],bool[]) { } function GetPlanTimeByUid(uint256 uid) public view returns(uint256[]) { } constructor() public { } function register_(address addr, uint256 _affCode) private{ } // this function called every time anyone sends a transaction to this contract function () isActivated() external payable { } function invest(uint256 _affCode, uint256 _planId) isActivated() public payable { } function withdraw() isActivated() public payable { } function distributeRef(uint256 _eth, uint256 _affID) private{ } }
address(partnerAddr_)!=address(0x0),"Must setup partnerAddr_."
361,525
address(partnerAddr_)!=address(0x0)
"Must setup affiAddr_."
pragma solidity ^0.4.25; /*********************************************************** * MultiInvest contract * - GAIN 5.3% PER 24 HOURS (every 5900 blocks) 40 days 0.01~500eth * - GAIN 5.6% PER 24 HOURS (every 5900 blocks) 30 days 1~1000eth * - GAIN 6.6% PER 24 HOURS (every 5900 blocks) 20 days 2~10000eth * - GAIN 7.6% PER 24 HOURS (every 5900 blocks) 15 days 5~10000eth * - GAIN 8.5% PER 24 HOURS (every 5900 blocks) 12 days 10~10000eth * - GAIN 3% PER 24 HOURS (every 5900 blocks) forever 0.01~10000eth * * website: https://www.MultiInvest.biz * telegram: https://t.me/MultiInvest ***********************************************************/ /*********************************************************** * @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 Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @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) { } /** * @dev gives square root of given x. */ function sqrt(uint256 x) internal pure returns (uint256 y) { } /** * @dev gives square. multiplies x by x */ function sq(uint256 x) internal pure returns (uint256) { } /** * @dev x to the power of y */ function pwr(uint256 x, uint256 y) internal pure returns (uint256) { } } /*********************************************************** * SDDatasets library ***********************************************************/ library SDDatasets { struct Player { address addr; // player address uint256 aff; // affiliate vault,directly send uint256 laff; // parent id uint256 planCount; mapping(uint256=>PalyerPlan) plans; uint256 aff1sum; //4 level uint256 aff2sum; uint256 aff3sum; uint256 aff4sum; } struct PalyerPlan { uint256 planId; uint256 startTime; uint256 startBlock; uint256 invested; // uint256 atBlock; // uint256 payEth; bool isClose; } struct Plan { uint256 interest; // interest per day %% uint256 dayRange; // days, 0 means No time limit uint256 min; uint256 max; } } contract MultiInvest { using SafeMath for *; address public devAddr_ = address(0xe6CE2a354a0BF26B5b383015B7E61701F6adb39C); address public commuAddr_ = address(0x08F521636a2B117B554d04dc9E54fa4061161859); //partner address address public partnerAddr_ = address(0xEc31176d4df0509115abC8065A8a3F8275aafF2b); bool public activated_ = false; uint256 ruleSum_ = 6; modifier isActivated() { } function activate() isAdmin() public { require(address(devAddr_) != address(0x0), "Must setup devAddr_."); require(address(partnerAddr_) != address(0x0), "Must setup partnerAddr_."); require(<FILL_ME>) require(activated_ == false, "Only once"); activated_ = true ; } mapping(address => uint256) private g_users ; function initUsers() private { } modifier isAdmin() { } uint256 public G_NowUserId = 1000; //first user uint256 public G_AllEth = 0; uint256 G_DayBlocks = 5900; mapping (address => uint256) public pIDxAddr_; mapping (uint256 => SDDatasets.Player) public player_; mapping (uint256 => SDDatasets.Plan) private plan_; function GetIdByAddr(address addr) public view returns(uint256) { } function GetPlayerByUid(uint256 uid) public view returns(uint256,uint256,uint256,uint256,uint256,uint256,uint256) { } function GetPlanByUid(uint256 uid) public view returns(uint256[],uint256[],uint256[],uint256[],uint256[],bool[]) { } function GetPlanTimeByUid(uint256 uid) public view returns(uint256[]) { } constructor() public { } function register_(address addr, uint256 _affCode) private{ } // this function called every time anyone sends a transaction to this contract function () isActivated() external payable { } function invest(uint256 _affCode, uint256 _planId) isActivated() public payable { } function withdraw() isActivated() public payable { } function distributeRef(uint256 _eth, uint256 _affID) private{ } }
address(commuAddr_)!=address(0x0),"Must setup affiAddr_."
361,525
address(commuAddr_)!=address(0x0)
"Must be admin."
pragma solidity ^0.4.25; /*********************************************************** * MultiInvest contract * - GAIN 5.3% PER 24 HOURS (every 5900 blocks) 40 days 0.01~500eth * - GAIN 5.6% PER 24 HOURS (every 5900 blocks) 30 days 1~1000eth * - GAIN 6.6% PER 24 HOURS (every 5900 blocks) 20 days 2~10000eth * - GAIN 7.6% PER 24 HOURS (every 5900 blocks) 15 days 5~10000eth * - GAIN 8.5% PER 24 HOURS (every 5900 blocks) 12 days 10~10000eth * - GAIN 3% PER 24 HOURS (every 5900 blocks) forever 0.01~10000eth * * website: https://www.MultiInvest.biz * telegram: https://t.me/MultiInvest ***********************************************************/ /*********************************************************** * @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 Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @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) { } /** * @dev gives square root of given x. */ function sqrt(uint256 x) internal pure returns (uint256 y) { } /** * @dev gives square. multiplies x by x */ function sq(uint256 x) internal pure returns (uint256) { } /** * @dev x to the power of y */ function pwr(uint256 x, uint256 y) internal pure returns (uint256) { } } /*********************************************************** * SDDatasets library ***********************************************************/ library SDDatasets { struct Player { address addr; // player address uint256 aff; // affiliate vault,directly send uint256 laff; // parent id uint256 planCount; mapping(uint256=>PalyerPlan) plans; uint256 aff1sum; //4 level uint256 aff2sum; uint256 aff3sum; uint256 aff4sum; } struct PalyerPlan { uint256 planId; uint256 startTime; uint256 startBlock; uint256 invested; // uint256 atBlock; // uint256 payEth; bool isClose; } struct Plan { uint256 interest; // interest per day %% uint256 dayRange; // days, 0 means No time limit uint256 min; uint256 max; } } contract MultiInvest { using SafeMath for *; address public devAddr_ = address(0xe6CE2a354a0BF26B5b383015B7E61701F6adb39C); address public commuAddr_ = address(0x08F521636a2B117B554d04dc9E54fa4061161859); //partner address address public partnerAddr_ = address(0xEc31176d4df0509115abC8065A8a3F8275aafF2b); bool public activated_ = false; uint256 ruleSum_ = 6; modifier isActivated() { } function activate() isAdmin() public { } mapping(address => uint256) private g_users ; function initUsers() private { } modifier isAdmin() { uint256 role = g_users[msg.sender]; require(<FILL_ME>) _; } uint256 public G_NowUserId = 1000; //first user uint256 public G_AllEth = 0; uint256 G_DayBlocks = 5900; mapping (address => uint256) public pIDxAddr_; mapping (uint256 => SDDatasets.Player) public player_; mapping (uint256 => SDDatasets.Plan) private plan_; function GetIdByAddr(address addr) public view returns(uint256) { } function GetPlayerByUid(uint256 uid) public view returns(uint256,uint256,uint256,uint256,uint256,uint256,uint256) { } function GetPlanByUid(uint256 uid) public view returns(uint256[],uint256[],uint256[],uint256[],uint256[],bool[]) { } function GetPlanTimeByUid(uint256 uid) public view returns(uint256[]) { } constructor() public { } function register_(address addr, uint256 _affCode) private{ } // this function called every time anyone sends a transaction to this contract function () isActivated() external payable { } function invest(uint256 _affCode, uint256 _planId) isActivated() public payable { } function withdraw() isActivated() public payable { } function distributeRef(uint256 _eth, uint256 _affID) private{ } }
(role==9),"Must be admin."
361,525
(role==9)
"This operator is not authorized"
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; // modification: allow Suspense --> User contract Payoutable is IPayoutable, Holdable { struct OrderedPayout { string instructions; PayoutStatusCode status; } mapping(bytes32 => OrderedPayout) private orderedPayouts; mapping(address => mapping(address => bool)) private payoutOperators; address public payoutAgent; address public suspenseAccount; constructor(address _suspenseAccount) public { } function orderPayout(string calldata operationId, uint256 value, string calldata instructions) external returns (bool) { } function orderPayoutFrom( string calldata operationId, address walletToBePaidOut, uint256 value, string calldata instructions ) external returns (bool) { require(walletToBePaidOut != address(0), "walletToBePaidOut address must not be zero address"); require(<FILL_ME>) emit PayoutOrdered( msg.sender, operationId, walletToBePaidOut, value, instructions ); return _orderPayout( msg.sender, operationId, walletToBePaidOut, value, instructions ); } function cancelPayout(string calldata operationId) external returns (bool) { } function processPayout(string calldata operationId) external returns (bool) { } function putFundsInSuspenseInPayout(string calldata operationId) external returns (bool) { } event PayoutFundsReady(string operationId, uint256 amount, string instructions); function transferPayoutToSuspenseAccount(string calldata operationId) external returns (bool) { } // New event PayoutFundsReturned(string operationId); function returnPayoutFromSuspenseAccount(string calldata operationId) external returns (bool) { } function executePayout(string calldata operationId) external returns (bool) { } function rejectPayout(string calldata operationId, string calldata reason) external returns (bool) { } function retrievePayoutData(string calldata operationId) external view returns ( address walletToDebit, uint256 value, string memory instructions, PayoutStatusCode status ) { } function isPayoutOperatorFor(address operator, address from) external view returns (bool) { } function authorizePayoutOperator(address operator) external returns (bool) { } function revokePayoutOperator(address operator) external returns (bool) { } function _orderPayout( address orderer, string memory operationId, address walletToBePaidOut, uint256 value, string memory instructions ) internal returns (bool) { } }
payoutOperators[walletToBePaidOut][msg.sender],"This operator is not authorized"
361,568
payoutOperators[walletToBePaidOut][msg.sender]
"The operator is already authorized"
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; // modification: allow Suspense --> User contract Payoutable is IPayoutable, Holdable { struct OrderedPayout { string instructions; PayoutStatusCode status; } mapping(bytes32 => OrderedPayout) private orderedPayouts; mapping(address => mapping(address => bool)) private payoutOperators; address public payoutAgent; address public suspenseAccount; constructor(address _suspenseAccount) public { } function orderPayout(string calldata operationId, uint256 value, string calldata instructions) external returns (bool) { } function orderPayoutFrom( string calldata operationId, address walletToBePaidOut, uint256 value, string calldata instructions ) external returns (bool) { } function cancelPayout(string calldata operationId) external returns (bool) { } function processPayout(string calldata operationId) external returns (bool) { } function putFundsInSuspenseInPayout(string calldata operationId) external returns (bool) { } event PayoutFundsReady(string operationId, uint256 amount, string instructions); function transferPayoutToSuspenseAccount(string calldata operationId) external returns (bool) { } // New event PayoutFundsReturned(string operationId); function returnPayoutFromSuspenseAccount(string calldata operationId) external returns (bool) { } function executePayout(string calldata operationId) external returns (bool) { } function rejectPayout(string calldata operationId, string calldata reason) external returns (bool) { } function retrievePayoutData(string calldata operationId) external view returns ( address walletToDebit, uint256 value, string memory instructions, PayoutStatusCode status ) { } function isPayoutOperatorFor(address operator, address from) external view returns (bool) { } function authorizePayoutOperator(address operator) external returns (bool) { require(<FILL_ME>) payoutOperators[msg.sender][operator] = true; emit AuthorizedPayoutOperator(operator, msg.sender); return true; } function revokePayoutOperator(address operator) external returns (bool) { } function _orderPayout( address orderer, string memory operationId, address walletToBePaidOut, uint256 value, string memory instructions ) internal returns (bool) { } }
payoutOperators[msg.sender][operator]==false,"The operator is already authorized"
361,568
payoutOperators[msg.sender][operator]==false
"The operator is already not authorized"
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; // modification: allow Suspense --> User contract Payoutable is IPayoutable, Holdable { struct OrderedPayout { string instructions; PayoutStatusCode status; } mapping(bytes32 => OrderedPayout) private orderedPayouts; mapping(address => mapping(address => bool)) private payoutOperators; address public payoutAgent; address public suspenseAccount; constructor(address _suspenseAccount) public { } function orderPayout(string calldata operationId, uint256 value, string calldata instructions) external returns (bool) { } function orderPayoutFrom( string calldata operationId, address walletToBePaidOut, uint256 value, string calldata instructions ) external returns (bool) { } function cancelPayout(string calldata operationId) external returns (bool) { } function processPayout(string calldata operationId) external returns (bool) { } function putFundsInSuspenseInPayout(string calldata operationId) external returns (bool) { } event PayoutFundsReady(string operationId, uint256 amount, string instructions); function transferPayoutToSuspenseAccount(string calldata operationId) external returns (bool) { } // New event PayoutFundsReturned(string operationId); function returnPayoutFromSuspenseAccount(string calldata operationId) external returns (bool) { } function executePayout(string calldata operationId) external returns (bool) { } function rejectPayout(string calldata operationId, string calldata reason) external returns (bool) { } function retrievePayoutData(string calldata operationId) external view returns ( address walletToDebit, uint256 value, string memory instructions, PayoutStatusCode status ) { } function isPayoutOperatorFor(address operator, address from) external view returns (bool) { } function authorizePayoutOperator(address operator) external returns (bool) { } function revokePayoutOperator(address operator) external returns (bool) { require(<FILL_ME>) payoutOperators[msg.sender][operator] = false; emit RevokedPayoutOperator(operator, msg.sender); return true; } function _orderPayout( address orderer, string memory operationId, address walletToBePaidOut, uint256 value, string memory instructions ) internal returns (bool) { } }
payoutOperators[msg.sender][operator],"The operator is already not authorized"
361,568
payoutOperators[msg.sender][operator]
"Instructions must not be empty"
// SPDX-License-Identifier: MIT pragma solidity >=0.5.0; // modification: allow Suspense --> User contract Payoutable is IPayoutable, Holdable { struct OrderedPayout { string instructions; PayoutStatusCode status; } mapping(bytes32 => OrderedPayout) private orderedPayouts; mapping(address => mapping(address => bool)) private payoutOperators; address public payoutAgent; address public suspenseAccount; constructor(address _suspenseAccount) public { } function orderPayout(string calldata operationId, uint256 value, string calldata instructions) external returns (bool) { } function orderPayoutFrom( string calldata operationId, address walletToBePaidOut, uint256 value, string calldata instructions ) external returns (bool) { } function cancelPayout(string calldata operationId) external returns (bool) { } function processPayout(string calldata operationId) external returns (bool) { } function putFundsInSuspenseInPayout(string calldata operationId) external returns (bool) { } event PayoutFundsReady(string operationId, uint256 amount, string instructions); function transferPayoutToSuspenseAccount(string calldata operationId) external returns (bool) { } // New event PayoutFundsReturned(string operationId); function returnPayoutFromSuspenseAccount(string calldata operationId) external returns (bool) { } function executePayout(string calldata operationId) external returns (bool) { } function rejectPayout(string calldata operationId, string calldata reason) external returns (bool) { } function retrievePayoutData(string calldata operationId) external view returns ( address walletToDebit, uint256 value, string memory instructions, PayoutStatusCode status ) { } function isPayoutOperatorFor(address operator, address from) external view returns (bool) { } function authorizePayoutOperator(address operator) external returns (bool) { } function revokePayoutOperator(address operator) external returns (bool) { } function _orderPayout( address orderer, string memory operationId, address walletToBePaidOut, uint256 value, string memory instructions ) internal returns (bool) { OrderedPayout storage newPayout = orderedPayouts[operationId.toHash()]; require(<FILL_ME>) newPayout.instructions = instructions; newPayout.status = PayoutStatusCode.Ordered; return _hold( operationId, orderer, walletToBePaidOut, suspenseAccount, payoutAgent, value, 0 ); } }
!instructions.isEmpty(),"Instructions must not be empty"
361,568
!instructions.isEmpty()
"Max Claim for Company Exceeds"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.7.0; contract KangarooHeroes is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public kangarooHeroesPrice = 0.07 ether; //0.07 ETH uint public maxKangarooHeroesPerWallet = 5; address public companyWallet; uint256 public MAX_KANGAROO_HEROES = 5000; bool public saleIsActive = false; uint256 public totalCompanyClaimed; mapping(uint256 => bool) public isReserved; string public reservedURI; bool public isRevealed; string public placeholder = "ipfs://QmQrGNUwXPJVRtW81xwvtoGUK7xsBjHc8a3iUSqoLVw1gf"; constructor(address _companyWallet) ERC721("KangarooHeroes", "KangarooHeroes") { } function claimCompanyReserve(uint256 noOfItems) public onlyOwner{ require(<FILL_ME>) for(uint256 i=0;i< noOfItems;i++){ uint mintIndex = totalSupply(); _mint(msg.sender,mintIndex); isReserved[mintIndex] = true; } totalCompanyClaimed = totalCompanyClaimed.add(noOfItems); } function setPrice(uint256 _price)public onlyOwner{ } function setPlaceholder(string memory _placeholder)public onlyOwner{ } function withdraw() public onlyOwner { } function setRevealed(bool _isRevealed) public onlyOwner { } function setURIs(string memory baseURI) public onlyOwner { } function setReserveURI(string memory uri) public onlyOwner { } /* * Pause sale if active, make active if paused */ function flipSaleState() public onlyOwner { } function setMaxKangarooHeroesPerWallet(uint num) public onlyOwner { } function mint(uint numberOfTokens) public payable { } function _mintKangarooHeroes(address to) internal { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
noOfItems.add(totalCompanyClaimed)<=556,"Max Claim for Company Exceeds"
361,635
noOfItems.add(totalCompanyClaimed)<=556
"Purchase would exceed max supply of KangarooHeroes"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.7.0; contract KangarooHeroes is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public kangarooHeroesPrice = 0.07 ether; //0.07 ETH uint public maxKangarooHeroesPerWallet = 5; address public companyWallet; uint256 public MAX_KANGAROO_HEROES = 5000; bool public saleIsActive = false; uint256 public totalCompanyClaimed; mapping(uint256 => bool) public isReserved; string public reservedURI; bool public isRevealed; string public placeholder = "ipfs://QmQrGNUwXPJVRtW81xwvtoGUK7xsBjHc8a3iUSqoLVw1gf"; constructor(address _companyWallet) ERC721("KangarooHeroes", "KangarooHeroes") { } function claimCompanyReserve(uint256 noOfItems) public onlyOwner{ } function setPrice(uint256 _price)public onlyOwner{ } function setPlaceholder(string memory _placeholder)public onlyOwner{ } function withdraw() public onlyOwner { } function setRevealed(bool _isRevealed) public onlyOwner { } function setURIs(string memory baseURI) public onlyOwner { } function setReserveURI(string memory uri) public onlyOwner { } /* * Pause sale if active, make active if paused */ function flipSaleState() public onlyOwner { } function setMaxKangarooHeroesPerWallet(uint num) public onlyOwner { } function mint(uint numberOfTokens) public payable { require(numberOfTokens> 0, "invalid no of tokens"); require(saleIsActive, "Sale must be active to mint KangarooHeroes"); require(<FILL_ME>) require(balanceOf(msg.sender) <= maxKangarooHeroesPerWallet, "Max Hold Limit Exceeds"); for(uint i = 0; i < numberOfTokens; i++) { _mintKangarooHeroes(msg.sender); } uint256 bal = address(this).balance; payable(companyWallet).transfer(bal); } function _mintKangarooHeroes(address to) internal { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
totalSupply().add(numberOfTokens)<=MAX_KANGAROO_HEROES,"Purchase would exceed max supply of KangarooHeroes"
361,635
totalSupply().add(numberOfTokens)<=MAX_KANGAROO_HEROES
"Max Hold Limit Exceeds"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.7.0; contract KangarooHeroes is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public kangarooHeroesPrice = 0.07 ether; //0.07 ETH uint public maxKangarooHeroesPerWallet = 5; address public companyWallet; uint256 public MAX_KANGAROO_HEROES = 5000; bool public saleIsActive = false; uint256 public totalCompanyClaimed; mapping(uint256 => bool) public isReserved; string public reservedURI; bool public isRevealed; string public placeholder = "ipfs://QmQrGNUwXPJVRtW81xwvtoGUK7xsBjHc8a3iUSqoLVw1gf"; constructor(address _companyWallet) ERC721("KangarooHeroes", "KangarooHeroes") { } function claimCompanyReserve(uint256 noOfItems) public onlyOwner{ } function setPrice(uint256 _price)public onlyOwner{ } function setPlaceholder(string memory _placeholder)public onlyOwner{ } function withdraw() public onlyOwner { } function setRevealed(bool _isRevealed) public onlyOwner { } function setURIs(string memory baseURI) public onlyOwner { } function setReserveURI(string memory uri) public onlyOwner { } /* * Pause sale if active, make active if paused */ function flipSaleState() public onlyOwner { } function setMaxKangarooHeroesPerWallet(uint num) public onlyOwner { } function mint(uint numberOfTokens) public payable { require(numberOfTokens> 0, "invalid no of tokens"); require(saleIsActive, "Sale must be active to mint KangarooHeroes"); require(totalSupply().add(numberOfTokens) <= MAX_KANGAROO_HEROES, "Purchase would exceed max supply of KangarooHeroes"); require(<FILL_ME>) for(uint i = 0; i < numberOfTokens; i++) { _mintKangarooHeroes(msg.sender); } uint256 bal = address(this).balance; payable(companyWallet).transfer(bal); } function _mintKangarooHeroes(address to) internal { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
balanceOf(msg.sender)<=maxKangarooHeroesPerWallet,"Max Hold Limit Exceeds"
361,635
balanceOf(msg.sender)<=maxKangarooHeroesPerWallet
"ERC20: burn amount exceeds balance"
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract GovERC20 { /// @notice EIP-20 token name for this token string public constant name = "SeenHaus Governance"; /// @notice EIP-20 token symbol for this token string public constant symbol = "xSEEN"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; uint public totalSupply; mapping (address => mapping (address => uint96)) internal allowances; mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { } function _mint(address account, uint amount) internal virtual { } function _burn(address account, uint amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account); require(<FILL_ME>) balances[account] -= uint96(amount); totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { } function _delegate(address delegator, address delegatee) internal { } function _transferTokens(address src, address dst, uint96 amount) internal { } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { } function getChainId() internal view returns (uint) { } function _beforeTokenTransfer(address from) internal virtual { } } interface IWETH { function deposit() external payable; } interface Sushiswap { function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); } contract SeenHaus is GovERC20(){ address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant sushiswap = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F; IERC20 public constant seen = IERC20(0xCa3FE04C7Ee111F0bbb02C328c699226aCf9Fd33); // accounts balances are locked for 3 days after entering mapping(address => uint256) locked; constructor() { } function _beforeTokenTransfer(address from) internal view override { } // Enter the haus. Pay some SEENs. Earn some shares. function enter(uint256 _amount) public { } // Leave the haus. Claim back your SEENs. function leave(uint256 _share) public { } function swap() public { } receive() external payable {} }
balances[account]>=uint96(amount),"ERC20: burn amount exceeds balance"
361,654
balances[account]>=uint96(amount)
"transfer:too soon after minting"
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract GovERC20 { /// @notice EIP-20 token name for this token string public constant name = "SeenHaus Governance"; /// @notice EIP-20 token symbol for this token string public constant symbol = "xSEEN"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; uint public totalSupply; mapping (address => mapping (address => uint96)) internal allowances; mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { } function _mint(address account, uint amount) internal virtual { } function _burn(address account, uint amount) internal virtual { } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { } function _delegate(address delegator, address delegatee) internal { } function _transferTokens(address src, address dst, uint96 amount) internal { } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { } function getChainId() internal view returns (uint) { } function _beforeTokenTransfer(address from) internal virtual { } } interface IWETH { function deposit() external payable; } interface Sushiswap { function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external returns (uint256[] memory amounts); } contract SeenHaus is GovERC20(){ address public constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant sushiswap = 0xd9e1cE17f2641f24aE83637ab66a2cca9C378B9F; IERC20 public constant seen = IERC20(0xCa3FE04C7Ee111F0bbb02C328c699226aCf9Fd33); // accounts balances are locked for 3 days after entering mapping(address => uint256) locked; constructor() { } function _beforeTokenTransfer(address from) internal view override { require(<FILL_ME>) } // Enter the haus. Pay some SEENs. Earn some shares. function enter(uint256 _amount) public { } // Leave the haus. Claim back your SEENs. function leave(uint256 _share) public { } function swap() public { } receive() external payable {} }
locked[from]<=block.timestamp,"transfer:too soon after minting"
361,654
locked[from]<=block.timestamp
"Flagged as sniper!"
/* $$$$$$$$\ $$$$$$$$\ $$$$$$$$\ $$$$$$\ $$\ $$\ \__$$ __|$$ _____|\__$$ __|$$ __$$\ $$ | $$ | $$ | $$ | $$ | $$ / \__|$$ | $$ | $$ | $$$$$\ $$ | \$$$$$$\ $$ | $$ | $$ | $$ __| $$ | \____$$\ $$ | $$ | $$ | $$ | $$ | $$\ $$ |$$ | $$ | $$ | $$$$$$$$\ $$ | \$$$$$$ |\$$$$$$ | \__| \________| \__| \______/ \______/ Tetsu Inu $TETSU */ // SPDX-License-Identifier: None pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract TetsuInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => uint256) private _buyMap; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _excludedFromFee; mapping (address => bool) private snipers; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _marketingFeeAddr; address payable private _devFeeAddr; string private constant _name = "Tetsu Inu"; string private constant _symbol = "TETSU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function originalPurchase(address account) public view returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function setMaxTx(uint256 maxTransactionAmount) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (!_isBuy(from)) { // taxes 25% on sells that occur within 24h of buy time if (_buyMap[from] != 0 && (_buyMap[from] + (24 hours) >= block.timestamp)) { _feeAddr1 = 1; _feeAddr2 = 15; } else { _feeAddr1 = 1; _feeAddr2 = 9; } } else { if (_buyMap[to] == 0) { _buyMap[to] = block.timestamp; } _feeAddr1 = 1; _feeAddr2 = 9; } if (from != owner() && to != owner()) { require(<FILL_ME>) if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _excludedFromFee[to] && cooldownEnabled) { // cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } // taxes function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function banSniper(address[] memory sniper) public onlyOwner { } function removeStrictTxLimit() public onlyOwner { } function unbanSniper(address not_sniper) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function updateMaxTx(uint256 fee) public onlyOwner { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() external { } function manualsend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _isBuy(address _sender) private view returns (bool) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
!snipers[from],"Flagged as sniper!"
361,680
!snipers[from]
null
/* $$$$$$$$\ $$$$$$$$\ $$$$$$$$\ $$$$$$\ $$\ $$\ \__$$ __|$$ _____|\__$$ __|$$ __$$\ $$ | $$ | $$ | $$ | $$ | $$ / \__|$$ | $$ | $$ | $$$$$\ $$ | \$$$$$$\ $$ | $$ | $$ | $$ __| $$ | \____$$\ $$ | $$ | $$ | $$ | $$ | $$\ $$ |$$ | $$ | $$ | $$$$$$$$\ $$ | \$$$$$$ |\$$$$$$ | \__| \________| \__| \______/ \______/ Tetsu Inu $TETSU */ // SPDX-License-Identifier: None pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract TetsuInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => uint256) private _buyMap; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _excludedFromFee; mapping (address => bool) private snipers; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _marketingFeeAddr; address payable private _devFeeAddr; string private constant _name = "Tetsu Inu"; string private constant _symbol = "TETSU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function originalPurchase(address account) public view returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function setMaxTx(uint256 maxTransactionAmount) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } // taxes function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function banSniper(address[] memory sniper) public onlyOwner { } function removeStrictTxLimit() public onlyOwner { } function unbanSniper(address not_sniper) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function updateMaxTx(uint256 fee) public onlyOwner { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function manualswap() external { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _isBuy(address _sender) private view returns (bool) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
_msgSender()==_marketingFeeAddr
361,680
_msgSender()==_marketingFeeAddr
'Treasury: need more permission'
pragma solidity ^0.6.0; /** * @title Basis Cash Treasury contract * @notice Monetary policy logic to adjust supplies of basis cash assets * @author Summer Smith & Rick Sanchez */ contract Treasury is ContractGuard, Epoch { using FixedPoint for *; using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; using Safe112 for uint112; /* ========== STATE VARIABLES ========== */ // ========== FLAGS bool public migrated = false; bool public initialized = false; // ========== CORE address public fund; address public cash; address public bond; address public share; address public curve; address public boardroom; address public bondOracle; address public seigniorageOracle; // ========== PARAMS uint256 public cashPriceOne; uint256 public lastBondOracleEpoch = 0; uint256 public cashConversionLimit = 0; uint256 public accumulatedSeigniorage = 0; uint256 public accumulatedCashConversion = 0; uint256 public fundAllocationRate = 2; // % /* ========== CONSTRUCTOR ========== */ constructor( address _cash, address _bond, address _share, address _bondOracle, address _seigniorageOracle, address _boardroom, address _fund, address _curve, uint256 _startTime ) public Epoch(1 days, _startTime, 0) { } /* =================== Modifier =================== */ modifier checkMigration { } modifier checkOperator { require(<FILL_ME>) _; } modifier updatePrice { } /* ========== VIEW FUNCTIONS ========== */ // budget function getReserve() public view returns (uint256) { } function circulatingSupply() public view returns (uint256) { } function getCeilingPrice() public view returns (uint256) { } // oracle function getBondOraclePrice() public view returns (uint256) { } function getSeigniorageOraclePrice() public view returns (uint256) { } function _getCashPrice(address oracle) internal view returns (uint256) { } /* ========== GOVERNANCE ========== */ // MIGRATION function initialize() public checkOperator { } function migrate(address target) public onlyOperator checkOperator { } // FUND function setFund(address newFund) public onlyOperator { } function setFundAllocationRate(uint256 newRate) public onlyOperator { } // ORACLE function setBondOracle(address newOracle) public onlyOperator { } function setSeigniorageOracle(address newOracle) public onlyOperator { } // TWEAK function setCeilingCurve(address newCurve) public onlyOperator { } /* ========== MUTABLE FUNCTIONS ========== */ function _updateConversionLimit(uint256 cashPrice) internal { } function _updateCashPrice() internal { } function buyBonds(uint256 amount, uint256 targetPrice) external onlyOneBlock checkMigration checkStartTime checkOperator updatePrice { } function redeemBonds(uint256 amount) external onlyOneBlock checkMigration checkStartTime checkOperator updatePrice { } function allocateSeigniorage() external onlyOneBlock checkMigration checkStartTime checkEpoch checkOperator { } /* ========== EVENTS ========== */ // GOV event Initialized(address indexed executor, uint256 at); event Migration(address indexed target); event ContributionPoolChanged( address indexed operator, address oldFund, address newFund ); event ContributionPoolRateChanged( address indexed operator, uint256 oldRate, uint256 newRate ); event BondOracleChanged( address indexed operator, address oldOracle, address newOracle ); event SeigniorageOracleChanged( address indexed operator, address oldOracle, address newOracle ); event CeilingCurveChanged( address indexed operator, address oldCurve, address newCurve ); // CORE event RedeemedBonds(address indexed from, uint256 amount); event BoughtBonds(address indexed from, uint256 amount); event TreasuryFunded(uint256 timestamp, uint256 seigniorage); event BoardroomFunded(uint256 timestamp, uint256 seigniorage); event ContributionPoolFunded(uint256 timestamp, uint256 seigniorage); }
IBasisAsset(cash).operator()==address(this)&&IBasisAsset(bond).operator()==address(this)&&IBasisAsset(share).operator()==address(this)&&Operator(boardroom).operator()==address(this),'Treasury: need more permission'
361,807
IBasisAsset(cash).operator()==address(this)&&IBasisAsset(bond).operator()==address(this)&&IBasisAsset(share).operator()==address(this)&&Operator(boardroom).operator()==address(this)
'Treasury: treasury has no more budget'
pragma solidity ^0.6.0; /** * @title Basis Cash Treasury contract * @notice Monetary policy logic to adjust supplies of basis cash assets * @author Summer Smith & Rick Sanchez */ contract Treasury is ContractGuard, Epoch { using FixedPoint for *; using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; using Safe112 for uint112; /* ========== STATE VARIABLES ========== */ // ========== FLAGS bool public migrated = false; bool public initialized = false; // ========== CORE address public fund; address public cash; address public bond; address public share; address public curve; address public boardroom; address public bondOracle; address public seigniorageOracle; // ========== PARAMS uint256 public cashPriceOne; uint256 public lastBondOracleEpoch = 0; uint256 public cashConversionLimit = 0; uint256 public accumulatedSeigniorage = 0; uint256 public accumulatedCashConversion = 0; uint256 public fundAllocationRate = 2; // % /* ========== CONSTRUCTOR ========== */ constructor( address _cash, address _bond, address _share, address _bondOracle, address _seigniorageOracle, address _boardroom, address _fund, address _curve, uint256 _startTime ) public Epoch(1 days, _startTime, 0) { } /* =================== Modifier =================== */ modifier checkMigration { } modifier checkOperator { } modifier updatePrice { } /* ========== VIEW FUNCTIONS ========== */ // budget function getReserve() public view returns (uint256) { } function circulatingSupply() public view returns (uint256) { } function getCeilingPrice() public view returns (uint256) { } // oracle function getBondOraclePrice() public view returns (uint256) { } function getSeigniorageOraclePrice() public view returns (uint256) { } function _getCashPrice(address oracle) internal view returns (uint256) { } /* ========== GOVERNANCE ========== */ // MIGRATION function initialize() public checkOperator { } function migrate(address target) public onlyOperator checkOperator { } // FUND function setFund(address newFund) public onlyOperator { } function setFundAllocationRate(uint256 newRate) public onlyOperator { } // ORACLE function setBondOracle(address newOracle) public onlyOperator { } function setSeigniorageOracle(address newOracle) public onlyOperator { } // TWEAK function setCeilingCurve(address newCurve) public onlyOperator { } /* ========== MUTABLE FUNCTIONS ========== */ function _updateConversionLimit(uint256 cashPrice) internal { } function _updateCashPrice() internal { } function buyBonds(uint256 amount, uint256 targetPrice) external onlyOneBlock checkMigration checkStartTime checkOperator updatePrice { } function redeemBonds(uint256 amount) external onlyOneBlock checkMigration checkStartTime checkOperator updatePrice { require(amount > 0, 'Treasury: cannot redeem bonds with zero amount'); uint256 cashPrice = _getCashPrice(bondOracle); require( cashPrice > getCeilingPrice(), // price > $1.05 'Treasury: cashPrice not eligible for bond purchase' ); require(<FILL_ME>) accumulatedSeigniorage = accumulatedSeigniorage.sub( Math.min(accumulatedSeigniorage, amount) ); IBasisAsset(bond).burnFrom(msg.sender, amount); IERC20(cash).safeTransfer(msg.sender, amount); emit RedeemedBonds(msg.sender, amount); } function allocateSeigniorage() external onlyOneBlock checkMigration checkStartTime checkEpoch checkOperator { } /* ========== EVENTS ========== */ // GOV event Initialized(address indexed executor, uint256 at); event Migration(address indexed target); event ContributionPoolChanged( address indexed operator, address oldFund, address newFund ); event ContributionPoolRateChanged( address indexed operator, uint256 oldRate, uint256 newRate ); event BondOracleChanged( address indexed operator, address oldOracle, address newOracle ); event SeigniorageOracleChanged( address indexed operator, address oldOracle, address newOracle ); event CeilingCurveChanged( address indexed operator, address oldCurve, address newCurve ); // CORE event RedeemedBonds(address indexed from, uint256 amount); event BoughtBonds(address indexed from, uint256 amount); event TreasuryFunded(uint256 timestamp, uint256 seigniorage); event BoardroomFunded(uint256 timestamp, uint256 seigniorage); event ContributionPoolFunded(uint256 timestamp, uint256 seigniorage); }
IERC20(cash).balanceOf(address(this))>=amount,'Treasury: treasury has no more budget'
361,807
IERC20(cash).balanceOf(address(this))>=amount
"!canHarvest"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/IVault.sol"; import "./interfaces/IController.sol"; import "./interfaces/IHarvester.sol"; import "./interfaces/ILegacyController.sol"; import "./interfaces/IManager.sol"; import "./interfaces/IStrategy.sol"; import "./interfaces/ISwap.sol"; /** * @title Harvester * @notice This contract is to be used as a central point to call * harvest on all strategies for any given vault. It has its own * permissions for harvesters (set by the strategist or governance). */ contract Harvester is IHarvester { using SafeMath for uint256; uint256 public constant ONE_HUNDRED_PERCENT = 10000; IManager public immutable override manager; IController public immutable controller; ILegacyController public immutable legacyController; uint256 public override slippage; struct Strategy { uint256 timeout; uint256 lastCalled; address[] addresses; } mapping(address => Strategy) public strategies; mapping(address => bool) public isHarvester; /** * @notice Logged when harvest is called for a strategy */ event Harvest( address indexed controller, address indexed strategy ); /** * @notice Logged when a harvester is set */ event HarvesterSet(address indexed harvester, bool status); /** * @notice Logged when a strategy is added for a vault */ event StrategyAdded(address indexed vault, address indexed strategy, uint256 timeout); /** * @notice Logged when a strategy is removed for a vault */ event StrategyRemoved(address indexed vault, address indexed strategy, uint256 timeout); /** * @param _manager The address of the yAxisMetaVaultManager contract * @param _controller The address of the controller */ constructor( address _manager, address _controller, address _legacyController ) public { } /** * (GOVERNANCE|STRATEGIST)-ONLY FUNCTIONS */ /** * @notice Adds a strategy to the rotation for a given vault and sets a timeout * @param _vault The address of the vault * @param _strategy The address of the strategy * @param _timeout The timeout between harvests */ function addStrategy( address _vault, address _strategy, uint256 _timeout ) external override onlyController { } /** * @notice Removes a strategy from the rotation for a given vault and sets a timeout * @param _vault The address of the vault * @param _strategy The address of the strategy * @param _timeout The timeout between harvests */ function removeStrategy( address _vault, address _strategy, uint256 _timeout ) external override onlyController { } /** * @notice Sets the status of a harvester address to be able to call harvest functions * @param _harvester The address of the harvester * @param _status The status to allow the harvester to harvest */ function setHarvester( address _harvester, bool _status ) external onlyStrategist { } function setSlippage( uint256 _slippage ) external onlyStrategist { } /** * HARVESTER-ONLY FUNCTIONS */ function earn( address _strategy, address _vault ) external onlyHarvester { } /** * @notice Harvests a given strategy on the provided controller * @dev This function ignores the timeout * @param _controller The address of the controller * @param _strategy The address of the strategy * @param _estimates The estimated outputs from swaps during harvest */ function harvest( IController _controller, address _strategy, uint256[] calldata _estimates ) public onlyHarvester { } /** * @notice Harvests the next available strategy for a given vault and * rotates the strategies * @param _vault The address of the vault * @param _estimates The estimated outputs from swaps during harvest */ function harvestNextStrategy( address _vault, uint256[] calldata _estimates ) external { require(<FILL_ME>) address strategy = strategies[_vault].addresses[0]; harvest(controller, strategy, _estimates); uint256 k = strategies[_vault].addresses.length; if (k > 1) { address[] memory _strategies = new address[](k); for (uint i; i < k-1; i++) { _strategies[i] = strategies[_vault].addresses[i+1]; } _strategies[k-1] = strategy; strategies[_vault].addresses = _strategies; } // solhint-disable-next-line not-rely-on-time strategies[_vault].lastCalled = block.timestamp; } /** * @notice Earns tokens in the LegacyController to the v3 vault * @param _expected The expected amount to deposit after conversion */ function legacyEarn( uint256 _expected ) external onlyHarvester { } /** * EXTERNAL VIEW FUNCTIONS */ /** * @notice Returns the addresses of the strategies for a given vault * @param _vault The address of the vault */ function strategyAddresses( address _vault ) external view returns (address[] memory) { } /** * PUBLIC VIEW FUNCTIONS */ /** * @notice Returns the availability of a vault's strategy to be harvested * @param _vault The address of the vault */ function canHarvest( address _vault ) public view returns (bool) { } /** * @notice Returns the estimated amount of WETH and YAXIS for the given strategy * @param _strategy The address of the strategy */ function getEstimates( address _strategy ) public view returns (uint256[] memory _estimates) { } /** * MODIFIERS */ modifier onlyController() { } modifier onlyHarvester() { } modifier onlyStrategist() { } }
canHarvest(_vault),"!canHarvest"
361,823
canHarvest(_vault)
"!controller"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/IVault.sol"; import "./interfaces/IController.sol"; import "./interfaces/IHarvester.sol"; import "./interfaces/ILegacyController.sol"; import "./interfaces/IManager.sol"; import "./interfaces/IStrategy.sol"; import "./interfaces/ISwap.sol"; /** * @title Harvester * @notice This contract is to be used as a central point to call * harvest on all strategies for any given vault. It has its own * permissions for harvesters (set by the strategist or governance). */ contract Harvester is IHarvester { using SafeMath for uint256; uint256 public constant ONE_HUNDRED_PERCENT = 10000; IManager public immutable override manager; IController public immutable controller; ILegacyController public immutable legacyController; uint256 public override slippage; struct Strategy { uint256 timeout; uint256 lastCalled; address[] addresses; } mapping(address => Strategy) public strategies; mapping(address => bool) public isHarvester; /** * @notice Logged when harvest is called for a strategy */ event Harvest( address indexed controller, address indexed strategy ); /** * @notice Logged when a harvester is set */ event HarvesterSet(address indexed harvester, bool status); /** * @notice Logged when a strategy is added for a vault */ event StrategyAdded(address indexed vault, address indexed strategy, uint256 timeout); /** * @notice Logged when a strategy is removed for a vault */ event StrategyRemoved(address indexed vault, address indexed strategy, uint256 timeout); /** * @param _manager The address of the yAxisMetaVaultManager contract * @param _controller The address of the controller */ constructor( address _manager, address _controller, address _legacyController ) public { } /** * (GOVERNANCE|STRATEGIST)-ONLY FUNCTIONS */ /** * @notice Adds a strategy to the rotation for a given vault and sets a timeout * @param _vault The address of the vault * @param _strategy The address of the strategy * @param _timeout The timeout between harvests */ function addStrategy( address _vault, address _strategy, uint256 _timeout ) external override onlyController { } /** * @notice Removes a strategy from the rotation for a given vault and sets a timeout * @param _vault The address of the vault * @param _strategy The address of the strategy * @param _timeout The timeout between harvests */ function removeStrategy( address _vault, address _strategy, uint256 _timeout ) external override onlyController { } /** * @notice Sets the status of a harvester address to be able to call harvest functions * @param _harvester The address of the harvester * @param _status The status to allow the harvester to harvest */ function setHarvester( address _harvester, bool _status ) external onlyStrategist { } function setSlippage( uint256 _slippage ) external onlyStrategist { } /** * HARVESTER-ONLY FUNCTIONS */ function earn( address _strategy, address _vault ) external onlyHarvester { } /** * @notice Harvests a given strategy on the provided controller * @dev This function ignores the timeout * @param _controller The address of the controller * @param _strategy The address of the strategy * @param _estimates The estimated outputs from swaps during harvest */ function harvest( IController _controller, address _strategy, uint256[] calldata _estimates ) public onlyHarvester { } /** * @notice Harvests the next available strategy for a given vault and * rotates the strategies * @param _vault The address of the vault * @param _estimates The estimated outputs from swaps during harvest */ function harvestNextStrategy( address _vault, uint256[] calldata _estimates ) external { } /** * @notice Earns tokens in the LegacyController to the v3 vault * @param _expected The expected amount to deposit after conversion */ function legacyEarn( uint256 _expected ) external onlyHarvester { } /** * EXTERNAL VIEW FUNCTIONS */ /** * @notice Returns the addresses of the strategies for a given vault * @param _vault The address of the vault */ function strategyAddresses( address _vault ) external view returns (address[] memory) { } /** * PUBLIC VIEW FUNCTIONS */ /** * @notice Returns the availability of a vault's strategy to be harvested * @param _vault The address of the vault */ function canHarvest( address _vault ) public view returns (bool) { } /** * @notice Returns the estimated amount of WETH and YAXIS for the given strategy * @param _strategy The address of the strategy */ function getEstimates( address _strategy ) public view returns (uint256[] memory _estimates) { } /** * MODIFIERS */ modifier onlyController() { require(<FILL_ME>) _; } modifier onlyHarvester() { } modifier onlyStrategist() { } }
manager.allowedControllers(msg.sender),"!controller"
361,823
manager.allowedControllers(msg.sender)
"!harvester"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/IVault.sol"; import "./interfaces/IController.sol"; import "./interfaces/IHarvester.sol"; import "./interfaces/ILegacyController.sol"; import "./interfaces/IManager.sol"; import "./interfaces/IStrategy.sol"; import "./interfaces/ISwap.sol"; /** * @title Harvester * @notice This contract is to be used as a central point to call * harvest on all strategies for any given vault. It has its own * permissions for harvesters (set by the strategist or governance). */ contract Harvester is IHarvester { using SafeMath for uint256; uint256 public constant ONE_HUNDRED_PERCENT = 10000; IManager public immutable override manager; IController public immutable controller; ILegacyController public immutable legacyController; uint256 public override slippage; struct Strategy { uint256 timeout; uint256 lastCalled; address[] addresses; } mapping(address => Strategy) public strategies; mapping(address => bool) public isHarvester; /** * @notice Logged when harvest is called for a strategy */ event Harvest( address indexed controller, address indexed strategy ); /** * @notice Logged when a harvester is set */ event HarvesterSet(address indexed harvester, bool status); /** * @notice Logged when a strategy is added for a vault */ event StrategyAdded(address indexed vault, address indexed strategy, uint256 timeout); /** * @notice Logged when a strategy is removed for a vault */ event StrategyRemoved(address indexed vault, address indexed strategy, uint256 timeout); /** * @param _manager The address of the yAxisMetaVaultManager contract * @param _controller The address of the controller */ constructor( address _manager, address _controller, address _legacyController ) public { } /** * (GOVERNANCE|STRATEGIST)-ONLY FUNCTIONS */ /** * @notice Adds a strategy to the rotation for a given vault and sets a timeout * @param _vault The address of the vault * @param _strategy The address of the strategy * @param _timeout The timeout between harvests */ function addStrategy( address _vault, address _strategy, uint256 _timeout ) external override onlyController { } /** * @notice Removes a strategy from the rotation for a given vault and sets a timeout * @param _vault The address of the vault * @param _strategy The address of the strategy * @param _timeout The timeout between harvests */ function removeStrategy( address _vault, address _strategy, uint256 _timeout ) external override onlyController { } /** * @notice Sets the status of a harvester address to be able to call harvest functions * @param _harvester The address of the harvester * @param _status The status to allow the harvester to harvest */ function setHarvester( address _harvester, bool _status ) external onlyStrategist { } function setSlippage( uint256 _slippage ) external onlyStrategist { } /** * HARVESTER-ONLY FUNCTIONS */ function earn( address _strategy, address _vault ) external onlyHarvester { } /** * @notice Harvests a given strategy on the provided controller * @dev This function ignores the timeout * @param _controller The address of the controller * @param _strategy The address of the strategy * @param _estimates The estimated outputs from swaps during harvest */ function harvest( IController _controller, address _strategy, uint256[] calldata _estimates ) public onlyHarvester { } /** * @notice Harvests the next available strategy for a given vault and * rotates the strategies * @param _vault The address of the vault * @param _estimates The estimated outputs from swaps during harvest */ function harvestNextStrategy( address _vault, uint256[] calldata _estimates ) external { } /** * @notice Earns tokens in the LegacyController to the v3 vault * @param _expected The expected amount to deposit after conversion */ function legacyEarn( uint256 _expected ) external onlyHarvester { } /** * EXTERNAL VIEW FUNCTIONS */ /** * @notice Returns the addresses of the strategies for a given vault * @param _vault The address of the vault */ function strategyAddresses( address _vault ) external view returns (address[] memory) { } /** * PUBLIC VIEW FUNCTIONS */ /** * @notice Returns the availability of a vault's strategy to be harvested * @param _vault The address of the vault */ function canHarvest( address _vault ) public view returns (bool) { } /** * @notice Returns the estimated amount of WETH and YAXIS for the given strategy * @param _strategy The address of the strategy */ function getEstimates( address _strategy ) public view returns (uint256[] memory _estimates) { } /** * MODIFIERS */ modifier onlyController() { } modifier onlyHarvester() { require(<FILL_ME>) _; } modifier onlyStrategist() { } }
isHarvester[msg.sender],"!harvester"
361,823
isHarvester[msg.sender]
null
pragma solidity ^0.4.17; contract NovaLabInterface { function bornFamedStar(uint lc) external constant returns(bool) {} } contract NovaAccessControl { mapping (address => bool) managers; address cfoAddress; function NovaAccessControl() public { } modifier onlyManager() { } function setManager(address _newManager) external onlyManager { } function removeManager(address mangerAddress) external onlyManager { } function updateCfo(address newCfoAddress) external onlyManager { } } contract FamedStar is NovaAccessControl { struct Star { bytes32 name; uint mass; uint lc; address owner; } address public labAddress; address public novaAddress; Star[] stars; mapping (bytes32 => uint) public famedStarNameToIds; mapping (uint => uint) public famedStarMassToIds; function FamedStar() public { } function _bytes32ToString(bytes32 x) internal pure returns (string) { } function _stringToBytes32(string source) internal pure returns (bytes32 result) { } function updateLabAddress(address addr) external onlyManager { } function updateNovaAddress(address addr) external onlyManager { } function addFamedStar(string name, uint mass, uint lc) external onlyManager { } function _addFamedStar(string name, uint mass, uint lc) internal { require(<FILL_ME>) var bN = _stringToBytes32(name); // no repeat on name require(famedStarNameToIds[bN] == 0); // no repeat on mass require(famedStarMassToIds[mass] == 0); var id = stars.push(Star({ name: bN, mass: mass, lc: lc, owner: 0x0 })) - 1; famedStarNameToIds[bN] = id; famedStarMassToIds[mass] = id; } function getFamedStarByID(uint id) public constant returns(uint starID, string name, uint mass, address owner) { } function getFamedStarByName(string n) public constant returns(uint starID, string name, uint mass, address owner) { } function getFamedStarByMass(uint m) public constant returns(uint starID, string name, uint mass, address owner) { } function updateFamedStarOwner(uint id, address newOwner) external { } function bornFamedStar(address userAddress, uint mass) external returns(uint id, bytes32 name) { } }
bytes(name).length<=32
361,877
bytes(name).length<=32
null
pragma solidity ^0.4.17; contract NovaLabInterface { function bornFamedStar(uint lc) external constant returns(bool) {} } contract NovaAccessControl { mapping (address => bool) managers; address cfoAddress; function NovaAccessControl() public { } modifier onlyManager() { } function setManager(address _newManager) external onlyManager { } function removeManager(address mangerAddress) external onlyManager { } function updateCfo(address newCfoAddress) external onlyManager { } } contract FamedStar is NovaAccessControl { struct Star { bytes32 name; uint mass; uint lc; address owner; } address public labAddress; address public novaAddress; Star[] stars; mapping (bytes32 => uint) public famedStarNameToIds; mapping (uint => uint) public famedStarMassToIds; function FamedStar() public { } function _bytes32ToString(bytes32 x) internal pure returns (string) { } function _stringToBytes32(string source) internal pure returns (bytes32 result) { } function updateLabAddress(address addr) external onlyManager { } function updateNovaAddress(address addr) external onlyManager { } function addFamedStar(string name, uint mass, uint lc) external onlyManager { } function _addFamedStar(string name, uint mass, uint lc) internal { require(bytes(name).length <= 32); var bN = _stringToBytes32(name); // no repeat on name require(<FILL_ME>) // no repeat on mass require(famedStarMassToIds[mass] == 0); var id = stars.push(Star({ name: bN, mass: mass, lc: lc, owner: 0x0 })) - 1; famedStarNameToIds[bN] = id; famedStarMassToIds[mass] = id; } function getFamedStarByID(uint id) public constant returns(uint starID, string name, uint mass, address owner) { } function getFamedStarByName(string n) public constant returns(uint starID, string name, uint mass, address owner) { } function getFamedStarByMass(uint m) public constant returns(uint starID, string name, uint mass, address owner) { } function updateFamedStarOwner(uint id, address newOwner) external { } function bornFamedStar(address userAddress, uint mass) external returns(uint id, bytes32 name) { } }
famedStarNameToIds[bN]==0
361,877
famedStarNameToIds[bN]==0
null
pragma solidity ^0.4.17; contract NovaLabInterface { function bornFamedStar(uint lc) external constant returns(bool) {} } contract NovaAccessControl { mapping (address => bool) managers; address cfoAddress; function NovaAccessControl() public { } modifier onlyManager() { } function setManager(address _newManager) external onlyManager { } function removeManager(address mangerAddress) external onlyManager { } function updateCfo(address newCfoAddress) external onlyManager { } } contract FamedStar is NovaAccessControl { struct Star { bytes32 name; uint mass; uint lc; address owner; } address public labAddress; address public novaAddress; Star[] stars; mapping (bytes32 => uint) public famedStarNameToIds; mapping (uint => uint) public famedStarMassToIds; function FamedStar() public { } function _bytes32ToString(bytes32 x) internal pure returns (string) { } function _stringToBytes32(string source) internal pure returns (bytes32 result) { } function updateLabAddress(address addr) external onlyManager { } function updateNovaAddress(address addr) external onlyManager { } function addFamedStar(string name, uint mass, uint lc) external onlyManager { } function _addFamedStar(string name, uint mass, uint lc) internal { require(bytes(name).length <= 32); var bN = _stringToBytes32(name); // no repeat on name require(famedStarNameToIds[bN] == 0); // no repeat on mass require(<FILL_ME>) var id = stars.push(Star({ name: bN, mass: mass, lc: lc, owner: 0x0 })) - 1; famedStarNameToIds[bN] = id; famedStarMassToIds[mass] = id; } function getFamedStarByID(uint id) public constant returns(uint starID, string name, uint mass, address owner) { } function getFamedStarByName(string n) public constant returns(uint starID, string name, uint mass, address owner) { } function getFamedStarByMass(uint m) public constant returns(uint starID, string name, uint mass, address owner) { } function updateFamedStarOwner(uint id, address newOwner) external { } function bornFamedStar(address userAddress, uint mass) external returns(uint id, bytes32 name) { } }
famedStarMassToIds[mass]==0
361,877
famedStarMassToIds[mass]==0
"Transfer failed"
pragma solidity 0.6.2; contract PreSale is ReentrancyGuard, Ownable { using Address for address payable; ERC20Token public token; /// Sale phases timings. /// /// Phase 1 starts from Monday, 02-Nov-20 08:00:00 UTC and end at Wednesday, 04-Nov-20 07:59:59 UTC /// while token rate during this phase is ~ 0.000077 i.e 1 ETH = 13000 tokens. /// /// Phase 2 starts from Wednesday, 04-Nov-20 08:00:00 UTC and end at Friday, 06-Nov-20 07:59:59 UTC /// while token rate during this phase is ~ 0.00009 i.e 1 ETH = 11000 tokens. /// /// Phase 3 starts from Friday, 06-Nov-20 08:00:00 UTC and end at Sunday, 08-Nov-20 08:00:00 UTC /// while token rate during this phase is ~ 0.00011 i.e 1 ETH = 9000 tokens. uint256 constant public PHASE_ONE_START_TIME = 1604304000; /// Monday, 02-Nov-20 08:00:00 UTC uint256 constant public PHASE_TWO_START_TIME = 1604476800; /// Wednesday, 04-Nov-20 08:00:00 UTC uint256 constant public PHASE_THREE_START_TIME = 1604649600; /// Friday, 06-Nov-20 08:00:00 UTC uint256 constant public PHASE_THREE_END_TIME = 1604822400; /// Sunday, 08-Nov-20 08:00:00 UTC /// Multiplier to provide precision. uint256 constant public MULTIPLIER = 10 ** 18; /// Rates for different phases of the sale. uint256 constant public PHASE_ONE_RATE = 13000 * MULTIPLIER; /// i.e 13000 tokens = 1 ETH. uint256 constant public PHASE_TWO_RATE = 11000 * MULTIPLIER; /// i.e 11000 tokens = 1 ETH. uint256 constant public PHASE_THREE_RATE = 9000 * MULTIPLIER; /// i.e 9000 tokens = 1 ETH. /// Address receives the funds collected from the sale. address public fundsReceiver; /// Boolean variable to provide the status of sale finalization. bool public isSaleFinalized; /// Event emitted when tokens are bought by the investor. event TokensBought(address indexed _beneficiary, uint256 _amount); /// Even emitted when sale is finalized. event SaleFinalized(); /// @dev fallback function to receives ETH. receive() external payable { } /// @dev Constructor to set initial values for the contract. /// /// @param _tokenAddress Address of the token that gets distributed. /// @param _fundsReceiver Address that receives the funds collected from the sale. constructor(address _tokenAddress, address _fundsReceiver) public { } /// @dev Used to buy tokens using ETH. It is only allowed to call when sale is running. /// ex - Alice sends 2 ETH. /// If Phase 1 is running Alice receives 2 * 13000 i.e 26000 tokens whilst `fundsReceiver` /// will get 2 ETH. /// If Phase 2 is running Alice receives 2 * 11000 i.e 22000 tokens whilst `fundsReceiver` /// will get 2 ETH. /// If Phase 3 is running Alice receives 2 * 11000 i.e 9000 tokens whilst `fundsReceiver` /// will get 2 ETH. function buyTokens() public payable nonReentrant { // Check whether sale is in running or not. _hasSaleRunning(); // Check for the 0 value. require(msg.value > 0, "Zero investments aren't allowed"); // Fetch the current rate as per the phases. uint256 rate = getCurrentRate(); // Calculate the amount of tokens to sale. uint256 tokensToSale = (rate * msg.value) / MULTIPLIER; // Sends funds to funds collector wallet. address(uint160(fundsReceiver)).sendValue(msg.value); // Tokens get transfered from this contract to the buyer. require(<FILL_ME>) // Emit event. emit TokensBought(msg.sender, tokensToSale); } /// @dev Finalize the sale. Only be called by the owner of the contract. /// It can only be called after the sale ends and it burns the remaining /// tokens after completing the sale duration. function finalizeSale() public onlyOwner { } /// @dev Public getter to fetch the current rate as per the running phase. function getCurrentRate() public view returns(uint256 _rate) { } function _hasSaleRunning() internal view { } function _checkForZeroAddress(address _target) internal pure { } }
token.transfer(msg.sender,tokensToSale),"Transfer failed"
361,921
token.transfer(msg.sender,tokensToSale)
"Already finalized"
pragma solidity 0.6.2; contract PreSale is ReentrancyGuard, Ownable { using Address for address payable; ERC20Token public token; /// Sale phases timings. /// /// Phase 1 starts from Monday, 02-Nov-20 08:00:00 UTC and end at Wednesday, 04-Nov-20 07:59:59 UTC /// while token rate during this phase is ~ 0.000077 i.e 1 ETH = 13000 tokens. /// /// Phase 2 starts from Wednesday, 04-Nov-20 08:00:00 UTC and end at Friday, 06-Nov-20 07:59:59 UTC /// while token rate during this phase is ~ 0.00009 i.e 1 ETH = 11000 tokens. /// /// Phase 3 starts from Friday, 06-Nov-20 08:00:00 UTC and end at Sunday, 08-Nov-20 08:00:00 UTC /// while token rate during this phase is ~ 0.00011 i.e 1 ETH = 9000 tokens. uint256 constant public PHASE_ONE_START_TIME = 1604304000; /// Monday, 02-Nov-20 08:00:00 UTC uint256 constant public PHASE_TWO_START_TIME = 1604476800; /// Wednesday, 04-Nov-20 08:00:00 UTC uint256 constant public PHASE_THREE_START_TIME = 1604649600; /// Friday, 06-Nov-20 08:00:00 UTC uint256 constant public PHASE_THREE_END_TIME = 1604822400; /// Sunday, 08-Nov-20 08:00:00 UTC /// Multiplier to provide precision. uint256 constant public MULTIPLIER = 10 ** 18; /// Rates for different phases of the sale. uint256 constant public PHASE_ONE_RATE = 13000 * MULTIPLIER; /// i.e 13000 tokens = 1 ETH. uint256 constant public PHASE_TWO_RATE = 11000 * MULTIPLIER; /// i.e 11000 tokens = 1 ETH. uint256 constant public PHASE_THREE_RATE = 9000 * MULTIPLIER; /// i.e 9000 tokens = 1 ETH. /// Address receives the funds collected from the sale. address public fundsReceiver; /// Boolean variable to provide the status of sale finalization. bool public isSaleFinalized; /// Event emitted when tokens are bought by the investor. event TokensBought(address indexed _beneficiary, uint256 _amount); /// Even emitted when sale is finalized. event SaleFinalized(); /// @dev fallback function to receives ETH. receive() external payable { } /// @dev Constructor to set initial values for the contract. /// /// @param _tokenAddress Address of the token that gets distributed. /// @param _fundsReceiver Address that receives the funds collected from the sale. constructor(address _tokenAddress, address _fundsReceiver) public { } /// @dev Used to buy tokens using ETH. It is only allowed to call when sale is running. /// ex - Alice sends 2 ETH. /// If Phase 1 is running Alice receives 2 * 13000 i.e 26000 tokens whilst `fundsReceiver` /// will get 2 ETH. /// If Phase 2 is running Alice receives 2 * 11000 i.e 22000 tokens whilst `fundsReceiver` /// will get 2 ETH. /// If Phase 3 is running Alice receives 2 * 11000 i.e 9000 tokens whilst `fundsReceiver` /// will get 2 ETH. function buyTokens() public payable nonReentrant { } /// @dev Finalize the sale. Only be called by the owner of the contract. /// It can only be called after the sale ends and it burns the remaining /// tokens after completing the sale duration. function finalizeSale() public onlyOwner { // Ensure sale ended. require(now > PHASE_THREE_END_TIME, "Sale has not end yet"); // Should not already be finalized. require(<FILL_ME>) // Fetch the remaining tokens those are owned by the contract. uint256 remainingTokens = token.balanceOf(address(this)); // Call burn function to burn the remaining tokens amount. token.burn(remainingTokens); // Set finalized status to be true as it not repeatatedly called. isSaleFinalized = true; // Emit even. emit SaleFinalized(); } /// @dev Public getter to fetch the current rate as per the running phase. function getCurrentRate() public view returns(uint256 _rate) { } function _hasSaleRunning() internal view { } function _checkForZeroAddress(address _target) internal pure { } }
!isSaleFinalized,"Already finalized"
361,921
!isSaleFinalized
"too much"
pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.8.0; contract RunescapeLoot is ERC721URIStorage, Ownable{ event MintLoot (address indexed summoner, uint256 startWith, uint256 times); uint256 public totalLoot; uint256 public totalCount = 8888; uint256 public maxBatch = 1; uint256 public price = 0; string public baseURI; uint addressRegistryCount; constructor(string memory name_, string memory symbol_, string memory baseURI_) ERC721(name_, symbol_) { } function totalSupply() public view virtual returns (uint256) { } function _baseURI() internal view virtual override returns (string memory){ } function setBaseURI(string memory _newURI) public onlyOwner { } function setTokenURI(uint256 _tokenId, string memory _tokenURI) public onlyOwner { } function claim(uint256 _times) public { require(_times >0 && _times <= maxBatch, "one at a time"); require(<FILL_ME>) emit MintLoot(_msgSender(), totalLoot+1, _times); for(uint256 i=0; i< _times; i++){ _mint(_msgSender(), 1 + totalLoot++); } } function adminMint(uint256 _times) public onlyOwner { } }
totalLoot+_times<=totalCount,"too much"
362,091
totalLoot+_times<=totalCount
"Not allowed to claim"
// SPDX-License-Identifier: MIT /* ████████╗██╗ ██╗███████╗ ╚══██╔══╝██║ ██║██╔════╝ ██║ ███████║█████╗ ██║ ██╔══██║██╔══╝ ██║ ██║ ██║███████╗ ╚═╝ ╚═╝ ╚═╝╚══════╝ ██╗ ██╗██╗ ██╗███╗ ███╗ █████╗ ███╗ ██╗ ██████╗ ██╗██████╗ ███████╗ ██║ ██║██║ ██║████╗ ████║██╔══██╗████╗ ██║██╔═══██╗██║██╔══██╗██╔════╝ ███████║██║ ██║██╔████╔██║███████║██╔██╗ ██║██║ ██║██║██║ ██║███████╗ ██╔══██║██║ ██║██║╚██╔╝██║██╔══██║██║╚██╗██║██║ ██║██║██║ ██║╚════██║ ██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ██║██║ ╚████║╚██████╔╝██║██████╔╝███████║ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝╚═════╝ ╚══════╝ The Humanoids Staking Reward Contract, earning $10 ION per day */ pragma solidity =0.8.11; import "./OwnableTokenAccessControl.sol"; import "./IStakingReward.sol"; import "./IERC20Mint.sol"; contract TheHumanoidsStakingReward is OwnableTokenAccessControl, IStakingReward { uint256 public constant REWARD_RATE_PER_DAY = 10 ether; uint256 public stakingRewardEndTimestamp = 1736152962; mapping(address => uint256) private _stakeData; // packed bits balance:208 timestamp:34 stakedCount:14 address private constant STAKING_ADDRESS = address(0x3d6a1F739e471c61328Eb8a8D8d998E591C0FD42); address private constant TOKEN_ADDRESS = address(0x831dAA3B72576867cD66319259bf022AFB1D9211); /// @dev Emitted when `account` claims `amount` of reward. event Claim(address indexed account, uint256 amount); function setStakingRewardEndTimestamp(uint256 timestamp) external onlyOwner { } modifier onlyStaking() { } function _reward(uint256 timestampFrom, uint256 timestampTo) internal pure returns (uint256) { } function reward(uint256 timestampFrom, uint256 timestampTo) external view returns (uint256) { } function timestampUntilRewardAmount(uint256 targetRewardAmount, uint256 stakedCount, uint256 timestampFrom) public view returns (uint256) { } function stakedTokensBalanceOf(address account) external view returns (uint256 stakedCount) { } function lastClaimTimestampOf(address account) external view returns (uint256 lastClaimTimestamp) { } function rawStakeDataOf(address account) external view returns (uint256 stakeData) { } function _calculateRewards(uint256 stakeData, uint256 unclaimedBalance) internal view returns (uint256, uint256, uint256) { } function willStakeTokens(address account, uint16[] calldata tokenIds) external override onlyStaking { } function willUnstakeTokens(address account, uint16[] calldata tokenIds) external override onlyStaking { } function willBeReplacedByContract(address /*stakingRewardContract*/) external override onlyStaking { } function didReplaceContract(address /*stakingRewardContract*/) external override onlyStaking { } function stakeDataOf(address account) external view returns (uint256) { } function claimStakeDataFor(address account) external returns (uint256) { uint256 stakeData = _stakeData[account]; if (stakeData != 0) { require(<FILL_ME>) (uint256 unclaimedBalance, uint256 timestamp, uint256 stakedCount) = _calculateRewards(stakeData, stakeData >> 48); stakeData = (unclaimedBalance << 48) | (timestamp << 14) | (stakedCount); delete _stakeData[account]; } return stakeData; } function _claim(address account, uint256 amount) private { } function _transfer(address account, address to, uint256 amount) internal { } function claimRewardsAmount(uint256 amount) external { } function claimRewards() external { } // ERC20 compatible functions function balanceOf(address account) external view returns (uint256) { } function transfer(address to, uint256 amount) external returns (bool) { } function transferFrom(address account, address to, uint256 amount) external returns (bool) { } function burn(uint256 amount) external { } function burnFrom(address account, uint256 amount) external { } }
_hasAccess(Access.Claim,_msgSender()),"Not allowed to claim"
362,143
_hasAccess(Access.Claim,_msgSender())
"Not allowed to transfer"
// SPDX-License-Identifier: MIT /* ████████╗██╗ ██╗███████╗ ╚══██╔══╝██║ ██║██╔════╝ ██║ ███████║█████╗ ██║ ██╔══██║██╔══╝ ██║ ██║ ██║███████╗ ╚═╝ ╚═╝ ╚═╝╚══════╝ ██╗ ██╗██╗ ██╗███╗ ███╗ █████╗ ███╗ ██╗ ██████╗ ██╗██████╗ ███████╗ ██║ ██║██║ ██║████╗ ████║██╔══██╗████╗ ██║██╔═══██╗██║██╔══██╗██╔════╝ ███████║██║ ██║██╔████╔██║███████║██╔██╗ ██║██║ ██║██║██║ ██║███████╗ ██╔══██║██║ ██║██║╚██╔╝██║██╔══██║██║╚██╗██║██║ ██║██║██║ ██║╚════██║ ██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ██║██║ ╚████║╚██████╔╝██║██████╔╝███████║ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝╚═════╝ ╚══════╝ The Humanoids Staking Reward Contract, earning $10 ION per day */ pragma solidity =0.8.11; import "./OwnableTokenAccessControl.sol"; import "./IStakingReward.sol"; import "./IERC20Mint.sol"; contract TheHumanoidsStakingReward is OwnableTokenAccessControl, IStakingReward { uint256 public constant REWARD_RATE_PER_DAY = 10 ether; uint256 public stakingRewardEndTimestamp = 1736152962; mapping(address => uint256) private _stakeData; // packed bits balance:208 timestamp:34 stakedCount:14 address private constant STAKING_ADDRESS = address(0x3d6a1F739e471c61328Eb8a8D8d998E591C0FD42); address private constant TOKEN_ADDRESS = address(0x831dAA3B72576867cD66319259bf022AFB1D9211); /// @dev Emitted when `account` claims `amount` of reward. event Claim(address indexed account, uint256 amount); function setStakingRewardEndTimestamp(uint256 timestamp) external onlyOwner { } modifier onlyStaking() { } function _reward(uint256 timestampFrom, uint256 timestampTo) internal pure returns (uint256) { } function reward(uint256 timestampFrom, uint256 timestampTo) external view returns (uint256) { } function timestampUntilRewardAmount(uint256 targetRewardAmount, uint256 stakedCount, uint256 timestampFrom) public view returns (uint256) { } function stakedTokensBalanceOf(address account) external view returns (uint256 stakedCount) { } function lastClaimTimestampOf(address account) external view returns (uint256 lastClaimTimestamp) { } function rawStakeDataOf(address account) external view returns (uint256 stakeData) { } function _calculateRewards(uint256 stakeData, uint256 unclaimedBalance) internal view returns (uint256, uint256, uint256) { } function willStakeTokens(address account, uint16[] calldata tokenIds) external override onlyStaking { } function willUnstakeTokens(address account, uint16[] calldata tokenIds) external override onlyStaking { } function willBeReplacedByContract(address /*stakingRewardContract*/) external override onlyStaking { } function didReplaceContract(address /*stakingRewardContract*/) external override onlyStaking { } function stakeDataOf(address account) external view returns (uint256) { } function claimStakeDataFor(address account) external returns (uint256) { } function _claim(address account, uint256 amount) private { } function _transfer(address account, address to, uint256 amount) internal { } function claimRewardsAmount(uint256 amount) external { } function claimRewards() external { } // ERC20 compatible functions function balanceOf(address account) external view returns (uint256) { } function transfer(address to, uint256 amount) external returns (bool) { } function transferFrom(address account, address to, uint256 amount) external returns (bool) { require(<FILL_ME>) _transfer(account, to, amount); return true; } function burn(uint256 amount) external { } function burnFrom(address account, uint256 amount) external { } }
_hasAccess(Access.Transfer,_msgSender()),"Not allowed to transfer"
362,143
_hasAccess(Access.Transfer,_msgSender())
"Not allowed to burn"
// SPDX-License-Identifier: MIT /* ████████╗██╗ ██╗███████╗ ╚══██╔══╝██║ ██║██╔════╝ ██║ ███████║█████╗ ██║ ██╔══██║██╔══╝ ██║ ██║ ██║███████╗ ╚═╝ ╚═╝ ╚═╝╚══════╝ ██╗ ██╗██╗ ██╗███╗ ███╗ █████╗ ███╗ ██╗ ██████╗ ██╗██████╗ ███████╗ ██║ ██║██║ ██║████╗ ████║██╔══██╗████╗ ██║██╔═══██╗██║██╔══██╗██╔════╝ ███████║██║ ██║██╔████╔██║███████║██╔██╗ ██║██║ ██║██║██║ ██║███████╗ ██╔══██║██║ ██║██║╚██╔╝██║██╔══██║██║╚██╗██║██║ ██║██║██║ ██║╚════██║ ██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ██║██║ ╚████║╚██████╔╝██║██████╔╝███████║ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝╚═════╝ ╚══════╝ The Humanoids Staking Reward Contract, earning $10 ION per day */ pragma solidity =0.8.11; import "./OwnableTokenAccessControl.sol"; import "./IStakingReward.sol"; import "./IERC20Mint.sol"; contract TheHumanoidsStakingReward is OwnableTokenAccessControl, IStakingReward { uint256 public constant REWARD_RATE_PER_DAY = 10 ether; uint256 public stakingRewardEndTimestamp = 1736152962; mapping(address => uint256) private _stakeData; // packed bits balance:208 timestamp:34 stakedCount:14 address private constant STAKING_ADDRESS = address(0x3d6a1F739e471c61328Eb8a8D8d998E591C0FD42); address private constant TOKEN_ADDRESS = address(0x831dAA3B72576867cD66319259bf022AFB1D9211); /// @dev Emitted when `account` claims `amount` of reward. event Claim(address indexed account, uint256 amount); function setStakingRewardEndTimestamp(uint256 timestamp) external onlyOwner { } modifier onlyStaking() { } function _reward(uint256 timestampFrom, uint256 timestampTo) internal pure returns (uint256) { } function reward(uint256 timestampFrom, uint256 timestampTo) external view returns (uint256) { } function timestampUntilRewardAmount(uint256 targetRewardAmount, uint256 stakedCount, uint256 timestampFrom) public view returns (uint256) { } function stakedTokensBalanceOf(address account) external view returns (uint256 stakedCount) { } function lastClaimTimestampOf(address account) external view returns (uint256 lastClaimTimestamp) { } function rawStakeDataOf(address account) external view returns (uint256 stakeData) { } function _calculateRewards(uint256 stakeData, uint256 unclaimedBalance) internal view returns (uint256, uint256, uint256) { } function willStakeTokens(address account, uint16[] calldata tokenIds) external override onlyStaking { } function willUnstakeTokens(address account, uint16[] calldata tokenIds) external override onlyStaking { } function willBeReplacedByContract(address /*stakingRewardContract*/) external override onlyStaking { } function didReplaceContract(address /*stakingRewardContract*/) external override onlyStaking { } function stakeDataOf(address account) external view returns (uint256) { } function claimStakeDataFor(address account) external returns (uint256) { } function _claim(address account, uint256 amount) private { } function _transfer(address account, address to, uint256 amount) internal { } function claimRewardsAmount(uint256 amount) external { } function claimRewards() external { } // ERC20 compatible functions function balanceOf(address account) external view returns (uint256) { } function transfer(address to, uint256 amount) external returns (bool) { } function transferFrom(address account, address to, uint256 amount) external returns (bool) { } function burn(uint256 amount) external { } function burnFrom(address account, uint256 amount) external { require(<FILL_ME>) _claim(account, amount); } }
_hasAccess(Access.Burn,_msgSender()),"Not allowed to burn"
362,143
_hasAccess(Access.Burn,_msgSender())
null
pragma solidity ^0.4.16; contract SuperEOS { string public name = "SuperEOS"; string public symbol = "SPEOS"; uint8 public decimals = 6; uint256 public totalSupply; bool public lockAll = false; event Transfer(address indexed from, address indexed to, uint256 value); event FrozenFunds(address target, bool frozen); event OwnerUpdate(address _prevOwner, address _newOwner); address public owner; address internal newOwner = 0x0; mapping (address => bool) public frozens; mapping (address => uint256) public balanceOf; //---------init---------- function SuperEOS() public { } //--------control-------- modifier onlyOwner { } function transferOwnership(address tOwner) onlyOwner public { } function acceptOwnership() public { } function freezeAccount(address target, bool freeze) onlyOwner public { } function freezeAll(bool lock) onlyOwner public { } //-------transfer------- function transfer(address _to, uint256 _value) public { } function _transfer(address _from, address _to, uint _value) internal { require(<FILL_ME>) require(_to != 0x0); require(balanceOf[_from] >= _value); require(balanceOf[_to] + _value >= balanceOf[_to]); require(!frozens[_from]); uint previousBalances = balanceOf[_from] + balanceOf[_to]; balanceOf[_from] -= _value; balanceOf[_to] += _value; emit Transfer(_from, _to, _value); assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } }
!lockAll
362,161
!lockAll
null
pragma solidity ^0.4.16; contract SuperEOS { string public name = "SuperEOS"; string public symbol = "SPEOS"; uint8 public decimals = 6; uint256 public totalSupply; bool public lockAll = false; event Transfer(address indexed from, address indexed to, uint256 value); event FrozenFunds(address target, bool frozen); event OwnerUpdate(address _prevOwner, address _newOwner); address public owner; address internal newOwner = 0x0; mapping (address => bool) public frozens; mapping (address => uint256) public balanceOf; //---------init---------- function SuperEOS() public { } //--------control-------- modifier onlyOwner { } function transferOwnership(address tOwner) onlyOwner public { } function acceptOwnership() public { } function freezeAccount(address target, bool freeze) onlyOwner public { } function freezeAll(bool lock) onlyOwner public { } //-------transfer------- function transfer(address _to, uint256 _value) public { } function _transfer(address _from, address _to, uint _value) internal { require(!lockAll); require(_to != 0x0); require(balanceOf[_from] >= _value); require(balanceOf[_to] + _value >= balanceOf[_to]); require(<FILL_ME>) uint previousBalances = balanceOf[_from] + balanceOf[_to]; balanceOf[_from] -= _value; balanceOf[_to] += _value; emit Transfer(_from, _to, _value); assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } }
!frozens[_from]
362,161
!frozens[_from]
'!UNKNOWN_TOKEN!'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '../NiftyForge/INiftyForge721.sol'; import '../NiftyForge/Modules/NFBaseModule.sol'; import '../NiftyForge/Modules/INFModuleTokenURI.sol'; import '../NiftyForge/Modules/INFModuleRenderTokenURI.sol'; import '../NiftyForge/Modules/INFModuleWithRoyalties.sol'; import '../v2/AstragladeUpgrade.sol'; import '../ERC2981/IERC2981Royalties.sol'; import '../libraries/Randomize.sol'; import '../libraries/Base64.sol'; /// @title PlanetsModule /// @author Simon Fremaux (@dievardump) contract PlanetsModule is Ownable, NFBaseModule, INFModuleTokenURI, INFModuleRenderTokenURI, INFModuleWithRoyalties { // using ECDSA for bytes32; using Strings for uint256; using Randomize for Randomize.Random; uint256 constant SEED_BOUND = 1000000000; // emitted when planets are claimed event PlanetsClaimed(uint256[] tokenIds); // contract actually holding the planets address public planetsContract; // astraglade contract to claim ids from address public astragladeContract; // contract operator next to the owner address public contractOperator = address(0xD1edDfcc4596CC8bD0bd7495beaB9B979fc50336); // project base render URI string private _baseRenderURI; // whenever all images are uploaded on arweave/ipfs and // this flag allows to stop all update of images, scripts etc... bool public frozenMeta; // base image rendering URI // before all Planets are minted, images will be stored on our servers since // they need to be generated after minting // after all planets are minted, they will all be stored in a decentralized way // and the _baseImagesURI will be updated string private _baseImagesURI; // project description string internal _description; address[3] public feeRecipients = [ 0xe4657aF058E3f844919c3ee713DF09c3F2949447, 0xb275E5aa8011eA32506a91449B190213224aEc1e, 0xdAC81C3642b520584eD0E743729F238D1c350E62 ]; mapping(uint256 => bytes32) public planetSeed; // saving already taken seeds to ensure not reusing a seed mapping(uint256 => bool) public seedTaken; modifier onlyOperator() { } function isOperator(address operator) public view returns (bool) { } /// @dev Receive, for royalties receive() external payable {} /// @notice constructor /// @param contractURI_ The contract URI (containing its metadata) - can be empty "" /// @param owner_ Address to whom transfer ownership (can be address(0), then owner is deployer) /// @param astragladeContract_ the contract holding the astraglades constructor( string memory contractURI_, address owner_, address planetsContract_, address astragladeContract_ ) NFBaseModule(contractURI_) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } /// @inheritdoc INFModuleWithRoyalties function royaltyInfo(uint256 tokenId) public view override returns (address, uint256) { } /// @inheritdoc INFModuleWithRoyalties function royaltyInfo(address, uint256) public view override returns (address receiver, uint256 basisPoint) { } /// @inheritdoc INFModuleTokenURI function tokenURI(uint256 tokenId) public view override returns (string memory) { } /// @inheritdoc INFModuleTokenURI function tokenURI(address, uint256 tokenId) public view override returns (string memory) { } /// @notice function that returns a string that can be used to render the current token /// @param tokenId tokenId /// @return the URI to render token function renderTokenURI(uint256 tokenId) public view override returns (string memory) { } /// @notice function that returns a string that can be used to render the current token /// @param tokenId tokenId /// @return the URI to render token function renderTokenURI(address, uint256 tokenId) public view override returns (string memory) { } /// @notice Helper returning all data for a Planet /// @param tokenId the planet id /// @return the planet seed, the astraglade seed and the planet attributes (the integer form) function getPlanetData(uint256 tokenId) public view returns ( uint256, uint256, uint256[] memory ) { require(<FILL_ME>) uint256 seed = uint256(planetSeed[tokenId]) % SEED_BOUND; uint256[] memory attributes = _getAttributes(seed); AstragladeUpgrade.AstragladeMeta memory astraglade = AstragladeUpgrade( payable(astragladeContract) ).getAstraglade(tokenId); return (seed, astraglade.seed, attributes); } /// @notice Returns Metadata for Astraglade id /// @param tokenId the tokenId we want metadata for function getAstraglade(uint256 tokenId) public view returns (AstragladeUpgrade.AstragladeMeta memory astraglade) { } /// @notice helper to get the description function getDescription() public view returns (string memory) { } /// @notice helper to get the baseRenderURI function getBaseRenderURI() public view returns (string memory) { } /// @notice helper to get the baseImageURI function getBaseImageURI() public view returns (string memory) { } /// @inheritdoc INFModule function onAttach() external virtual override(INFModule, NFBaseModule) returns (bool) { } /// @notice Claim tokenIds[] from the astraglade contract /// @param tokenIds the tokenIds to claim function claim(uint256[] calldata tokenIds) external { } /// @notice Allows to freeze any metadata update function freezeMeta() external onlyOperator { } /// @notice sets contract uri /// @param newURI the new uri function setContractURI(string memory newURI) external onlyOperator { } /// @notice sets planets contract /// @param planetsContract_ the contract containing planets function setPlanetsContract(address planetsContract_) external onlyOperator { } /// @notice helper to set the description /// @param newDescription the new description function setDescription(string memory newDescription) external onlyOperator { } /// @notice helper to set the baseRenderURI /// @param newRenderURI the new renderURI function setBaseRenderURI(string memory newRenderURI) external onlyOperator { } /// @notice helper to set the baseImageURI /// @param newBaseImagesURI the new base image URI function setBaseImagesURI(string memory newBaseImagesURI) external onlyOperator { } /// @dev Owner withdraw balance function function withdraw() external onlyOperator { } /// @notice helper to set the fee recipient at `index` /// @param newFeeRecipient the new address /// @param index the index to edit function setFeeRecipient(address newFeeRecipient, uint8 index) external onlyOperator { } /// @notice Helper for an operator to change the current operator address /// @param newOperator the new operator function setContractOperator(address newOperator) external onlyOperator { } /// @dev Allows to claim a tokenId; the Planet will always be minted to the owner of the Astraglade /// @param operator the one launching the claim (needs to be owner or approved on the Astraglade) /// @param tokenId the Astraglade tokenId to claim /// @param astragladeContract_ the Astraglade contract to check ownership /// @param planetsContract_ the Planet contract (where to mint the tokens) function _claim( address operator, uint256 tokenId, address astragladeContract_, address planetsContract_ ) internal { } /// @dev Calculate next seed using a few on chain data /// @param tokenId tokenId /// @param timestamp current block timestamp /// @param operator current operator /// @param blockHash last block hash /// @return a new bytes32 seed function _generateSeed( uint256 tokenId, uint256 timestamp, address operator, bytes32 blockHash ) internal view returns (bytes32) { } /// @notice generates the attributes values according to seed /// @param seed the seed to generate the values /// @return attributes an array of attributes (integers) function _getAttributes(uint256 seed) internal pure returns (uint256[] memory attributes) { } /// @notice Generates the JSON string from the attributes values /// @param attributes the attributes values /// @return jsonAttributes, the string for attributes function _generateJSONAttributes(uint256[] memory attributes) internal pure returns (string memory) { } function _makeAttributes(string memory name_, string memory value) internal pure returns (bytes memory) { } /// @notice returns the URL to render the Planet /// @param seed the planet seed /// @param astragladeSeed the astraglade seed /// @param attributes all attributes needed for the planets /// @return the URI to render the planet function _renderTokenURI( uint256 seed, uint256 astragladeSeed, uint256[] memory attributes ) internal view returns (string memory) { } }
planetSeed[tokenId]!=0,'!UNKNOWN_TOKEN!'
362,176
planetSeed[tokenId]!=0
null
pragma solidity ^0.4.18; // solhint-disable-line contract EmailRegistry { mapping (address => string) public emails; address [] public registeredAddresses; function registerEmail(string email) public{ require(<FILL_ME>) //if previously unregistered, add to list if(bytes(emails[msg.sender]).length==0){ registeredAddresses.push(msg.sender); } emails[msg.sender]=email; } function numRegistered() public constant returns(uint count) { } }
bytes(email).length>0
362,180
bytes(email).length>0
' Already referred '
pragma solidity >=0.4.22 <0.7.0; /** * @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 OwnershipRenounced(address indexed previousOwner); 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) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract bankofether is Ownable{ uint256 overall_invested; struct User{ bool referred; address referred_by; uint256 total_invested_amount; uint256 profit_remaining; uint256 referal_profit; } struct Referal_levels{ uint256 level_1; uint256 level_2; uint256 level_3; uint256 level_4; uint256 level_5; } struct Panel_1{ uint256 invested_amount; uint256 profit; uint256 profit_withdrawn; uint256 start_time; uint256 exp_time; bool time_started; } struct Panel_2{ uint256 invested_amount; uint256 profit; uint256 profit_withdrawn; uint256 start_time; uint256 exp_time; bool time_started; } struct Panel_3{ uint256 invested_amount; uint256 profit; uint256 profit_withdrawn; uint256 start_time; uint256 exp_time; bool time_started; } struct Panel_4{ uint256 invested_amount; uint256 profit; uint256 profit_withdrawn; uint256 start_time; uint256 exp_time; bool time_started; } mapping(address => Panel_1) public panel_1; mapping(address => Panel_2) public panel_2; mapping(address => Panel_3) public panel_3; mapping(address => Panel_4) public panel_4; mapping(address => User) public user_info; mapping(address => Referal_levels) public refer_info; mapping(uint8 => address) public top_10_investors; function top_10() public{ } // -------------------- PANEL 1 ------------------------------- // 6.7% : 45days function invest_panel1() public payable { } function is_plan_completed_p1() public view returns(bool){ } function plan_completed_p1() public returns(bool){ } function current_profit_p1() public view returns(uint256){ } function panel1_days() public view returns(uint256){ } function withdraw_profit_panel1(uint256 amount) public payable { } function is_valid_time() public view returns(bool){ } function l_l1() public view returns(uint256){ } function u_l1() public view returns(uint256){ } function reset_panel_1() private{ } // --------------------------------- PANEL 2 ---------------------- // 8.4% : 30days function invest_panel2() public payable { } function is_plan_completed_p2() public view returns(bool){ } function plan_completed_p2() public returns(bool){ } function current_profit_p2() public view returns(uint256){ } function panel2_days() public view returns(uint256){ } function withdraw_profit_panel2(uint256 amount) public payable { } function is_valid_time_p2() public view returns(bool){ } function l_l2() public view returns(uint256){ } function u_l2() public view returns(uint256){ } function reset_panel_2() private{ } // --------------------------------- PANEL 3 --------------------------- // 10.6% : 20 days function invest_panel3() public payable { } function is_plan_completed_p3() public view returns(bool){ } function plan_completed_p3() public returns(bool){ } function current_profit_p3() public view returns(uint256){ } function panel3_days() public view returns(uint256){ } function withdraw_profit_panel3(uint256 amount) public payable { } function is_valid_time_p3() public view returns(bool){ } function l_l3() public view returns(uint256){ } function u_l3() public view returns(uint256){ } function reset_panel_3() private{ } // --------------------------------------------------------------------------------------------------------------- // -------------------------------------------- PANEL - 4 ------------------------------------------------------- // 12.3 % : 10 days function invest_panel4() public payable { } function is_plan_completed_p4() public view returns(bool){ } function plan_completed_p4() public returns(bool){ } function current_profit_p4() public view returns(uint256){ } function panel4_days() public view returns(uint256){ } function withdraw_profit_panel4(uint256 amount) public payable { } function is_valid_time_p4() public view returns(bool){ } function l_l4() public view returns(uint256){ } function u_l4() public view returns(uint256){ } function reset_panel_4() private{ } // ------------- withdraw remaining profit --------------------- function withdraw_rem_profit(uint256 amt) public payable{ } //------------------- Referal System ------------------------ function refer(address ref_add) public { require(<FILL_ME>) require(ref_add != msg.sender, ' You cannot refer yourself '); user_info[msg.sender].referred_by = ref_add; user_info[msg.sender].referred = true; address level1 = user_info[msg.sender].referred_by; address level2 = user_info[level1].referred_by; address level3 = user_info[level2].referred_by; address level4 = user_info[level3].referred_by; address level5 = user_info[level4].referred_by; if( (level1 != msg.sender) && (level1 != address(0)) ){ refer_info[level1].level_1 += 1; } if( (level2 != msg.sender) && (level2 != address(0)) ){ refer_info[level2].level_2 += 1; } if( (level3 != msg.sender) && (level3 != address(0)) ){ refer_info[level3].level_3 += 1; } if( (level4 != msg.sender) && (level4 != address(0)) ){ refer_info[level4].level_4 += 1; } if( (level5 != msg.sender) && (level5 != address(0)) ){ refer_info[level5].level_5 += 1; } } function referral_system(uint256 amount) private { } function referal_withdraw(uint256 amount) public { } function over_inv() public view returns(uint256){ } function SendETHFromContract(address payable _address, uint256 _amount) public payable onlyOwner returns (bool){ } function SendETHToContract() public payable returns (bool){ } function getBalance() public view returns(uint){ } }
user_info[msg.sender].referred==false,' Already referred '
362,199
user_info[msg.sender].referred==false
'Withdraw must be less than Profit'
pragma solidity >=0.4.22 <0.7.0; /** * @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 OwnershipRenounced(address indexed previousOwner); 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) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract bankofether is Ownable{ uint256 overall_invested; struct User{ bool referred; address referred_by; uint256 total_invested_amount; uint256 profit_remaining; uint256 referal_profit; } struct Referal_levels{ uint256 level_1; uint256 level_2; uint256 level_3; uint256 level_4; uint256 level_5; } struct Panel_1{ uint256 invested_amount; uint256 profit; uint256 profit_withdrawn; uint256 start_time; uint256 exp_time; bool time_started; } struct Panel_2{ uint256 invested_amount; uint256 profit; uint256 profit_withdrawn; uint256 start_time; uint256 exp_time; bool time_started; } struct Panel_3{ uint256 invested_amount; uint256 profit; uint256 profit_withdrawn; uint256 start_time; uint256 exp_time; bool time_started; } struct Panel_4{ uint256 invested_amount; uint256 profit; uint256 profit_withdrawn; uint256 start_time; uint256 exp_time; bool time_started; } mapping(address => Panel_1) public panel_1; mapping(address => Panel_2) public panel_2; mapping(address => Panel_3) public panel_3; mapping(address => Panel_4) public panel_4; mapping(address => User) public user_info; mapping(address => Referal_levels) public refer_info; mapping(uint8 => address) public top_10_investors; function top_10() public{ } // -------------------- PANEL 1 ------------------------------- // 6.7% : 45days function invest_panel1() public payable { } function is_plan_completed_p1() public view returns(bool){ } function plan_completed_p1() public returns(bool){ } function current_profit_p1() public view returns(uint256){ } function panel1_days() public view returns(uint256){ } function withdraw_profit_panel1(uint256 amount) public payable { } function is_valid_time() public view returns(bool){ } function l_l1() public view returns(uint256){ } function u_l1() public view returns(uint256){ } function reset_panel_1() private{ } // --------------------------------- PANEL 2 ---------------------- // 8.4% : 30days function invest_panel2() public payable { } function is_plan_completed_p2() public view returns(bool){ } function plan_completed_p2() public returns(bool){ } function current_profit_p2() public view returns(uint256){ } function panel2_days() public view returns(uint256){ } function withdraw_profit_panel2(uint256 amount) public payable { } function is_valid_time_p2() public view returns(bool){ } function l_l2() public view returns(uint256){ } function u_l2() public view returns(uint256){ } function reset_panel_2() private{ } // --------------------------------- PANEL 3 --------------------------- // 10.6% : 20 days function invest_panel3() public payable { } function is_plan_completed_p3() public view returns(bool){ } function plan_completed_p3() public returns(bool){ } function current_profit_p3() public view returns(uint256){ } function panel3_days() public view returns(uint256){ } function withdraw_profit_panel3(uint256 amount) public payable { } function is_valid_time_p3() public view returns(bool){ } function l_l3() public view returns(uint256){ } function u_l3() public view returns(uint256){ } function reset_panel_3() private{ } // --------------------------------------------------------------------------------------------------------------- // -------------------------------------------- PANEL - 4 ------------------------------------------------------- // 12.3 % : 10 days function invest_panel4() public payable { } function is_plan_completed_p4() public view returns(bool){ } function plan_completed_p4() public returns(bool){ } function current_profit_p4() public view returns(uint256){ } function panel4_days() public view returns(uint256){ } function withdraw_profit_panel4(uint256 amount) public payable { } function is_valid_time_p4() public view returns(bool){ } function l_l4() public view returns(uint256){ } function u_l4() public view returns(uint256){ } function reset_panel_4() private{ } // ------------- withdraw remaining profit --------------------- function withdraw_rem_profit(uint256 amt) public payable{ } //------------------- Referal System ------------------------ function refer(address ref_add) public { } function referral_system(uint256 amount) private { } function referal_withdraw(uint256 amount) public { require(<FILL_ME>) user_info[msg.sender].referal_profit = user_info[msg.sender].referal_profit - amount; msg.sender.transfer(amount); } function over_inv() public view returns(uint256){ } function SendETHFromContract(address payable _address, uint256 _amount) public payable onlyOwner returns (bool){ } function SendETHToContract() public payable returns (bool){ } function getBalance() public view returns(uint){ } }
user_info[msg.sender].referal_profit>=amount,'Withdraw must be less than Profit'
362,199
user_info[msg.sender].referal_profit>=amount
'Purchase exceeds max allowed'
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract FudSociety is ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; bool private presale; bool private sale; uint256 public constant MAX_ITEMS = 9999; uint256 public constant PRICE = 0.09 ether; uint256 public constant MAX_MINT = 20; uint256 public constant MAX_MINT_PRESALE = 2; uint256 public constant MAX_MINT_PRESALE2 = 1; address public constant devAddress = 0x4289bA7bCb5E0885817e47260f2cE4016EaF659e; string public baseTokenURI; mapping(address => bool) private _presaleList; mapping(address => uint256) private _presaleListClaimed; event CreateNft(uint256 indexed id); constructor(string memory baseURI) ERC721("Fud Society", "FUDSOCIETY") { } function addToPresaleList(address[] calldata addresses) external onlyOwner { } function onPresaleList(address addr) external view returns (bool) { } function removeFromPresaleList(address[] calldata addresses) external onlyOwner { } function presaleListClaimedBy(address owner) external view returns (uint256){ } modifier saleIsOpen { } function _totalSupply() internal view returns (uint) { } function totalMint() public view returns (uint256) { } function mintReserve(uint256 _count, address _to) public onlyOwner { } function presaleMint(address _to, uint256 _count) public payable { uint256 total = _totalSupply(); require(presale == true, "Presale has not yet started"); require(_presaleList[_to], 'You are not on the Presale List'); require(<FILL_ME>) require(total <= MAX_ITEMS, "Presale ended"); require(total + _count <= MAX_ITEMS, "Max limit"); require(_count <= MAX_MINT_PRESALE, "Exceeds number"); require(msg.value >= price(_count), "Value below price"); require(total <= MAX_ITEMS, "Sale ended"); for (uint256 i = 0; i < _count; i++) { _presaleListClaimed[_to] += 1; _mintAnElement(_to); } } function mint(address _to, uint256 _count) public payable saleIsOpen { } function _mintAnElement(address _to) private { } function price(uint256 _count) public pure returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function walletOfOwner(address _owner) external view returns (uint256[] memory) { } function pause(bool val) public onlyOwner { } function togglePresale() public onlyOwner { } function toggleSale() public onlyOwner { } function withdrawAll() public payable onlyOwner { } function _widthdraw(address _address, uint256 _amount) private { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
_presaleListClaimed[_to]+_count<=MAX_MINT_PRESALE,'Purchase exceeds max allowed'
362,244
_presaleListClaimed[_to]+_count<=MAX_MINT_PRESALE
null
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.8.11; import "./ConflictResolutionInterface.sol"; import "./ConflictResolutionManager.sol"; import "./Destroyable.sol"; import "./MathUtil.sol"; import "./SafeCast.sol"; import "./SafeMath.sol"; /** * @title Game Channel Base * @dev Base contract for state channel implementation. * @author dicether */ contract GameChannelBase is Destroyable, ConflictResolutionManager { using SafeCast for int; using SafeCast for uint; using SafeMath for int; using SafeMath for uint; /// @dev Different game session states. enum GameStatus { ENDED, ///< @dev Game session is ended. ACTIVE, ///< @dev Game session is active. USER_INITIATED_END, ///< @dev User initiated non regular end. SERVER_INITIATED_END ///< @dev Server initiated non regular end. } /// @dev Reason game session ended. enum ReasonEnded { REGULAR_ENDED, ///< @dev Game session is regularly ended. SERVER_FORCED_END, ///< @dev User did not respond. Server forced end. USER_FORCED_END, ///< @dev Server did not respond. User forced end. CONFLICT_ENDED ///< @dev Server or user raised conflict ans pushed game state, opponent pushed same game state. } struct Game { /// @dev Game session status. GameStatus status; /// @dev User's stake. uint128 stake; /// @dev Last game round info if not regularly ended. /// If game session is ended normally this data is not used. uint8 gameType; uint32 roundId; uint betNum; uint betValue; int balance; bytes32 userSeed; bytes32 serverSeed; uint endInitiatedTime; } /// @dev Minimal time span between profit transfer. uint public constant MIN_TRANSFER_TIMESPAN = 1 days; /// @dev Maximal time span between profit transfer. uint public constant MAX_TRANSFER_TIMSPAN = 6 * 30 days; bytes32 public constant EIP712DOMAIN_TYPEHASH = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); bytes32 public constant BET_TYPEHASH = keccak256( "Bet(uint32 roundId,uint8 gameType,uint256 number,uint256 value,int256 balance,bytes32 serverHash,bytes32 userHash,uint256 gameId)" ); bytes32 public DOMAIN_SEPERATOR; /// @dev Current active game sessions. uint public activeGames = 0; /// @dev Game session id counter. Points to next free game session slot. So gameIdCntr -1 is the // number of game sessions created. uint public gameIdCntr = 1; /// @dev Only this address can accept and end games. address public serverAddress; /// @dev Address to transfer profit to. address payable public houseAddress; /// @dev Current house stake. uint public houseStake = 0; /// @dev House profit since last profit transfer. int public houseProfit = 0; /// @dev Min value user needs to deposit for creating game session. uint128 public minStake; /// @dev Max value user can deposit for creating game session. uint128 public maxStake; /// @dev Timeout until next profit transfer is allowed. uint public profitTransferTimeSpan = 14 days; /// @dev Last time profit transferred to house. uint public lastProfitTransferTimestamp; /// @dev Maps gameId to game struct. mapping (uint => Game) public gameIdGame; /// @dev Maps user address to current user game id. mapping (address => uint) public userGameId; /// @dev Maps user address to pending returns. mapping (address => uint) public pendingReturns; /// @dev Modifier, which only allows to execute if house stake is high enough. modifier onlyValidHouseStake(uint _activeGames) { } /// @dev Modifier to check if value send fulfills user stake requirements. modifier onlyValidValue() { } /// @dev Modifier, which only allows server to call function. modifier onlyServer() { } /// @dev Modifier, which only allows to set valid transfer timeouts. modifier onlyValidTransferTimeSpan(uint transferTimeout) { } /// @dev This event is fired when user creates game session. event LogGameCreated(address indexed user, uint indexed gameId, uint128 stake, bytes32 indexed serverEndHash, bytes32 userEndHash); /// @dev This event is fired when user requests conflict end. event LogUserRequestedEnd(address indexed user, uint indexed gameId); /// @dev This event is fired when server requests conflict end. event LogServerRequestedEnd(address indexed user, uint indexed gameId); /// @dev This event is fired when game session is ended. event LogGameEnded(address indexed user, uint indexed gameId, uint32 roundId, int balance, ReasonEnded reason); /// @dev this event is fired when owner modifies user's stake limits. event LogStakeLimitsModified(uint minStake, uint maxStake); /** * @dev Contract constructor. * @param _serverAddress Server address. * @param _minStake Min value user needs to deposit to create game session. * @param _maxStake Max value user can deposit to create game session. * @param _conflictResAddress Conflict resolution contract address. * @param _houseAddress House address to move profit to. */ constructor( address _serverAddress, uint128 _minStake, uint128 _maxStake, address _conflictResAddress, address payable _houseAddress ) ConflictResolutionManager(_conflictResAddress) { } /** * @dev Set gameIdCntr. Can be only set before activating contract. */ function setGameIdCntr(uint _gameIdCntr) public onlyOwner onlyNotActivated { } /** * @notice Withdraw pending returns. */ function withdraw() public { } /** * @notice Transfer house profit to houseAddress. */ function transferProfitToHouse() public { require(<FILL_ME>) // update last transfer timestamp lastProfitTransferTimestamp = block.timestamp; if (houseProfit <= 0) { // no profit to transfer return; } uint toTransfer = houseProfit.castToUint(); houseProfit = 0; houseStake = houseStake.sub(toTransfer); houseAddress.transfer(toTransfer); } /** * @dev Set profit transfer time span. */ function setProfitTransferTimeSpan(uint _profitTransferTimeSpan) public onlyOwner onlyValidTransferTimeSpan(_profitTransferTimeSpan) { } /** * @dev Increase house stake by msg.value */ function addHouseStake() public payable onlyOwner { } /** * @dev Withdraw house stake. */ function withdrawHouseStake(uint value) public onlyOwner { } /** * @dev Withdraw house stake and profit. */ function withdrawAll() public onlyOwner onlyPausedSince(3 days) { } /** * @dev Set new house address. * @param _houseAddress New house address. */ function setHouseAddress(address payable _houseAddress) public onlyOwner { } /** * @dev Set stake min and max value. * @param _minStake Min stake. * @param _maxStake Max stake. */ function setStakeRequirements(uint128 _minStake, uint128 _maxStake) public onlyOwner { } /** * @dev Close game session. * @param _game Game session data. * @param _gameId Id of game session. * @param _userAddress User's address of game session. * @param _reason Reason for closing game session. * @param _balance Game session balance. */ function closeGame( Game storage _game, uint _gameId, uint32 _roundId, address payable _userAddress, ReasonEnded _reason, int _balance ) internal { } /** * @dev End game by paying out user and server. * @param _userAddress User's address. * @param _stake User's stake. * @param _balance User's balance. */ function payOut(address payable _userAddress, uint128 _stake, int _balance) internal { } /** * @dev Send value of pendingReturns[_address] to _address. * @param _address Address to send value to. */ function safeSend(address payable _address) internal { } /** * @dev Verify signature of given data. Throws on verification failure. * @param _sig Signature of given data in the form of rsv. * @param _address Address of signature signer. */ function verifySig( uint32 _roundId, uint8 _gameType, uint _num, uint _value, int _balance, bytes32 _serverHash, bytes32 _userHash, uint _gameId, address _contractAddress, bytes memory _sig, address _address ) internal view { } /** * @dev Check if _sig is valid signature of _hash. Throws if invalid signature. * @param _hash Hash to check signature of. * @param _sig Signature of _hash. * @param _address Address of signer. */ function verify( bytes32 _hash, bytes memory _sig, address _address ) internal pure { } /** * @dev Calculate typed hash of given data (compare eth_signTypedData). * @return Hash of given data. */ function calcHash( uint32 _roundId, uint8 _gameType, uint _num, uint _value, int _balance, bytes32 _serverHash, bytes32 _userHash, uint _gameId ) private view returns(bytes32) { } /** * @dev Split the given signature of the form rsv in r s v. v is incremented with 27 if * it is below 2. * @param _signature Signature to split. * @return r s v */ function signatureSplit(bytes memory _signature) private pure returns (bytes32 r, bytes32 s, uint8 v) { } }
lastProfitTransferTimestamp.add(profitTransferTimeSpan)<=block.timestamp
362,270
lastProfitTransferTimestamp.add(profitTransferTimeSpan)<=block.timestamp
"Strategy: admin not contract"
// SPDX-License-Identifier: MIT pragma solidity 0.8.11; import "hardhat/console.sol"; import "./interfaces/ICvxBooster.sol"; import "./interfaces/ICvxBaseRewardPool.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract UniversalCurveConvexStrategy is AccessControl { using SafeERC20 for IERC20; using Address for address; constructor(address admin) { require(<FILL_ME>) _setupRole(DEFAULT_ADMIN_ROLE, admin); } function deployToCurve( uint256[4] calldata fourPoolTokensAmount, IERC20[4] calldata tokens, uint8 poolSize, address curvePool ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function deployToConvex( address cvxBoosterAddress, uint256 poolId ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function claimAll(ICvxBaseRewardPool pool) external onlyRole(DEFAULT_ADMIN_ROLE) { } function withdraw(ICvxBaseRewardPool pool, uint256 lpAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } function exit( uint256[2] calldata twoPoolTokensAmount, uint256[3] calldata threePoolTokensAmount, uint256[4] calldata fourPoolTokensAmount, address pool, uint8 tokensCount ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function exitOneCoin( address pool, uint256 coinIndex, uint256 lpBurnAmount ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function withdrawTokens( IERC20 token, address destination, uint256 amount ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function executeCall(address destination, bytes calldata _calldata) external onlyRole(DEFAULT_ADMIN_ROLE) { } function grantRole(bytes32 role, address account) public override onlyRole(getRoleAdmin(role)) { } }
admin.isContract(),"Strategy: admin not contract"
362,283
admin.isContract()
"Sale has already ended"
pragma solidity ^0.8.0; contract Kamagang is ERC721, Ownable { using SafeMath for uint256; uint public constant MAX_KAMAS = 3163; bool public hasSaleStarted = false; // THE IPFS HASH OF ALL TOKEN DATAS WILL BE ADDED HERE WHEN ALL KAMAS ARE FINALIZED. string public METADATA_PROVENANCE_HASH = ""; uint256 public nextTokenId = 0; address[] public oldHolders; constructor() ERC721("Kamagang","KAMA") { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } function calculatePrice() public view returns (uint256) { require(hasSaleStarted == true, "Sale hasn't started"); require(<FILL_ME>) //return 9e16; //0.09ETH return 90000000000000000; //0.09ETH } function mintKAMA(uint256 numKamas) public payable { } // ONLYOWNER FUNCTIONS function setProvenanceHash(string memory _hash) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function startDrop() public onlyOwner { } function pauseDrop() public onlyOwner { } function withdrawAll() public payable onlyOwner { } function migrate1() public onlyOwner { } function migrate2() public onlyOwner { } function migrate3() public onlyOwner { } function migrate4() public onlyOwner { } function migrate5() public onlyOwner { } }
totalSupply()<MAX_KAMAS,"Sale has already ended"
362,348
totalSupply()<MAX_KAMAS
"Exceeds MAX_KAMAS"
pragma solidity ^0.8.0; contract Kamagang is ERC721, Ownable { using SafeMath for uint256; uint public constant MAX_KAMAS = 3163; bool public hasSaleStarted = false; // THE IPFS HASH OF ALL TOKEN DATAS WILL BE ADDED HERE WHEN ALL KAMAS ARE FINALIZED. string public METADATA_PROVENANCE_HASH = ""; uint256 public nextTokenId = 0; address[] public oldHolders; constructor() ERC721("Kamagang","KAMA") { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } function calculatePrice() public view returns (uint256) { } function mintKAMA(uint256 numKamas) public payable { require(totalSupply() < MAX_KAMAS, "Sale has already ended"); require(numKamas > 0 && numKamas <= 20, "You can adopt minimum 1, maximum 20 KAMAS"); require(<FILL_ME>) require(msg.value >= calculatePrice().mul(numKamas), "Ether value sent is below the price"); for (uint i = 0; i < numKamas; i++) { uint mintIndex = totalSupply(); _safeMint(msg.sender, mintIndex); nextTokenId++; //FIXFIXFIXFIX } } // ONLYOWNER FUNCTIONS function setProvenanceHash(string memory _hash) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function startDrop() public onlyOwner { } function pauseDrop() public onlyOwner { } function withdrawAll() public payable onlyOwner { } function migrate1() public onlyOwner { } function migrate2() public onlyOwner { } function migrate3() public onlyOwner { } function migrate4() public onlyOwner { } function migrate5() public onlyOwner { } }
totalSupply().add(numKamas)<=MAX_KAMAS,"Exceeds MAX_KAMAS"
362,348
totalSupply().add(numKamas)<=MAX_KAMAS
'PairFactory: _lendingPairMaster must be a contract'
// SPDX-License-Identifier: UNLICENSED // Copyright (c) WildCredit - All rights reserved // https://twitter.com/WildCredit pragma solidity 0.8.6; import "UpgradeableBeacon.sol"; import "IPairFactory.sol"; import "ILendingController.sol"; import "ILendingPair.sol"; import "SafeOwnable.sol"; import "AddressLibrary.sol"; import "BeaconProxyPayable.sol"; import "LendingPair.sol"; contract PairFactory is IPairFactory, SafeOwnable { using AddressLibrary for address; UpgradeableBeacon public immutable lendingPairMaster; address public immutable lpTokenMaster; address public immutable uniV3Helper; address public immutable feeRecipient; ILendingController public immutable lendingController; mapping(address => mapping(address => address)) public override pairByTokens; event PairCreated(address indexed pair, address indexed tokenA, address indexed tokenB); constructor( address _lendingPairMaster, address _lpTokenMaster, address _uniV3Helper, address _feeRecipient, ILendingController _lendingController ) { require(<FILL_ME>) require(_lpTokenMaster.isContract(), 'PairFactory: _lpTokenMaster must be a contract'); require(_uniV3Helper.isContract(), 'PairFactory: _uniV3Helper must be a contract'); require(_feeRecipient.isContract(), 'PairFactory: _feeRecipient must be a contract'); require(address(_lendingController).isContract(), 'PairFactory: _lendingController must be a contract'); lendingPairMaster = UpgradeableBeacon(_lendingPairMaster); lpTokenMaster = _lpTokenMaster; uniV3Helper = _uniV3Helper; feeRecipient = _feeRecipient; lendingController = _lendingController; } function createPair( address _token0, address _token1 ) external returns(address) { } }
_lendingPairMaster.isContract(),'PairFactory: _lendingPairMaster must be a contract'
362,456
_lendingPairMaster.isContract()
'PairFactory: _lpTokenMaster must be a contract'
// SPDX-License-Identifier: UNLICENSED // Copyright (c) WildCredit - All rights reserved // https://twitter.com/WildCredit pragma solidity 0.8.6; import "UpgradeableBeacon.sol"; import "IPairFactory.sol"; import "ILendingController.sol"; import "ILendingPair.sol"; import "SafeOwnable.sol"; import "AddressLibrary.sol"; import "BeaconProxyPayable.sol"; import "LendingPair.sol"; contract PairFactory is IPairFactory, SafeOwnable { using AddressLibrary for address; UpgradeableBeacon public immutable lendingPairMaster; address public immutable lpTokenMaster; address public immutable uniV3Helper; address public immutable feeRecipient; ILendingController public immutable lendingController; mapping(address => mapping(address => address)) public override pairByTokens; event PairCreated(address indexed pair, address indexed tokenA, address indexed tokenB); constructor( address _lendingPairMaster, address _lpTokenMaster, address _uniV3Helper, address _feeRecipient, ILendingController _lendingController ) { require(_lendingPairMaster.isContract(), 'PairFactory: _lendingPairMaster must be a contract'); require(<FILL_ME>) require(_uniV3Helper.isContract(), 'PairFactory: _uniV3Helper must be a contract'); require(_feeRecipient.isContract(), 'PairFactory: _feeRecipient must be a contract'); require(address(_lendingController).isContract(), 'PairFactory: _lendingController must be a contract'); lendingPairMaster = UpgradeableBeacon(_lendingPairMaster); lpTokenMaster = _lpTokenMaster; uniV3Helper = _uniV3Helper; feeRecipient = _feeRecipient; lendingController = _lendingController; } function createPair( address _token0, address _token1 ) external returns(address) { } }
_lpTokenMaster.isContract(),'PairFactory: _lpTokenMaster must be a contract'
362,456
_lpTokenMaster.isContract()
'PairFactory: _uniV3Helper must be a contract'
// SPDX-License-Identifier: UNLICENSED // Copyright (c) WildCredit - All rights reserved // https://twitter.com/WildCredit pragma solidity 0.8.6; import "UpgradeableBeacon.sol"; import "IPairFactory.sol"; import "ILendingController.sol"; import "ILendingPair.sol"; import "SafeOwnable.sol"; import "AddressLibrary.sol"; import "BeaconProxyPayable.sol"; import "LendingPair.sol"; contract PairFactory is IPairFactory, SafeOwnable { using AddressLibrary for address; UpgradeableBeacon public immutable lendingPairMaster; address public immutable lpTokenMaster; address public immutable uniV3Helper; address public immutable feeRecipient; ILendingController public immutable lendingController; mapping(address => mapping(address => address)) public override pairByTokens; event PairCreated(address indexed pair, address indexed tokenA, address indexed tokenB); constructor( address _lendingPairMaster, address _lpTokenMaster, address _uniV3Helper, address _feeRecipient, ILendingController _lendingController ) { require(_lendingPairMaster.isContract(), 'PairFactory: _lendingPairMaster must be a contract'); require(_lpTokenMaster.isContract(), 'PairFactory: _lpTokenMaster must be a contract'); require(<FILL_ME>) require(_feeRecipient.isContract(), 'PairFactory: _feeRecipient must be a contract'); require(address(_lendingController).isContract(), 'PairFactory: _lendingController must be a contract'); lendingPairMaster = UpgradeableBeacon(_lendingPairMaster); lpTokenMaster = _lpTokenMaster; uniV3Helper = _uniV3Helper; feeRecipient = _feeRecipient; lendingController = _lendingController; } function createPair( address _token0, address _token1 ) external returns(address) { } }
_uniV3Helper.isContract(),'PairFactory: _uniV3Helper must be a contract'
362,456
_uniV3Helper.isContract()
'PairFactory: _feeRecipient must be a contract'
// SPDX-License-Identifier: UNLICENSED // Copyright (c) WildCredit - All rights reserved // https://twitter.com/WildCredit pragma solidity 0.8.6; import "UpgradeableBeacon.sol"; import "IPairFactory.sol"; import "ILendingController.sol"; import "ILendingPair.sol"; import "SafeOwnable.sol"; import "AddressLibrary.sol"; import "BeaconProxyPayable.sol"; import "LendingPair.sol"; contract PairFactory is IPairFactory, SafeOwnable { using AddressLibrary for address; UpgradeableBeacon public immutable lendingPairMaster; address public immutable lpTokenMaster; address public immutable uniV3Helper; address public immutable feeRecipient; ILendingController public immutable lendingController; mapping(address => mapping(address => address)) public override pairByTokens; event PairCreated(address indexed pair, address indexed tokenA, address indexed tokenB); constructor( address _lendingPairMaster, address _lpTokenMaster, address _uniV3Helper, address _feeRecipient, ILendingController _lendingController ) { require(_lendingPairMaster.isContract(), 'PairFactory: _lendingPairMaster must be a contract'); require(_lpTokenMaster.isContract(), 'PairFactory: _lpTokenMaster must be a contract'); require(_uniV3Helper.isContract(), 'PairFactory: _uniV3Helper must be a contract'); require(<FILL_ME>) require(address(_lendingController).isContract(), 'PairFactory: _lendingController must be a contract'); lendingPairMaster = UpgradeableBeacon(_lendingPairMaster); lpTokenMaster = _lpTokenMaster; uniV3Helper = _uniV3Helper; feeRecipient = _feeRecipient; lendingController = _lendingController; } function createPair( address _token0, address _token1 ) external returns(address) { } }
_feeRecipient.isContract(),'PairFactory: _feeRecipient must be a contract'
362,456
_feeRecipient.isContract()
'PairFactory: _lendingController must be a contract'
// SPDX-License-Identifier: UNLICENSED // Copyright (c) WildCredit - All rights reserved // https://twitter.com/WildCredit pragma solidity 0.8.6; import "UpgradeableBeacon.sol"; import "IPairFactory.sol"; import "ILendingController.sol"; import "ILendingPair.sol"; import "SafeOwnable.sol"; import "AddressLibrary.sol"; import "BeaconProxyPayable.sol"; import "LendingPair.sol"; contract PairFactory is IPairFactory, SafeOwnable { using AddressLibrary for address; UpgradeableBeacon public immutable lendingPairMaster; address public immutable lpTokenMaster; address public immutable uniV3Helper; address public immutable feeRecipient; ILendingController public immutable lendingController; mapping(address => mapping(address => address)) public override pairByTokens; event PairCreated(address indexed pair, address indexed tokenA, address indexed tokenB); constructor( address _lendingPairMaster, address _lpTokenMaster, address _uniV3Helper, address _feeRecipient, ILendingController _lendingController ) { require(_lendingPairMaster.isContract(), 'PairFactory: _lendingPairMaster must be a contract'); require(_lpTokenMaster.isContract(), 'PairFactory: _lpTokenMaster must be a contract'); require(_uniV3Helper.isContract(), 'PairFactory: _uniV3Helper must be a contract'); require(_feeRecipient.isContract(), 'PairFactory: _feeRecipient must be a contract'); require(<FILL_ME>) lendingPairMaster = UpgradeableBeacon(_lendingPairMaster); lpTokenMaster = _lpTokenMaster; uniV3Helper = _uniV3Helper; feeRecipient = _feeRecipient; lendingController = _lendingController; } function createPair( address _token0, address _token1 ) external returns(address) { } }
address(_lendingController).isContract(),'PairFactory: _lendingController must be a contract'
362,456
address(_lendingController).isContract()
'PairFactory: already exists'
// SPDX-License-Identifier: UNLICENSED // Copyright (c) WildCredit - All rights reserved // https://twitter.com/WildCredit pragma solidity 0.8.6; import "UpgradeableBeacon.sol"; import "IPairFactory.sol"; import "ILendingController.sol"; import "ILendingPair.sol"; import "SafeOwnable.sol"; import "AddressLibrary.sol"; import "BeaconProxyPayable.sol"; import "LendingPair.sol"; contract PairFactory is IPairFactory, SafeOwnable { using AddressLibrary for address; UpgradeableBeacon public immutable lendingPairMaster; address public immutable lpTokenMaster; address public immutable uniV3Helper; address public immutable feeRecipient; ILendingController public immutable lendingController; mapping(address => mapping(address => address)) public override pairByTokens; event PairCreated(address indexed pair, address indexed tokenA, address indexed tokenB); constructor( address _lendingPairMaster, address _lpTokenMaster, address _uniV3Helper, address _feeRecipient, ILendingController _lendingController ) { } function createPair( address _token0, address _token1 ) external returns(address) { require(_token0 != _token1, 'PairFactory: duplicate tokens'); require(_token0 != address(0) && _token1 != address(0), 'PairFactory: zero address'); require(<FILL_ME>) (address tokenA, address tokenB) = _token0 < _token1 ? (_token0, _token1) : (_token1, _token0); require( lendingController.tokenSupported(tokenA) && lendingController.tokenSupported(tokenB), 'PairFactory: token not supported' ); address lendingPair = address(new BeaconProxyPayable(address(lendingPairMaster), "")); ILendingPair(lendingPair).initialize( lpTokenMaster, address(lendingController), uniV3Helper, feeRecipient, tokenA, tokenB ); pairByTokens[tokenA][tokenB] = lendingPair; pairByTokens[tokenB][tokenA] = lendingPair; emit PairCreated(lendingPair, tokenA, tokenB); return lendingPair; } }
pairByTokens[_token0][_token1]==address(0),'PairFactory: already exists'
362,456
pairByTokens[_token0][_token1]==address(0)
'PairFactory: token not supported'
// SPDX-License-Identifier: UNLICENSED // Copyright (c) WildCredit - All rights reserved // https://twitter.com/WildCredit pragma solidity 0.8.6; import "UpgradeableBeacon.sol"; import "IPairFactory.sol"; import "ILendingController.sol"; import "ILendingPair.sol"; import "SafeOwnable.sol"; import "AddressLibrary.sol"; import "BeaconProxyPayable.sol"; import "LendingPair.sol"; contract PairFactory is IPairFactory, SafeOwnable { using AddressLibrary for address; UpgradeableBeacon public immutable lendingPairMaster; address public immutable lpTokenMaster; address public immutable uniV3Helper; address public immutable feeRecipient; ILendingController public immutable lendingController; mapping(address => mapping(address => address)) public override pairByTokens; event PairCreated(address indexed pair, address indexed tokenA, address indexed tokenB); constructor( address _lendingPairMaster, address _lpTokenMaster, address _uniV3Helper, address _feeRecipient, ILendingController _lendingController ) { } function createPair( address _token0, address _token1 ) external returns(address) { require(_token0 != _token1, 'PairFactory: duplicate tokens'); require(_token0 != address(0) && _token1 != address(0), 'PairFactory: zero address'); require(pairByTokens[_token0][_token1] == address(0), 'PairFactory: already exists'); (address tokenA, address tokenB) = _token0 < _token1 ? (_token0, _token1) : (_token1, _token0); require(<FILL_ME>) address lendingPair = address(new BeaconProxyPayable(address(lendingPairMaster), "")); ILendingPair(lendingPair).initialize( lpTokenMaster, address(lendingController), uniV3Helper, feeRecipient, tokenA, tokenB ); pairByTokens[tokenA][tokenB] = lendingPair; pairByTokens[tokenB][tokenA] = lendingPair; emit PairCreated(lendingPair, tokenA, tokenB); return lendingPair; } }
lendingController.tokenSupported(tokenA)&&lendingController.tokenSupported(tokenB),'PairFactory: token not supported'
362,456
lendingController.tokenSupported(tokenA)&&lendingController.tokenSupported(tokenB)
"address should not be 0"
pragma solidity ^0.8.0; // SPDX-License-Identifier: MIT /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IFilChainStatOracle { function sectorInitialPledge() external view returns(uint256); function minerAdjustedPower(string memory _minerId) external view returns(uint256); function minerMiningEfficiency(string memory _minerId) external view returns(uint256); function minerSectorInitialPledge(string memory _minerId) external view returns(uint256); function minerTotalAdjustedPower() external view returns(uint256); function avgMiningEfficiency() external view returns(uint256); function latest24hBlockReward() external view returns(uint256); function rewardAttenuationFactor() external view returns(uint256); function networkStoragePower() external view returns(uint256); function dailyStoragePowerIncrease() external view returns(uint256); function removeMinerAdjustedPower(string memory _minerId) external; } library StringUtil { function equal(string memory a, string memory b) internal pure returns(bool){ } function equal(bytes memory a, bytes memory b) internal pure returns(bool){ } function notEmpty(string memory a) internal pure returns(bool){ } } contract MinerManage is Ownable{ using StringUtil for string; struct MinerInfo{ string minerId; string data; string signature; } IFilChainStatOracle public oracleAddress; mapping(address=>MinerInfo) public minerInfoMap; mapping(address=>bool) public whiteList; mapping(string=>address) public minerIdToWalletMap; string[] public minerList; event AddMiner(address walletAddress, string minerId); event RemoveMiner(address walletAddress, string minerId); event FilChainStatOracleChanged(address filChainStatOracle, address _filChainStatOracle); constructor(IFilChainStatOracle _oracleAddress){ } function setOracleAddress(IFilChainStatOracle _oracleAddress) public onlyOwner{ require(<FILL_ME>) emit FilChainStatOracleChanged(address(oracleAddress), address(_oracleAddress)); oracleAddress = _oracleAddress; } function addToWhiteList(address walletAddress, string memory minerId, string memory data, string memory signature) public onlyOwner{ } function removeFromWhiteList(address walletAddress) public onlyOwner{ } function minerAdjustedStoragePowerInTiB(string memory minerId) external view returns(uint256){ } function getMinerId(address walletAddress) public view returns(string memory){ } function getMinerList() external view returns(string[] memory){ } }
address(_oracleAddress)!=address(0),"address should not be 0"
362,585
address(_oracleAddress)!=address(0)
"Supply exceeded"
pragma solidity ^0.8.2; contract HBC90 is ERC721Enumerable, Ownable { IERC721 firstEdition = IERC721(0xD6777fD56eEd434D6159A0B0d0BDE8274ab8Bf78); mapping(address => uint256) public mintPasses; string private baseURI; string public BEARDO_PROVENANCE; uint256 public MAX_BEARDOS = 9090; uint256 private unredeemedFE = 367; uint256 public totalReservations = 90; uint256 public price = 30000000000000000; bool public saleIsActive; bool public reservationIsActive = true; bool public resMintIsActive; constructor() ERC721("HoboBeardClub 90", "HBC90") { } function mintMyBeardo(uint _count) public payable { require(saleIsActive, "Sale is not active"); uint ts = totalSupply()+unredeemedFE; require(<FILL_ME>) require(_count <= 20, "Maximum per tx reached"); require(msg.value >= price*_count, "Value below price"); for(uint i = 0; i < _count; i++){ _safeMint(msg.sender, ts+i); } } function printMyBeardo(uint id) public { } function printMyBeardos(uint[] memory ids) public { } function tokenRedeemed(uint id) public view returns (bool) { } function activateSale() public onlyOwner { } function deactivateSale() public onlyOwner { } function burnBeardos() public onlyOwner { } function setProvenanceHash(string memory provenanceHash) public onlyOwner { } // Alternative against gas wars function reserveMyBeardo(uint _count) public payable { } function mintReservations(uint _count) public { } function removeReservations(address[] memory addresses) public onlyOwner { } function deactivateReservation() public onlyOwner { } function activateResMint() public onlyOwner { } function deactivateResMint() public onlyOwner { } // incase of price changes or collaborations that include airdrops, probably never used function initDrop(address _address, uint _count) public onlyOwner { } function distributeDrop(address[] memory addresses) public { } function setPrice(uint _newPrice) public onlyOwner() { } function withdrawAll() public payable onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } // accounting for reservations and unminted first edition mints function actualTotalSupply() public view returns (uint){ } }
ts+_count+totalReservations<=MAX_BEARDOS,"Supply exceeded"
362,605
ts+_count+totalReservations<=MAX_BEARDOS
"You have to own this 1st gen beardo with this id"
pragma solidity ^0.8.2; contract HBC90 is ERC721Enumerable, Ownable { IERC721 firstEdition = IERC721(0xD6777fD56eEd434D6159A0B0d0BDE8274ab8Bf78); mapping(address => uint256) public mintPasses; string private baseURI; string public BEARDO_PROVENANCE; uint256 public MAX_BEARDOS = 9090; uint256 private unredeemedFE = 367; uint256 public totalReservations = 90; uint256 public price = 30000000000000000; bool public saleIsActive; bool public reservationIsActive = true; bool public resMintIsActive; constructor() ERC721("HoboBeardClub 90", "HBC90") { } function mintMyBeardo(uint _count) public payable { } function printMyBeardo(uint id) public { require(<FILL_ME>) _safeMint(msg.sender, id); unredeemedFE -= 1; } function printMyBeardos(uint[] memory ids) public { } function tokenRedeemed(uint id) public view returns (bool) { } function activateSale() public onlyOwner { } function deactivateSale() public onlyOwner { } function burnBeardos() public onlyOwner { } function setProvenanceHash(string memory provenanceHash) public onlyOwner { } // Alternative against gas wars function reserveMyBeardo(uint _count) public payable { } function mintReservations(uint _count) public { } function removeReservations(address[] memory addresses) public onlyOwner { } function deactivateReservation() public onlyOwner { } function activateResMint() public onlyOwner { } function deactivateResMint() public onlyOwner { } // incase of price changes or collaborations that include airdrops, probably never used function initDrop(address _address, uint _count) public onlyOwner { } function distributeDrop(address[] memory addresses) public { } function setPrice(uint _newPrice) public onlyOwner() { } function withdrawAll() public payable onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } // accounting for reservations and unminted first edition mints function actualTotalSupply() public view returns (uint){ } }
firstEdition.ownerOf(id)==msg.sender,"You have to own this 1st gen beardo with this id"
362,605
firstEdition.ownerOf(id)==msg.sender
null
pragma solidity ^0.8.2; contract HBC90 is ERC721Enumerable, Ownable { IERC721 firstEdition = IERC721(0xD6777fD56eEd434D6159A0B0d0BDE8274ab8Bf78); mapping(address => uint256) public mintPasses; string private baseURI; string public BEARDO_PROVENANCE; uint256 public MAX_BEARDOS = 9090; uint256 private unredeemedFE = 367; uint256 public totalReservations = 90; uint256 public price = 30000000000000000; bool public saleIsActive; bool public reservationIsActive = true; bool public resMintIsActive; constructor() ERC721("HoboBeardClub 90", "HBC90") { } function mintMyBeardo(uint _count) public payable { } function printMyBeardo(uint id) public { } function printMyBeardos(uint[] memory ids) public { } function tokenRedeemed(uint id) public view returns (bool) { } function activateSale() public onlyOwner { } function deactivateSale() public onlyOwner { } function burnBeardos() public onlyOwner { } function setProvenanceHash(string memory provenanceHash) public onlyOwner { } // Alternative against gas wars function reserveMyBeardo(uint _count) public payable { } function mintReservations(uint _count) public { } function removeReservations(address[] memory addresses) public onlyOwner { } function deactivateReservation() public onlyOwner { } function activateResMint() public onlyOwner { } function deactivateResMint() public onlyOwner { } // incase of price changes or collaborations that include airdrops, probably never used function initDrop(address _address, uint _count) public onlyOwner { uint newtr = totalReservations+_count; require(<FILL_ME>) mintPasses[_address] += _count; totalReservations = newtr; } function distributeDrop(address[] memory addresses) public { } function setPrice(uint _newPrice) public onlyOwner() { } function withdrawAll() public payable onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } // accounting for reservations and unminted first edition mints function actualTotalSupply() public view returns (uint){ } }
newtr+totalSupply()+unredeemedFE<=MAX_BEARDOS
362,605
newtr+totalSupply()+unredeemedFE<=MAX_BEARDOS
null
pragma solidity ^0.8.2; contract HBC90 is ERC721Enumerable, Ownable { IERC721 firstEdition = IERC721(0xD6777fD56eEd434D6159A0B0d0BDE8274ab8Bf78); mapping(address => uint256) public mintPasses; string private baseURI; string public BEARDO_PROVENANCE; uint256 public MAX_BEARDOS = 9090; uint256 private unredeemedFE = 367; uint256 public totalReservations = 90; uint256 public price = 30000000000000000; bool public saleIsActive; bool public reservationIsActive = true; bool public resMintIsActive; constructor() ERC721("HoboBeardClub 90", "HBC90") { } function mintMyBeardo(uint _count) public payable { } function printMyBeardo(uint id) public { } function printMyBeardos(uint[] memory ids) public { } function tokenRedeemed(uint id) public view returns (bool) { } function activateSale() public onlyOwner { } function deactivateSale() public onlyOwner { } function burnBeardos() public onlyOwner { } function setProvenanceHash(string memory provenanceHash) public onlyOwner { } // Alternative against gas wars function reserveMyBeardo(uint _count) public payable { } function mintReservations(uint _count) public { } function removeReservations(address[] memory addresses) public onlyOwner { } function deactivateReservation() public onlyOwner { } function activateResMint() public onlyOwner { } function deactivateResMint() public onlyOwner { } // incase of price changes or collaborations that include airdrops, probably never used function initDrop(address _address, uint _count) public onlyOwner { } function distributeDrop(address[] memory addresses) public { } function setPrice(uint _newPrice) public onlyOwner() { } function withdrawAll() public payable onlyOwner { require(<FILL_ME>) } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } // accounting for reservations and unminted first edition mints function actualTotalSupply() public view returns (uint){ } }
payable(0x25c9DE88361b2E83f7C82446C7CCca2a369327dd).send(address(this).balance)
362,605
payable(0x25c9DE88361b2E83f7C82446C7CCca2a369327dd).send(address(this).balance)
"Public sale is already active"
pragma solidity ^0.8.0; /** * * Impact Theory Founders Key * */ contract ImpactTheoryFoundersKey is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using ECDSA for bytes32; // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 startingPrice; uint256 endingPrice; uint256 maxPerClosedPresale; uint256 maxTotalMint; bool saleEnded; } // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ while string private baseTokenURIForMetadata; // baseTokenURIForMetadata should point to the raw IPFS endpoint because it will not use IPFS folders. For example: https://ipfs.io/ipfs/ // For uint to bytes32 conversion bytes16 private constant HEX_ALPHABET = "0123456789abcdef"; string private constant IPFS_PREFIX = "f01551220"; // IPFS byte (f) + CID v1 (0x01) + raw codec (0x55) + SHA256 (0x12) + 256 bits long (0x20) // Payment address address private paymentAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Royalties address address private royaltyAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Signer address address private signerAddress = 0x4A2034e724034F31b46117d918E789c42EBE0CF2; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = "Impact Theory Founder's Key"; string public constant TOKEN_SYMBOL = "ITFK"; // Sale durations uint256 public constant CLOSED_PRESALE_DURATION = 1 days; uint256 public constant PRESALE_DURATION = 1 days; uint256 public constant AUCTION_DURATION = 1 days; uint256 public constant AUCTION_PRICE_CHANGE = 1 hours; uint256 public constant DURATION_BETWEEN_TIERS = 1 days; // Public sale params uint256 public publicSaleStartTime; bool public publicSaleActive; //-- Tiers --// // Tier 1 - public info Tier public tier1 = Tier({id: 1, name: "Legendary"}); // Tier 1 - private info TierInfo private tier1Info = TierInfo({ tier: tier1, startingOffset: 1, totalSupply: 2700, startingPrice: 3 ether, endingPrice: 1.5 ether, maxPerClosedPresale: 1, maxTotalMint: 4, saleEnded: false }); // Tier 2 - public info Tier public tier2 = Tier({id: 2, name: "Heroic"}); // Tier 2 - private info TierInfo private tier2Info = TierInfo({ tier: tier2, startingOffset: 2701, totalSupply: 7300, startingPrice: 1.5 ether, endingPrice: .75 ether, maxPerClosedPresale: 2, maxTotalMint: 5, saleEnded: false }); // Tier 3 - public info Tier public tier3 = Tier({id: 3, name: "Relentless"}); // Tier 3 - private info TierInfo private tier3Info = TierInfo({ tier: tier3, startingOffset: 10001, totalSupply: 10000, startingPrice: .1 ether, endingPrice: .05 ether, maxPerClosedPresale: 1, maxTotalMint: 5, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => bytes32[]) public tokenMetadata; // Presale whitelist per tier mapping(address => uint256[]) private presaleWhitelist; // Used nonces for mint signatures mapping(string => bool) private usedNonces; //-- Events --// event PublicSaleStart(uint256 indexed _saleStartTime); event PublicSalePaused(uint256 indexed _timeElapsed); event PublicSaleActive(bool indexed _publicSaleActive); event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPublicSaleActive() { } // Public sale not active modifier modifier whenPublicSaleNotActive() { require(<FILL_ME>) _; } // Owner or public sale active modifier modifier whenOwnerOrPublicSaleActive() { } // -- Constructor --// constructor(string memory _baseTokenURI) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // -- External Functions -- // // Start public sale function startPublicSale() external onlyOwner whenPublicSaleNotActive { } // Set this value to the block.timestamp you'd like to reset to // Created as a way to fast foward in time for tier timing unit tests // Can also be used if needing to pause and restart public sale from original start time (returned in startPublicSale() above) function setPublicSaleStartTime(uint256 _publicSaleStartTime) external onlyOwner { } // Toggle public sale function togglePublicSaleActive() external onlyOwner { } // Pause public sale function pausePublicSale() external onlyOwner whenPublicSaleActive { } // End tier sale function setTierSaleEnded(uint256 _tierId, bool _saleEnded) external onlyOwner whenPublicSaleActive { } // Get all tiers function getAllTiers() external view returns (Tier[] memory) { } // Get all tiers info function getAllTiersInfo() external view onlyOwner returns (TierInfo[] memory) { } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // Adds multiple address to presale whitelist for specific tier function addToPresaleWhitelist(uint256 _tierId, address[] memory _addresses) external onlyOwner { } // Removes single address from whitelist for specific tier function removeFromPresaleWhitelist(uint256 _tierId, address _address) external onlyOwner { } // Get all tiers address is whitelisted for function getPresaleWhitelist(address _address) external view onlyOwner returns (uint256[] memory) { } //-- Public Functions --// // Get elapsed sale time function getElapsedSaleTime() public view returns (uint256) { } // Get remaining closed presale time function getRemainingClosedPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining presale time function getRemainingPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining auction time function getRemainingAuctionTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Mint token - requires tier and amount function mint( uint256 _tierId, uint256 _amount, bytes32 _hash, bytes memory _signature, string memory _nonce ) public payable whenOwnerOrPublicSaleActive { } // Burn multiple function burnMultiple(uint256[] memory _tokenIds) public onlyOwner { } // Get mint price function getMintPrice(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } // Get mints left for tier function getMintsLeft(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } function setPaymentAddress(address _address) public onlyOwner { } function setSignerAddress(address _address) public onlyOwner { } // Set royalty wallet address function setRoyaltyAddress(address _address) public onlyOwner { } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) public onlyOwner { } // Set base URI function setBaseURI(string memory _uri) public onlyOwner { } function setBaseURIForMetadata(string memory _uri) public onlyOwner { } // Append token metadata function appendTokenMetadata(uint256 _tokenId, bytes32 _metadataHash) public onlyOwner { } // Get all token metadata changes function getTokenMetadata(uint256 _tokenId) public view returns (bytes32[] memory) { } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Pauses all token transfers - See {ERC721Pausable} function pause() public virtual onlyOwner { } // Unpauses all token transfers - See {ERC721Pausable} function unpause() public virtual onlyOwner { } //-- Private Functions --/ // Hash transaction function hashTransaction( address _sender, uint256 _amount, string memory _nonce ) private pure returns (bytes32) { } // Match address signer function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Uint to hex string function uintToHexString(uint256 value, uint256 length) internal pure returns (string memory) { } }
!publicSaleActive&&publicSaleStartTime==0,"Public sale is already active"
362,671
!publicSaleActive&&publicSaleStartTime==0
"Public sale is not active"
pragma solidity ^0.8.0; /** * * Impact Theory Founders Key * */ contract ImpactTheoryFoundersKey is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using ECDSA for bytes32; // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 startingPrice; uint256 endingPrice; uint256 maxPerClosedPresale; uint256 maxTotalMint; bool saleEnded; } // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ while string private baseTokenURIForMetadata; // baseTokenURIForMetadata should point to the raw IPFS endpoint because it will not use IPFS folders. For example: https://ipfs.io/ipfs/ // For uint to bytes32 conversion bytes16 private constant HEX_ALPHABET = "0123456789abcdef"; string private constant IPFS_PREFIX = "f01551220"; // IPFS byte (f) + CID v1 (0x01) + raw codec (0x55) + SHA256 (0x12) + 256 bits long (0x20) // Payment address address private paymentAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Royalties address address private royaltyAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Signer address address private signerAddress = 0x4A2034e724034F31b46117d918E789c42EBE0CF2; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = "Impact Theory Founder's Key"; string public constant TOKEN_SYMBOL = "ITFK"; // Sale durations uint256 public constant CLOSED_PRESALE_DURATION = 1 days; uint256 public constant PRESALE_DURATION = 1 days; uint256 public constant AUCTION_DURATION = 1 days; uint256 public constant AUCTION_PRICE_CHANGE = 1 hours; uint256 public constant DURATION_BETWEEN_TIERS = 1 days; // Public sale params uint256 public publicSaleStartTime; bool public publicSaleActive; //-- Tiers --// // Tier 1 - public info Tier public tier1 = Tier({id: 1, name: "Legendary"}); // Tier 1 - private info TierInfo private tier1Info = TierInfo({ tier: tier1, startingOffset: 1, totalSupply: 2700, startingPrice: 3 ether, endingPrice: 1.5 ether, maxPerClosedPresale: 1, maxTotalMint: 4, saleEnded: false }); // Tier 2 - public info Tier public tier2 = Tier({id: 2, name: "Heroic"}); // Tier 2 - private info TierInfo private tier2Info = TierInfo({ tier: tier2, startingOffset: 2701, totalSupply: 7300, startingPrice: 1.5 ether, endingPrice: .75 ether, maxPerClosedPresale: 2, maxTotalMint: 5, saleEnded: false }); // Tier 3 - public info Tier public tier3 = Tier({id: 3, name: "Relentless"}); // Tier 3 - private info TierInfo private tier3Info = TierInfo({ tier: tier3, startingOffset: 10001, totalSupply: 10000, startingPrice: .1 ether, endingPrice: .05 ether, maxPerClosedPresale: 1, maxTotalMint: 5, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => bytes32[]) public tokenMetadata; // Presale whitelist per tier mapping(address => uint256[]) private presaleWhitelist; // Used nonces for mint signatures mapping(string => bool) private usedNonces; //-- Events --// event PublicSaleStart(uint256 indexed _saleStartTime); event PublicSalePaused(uint256 indexed _timeElapsed); event PublicSaleActive(bool indexed _publicSaleActive); event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPublicSaleActive() { } // Public sale not active modifier modifier whenPublicSaleNotActive() { } // Owner or public sale active modifier modifier whenOwnerOrPublicSaleActive() { require(<FILL_ME>) _; } // -- Constructor --// constructor(string memory _baseTokenURI) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // -- External Functions -- // // Start public sale function startPublicSale() external onlyOwner whenPublicSaleNotActive { } // Set this value to the block.timestamp you'd like to reset to // Created as a way to fast foward in time for tier timing unit tests // Can also be used if needing to pause and restart public sale from original start time (returned in startPublicSale() above) function setPublicSaleStartTime(uint256 _publicSaleStartTime) external onlyOwner { } // Toggle public sale function togglePublicSaleActive() external onlyOwner { } // Pause public sale function pausePublicSale() external onlyOwner whenPublicSaleActive { } // End tier sale function setTierSaleEnded(uint256 _tierId, bool _saleEnded) external onlyOwner whenPublicSaleActive { } // Get all tiers function getAllTiers() external view returns (Tier[] memory) { } // Get all tiers info function getAllTiersInfo() external view onlyOwner returns (TierInfo[] memory) { } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // Adds multiple address to presale whitelist for specific tier function addToPresaleWhitelist(uint256 _tierId, address[] memory _addresses) external onlyOwner { } // Removes single address from whitelist for specific tier function removeFromPresaleWhitelist(uint256 _tierId, address _address) external onlyOwner { } // Get all tiers address is whitelisted for function getPresaleWhitelist(address _address) external view onlyOwner returns (uint256[] memory) { } //-- Public Functions --// // Get elapsed sale time function getElapsedSaleTime() public view returns (uint256) { } // Get remaining closed presale time function getRemainingClosedPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining presale time function getRemainingPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining auction time function getRemainingAuctionTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Mint token - requires tier and amount function mint( uint256 _tierId, uint256 _amount, bytes32 _hash, bytes memory _signature, string memory _nonce ) public payable whenOwnerOrPublicSaleActive { } // Burn multiple function burnMultiple(uint256[] memory _tokenIds) public onlyOwner { } // Get mint price function getMintPrice(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } // Get mints left for tier function getMintsLeft(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } function setPaymentAddress(address _address) public onlyOwner { } function setSignerAddress(address _address) public onlyOwner { } // Set royalty wallet address function setRoyaltyAddress(address _address) public onlyOwner { } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) public onlyOwner { } // Set base URI function setBaseURI(string memory _uri) public onlyOwner { } function setBaseURIForMetadata(string memory _uri) public onlyOwner { } // Append token metadata function appendTokenMetadata(uint256 _tokenId, bytes32 _metadataHash) public onlyOwner { } // Get all token metadata changes function getTokenMetadata(uint256 _tokenId) public view returns (bytes32[] memory) { } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Pauses all token transfers - See {ERC721Pausable} function pause() public virtual onlyOwner { } // Unpauses all token transfers - See {ERC721Pausable} function unpause() public virtual onlyOwner { } //-- Private Functions --/ // Hash transaction function hashTransaction( address _sender, uint256 _amount, string memory _nonce ) private pure returns (bytes32) { } // Match address signer function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Uint to hex string function uintToHexString(uint256 value, uint256 length) internal pure returns (string memory) { } }
owner()==_msgSender()||publicSaleActive,"Public sale is not active"
362,671
owner()==_msgSender()||publicSaleActive
"Direct mint disallowed"
pragma solidity ^0.8.0; /** * * Impact Theory Founders Key * */ contract ImpactTheoryFoundersKey is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using ECDSA for bytes32; // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 startingPrice; uint256 endingPrice; uint256 maxPerClosedPresale; uint256 maxTotalMint; bool saleEnded; } // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ while string private baseTokenURIForMetadata; // baseTokenURIForMetadata should point to the raw IPFS endpoint because it will not use IPFS folders. For example: https://ipfs.io/ipfs/ // For uint to bytes32 conversion bytes16 private constant HEX_ALPHABET = "0123456789abcdef"; string private constant IPFS_PREFIX = "f01551220"; // IPFS byte (f) + CID v1 (0x01) + raw codec (0x55) + SHA256 (0x12) + 256 bits long (0x20) // Payment address address private paymentAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Royalties address address private royaltyAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Signer address address private signerAddress = 0x4A2034e724034F31b46117d918E789c42EBE0CF2; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = "Impact Theory Founder's Key"; string public constant TOKEN_SYMBOL = "ITFK"; // Sale durations uint256 public constant CLOSED_PRESALE_DURATION = 1 days; uint256 public constant PRESALE_DURATION = 1 days; uint256 public constant AUCTION_DURATION = 1 days; uint256 public constant AUCTION_PRICE_CHANGE = 1 hours; uint256 public constant DURATION_BETWEEN_TIERS = 1 days; // Public sale params uint256 public publicSaleStartTime; bool public publicSaleActive; //-- Tiers --// // Tier 1 - public info Tier public tier1 = Tier({id: 1, name: "Legendary"}); // Tier 1 - private info TierInfo private tier1Info = TierInfo({ tier: tier1, startingOffset: 1, totalSupply: 2700, startingPrice: 3 ether, endingPrice: 1.5 ether, maxPerClosedPresale: 1, maxTotalMint: 4, saleEnded: false }); // Tier 2 - public info Tier public tier2 = Tier({id: 2, name: "Heroic"}); // Tier 2 - private info TierInfo private tier2Info = TierInfo({ tier: tier2, startingOffset: 2701, totalSupply: 7300, startingPrice: 1.5 ether, endingPrice: .75 ether, maxPerClosedPresale: 2, maxTotalMint: 5, saleEnded: false }); // Tier 3 - public info Tier public tier3 = Tier({id: 3, name: "Relentless"}); // Tier 3 - private info TierInfo private tier3Info = TierInfo({ tier: tier3, startingOffset: 10001, totalSupply: 10000, startingPrice: .1 ether, endingPrice: .05 ether, maxPerClosedPresale: 1, maxTotalMint: 5, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => bytes32[]) public tokenMetadata; // Presale whitelist per tier mapping(address => uint256[]) private presaleWhitelist; // Used nonces for mint signatures mapping(string => bool) private usedNonces; //-- Events --// event PublicSaleStart(uint256 indexed _saleStartTime); event PublicSalePaused(uint256 indexed _timeElapsed); event PublicSaleActive(bool indexed _publicSaleActive); event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPublicSaleActive() { } // Public sale not active modifier modifier whenPublicSaleNotActive() { } // Owner or public sale active modifier modifier whenOwnerOrPublicSaleActive() { } // -- Constructor --// constructor(string memory _baseTokenURI) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // -- External Functions -- // // Start public sale function startPublicSale() external onlyOwner whenPublicSaleNotActive { } // Set this value to the block.timestamp you'd like to reset to // Created as a way to fast foward in time for tier timing unit tests // Can also be used if needing to pause and restart public sale from original start time (returned in startPublicSale() above) function setPublicSaleStartTime(uint256 _publicSaleStartTime) external onlyOwner { } // Toggle public sale function togglePublicSaleActive() external onlyOwner { } // Pause public sale function pausePublicSale() external onlyOwner whenPublicSaleActive { } // End tier sale function setTierSaleEnded(uint256 _tierId, bool _saleEnded) external onlyOwner whenPublicSaleActive { } // Get all tiers function getAllTiers() external view returns (Tier[] memory) { } // Get all tiers info function getAllTiersInfo() external view onlyOwner returns (TierInfo[] memory) { } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // Adds multiple address to presale whitelist for specific tier function addToPresaleWhitelist(uint256 _tierId, address[] memory _addresses) external onlyOwner { } // Removes single address from whitelist for specific tier function removeFromPresaleWhitelist(uint256 _tierId, address _address) external onlyOwner { } // Get all tiers address is whitelisted for function getPresaleWhitelist(address _address) external view onlyOwner returns (uint256[] memory) { } //-- Public Functions --// // Get elapsed sale time function getElapsedSaleTime() public view returns (uint256) { } // Get remaining closed presale time function getRemainingClosedPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining presale time function getRemainingPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining auction time function getRemainingAuctionTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Mint token - requires tier and amount function mint( uint256 _tierId, uint256 _amount, bytes32 _hash, bytes memory _signature, string memory _nonce ) public payable whenOwnerOrPublicSaleActive { require(<FILL_ME>) require(!usedNonces[_nonce], "Hash already used"); require( hashTransaction(_msgSender(), _amount, _nonce) == _hash, "Hash failed" ); Tier memory tier = allTiers[_tierId]; TierInfo memory tierInfo = allTiersInfo[_tierId]; require(tier.id == _tierId, "Invalid tier"); // Must mint at least one require(_amount > 0, "Must mint at least one"); // Check there enough mints left for tier require( getMintsLeft(tier.id).sub(_amount) >= 0, "Minting would exceed max supply" ); // Get current address total balance uint256 currentTotalAmount = super.balanceOf(_msgSender()); // Loop over all tokens for address and get current tier count uint256 currentTierAmount = 0; for (uint256 i = 0; i < currentTotalAmount; i++) { uint256 tokenId = super.tokenOfOwnerByIndex(_msgSender(), i); Tier memory _tokenTier = tokenTier[tokenId]; if (_tokenTier.id == tier.id) { currentTierAmount++; } } uint256 costToMint = 0; uint256 amount = _amount; // Is owner bool isOwner = owner() == _msgSender(); // If not owner, check amounts are not more than max amounts if (!isOwner) { // Get elapsed sale time uint256 elapsed = getElapsedSaleTime(); // Time logic based on tier and constants uint256 closedPresaleStart = (tier.id - 1).mul( DURATION_BETWEEN_TIERS ); uint256 closedPresaleEnd = closedPresaleStart.add( CLOSED_PRESALE_DURATION ); // If still in the closed whitelist, do not allow more than max per closed presale if (elapsed <= closedPresaleEnd) { require( currentTierAmount.add(amount) <= tierInfo.maxPerClosedPresale, "Requested amount exceeds maximum whitelist mint amount" ); } // Do not allow more than max total mint require( currentTierAmount.add(amount) <= tierInfo.maxTotalMint, "Requested amount exceeds maximum total mint amount" ); } // Get cost to mint costToMint = getMintPrice(tier.id).mul(amount); // Check cost to mint for tier, and if enough ETH is passed to mint require(costToMint <= msg.value, "ETH amount sent is not correct"); for (uint256 i = 0; i < amount; i++) { // Token id is tier starting offset plus count of already minted uint256 tokenId = tierInfo.startingOffset.add(tierCounts[tier.id]); // Safe mint _safeMint(_msgSender(), tokenId); // Attribute token id with tier tokenTier[tokenId] = tier; // Store minted at timestamp by token id tokenMintedAt[tokenId] = block.timestamp; // Increment tier counter tierCounts[tier.id] = tierCounts[tier.id].add(1); } usedNonces[_nonce] = true; // Send mint cost to payment address Address.sendValue(payable(paymentAddress), costToMint); // Return unused value if (msg.value > costToMint) { Address.sendValue(payable(_msgSender()), msg.value.sub(costToMint)); } } // Burn multiple function burnMultiple(uint256[] memory _tokenIds) public onlyOwner { } // Get mint price function getMintPrice(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } // Get mints left for tier function getMintsLeft(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } function setPaymentAddress(address _address) public onlyOwner { } function setSignerAddress(address _address) public onlyOwner { } // Set royalty wallet address function setRoyaltyAddress(address _address) public onlyOwner { } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) public onlyOwner { } // Set base URI function setBaseURI(string memory _uri) public onlyOwner { } function setBaseURIForMetadata(string memory _uri) public onlyOwner { } // Append token metadata function appendTokenMetadata(uint256 _tokenId, bytes32 _metadataHash) public onlyOwner { } // Get all token metadata changes function getTokenMetadata(uint256 _tokenId) public view returns (bytes32[] memory) { } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Pauses all token transfers - See {ERC721Pausable} function pause() public virtual onlyOwner { } // Unpauses all token transfers - See {ERC721Pausable} function unpause() public virtual onlyOwner { } //-- Private Functions --/ // Hash transaction function hashTransaction( address _sender, uint256 _amount, string memory _nonce ) private pure returns (bytes32) { } // Match address signer function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Uint to hex string function uintToHexString(uint256 value, uint256 length) internal pure returns (string memory) { } }
matchAddressSigner(_hash,_signature),"Direct mint disallowed"
362,671
matchAddressSigner(_hash,_signature)
"Hash failed"
pragma solidity ^0.8.0; /** * * Impact Theory Founders Key * */ contract ImpactTheoryFoundersKey is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using ECDSA for bytes32; // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 startingPrice; uint256 endingPrice; uint256 maxPerClosedPresale; uint256 maxTotalMint; bool saleEnded; } // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ while string private baseTokenURIForMetadata; // baseTokenURIForMetadata should point to the raw IPFS endpoint because it will not use IPFS folders. For example: https://ipfs.io/ipfs/ // For uint to bytes32 conversion bytes16 private constant HEX_ALPHABET = "0123456789abcdef"; string private constant IPFS_PREFIX = "f01551220"; // IPFS byte (f) + CID v1 (0x01) + raw codec (0x55) + SHA256 (0x12) + 256 bits long (0x20) // Payment address address private paymentAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Royalties address address private royaltyAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Signer address address private signerAddress = 0x4A2034e724034F31b46117d918E789c42EBE0CF2; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = "Impact Theory Founder's Key"; string public constant TOKEN_SYMBOL = "ITFK"; // Sale durations uint256 public constant CLOSED_PRESALE_DURATION = 1 days; uint256 public constant PRESALE_DURATION = 1 days; uint256 public constant AUCTION_DURATION = 1 days; uint256 public constant AUCTION_PRICE_CHANGE = 1 hours; uint256 public constant DURATION_BETWEEN_TIERS = 1 days; // Public sale params uint256 public publicSaleStartTime; bool public publicSaleActive; //-- Tiers --// // Tier 1 - public info Tier public tier1 = Tier({id: 1, name: "Legendary"}); // Tier 1 - private info TierInfo private tier1Info = TierInfo({ tier: tier1, startingOffset: 1, totalSupply: 2700, startingPrice: 3 ether, endingPrice: 1.5 ether, maxPerClosedPresale: 1, maxTotalMint: 4, saleEnded: false }); // Tier 2 - public info Tier public tier2 = Tier({id: 2, name: "Heroic"}); // Tier 2 - private info TierInfo private tier2Info = TierInfo({ tier: tier2, startingOffset: 2701, totalSupply: 7300, startingPrice: 1.5 ether, endingPrice: .75 ether, maxPerClosedPresale: 2, maxTotalMint: 5, saleEnded: false }); // Tier 3 - public info Tier public tier3 = Tier({id: 3, name: "Relentless"}); // Tier 3 - private info TierInfo private tier3Info = TierInfo({ tier: tier3, startingOffset: 10001, totalSupply: 10000, startingPrice: .1 ether, endingPrice: .05 ether, maxPerClosedPresale: 1, maxTotalMint: 5, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => bytes32[]) public tokenMetadata; // Presale whitelist per tier mapping(address => uint256[]) private presaleWhitelist; // Used nonces for mint signatures mapping(string => bool) private usedNonces; //-- Events --// event PublicSaleStart(uint256 indexed _saleStartTime); event PublicSalePaused(uint256 indexed _timeElapsed); event PublicSaleActive(bool indexed _publicSaleActive); event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPublicSaleActive() { } // Public sale not active modifier modifier whenPublicSaleNotActive() { } // Owner or public sale active modifier modifier whenOwnerOrPublicSaleActive() { } // -- Constructor --// constructor(string memory _baseTokenURI) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // -- External Functions -- // // Start public sale function startPublicSale() external onlyOwner whenPublicSaleNotActive { } // Set this value to the block.timestamp you'd like to reset to // Created as a way to fast foward in time for tier timing unit tests // Can also be used if needing to pause and restart public sale from original start time (returned in startPublicSale() above) function setPublicSaleStartTime(uint256 _publicSaleStartTime) external onlyOwner { } // Toggle public sale function togglePublicSaleActive() external onlyOwner { } // Pause public sale function pausePublicSale() external onlyOwner whenPublicSaleActive { } // End tier sale function setTierSaleEnded(uint256 _tierId, bool _saleEnded) external onlyOwner whenPublicSaleActive { } // Get all tiers function getAllTiers() external view returns (Tier[] memory) { } // Get all tiers info function getAllTiersInfo() external view onlyOwner returns (TierInfo[] memory) { } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // Adds multiple address to presale whitelist for specific tier function addToPresaleWhitelist(uint256 _tierId, address[] memory _addresses) external onlyOwner { } // Removes single address from whitelist for specific tier function removeFromPresaleWhitelist(uint256 _tierId, address _address) external onlyOwner { } // Get all tiers address is whitelisted for function getPresaleWhitelist(address _address) external view onlyOwner returns (uint256[] memory) { } //-- Public Functions --// // Get elapsed sale time function getElapsedSaleTime() public view returns (uint256) { } // Get remaining closed presale time function getRemainingClosedPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining presale time function getRemainingPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining auction time function getRemainingAuctionTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Mint token - requires tier and amount function mint( uint256 _tierId, uint256 _amount, bytes32 _hash, bytes memory _signature, string memory _nonce ) public payable whenOwnerOrPublicSaleActive { require( matchAddressSigner(_hash, _signature), "Direct mint disallowed" ); require(!usedNonces[_nonce], "Hash already used"); require(<FILL_ME>) Tier memory tier = allTiers[_tierId]; TierInfo memory tierInfo = allTiersInfo[_tierId]; require(tier.id == _tierId, "Invalid tier"); // Must mint at least one require(_amount > 0, "Must mint at least one"); // Check there enough mints left for tier require( getMintsLeft(tier.id).sub(_amount) >= 0, "Minting would exceed max supply" ); // Get current address total balance uint256 currentTotalAmount = super.balanceOf(_msgSender()); // Loop over all tokens for address and get current tier count uint256 currentTierAmount = 0; for (uint256 i = 0; i < currentTotalAmount; i++) { uint256 tokenId = super.tokenOfOwnerByIndex(_msgSender(), i); Tier memory _tokenTier = tokenTier[tokenId]; if (_tokenTier.id == tier.id) { currentTierAmount++; } } uint256 costToMint = 0; uint256 amount = _amount; // Is owner bool isOwner = owner() == _msgSender(); // If not owner, check amounts are not more than max amounts if (!isOwner) { // Get elapsed sale time uint256 elapsed = getElapsedSaleTime(); // Time logic based on tier and constants uint256 closedPresaleStart = (tier.id - 1).mul( DURATION_BETWEEN_TIERS ); uint256 closedPresaleEnd = closedPresaleStart.add( CLOSED_PRESALE_DURATION ); // If still in the closed whitelist, do not allow more than max per closed presale if (elapsed <= closedPresaleEnd) { require( currentTierAmount.add(amount) <= tierInfo.maxPerClosedPresale, "Requested amount exceeds maximum whitelist mint amount" ); } // Do not allow more than max total mint require( currentTierAmount.add(amount) <= tierInfo.maxTotalMint, "Requested amount exceeds maximum total mint amount" ); } // Get cost to mint costToMint = getMintPrice(tier.id).mul(amount); // Check cost to mint for tier, and if enough ETH is passed to mint require(costToMint <= msg.value, "ETH amount sent is not correct"); for (uint256 i = 0; i < amount; i++) { // Token id is tier starting offset plus count of already minted uint256 tokenId = tierInfo.startingOffset.add(tierCounts[tier.id]); // Safe mint _safeMint(_msgSender(), tokenId); // Attribute token id with tier tokenTier[tokenId] = tier; // Store minted at timestamp by token id tokenMintedAt[tokenId] = block.timestamp; // Increment tier counter tierCounts[tier.id] = tierCounts[tier.id].add(1); } usedNonces[_nonce] = true; // Send mint cost to payment address Address.sendValue(payable(paymentAddress), costToMint); // Return unused value if (msg.value > costToMint) { Address.sendValue(payable(_msgSender()), msg.value.sub(costToMint)); } } // Burn multiple function burnMultiple(uint256[] memory _tokenIds) public onlyOwner { } // Get mint price function getMintPrice(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } // Get mints left for tier function getMintsLeft(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } function setPaymentAddress(address _address) public onlyOwner { } function setSignerAddress(address _address) public onlyOwner { } // Set royalty wallet address function setRoyaltyAddress(address _address) public onlyOwner { } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) public onlyOwner { } // Set base URI function setBaseURI(string memory _uri) public onlyOwner { } function setBaseURIForMetadata(string memory _uri) public onlyOwner { } // Append token metadata function appendTokenMetadata(uint256 _tokenId, bytes32 _metadataHash) public onlyOwner { } // Get all token metadata changes function getTokenMetadata(uint256 _tokenId) public view returns (bytes32[] memory) { } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Pauses all token transfers - See {ERC721Pausable} function pause() public virtual onlyOwner { } // Unpauses all token transfers - See {ERC721Pausable} function unpause() public virtual onlyOwner { } //-- Private Functions --/ // Hash transaction function hashTransaction( address _sender, uint256 _amount, string memory _nonce ) private pure returns (bytes32) { } // Match address signer function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Uint to hex string function uintToHexString(uint256 value, uint256 length) internal pure returns (string memory) { } }
hashTransaction(_msgSender(),_amount,_nonce)==_hash,"Hash failed"
362,671
hashTransaction(_msgSender(),_amount,_nonce)==_hash
"Minting would exceed max supply"
pragma solidity ^0.8.0; /** * * Impact Theory Founders Key * */ contract ImpactTheoryFoundersKey is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using ECDSA for bytes32; // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 startingPrice; uint256 endingPrice; uint256 maxPerClosedPresale; uint256 maxTotalMint; bool saleEnded; } // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ while string private baseTokenURIForMetadata; // baseTokenURIForMetadata should point to the raw IPFS endpoint because it will not use IPFS folders. For example: https://ipfs.io/ipfs/ // For uint to bytes32 conversion bytes16 private constant HEX_ALPHABET = "0123456789abcdef"; string private constant IPFS_PREFIX = "f01551220"; // IPFS byte (f) + CID v1 (0x01) + raw codec (0x55) + SHA256 (0x12) + 256 bits long (0x20) // Payment address address private paymentAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Royalties address address private royaltyAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Signer address address private signerAddress = 0x4A2034e724034F31b46117d918E789c42EBE0CF2; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = "Impact Theory Founder's Key"; string public constant TOKEN_SYMBOL = "ITFK"; // Sale durations uint256 public constant CLOSED_PRESALE_DURATION = 1 days; uint256 public constant PRESALE_DURATION = 1 days; uint256 public constant AUCTION_DURATION = 1 days; uint256 public constant AUCTION_PRICE_CHANGE = 1 hours; uint256 public constant DURATION_BETWEEN_TIERS = 1 days; // Public sale params uint256 public publicSaleStartTime; bool public publicSaleActive; //-- Tiers --// // Tier 1 - public info Tier public tier1 = Tier({id: 1, name: "Legendary"}); // Tier 1 - private info TierInfo private tier1Info = TierInfo({ tier: tier1, startingOffset: 1, totalSupply: 2700, startingPrice: 3 ether, endingPrice: 1.5 ether, maxPerClosedPresale: 1, maxTotalMint: 4, saleEnded: false }); // Tier 2 - public info Tier public tier2 = Tier({id: 2, name: "Heroic"}); // Tier 2 - private info TierInfo private tier2Info = TierInfo({ tier: tier2, startingOffset: 2701, totalSupply: 7300, startingPrice: 1.5 ether, endingPrice: .75 ether, maxPerClosedPresale: 2, maxTotalMint: 5, saleEnded: false }); // Tier 3 - public info Tier public tier3 = Tier({id: 3, name: "Relentless"}); // Tier 3 - private info TierInfo private tier3Info = TierInfo({ tier: tier3, startingOffset: 10001, totalSupply: 10000, startingPrice: .1 ether, endingPrice: .05 ether, maxPerClosedPresale: 1, maxTotalMint: 5, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => bytes32[]) public tokenMetadata; // Presale whitelist per tier mapping(address => uint256[]) private presaleWhitelist; // Used nonces for mint signatures mapping(string => bool) private usedNonces; //-- Events --// event PublicSaleStart(uint256 indexed _saleStartTime); event PublicSalePaused(uint256 indexed _timeElapsed); event PublicSaleActive(bool indexed _publicSaleActive); event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPublicSaleActive() { } // Public sale not active modifier modifier whenPublicSaleNotActive() { } // Owner or public sale active modifier modifier whenOwnerOrPublicSaleActive() { } // -- Constructor --// constructor(string memory _baseTokenURI) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // -- External Functions -- // // Start public sale function startPublicSale() external onlyOwner whenPublicSaleNotActive { } // Set this value to the block.timestamp you'd like to reset to // Created as a way to fast foward in time for tier timing unit tests // Can also be used if needing to pause and restart public sale from original start time (returned in startPublicSale() above) function setPublicSaleStartTime(uint256 _publicSaleStartTime) external onlyOwner { } // Toggle public sale function togglePublicSaleActive() external onlyOwner { } // Pause public sale function pausePublicSale() external onlyOwner whenPublicSaleActive { } // End tier sale function setTierSaleEnded(uint256 _tierId, bool _saleEnded) external onlyOwner whenPublicSaleActive { } // Get all tiers function getAllTiers() external view returns (Tier[] memory) { } // Get all tiers info function getAllTiersInfo() external view onlyOwner returns (TierInfo[] memory) { } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // Adds multiple address to presale whitelist for specific tier function addToPresaleWhitelist(uint256 _tierId, address[] memory _addresses) external onlyOwner { } // Removes single address from whitelist for specific tier function removeFromPresaleWhitelist(uint256 _tierId, address _address) external onlyOwner { } // Get all tiers address is whitelisted for function getPresaleWhitelist(address _address) external view onlyOwner returns (uint256[] memory) { } //-- Public Functions --// // Get elapsed sale time function getElapsedSaleTime() public view returns (uint256) { } // Get remaining closed presale time function getRemainingClosedPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining presale time function getRemainingPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining auction time function getRemainingAuctionTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Mint token - requires tier and amount function mint( uint256 _tierId, uint256 _amount, bytes32 _hash, bytes memory _signature, string memory _nonce ) public payable whenOwnerOrPublicSaleActive { require( matchAddressSigner(_hash, _signature), "Direct mint disallowed" ); require(!usedNonces[_nonce], "Hash already used"); require( hashTransaction(_msgSender(), _amount, _nonce) == _hash, "Hash failed" ); Tier memory tier = allTiers[_tierId]; TierInfo memory tierInfo = allTiersInfo[_tierId]; require(tier.id == _tierId, "Invalid tier"); // Must mint at least one require(_amount > 0, "Must mint at least one"); // Check there enough mints left for tier require(<FILL_ME>) // Get current address total balance uint256 currentTotalAmount = super.balanceOf(_msgSender()); // Loop over all tokens for address and get current tier count uint256 currentTierAmount = 0; for (uint256 i = 0; i < currentTotalAmount; i++) { uint256 tokenId = super.tokenOfOwnerByIndex(_msgSender(), i); Tier memory _tokenTier = tokenTier[tokenId]; if (_tokenTier.id == tier.id) { currentTierAmount++; } } uint256 costToMint = 0; uint256 amount = _amount; // Is owner bool isOwner = owner() == _msgSender(); // If not owner, check amounts are not more than max amounts if (!isOwner) { // Get elapsed sale time uint256 elapsed = getElapsedSaleTime(); // Time logic based on tier and constants uint256 closedPresaleStart = (tier.id - 1).mul( DURATION_BETWEEN_TIERS ); uint256 closedPresaleEnd = closedPresaleStart.add( CLOSED_PRESALE_DURATION ); // If still in the closed whitelist, do not allow more than max per closed presale if (elapsed <= closedPresaleEnd) { require( currentTierAmount.add(amount) <= tierInfo.maxPerClosedPresale, "Requested amount exceeds maximum whitelist mint amount" ); } // Do not allow more than max total mint require( currentTierAmount.add(amount) <= tierInfo.maxTotalMint, "Requested amount exceeds maximum total mint amount" ); } // Get cost to mint costToMint = getMintPrice(tier.id).mul(amount); // Check cost to mint for tier, and if enough ETH is passed to mint require(costToMint <= msg.value, "ETH amount sent is not correct"); for (uint256 i = 0; i < amount; i++) { // Token id is tier starting offset plus count of already minted uint256 tokenId = tierInfo.startingOffset.add(tierCounts[tier.id]); // Safe mint _safeMint(_msgSender(), tokenId); // Attribute token id with tier tokenTier[tokenId] = tier; // Store minted at timestamp by token id tokenMintedAt[tokenId] = block.timestamp; // Increment tier counter tierCounts[tier.id] = tierCounts[tier.id].add(1); } usedNonces[_nonce] = true; // Send mint cost to payment address Address.sendValue(payable(paymentAddress), costToMint); // Return unused value if (msg.value > costToMint) { Address.sendValue(payable(_msgSender()), msg.value.sub(costToMint)); } } // Burn multiple function burnMultiple(uint256[] memory _tokenIds) public onlyOwner { } // Get mint price function getMintPrice(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } // Get mints left for tier function getMintsLeft(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } function setPaymentAddress(address _address) public onlyOwner { } function setSignerAddress(address _address) public onlyOwner { } // Set royalty wallet address function setRoyaltyAddress(address _address) public onlyOwner { } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) public onlyOwner { } // Set base URI function setBaseURI(string memory _uri) public onlyOwner { } function setBaseURIForMetadata(string memory _uri) public onlyOwner { } // Append token metadata function appendTokenMetadata(uint256 _tokenId, bytes32 _metadataHash) public onlyOwner { } // Get all token metadata changes function getTokenMetadata(uint256 _tokenId) public view returns (bytes32[] memory) { } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Pauses all token transfers - See {ERC721Pausable} function pause() public virtual onlyOwner { } // Unpauses all token transfers - See {ERC721Pausable} function unpause() public virtual onlyOwner { } //-- Private Functions --/ // Hash transaction function hashTransaction( address _sender, uint256 _amount, string memory _nonce ) private pure returns (bytes32) { } // Match address signer function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Uint to hex string function uintToHexString(uint256 value, uint256 length) internal pure returns (string memory) { } }
getMintsLeft(tier.id).sub(_amount)>=0,"Minting would exceed max supply"
362,671
getMintsLeft(tier.id).sub(_amount)>=0
"Requested amount exceeds maximum whitelist mint amount"
pragma solidity ^0.8.0; /** * * Impact Theory Founders Key * */ contract ImpactTheoryFoundersKey is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using ECDSA for bytes32; // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 startingPrice; uint256 endingPrice; uint256 maxPerClosedPresale; uint256 maxTotalMint; bool saleEnded; } // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ while string private baseTokenURIForMetadata; // baseTokenURIForMetadata should point to the raw IPFS endpoint because it will not use IPFS folders. For example: https://ipfs.io/ipfs/ // For uint to bytes32 conversion bytes16 private constant HEX_ALPHABET = "0123456789abcdef"; string private constant IPFS_PREFIX = "f01551220"; // IPFS byte (f) + CID v1 (0x01) + raw codec (0x55) + SHA256 (0x12) + 256 bits long (0x20) // Payment address address private paymentAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Royalties address address private royaltyAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Signer address address private signerAddress = 0x4A2034e724034F31b46117d918E789c42EBE0CF2; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = "Impact Theory Founder's Key"; string public constant TOKEN_SYMBOL = "ITFK"; // Sale durations uint256 public constant CLOSED_PRESALE_DURATION = 1 days; uint256 public constant PRESALE_DURATION = 1 days; uint256 public constant AUCTION_DURATION = 1 days; uint256 public constant AUCTION_PRICE_CHANGE = 1 hours; uint256 public constant DURATION_BETWEEN_TIERS = 1 days; // Public sale params uint256 public publicSaleStartTime; bool public publicSaleActive; //-- Tiers --// // Tier 1 - public info Tier public tier1 = Tier({id: 1, name: "Legendary"}); // Tier 1 - private info TierInfo private tier1Info = TierInfo({ tier: tier1, startingOffset: 1, totalSupply: 2700, startingPrice: 3 ether, endingPrice: 1.5 ether, maxPerClosedPresale: 1, maxTotalMint: 4, saleEnded: false }); // Tier 2 - public info Tier public tier2 = Tier({id: 2, name: "Heroic"}); // Tier 2 - private info TierInfo private tier2Info = TierInfo({ tier: tier2, startingOffset: 2701, totalSupply: 7300, startingPrice: 1.5 ether, endingPrice: .75 ether, maxPerClosedPresale: 2, maxTotalMint: 5, saleEnded: false }); // Tier 3 - public info Tier public tier3 = Tier({id: 3, name: "Relentless"}); // Tier 3 - private info TierInfo private tier3Info = TierInfo({ tier: tier3, startingOffset: 10001, totalSupply: 10000, startingPrice: .1 ether, endingPrice: .05 ether, maxPerClosedPresale: 1, maxTotalMint: 5, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => bytes32[]) public tokenMetadata; // Presale whitelist per tier mapping(address => uint256[]) private presaleWhitelist; // Used nonces for mint signatures mapping(string => bool) private usedNonces; //-- Events --// event PublicSaleStart(uint256 indexed _saleStartTime); event PublicSalePaused(uint256 indexed _timeElapsed); event PublicSaleActive(bool indexed _publicSaleActive); event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPublicSaleActive() { } // Public sale not active modifier modifier whenPublicSaleNotActive() { } // Owner or public sale active modifier modifier whenOwnerOrPublicSaleActive() { } // -- Constructor --// constructor(string memory _baseTokenURI) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // -- External Functions -- // // Start public sale function startPublicSale() external onlyOwner whenPublicSaleNotActive { } // Set this value to the block.timestamp you'd like to reset to // Created as a way to fast foward in time for tier timing unit tests // Can also be used if needing to pause and restart public sale from original start time (returned in startPublicSale() above) function setPublicSaleStartTime(uint256 _publicSaleStartTime) external onlyOwner { } // Toggle public sale function togglePublicSaleActive() external onlyOwner { } // Pause public sale function pausePublicSale() external onlyOwner whenPublicSaleActive { } // End tier sale function setTierSaleEnded(uint256 _tierId, bool _saleEnded) external onlyOwner whenPublicSaleActive { } // Get all tiers function getAllTiers() external view returns (Tier[] memory) { } // Get all tiers info function getAllTiersInfo() external view onlyOwner returns (TierInfo[] memory) { } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // Adds multiple address to presale whitelist for specific tier function addToPresaleWhitelist(uint256 _tierId, address[] memory _addresses) external onlyOwner { } // Removes single address from whitelist for specific tier function removeFromPresaleWhitelist(uint256 _tierId, address _address) external onlyOwner { } // Get all tiers address is whitelisted for function getPresaleWhitelist(address _address) external view onlyOwner returns (uint256[] memory) { } //-- Public Functions --// // Get elapsed sale time function getElapsedSaleTime() public view returns (uint256) { } // Get remaining closed presale time function getRemainingClosedPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining presale time function getRemainingPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining auction time function getRemainingAuctionTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Mint token - requires tier and amount function mint( uint256 _tierId, uint256 _amount, bytes32 _hash, bytes memory _signature, string memory _nonce ) public payable whenOwnerOrPublicSaleActive { require( matchAddressSigner(_hash, _signature), "Direct mint disallowed" ); require(!usedNonces[_nonce], "Hash already used"); require( hashTransaction(_msgSender(), _amount, _nonce) == _hash, "Hash failed" ); Tier memory tier = allTiers[_tierId]; TierInfo memory tierInfo = allTiersInfo[_tierId]; require(tier.id == _tierId, "Invalid tier"); // Must mint at least one require(_amount > 0, "Must mint at least one"); // Check there enough mints left for tier require( getMintsLeft(tier.id).sub(_amount) >= 0, "Minting would exceed max supply" ); // Get current address total balance uint256 currentTotalAmount = super.balanceOf(_msgSender()); // Loop over all tokens for address and get current tier count uint256 currentTierAmount = 0; for (uint256 i = 0; i < currentTotalAmount; i++) { uint256 tokenId = super.tokenOfOwnerByIndex(_msgSender(), i); Tier memory _tokenTier = tokenTier[tokenId]; if (_tokenTier.id == tier.id) { currentTierAmount++; } } uint256 costToMint = 0; uint256 amount = _amount; // Is owner bool isOwner = owner() == _msgSender(); // If not owner, check amounts are not more than max amounts if (!isOwner) { // Get elapsed sale time uint256 elapsed = getElapsedSaleTime(); // Time logic based on tier and constants uint256 closedPresaleStart = (tier.id - 1).mul( DURATION_BETWEEN_TIERS ); uint256 closedPresaleEnd = closedPresaleStart.add( CLOSED_PRESALE_DURATION ); // If still in the closed whitelist, do not allow more than max per closed presale if (elapsed <= closedPresaleEnd) { require(<FILL_ME>) } // Do not allow more than max total mint require( currentTierAmount.add(amount) <= tierInfo.maxTotalMint, "Requested amount exceeds maximum total mint amount" ); } // Get cost to mint costToMint = getMintPrice(tier.id).mul(amount); // Check cost to mint for tier, and if enough ETH is passed to mint require(costToMint <= msg.value, "ETH amount sent is not correct"); for (uint256 i = 0; i < amount; i++) { // Token id is tier starting offset plus count of already minted uint256 tokenId = tierInfo.startingOffset.add(tierCounts[tier.id]); // Safe mint _safeMint(_msgSender(), tokenId); // Attribute token id with tier tokenTier[tokenId] = tier; // Store minted at timestamp by token id tokenMintedAt[tokenId] = block.timestamp; // Increment tier counter tierCounts[tier.id] = tierCounts[tier.id].add(1); } usedNonces[_nonce] = true; // Send mint cost to payment address Address.sendValue(payable(paymentAddress), costToMint); // Return unused value if (msg.value > costToMint) { Address.sendValue(payable(_msgSender()), msg.value.sub(costToMint)); } } // Burn multiple function burnMultiple(uint256[] memory _tokenIds) public onlyOwner { } // Get mint price function getMintPrice(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } // Get mints left for tier function getMintsLeft(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } function setPaymentAddress(address _address) public onlyOwner { } function setSignerAddress(address _address) public onlyOwner { } // Set royalty wallet address function setRoyaltyAddress(address _address) public onlyOwner { } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) public onlyOwner { } // Set base URI function setBaseURI(string memory _uri) public onlyOwner { } function setBaseURIForMetadata(string memory _uri) public onlyOwner { } // Append token metadata function appendTokenMetadata(uint256 _tokenId, bytes32 _metadataHash) public onlyOwner { } // Get all token metadata changes function getTokenMetadata(uint256 _tokenId) public view returns (bytes32[] memory) { } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Pauses all token transfers - See {ERC721Pausable} function pause() public virtual onlyOwner { } // Unpauses all token transfers - See {ERC721Pausable} function unpause() public virtual onlyOwner { } //-- Private Functions --/ // Hash transaction function hashTransaction( address _sender, uint256 _amount, string memory _nonce ) private pure returns (bytes32) { } // Match address signer function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Uint to hex string function uintToHexString(uint256 value, uint256 length) internal pure returns (string memory) { } }
currentTierAmount.add(amount)<=tierInfo.maxPerClosedPresale,"Requested amount exceeds maximum whitelist mint amount"
362,671
currentTierAmount.add(amount)<=tierInfo.maxPerClosedPresale
"Requested amount exceeds maximum total mint amount"
pragma solidity ^0.8.0; /** * * Impact Theory Founders Key * */ contract ImpactTheoryFoundersKey is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using ECDSA for bytes32; // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 startingPrice; uint256 endingPrice; uint256 maxPerClosedPresale; uint256 maxTotalMint; bool saleEnded; } // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ while string private baseTokenURIForMetadata; // baseTokenURIForMetadata should point to the raw IPFS endpoint because it will not use IPFS folders. For example: https://ipfs.io/ipfs/ // For uint to bytes32 conversion bytes16 private constant HEX_ALPHABET = "0123456789abcdef"; string private constant IPFS_PREFIX = "f01551220"; // IPFS byte (f) + CID v1 (0x01) + raw codec (0x55) + SHA256 (0x12) + 256 bits long (0x20) // Payment address address private paymentAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Royalties address address private royaltyAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Signer address address private signerAddress = 0x4A2034e724034F31b46117d918E789c42EBE0CF2; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = "Impact Theory Founder's Key"; string public constant TOKEN_SYMBOL = "ITFK"; // Sale durations uint256 public constant CLOSED_PRESALE_DURATION = 1 days; uint256 public constant PRESALE_DURATION = 1 days; uint256 public constant AUCTION_DURATION = 1 days; uint256 public constant AUCTION_PRICE_CHANGE = 1 hours; uint256 public constant DURATION_BETWEEN_TIERS = 1 days; // Public sale params uint256 public publicSaleStartTime; bool public publicSaleActive; //-- Tiers --// // Tier 1 - public info Tier public tier1 = Tier({id: 1, name: "Legendary"}); // Tier 1 - private info TierInfo private tier1Info = TierInfo({ tier: tier1, startingOffset: 1, totalSupply: 2700, startingPrice: 3 ether, endingPrice: 1.5 ether, maxPerClosedPresale: 1, maxTotalMint: 4, saleEnded: false }); // Tier 2 - public info Tier public tier2 = Tier({id: 2, name: "Heroic"}); // Tier 2 - private info TierInfo private tier2Info = TierInfo({ tier: tier2, startingOffset: 2701, totalSupply: 7300, startingPrice: 1.5 ether, endingPrice: .75 ether, maxPerClosedPresale: 2, maxTotalMint: 5, saleEnded: false }); // Tier 3 - public info Tier public tier3 = Tier({id: 3, name: "Relentless"}); // Tier 3 - private info TierInfo private tier3Info = TierInfo({ tier: tier3, startingOffset: 10001, totalSupply: 10000, startingPrice: .1 ether, endingPrice: .05 ether, maxPerClosedPresale: 1, maxTotalMint: 5, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => bytes32[]) public tokenMetadata; // Presale whitelist per tier mapping(address => uint256[]) private presaleWhitelist; // Used nonces for mint signatures mapping(string => bool) private usedNonces; //-- Events --// event PublicSaleStart(uint256 indexed _saleStartTime); event PublicSalePaused(uint256 indexed _timeElapsed); event PublicSaleActive(bool indexed _publicSaleActive); event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPublicSaleActive() { } // Public sale not active modifier modifier whenPublicSaleNotActive() { } // Owner or public sale active modifier modifier whenOwnerOrPublicSaleActive() { } // -- Constructor --// constructor(string memory _baseTokenURI) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // -- External Functions -- // // Start public sale function startPublicSale() external onlyOwner whenPublicSaleNotActive { } // Set this value to the block.timestamp you'd like to reset to // Created as a way to fast foward in time for tier timing unit tests // Can also be used if needing to pause and restart public sale from original start time (returned in startPublicSale() above) function setPublicSaleStartTime(uint256 _publicSaleStartTime) external onlyOwner { } // Toggle public sale function togglePublicSaleActive() external onlyOwner { } // Pause public sale function pausePublicSale() external onlyOwner whenPublicSaleActive { } // End tier sale function setTierSaleEnded(uint256 _tierId, bool _saleEnded) external onlyOwner whenPublicSaleActive { } // Get all tiers function getAllTiers() external view returns (Tier[] memory) { } // Get all tiers info function getAllTiersInfo() external view onlyOwner returns (TierInfo[] memory) { } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // Adds multiple address to presale whitelist for specific tier function addToPresaleWhitelist(uint256 _tierId, address[] memory _addresses) external onlyOwner { } // Removes single address from whitelist for specific tier function removeFromPresaleWhitelist(uint256 _tierId, address _address) external onlyOwner { } // Get all tiers address is whitelisted for function getPresaleWhitelist(address _address) external view onlyOwner returns (uint256[] memory) { } //-- Public Functions --// // Get elapsed sale time function getElapsedSaleTime() public view returns (uint256) { } // Get remaining closed presale time function getRemainingClosedPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining presale time function getRemainingPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining auction time function getRemainingAuctionTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Mint token - requires tier and amount function mint( uint256 _tierId, uint256 _amount, bytes32 _hash, bytes memory _signature, string memory _nonce ) public payable whenOwnerOrPublicSaleActive { require( matchAddressSigner(_hash, _signature), "Direct mint disallowed" ); require(!usedNonces[_nonce], "Hash already used"); require( hashTransaction(_msgSender(), _amount, _nonce) == _hash, "Hash failed" ); Tier memory tier = allTiers[_tierId]; TierInfo memory tierInfo = allTiersInfo[_tierId]; require(tier.id == _tierId, "Invalid tier"); // Must mint at least one require(_amount > 0, "Must mint at least one"); // Check there enough mints left for tier require( getMintsLeft(tier.id).sub(_amount) >= 0, "Minting would exceed max supply" ); // Get current address total balance uint256 currentTotalAmount = super.balanceOf(_msgSender()); // Loop over all tokens for address and get current tier count uint256 currentTierAmount = 0; for (uint256 i = 0; i < currentTotalAmount; i++) { uint256 tokenId = super.tokenOfOwnerByIndex(_msgSender(), i); Tier memory _tokenTier = tokenTier[tokenId]; if (_tokenTier.id == tier.id) { currentTierAmount++; } } uint256 costToMint = 0; uint256 amount = _amount; // Is owner bool isOwner = owner() == _msgSender(); // If not owner, check amounts are not more than max amounts if (!isOwner) { // Get elapsed sale time uint256 elapsed = getElapsedSaleTime(); // Time logic based on tier and constants uint256 closedPresaleStart = (tier.id - 1).mul( DURATION_BETWEEN_TIERS ); uint256 closedPresaleEnd = closedPresaleStart.add( CLOSED_PRESALE_DURATION ); // If still in the closed whitelist, do not allow more than max per closed presale if (elapsed <= closedPresaleEnd) { require( currentTierAmount.add(amount) <= tierInfo.maxPerClosedPresale, "Requested amount exceeds maximum whitelist mint amount" ); } // Do not allow more than max total mint require(<FILL_ME>) } // Get cost to mint costToMint = getMintPrice(tier.id).mul(amount); // Check cost to mint for tier, and if enough ETH is passed to mint require(costToMint <= msg.value, "ETH amount sent is not correct"); for (uint256 i = 0; i < amount; i++) { // Token id is tier starting offset plus count of already minted uint256 tokenId = tierInfo.startingOffset.add(tierCounts[tier.id]); // Safe mint _safeMint(_msgSender(), tokenId); // Attribute token id with tier tokenTier[tokenId] = tier; // Store minted at timestamp by token id tokenMintedAt[tokenId] = block.timestamp; // Increment tier counter tierCounts[tier.id] = tierCounts[tier.id].add(1); } usedNonces[_nonce] = true; // Send mint cost to payment address Address.sendValue(payable(paymentAddress), costToMint); // Return unused value if (msg.value > costToMint) { Address.sendValue(payable(_msgSender()), msg.value.sub(costToMint)); } } // Burn multiple function burnMultiple(uint256[] memory _tokenIds) public onlyOwner { } // Get mint price function getMintPrice(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } // Get mints left for tier function getMintsLeft(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } function setPaymentAddress(address _address) public onlyOwner { } function setSignerAddress(address _address) public onlyOwner { } // Set royalty wallet address function setRoyaltyAddress(address _address) public onlyOwner { } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) public onlyOwner { } // Set base URI function setBaseURI(string memory _uri) public onlyOwner { } function setBaseURIForMetadata(string memory _uri) public onlyOwner { } // Append token metadata function appendTokenMetadata(uint256 _tokenId, bytes32 _metadataHash) public onlyOwner { } // Get all token metadata changes function getTokenMetadata(uint256 _tokenId) public view returns (bytes32[] memory) { } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Pauses all token transfers - See {ERC721Pausable} function pause() public virtual onlyOwner { } // Unpauses all token transfers - See {ERC721Pausable} function unpause() public virtual onlyOwner { } //-- Private Functions --/ // Hash transaction function hashTransaction( address _sender, uint256 _amount, string memory _nonce ) private pure returns (bytes32) { } // Match address signer function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Uint to hex string function uintToHexString(uint256 value, uint256 length) internal pure returns (string memory) { } }
currentTierAmount.add(amount)<=tierInfo.maxTotalMint,"Requested amount exceeds maximum total mint amount"
362,671
currentTierAmount.add(amount)<=tierInfo.maxTotalMint
"Tier not active"
pragma solidity ^0.8.0; /** * * Impact Theory Founders Key * */ contract ImpactTheoryFoundersKey is Ownable, ERC721Burnable, ERC721Enumerable, ERC721Pausable { using SafeMath for uint256; using Strings for uint256; using ECDSA for bytes32; // Public tier info struct Tier { uint256 id; string name; } // Private tier info struct TierInfo { Tier tier; uint256 startingOffset; uint256 totalSupply; uint256 startingPrice; uint256 endingPrice; uint256 maxPerClosedPresale; uint256 maxTotalMint; bool saleEnded; } // Base token uri string private baseTokenURI; // baseTokenURI can point to IPFS folder like https://ipfs.io/ipfs/{cid}/ while string private baseTokenURIForMetadata; // baseTokenURIForMetadata should point to the raw IPFS endpoint because it will not use IPFS folders. For example: https://ipfs.io/ipfs/ // For uint to bytes32 conversion bytes16 private constant HEX_ALPHABET = "0123456789abcdef"; string private constant IPFS_PREFIX = "f01551220"; // IPFS byte (f) + CID v1 (0x01) + raw codec (0x55) + SHA256 (0x12) + 256 bits long (0x20) // Payment address address private paymentAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Royalties address address private royaltyAddress = 0x681EA99a65E6f392f0F5276Af396AE8CaD140E6D; // Signer address address private signerAddress = 0x4A2034e724034F31b46117d918E789c42EBE0CF2; // Royalties basis points (percentage using 2 decimals - 10000 = 100, 0 = 0) uint256 private royaltyBasisPoints = 1000; // 10% // Token info string public constant TOKEN_NAME = "Impact Theory Founder's Key"; string public constant TOKEN_SYMBOL = "ITFK"; // Sale durations uint256 public constant CLOSED_PRESALE_DURATION = 1 days; uint256 public constant PRESALE_DURATION = 1 days; uint256 public constant AUCTION_DURATION = 1 days; uint256 public constant AUCTION_PRICE_CHANGE = 1 hours; uint256 public constant DURATION_BETWEEN_TIERS = 1 days; // Public sale params uint256 public publicSaleStartTime; bool public publicSaleActive; //-- Tiers --// // Tier 1 - public info Tier public tier1 = Tier({id: 1, name: "Legendary"}); // Tier 1 - private info TierInfo private tier1Info = TierInfo({ tier: tier1, startingOffset: 1, totalSupply: 2700, startingPrice: 3 ether, endingPrice: 1.5 ether, maxPerClosedPresale: 1, maxTotalMint: 4, saleEnded: false }); // Tier 2 - public info Tier public tier2 = Tier({id: 2, name: "Heroic"}); // Tier 2 - private info TierInfo private tier2Info = TierInfo({ tier: tier2, startingOffset: 2701, totalSupply: 7300, startingPrice: 1.5 ether, endingPrice: .75 ether, maxPerClosedPresale: 2, maxTotalMint: 5, saleEnded: false }); // Tier 3 - public info Tier public tier3 = Tier({id: 3, name: "Relentless"}); // Tier 3 - private info TierInfo private tier3Info = TierInfo({ tier: tier3, startingOffset: 10001, totalSupply: 10000, startingPrice: .1 ether, endingPrice: .05 ether, maxPerClosedPresale: 1, maxTotalMint: 5, saleEnded: false }); Tier[] public allTiersArray; TierInfo[] private allTiersInfoArray; uint256[] public allTierIds; mapping(uint256 => Tier) public allTiers; mapping(uint256 => TierInfo) private allTiersInfo; mapping(uint256 => Tier) public tokenTier; mapping(uint256 => uint256) public tokenMintedAt; mapping(uint256 => uint256) public tokenLastTransferredAt; mapping(uint256 => uint256) public tierCounts; mapping(uint256 => bytes32[]) public tokenMetadata; // Presale whitelist per tier mapping(address => uint256[]) private presaleWhitelist; // Used nonces for mint signatures mapping(string => bool) private usedNonces; //-- Events --// event PublicSaleStart(uint256 indexed _saleStartTime); event PublicSalePaused(uint256 indexed _timeElapsed); event PublicSaleActive(bool indexed _publicSaleActive); event RoyaltyBasisPoints(uint256 indexed _royaltyBasisPoints); //-- Modifiers --// // Public sale active modifier modifier whenPublicSaleActive() { } // Public sale not active modifier modifier whenPublicSaleNotActive() { } // Owner or public sale active modifier modifier whenOwnerOrPublicSaleActive() { } // -- Constructor --// constructor(string memory _baseTokenURI) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // -- External Functions -- // // Start public sale function startPublicSale() external onlyOwner whenPublicSaleNotActive { } // Set this value to the block.timestamp you'd like to reset to // Created as a way to fast foward in time for tier timing unit tests // Can also be used if needing to pause and restart public sale from original start time (returned in startPublicSale() above) function setPublicSaleStartTime(uint256 _publicSaleStartTime) external onlyOwner { } // Toggle public sale function togglePublicSaleActive() external onlyOwner { } // Pause public sale function pausePublicSale() external onlyOwner whenPublicSaleActive { } // End tier sale function setTierSaleEnded(uint256 _tierId, bool _saleEnded) external onlyOwner whenPublicSaleActive { } // Get all tiers function getAllTiers() external view returns (Tier[] memory) { } // Get all tiers info function getAllTiersInfo() external view onlyOwner returns (TierInfo[] memory) { } // Support royalty info - See {EIP-2981}: https://eips.ethereum.org/EIPS/eip-2981 function royaltyInfo(uint256, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } // Adds multiple address to presale whitelist for specific tier function addToPresaleWhitelist(uint256 _tierId, address[] memory _addresses) external onlyOwner { } // Removes single address from whitelist for specific tier function removeFromPresaleWhitelist(uint256 _tierId, address _address) external onlyOwner { } // Get all tiers address is whitelisted for function getPresaleWhitelist(address _address) external view onlyOwner returns (uint256[] memory) { } //-- Public Functions --// // Get elapsed sale time function getElapsedSaleTime() public view returns (uint256) { } // Get remaining closed presale time function getRemainingClosedPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining presale time function getRemainingPresaleTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Get remaining auction time function getRemainingAuctionTime(uint256 _tierId) public view whenPublicSaleActive returns (uint256) { } // Mint token - requires tier and amount function mint( uint256 _tierId, uint256 _amount, bytes32 _hash, bytes memory _signature, string memory _nonce ) public payable whenOwnerOrPublicSaleActive { } // Burn multiple function burnMultiple(uint256[] memory _tokenIds) public onlyOwner { } // Get mint price function getMintPrice(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { Tier memory tier = allTiers[_tierId]; TierInfo memory tierInfo = allTiersInfo[_tierId]; require(tier.id == _tierId, "Invalid tier"); // Is owner bool isOwner = owner() == _msgSender(); // If owner, cost is 0 if (isOwner) { return 0; } uint256 elapsed = getElapsedSaleTime(); uint256 currentPrice = 0; // Setup starting and ending prices uint256 startingPrice = tierInfo.startingPrice; uint256 endingPrice = tierInfo.endingPrice; // Time logic based on tier and constants uint256 closedPresaleStart = (tier.id - 1).mul(DURATION_BETWEEN_TIERS); uint256 closedPresaleEnd = closedPresaleStart.add( CLOSED_PRESALE_DURATION ); uint256 presaleStart = closedPresaleEnd; uint256 presaleEnd = presaleStart.add(PRESALE_DURATION); uint256 auctionStart = presaleEnd; uint256 auctionEnd = auctionStart.add(AUCTION_DURATION); // Tier not active require(elapsed >= closedPresaleStart, "Tier not active"); // Closed presale - starting price if ((elapsed >= closedPresaleStart) && (elapsed < presaleStart)) { // Must be in presale whitelist to get price and mint uint256[] memory whitelistedTiers = presaleWhitelist[_msgSender()]; bool isWhitelisted = false; for (uint256 i = 0; i < whitelistedTiers.length; i++) { if (whitelistedTiers[i] == tier.id) { isWhitelisted = true; } } require(isWhitelisted, "Tier not active, not whitelisted"); currentPrice = startingPrice; // Presale - starting price } else if ((elapsed >= presaleStart) && (elapsed < presaleEnd)) { currentPrice = startingPrice; // Dutch Auction - price descreses dynamically for duration } else if ((elapsed >= auctionStart) && (elapsed < auctionEnd)) { uint256 elapsedSinceAuctionStart = elapsed.sub(auctionStart); // Elapsed time since auction start uint256 totalPriceDiff = startingPrice.sub(endingPrice); // Total price diff between starting and ending price uint256 numPriceChanges = AUCTION_DURATION.div( AUCTION_PRICE_CHANGE ).sub(1); // Amount of price changes in the auction uint256 priceChangeAmount = totalPriceDiff.div(numPriceChanges); // Amount of price change per instance of price change uint256 elapsedRounded = elapsedSinceAuctionStart.div( AUCTION_PRICE_CHANGE ); // Elapsed time since auction start rounded to auction price change variable uint256 totalPriceChangeAmount = priceChangeAmount.mul( elapsedRounded ); // Total amount of price change based on time currentPrice = startingPrice.sub(totalPriceChangeAmount); // Starting price minus total price change // Post auction - ending price } else if (elapsed >= auctionEnd) { // Check if tier ended require(<FILL_ME>) currentPrice = endingPrice; } // Double check current price is not lower than ending price return currentPrice < endingPrice ? endingPrice : currentPrice; } // Get mints left for tier function getMintsLeft(uint256 _tierId) public view whenOwnerOrPublicSaleActive returns (uint256) { } function setPaymentAddress(address _address) public onlyOwner { } function setSignerAddress(address _address) public onlyOwner { } // Set royalty wallet address function setRoyaltyAddress(address _address) public onlyOwner { } // Set royalty basis points function setRoyaltyBasisPoints(uint256 _basisPoints) public onlyOwner { } // Set base URI function setBaseURI(string memory _uri) public onlyOwner { } function setBaseURIForMetadata(string memory _uri) public onlyOwner { } // Append token metadata function appendTokenMetadata(uint256 _tokenId, bytes32 _metadataHash) public onlyOwner { } // Get all token metadata changes function getTokenMetadata(uint256 _tokenId) public view returns (bytes32[] memory) { } // Token URI (baseTokenURI + tokenId) function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Contract metadata URI - Support for OpenSea: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { } // Override supportsInterface - See {IERC165-supportsInterface} function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } // Pauses all token transfers - See {ERC721Pausable} function pause() public virtual onlyOwner { } // Unpauses all token transfers - See {ERC721Pausable} function unpause() public virtual onlyOwner { } //-- Private Functions --/ // Hash transaction function hashTransaction( address _sender, uint256 _amount, string memory _nonce ) private pure returns (bytes32) { } // Match address signer function matchAddressSigner(bytes32 _hash, bytes memory _signature) private view returns (bool) { } //-- Internal Functions --// // Get base URI function _baseURI() internal view override returns (string memory) { } // Before all token transfer function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } // Uint to hex string function uintToHexString(uint256 value, uint256 length) internal pure returns (string memory) { } }
!tierInfo.saleEnded,"Tier not active"
362,671
!tierInfo.saleEnded
"Minting would exceed max supply of Moose"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } // SwaggyMoose created by WoodCollector // Art by ebbanosen pragma solidity ^0.7.0; pragma abicoder v2; abstract contract SwaggyCows { function ownerOf(uint256 tokenId) public virtual view returns (address); function tokenOfOwnerByIndex(address owner, uint256 index) public virtual view returns (uint256); function balanceOf(address owner) external virtual view returns (uint256 balance); } contract SwaggyMoose is ERC721, Ownable { using SafeMath for uint256; string public MOOSE_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN COWS ARE ALL SOLD OUT string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS bool licenseLocked = false; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE uint256 public constant MAX_MOOSE = 1000; bool public saleIsActive = false; bool public uriIsFrozen = false; SwaggyCows private swaggycows; event licenseisLocked(string _licenseText); constructor() ERC721("Swaggy Moose", "SWAGGYMO") { } function withdraw() public onlyOwner { } function setProvenanceHash(string memory provenanceHash) public onlyOwner { } function isMinted(uint256 tokenId) external view returns (bool) { } function setBaseURI(string memory baseURI) public onlyOwner { } function freezeBaseURI() public onlyOwner { } function flipSaleState() public onlyOwner { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } // Returns the license for tokens function tokenLicense(uint _id) public view returns(string memory) { } // Locks the license to prevent further changes function lockLicense() public onlyOwner { } // Change the license function changeLicense(string memory _license) public onlyOwner { } function adoptMoose(uint256 swaggycowsTokenId) public { require(saleIsActive, "Sale must be active to mint a Swaggy Moose"); require(<FILL_ME>) require(swaggycowsTokenId < MAX_MOOSE, "Requested tokenId exceeds upper bound"); require(swaggycows.ownerOf(swaggycowsTokenId) == msg.sender, "Must own the Swaggy Cow for requested tokenId to mint a Swaggy Moose"); _safeMint(msg.sender, swaggycowsTokenId); } }
totalSupply()<MAX_MOOSE,"Minting would exceed max supply of Moose"
362,726
totalSupply()<MAX_MOOSE
"Must own the Swaggy Cow for requested tokenId to mint a Swaggy Moose"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } // SwaggyMoose created by WoodCollector // Art by ebbanosen pragma solidity ^0.7.0; pragma abicoder v2; abstract contract SwaggyCows { function ownerOf(uint256 tokenId) public virtual view returns (address); function tokenOfOwnerByIndex(address owner, uint256 index) public virtual view returns (uint256); function balanceOf(address owner) external virtual view returns (uint256 balance); } contract SwaggyMoose is ERC721, Ownable { using SafeMath for uint256; string public MOOSE_PROVENANCE = ""; // IPFS URL WILL BE ADDED WHEN COWS ARE ALL SOLD OUT string public LICENSE_TEXT = ""; // IT IS WHAT IT SAYS bool licenseLocked = false; // TEAM CAN'T EDIT THE LICENSE AFTER THIS GETS TRUE uint256 public constant MAX_MOOSE = 1000; bool public saleIsActive = false; bool public uriIsFrozen = false; SwaggyCows private swaggycows; event licenseisLocked(string _licenseText); constructor() ERC721("Swaggy Moose", "SWAGGYMO") { } function withdraw() public onlyOwner { } function setProvenanceHash(string memory provenanceHash) public onlyOwner { } function isMinted(uint256 tokenId) external view returns (bool) { } function setBaseURI(string memory baseURI) public onlyOwner { } function freezeBaseURI() public onlyOwner { } function flipSaleState() public onlyOwner { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } // Returns the license for tokens function tokenLicense(uint _id) public view returns(string memory) { } // Locks the license to prevent further changes function lockLicense() public onlyOwner { } // Change the license function changeLicense(string memory _license) public onlyOwner { } function adoptMoose(uint256 swaggycowsTokenId) public { require(saleIsActive, "Sale must be active to mint a Swaggy Moose"); require(totalSupply() < MAX_MOOSE, "Minting would exceed max supply of Moose"); require(swaggycowsTokenId < MAX_MOOSE, "Requested tokenId exceeds upper bound"); require(<FILL_ME>) _safeMint(msg.sender, swaggycowsTokenId); } }
swaggycows.ownerOf(swaggycowsTokenId)==msg.sender,"Must own the Swaggy Cow for requested tokenId to mint a Swaggy Moose"
362,726
swaggycows.ownerOf(swaggycowsTokenId)==msg.sender
null
/* badERC20 POC Fix by SECBIT Team USE WITH CAUTION & NO WARRANTY REFERENCE & RELATED READING - https://github.com/ethereum/solidity/issues/4116 - https://medium.com/@chris_77367/explaining-unexpected-reverts-starting-with-solidity-0-4-22-3ada6e82308c - https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca - https://gist.github.com/BrendanChou/88a2eeb80947ff00bcf58ffdafeaeb61 */ pragma solidity ^0.4.24; library ERC20AsmFn { function isContract(address addr) internal { } function handleReturnData() internal returns (bool result) { } function asmTransfer(address _erc20Addr, address _to, uint256 _value) internal returns (bool result) { // Must be a contract addr first! isContract(_erc20Addr); // call return false when something wrong require(<FILL_ME>) // handle returndata return handleReturnData(); } function asmTransferFrom(address _erc20Addr, address _from, address _to, uint256 _value) internal returns (bool result) { } function asmApprove(address _erc20Addr, address _spender, uint256 _value) internal returns (bool result) { } }
_erc20Addr.call(bytes4(keccak256("transfer(address,uint256)")),_to,_value)
362,954
_erc20Addr.call(bytes4(keccak256("transfer(address,uint256)")),_to,_value)
null
/* badERC20 POC Fix by SECBIT Team USE WITH CAUTION & NO WARRANTY REFERENCE & RELATED READING - https://github.com/ethereum/solidity/issues/4116 - https://medium.com/@chris_77367/explaining-unexpected-reverts-starting-with-solidity-0-4-22-3ada6e82308c - https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca - https://gist.github.com/BrendanChou/88a2eeb80947ff00bcf58ffdafeaeb61 */ pragma solidity ^0.4.24; library ERC20AsmFn { function isContract(address addr) internal { } function handleReturnData() internal returns (bool result) { } function asmTransfer(address _erc20Addr, address _to, uint256 _value) internal returns (bool result) { } function asmTransferFrom(address _erc20Addr, address _from, address _to, uint256 _value) internal returns (bool result) { // Must be a contract addr first! isContract(_erc20Addr); // call return false when something wrong require(<FILL_ME>) // handle returndata return handleReturnData(); } function asmApprove(address _erc20Addr, address _spender, uint256 _value) internal returns (bool result) { } }
_erc20Addr.call(bytes4(keccak256("transferFrom(address,address,uint256)")),_from,_to,_value)
362,954
_erc20Addr.call(bytes4(keccak256("transferFrom(address,address,uint256)")),_from,_to,_value)
null
/* badERC20 POC Fix by SECBIT Team USE WITH CAUTION & NO WARRANTY REFERENCE & RELATED READING - https://github.com/ethereum/solidity/issues/4116 - https://medium.com/@chris_77367/explaining-unexpected-reverts-starting-with-solidity-0-4-22-3ada6e82308c - https://medium.com/coinmonks/missing-return-value-bug-at-least-130-tokens-affected-d67bf08521ca - https://gist.github.com/BrendanChou/88a2eeb80947ff00bcf58ffdafeaeb61 */ pragma solidity ^0.4.24; library ERC20AsmFn { function isContract(address addr) internal { } function handleReturnData() internal returns (bool result) { } function asmTransfer(address _erc20Addr, address _to, uint256 _value) internal returns (bool result) { } function asmTransferFrom(address _erc20Addr, address _from, address _to, uint256 _value) internal returns (bool result) { } function asmApprove(address _erc20Addr, address _spender, uint256 _value) internal returns (bool result) { // Must be a contract addr first! isContract(_erc20Addr); // call return false when something wrong require(<FILL_ME>) // handle returndata return handleReturnData(); } }
_erc20Addr.call(bytes4(keccak256("approve(address,uint256)")),_spender,_value)
362,954
_erc20Addr.call(bytes4(keccak256("approve(address,uint256)")),_spender,_value)
"ERC721XX: transfer of token that is not own"
// SPDX-License-Identifier: MIT // ERC721XX.org pragma solidity ^0.8.0; 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/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; import '@imtbl/imx-contracts/contracts/utils/Bytes.sol'; import '@imtbl/imx-contracts/contracts/utils/Minting.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721XX is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // 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; // L2 IMX address from Mainnet or Testnet // Mainnet : 0x5FDCCA53617f4d2b9134B29090C87D01058e27e9 // Testnet : 0x4527be8f31e2ebfbef4fcaddb5a17447b27d2aef address public imx; event Minted(address indexed to, uint256 id); /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. * When deployed, should be initialized whether it's on mainnet or testnet. * */ constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @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}. * Ethereum L1 and L2 have different metadata structure. * Should be initialized carefully. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @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 See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @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 { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721XX protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev mintFor only called by IMX contract. * TokenIDs from IMX are fixed. So please becareful with duplicated ID with ETH and IMX. */ function mintFor( address user, uint256 quantity, bytes calldata mintingBlob ) external onlyIMX { } /** * @dev _mintFor. * Originally Inculding memory(blueprint) for on-chain metadata. * Empty by default, can be overriden in child contracts. */ function _mintFor( address user, uint256 id, bytes memory ) internal { } /** * @dev Checks this token's ownership is IMX */ modifier onlyIMX() { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(<FILL_ME>) require(to != address(0), "ERC721XX: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { } /** * @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) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
ERC721XX.ownerOf(tokenId)==from,"ERC721XX: transfer of token that is not own"
363,117
ERC721XX.ownerOf(tokenId)==from
"transfer fails"
/** * @dev Interface of the ERC20 standard as defined in the EIP. */ pragma solidity ^0.6.6; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract TokenChecker2 { function canFlip(IERC20 token) public { require(<FILL_ME>) } }
token.transferFrom(address(this),address(this),0),"transfer fails"
363,162
token.transferFrom(address(this),address(this),0)
"Burnable: Only allowed from redeemable contract"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { require(<FILL_ME>) _burn(account, mpIndex, amount); } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
mintPasses[mpIndex].redeemableContract==msg.sender,"Burnable: Only allowed from redeemable contract"
363,278
mintPasses[mpIndex].redeemableContract==msg.sender
null
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { // verify call is valid require(<FILL_ME>) //return any excess funds to sender if overpaid uint256 excessPayment = msg.value.sub(numPasses.mul(mintPasses[mpIndex].mintPrice)); if (excessPayment > 0) { (bool returnExcessStatus, ) = _msgSender().call{value: excessPayment}(""); require(returnExcessStatus, "Error returning excess payment"); } mintPasses[mpIndex].claimedMPs[msg.sender] = mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses); _mint(msg.sender, mpIndex, numPasses, ""); emit Claimed(mpIndex, msg.sender, numPasses); } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
isValidClaim(numPasses,amount,mpIndex,merkleProof)
363,278
isValidClaim(numPasses,amount,mpIndex,merkleProof)
"Claim: claim cannot contain duplicate merkle proof indexes"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { // duplicate merkle proof indexes are not permitted require(<FILL_ME>) // verify contract is not paused require(!paused(), "Claim: claiming is paused"); //validate all tokens being claimed and aggregate a total cost due for (uint i=0; i< mpIndexs.length; i++) { require(isValidClaim(numPasses[i],amounts[i],mpIndexs[i],merkleProofs[i]), "One or more claims are invalid"); } for (uint i=0; i< mpIndexs.length; i++) { mintPasses[mpIndexs[i]].claimedMPs[msg.sender] = mintPasses[mpIndexs[i]].claimedMPs[msg.sender].add(numPasses[i]); } _mintBatch(msg.sender, mpIndexs, numPasses, ""); emit ClaimedMultiple(mpIndexs, msg.sender, numPasses); } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
arrayIsUnique(mpIndexs),"Claim: claim cannot contain duplicate merkle proof indexes"
363,278
arrayIsUnique(mpIndexs)
"One or more claims are invalid"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { // duplicate merkle proof indexes are not permitted require(arrayIsUnique(mpIndexs), "Claim: claim cannot contain duplicate merkle proof indexes"); // verify contract is not paused require(!paused(), "Claim: claiming is paused"); //validate all tokens being claimed and aggregate a total cost due for (uint i=0; i< mpIndexs.length; i++) { require(<FILL_ME>) } for (uint i=0; i< mpIndexs.length; i++) { mintPasses[mpIndexs[i]].claimedMPs[msg.sender] = mintPasses[mpIndexs[i]].claimedMPs[msg.sender].add(numPasses[i]); } _mintBatch(msg.sender, mpIndexs, numPasses, ""); emit ClaimedMultiple(mpIndexs, msg.sender, numPasses); } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
isValidClaim(numPasses[i],amounts[i],mpIndexs[i],merkleProofs[i]),"One or more claims are invalid"
363,278
isValidClaim(numPasses[i],amounts[i],mpIndexs[i],merkleProofs[i])
"Sale is paused"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { // verify contract is not paused require(<FILL_ME>) require(!paused(), "Claim: claiming is paused"); // verify mint pass for given index exists require(mintPasses[mpIndex].windowOpens != 0, "Claim: Mint pass does not exist"); // Verify within window require (block.timestamp > mintPasses[mpIndex].windowOpens && block.timestamp < mintPasses[mpIndex].windowCloses, "Claim: time window closed"); // Verify minting price require(msg.value >= numPasses.mul(mintPasses[mpIndex].mintPrice), "Claim: Ether value incorrect"); // Verify numPasses is within remaining claimable amount require(mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses) <= amount, "Claim: Not allowed to claim given amount"); require(mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses) <= mintPasses[mpIndex].maxPerWallet, "Claim: Not allowed to claim that many from one wallet"); require(numPasses <= mintPasses[mpIndex].maxMintPerTxn, "Max quantity per transaction exceeded"); require(totalSupply(mpIndex) + numPasses <= mintPasses[mpIndex].maxSupply, "Purchase would exceed max supply"); bool isValid = verifyMerkleProof(merkleProof, mpIndex, amount); require( isValid, "MerkleDistributor: Invalid proof." ); return isValid; } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
mintPasses[mpIndex].saleIsOpen,"Sale is paused"
363,278
mintPasses[mpIndex].saleIsOpen
"Claim: Mint pass does not exist"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { // verify contract is not paused require(mintPasses[mpIndex].saleIsOpen, "Sale is paused"); require(!paused(), "Claim: claiming is paused"); // verify mint pass for given index exists require(<FILL_ME>) // Verify within window require (block.timestamp > mintPasses[mpIndex].windowOpens && block.timestamp < mintPasses[mpIndex].windowCloses, "Claim: time window closed"); // Verify minting price require(msg.value >= numPasses.mul(mintPasses[mpIndex].mintPrice), "Claim: Ether value incorrect"); // Verify numPasses is within remaining claimable amount require(mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses) <= amount, "Claim: Not allowed to claim given amount"); require(mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses) <= mintPasses[mpIndex].maxPerWallet, "Claim: Not allowed to claim that many from one wallet"); require(numPasses <= mintPasses[mpIndex].maxMintPerTxn, "Max quantity per transaction exceeded"); require(totalSupply(mpIndex) + numPasses <= mintPasses[mpIndex].maxSupply, "Purchase would exceed max supply"); bool isValid = verifyMerkleProof(merkleProof, mpIndex, amount); require( isValid, "MerkleDistributor: Invalid proof." ); return isValid; } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
mintPasses[mpIndex].windowOpens!=0,"Claim: Mint pass does not exist"
363,278
mintPasses[mpIndex].windowOpens!=0
"Claim: Not allowed to claim given amount"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { // verify contract is not paused require(mintPasses[mpIndex].saleIsOpen, "Sale is paused"); require(!paused(), "Claim: claiming is paused"); // verify mint pass for given index exists require(mintPasses[mpIndex].windowOpens != 0, "Claim: Mint pass does not exist"); // Verify within window require (block.timestamp > mintPasses[mpIndex].windowOpens && block.timestamp < mintPasses[mpIndex].windowCloses, "Claim: time window closed"); // Verify minting price require(msg.value >= numPasses.mul(mintPasses[mpIndex].mintPrice), "Claim: Ether value incorrect"); // Verify numPasses is within remaining claimable amount require(<FILL_ME>) require(mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses) <= mintPasses[mpIndex].maxPerWallet, "Claim: Not allowed to claim that many from one wallet"); require(numPasses <= mintPasses[mpIndex].maxMintPerTxn, "Max quantity per transaction exceeded"); require(totalSupply(mpIndex) + numPasses <= mintPasses[mpIndex].maxSupply, "Purchase would exceed max supply"); bool isValid = verifyMerkleProof(merkleProof, mpIndex, amount); require( isValid, "MerkleDistributor: Invalid proof." ); return isValid; } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses)<=amount,"Claim: Not allowed to claim given amount"
363,278
mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses)<=amount
"Claim: Not allowed to claim that many from one wallet"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { // verify contract is not paused require(mintPasses[mpIndex].saleIsOpen, "Sale is paused"); require(!paused(), "Claim: claiming is paused"); // verify mint pass for given index exists require(mintPasses[mpIndex].windowOpens != 0, "Claim: Mint pass does not exist"); // Verify within window require (block.timestamp > mintPasses[mpIndex].windowOpens && block.timestamp < mintPasses[mpIndex].windowCloses, "Claim: time window closed"); // Verify minting price require(msg.value >= numPasses.mul(mintPasses[mpIndex].mintPrice), "Claim: Ether value incorrect"); // Verify numPasses is within remaining claimable amount require(mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses) <= amount, "Claim: Not allowed to claim given amount"); require(<FILL_ME>) require(numPasses <= mintPasses[mpIndex].maxMintPerTxn, "Max quantity per transaction exceeded"); require(totalSupply(mpIndex) + numPasses <= mintPasses[mpIndex].maxSupply, "Purchase would exceed max supply"); bool isValid = verifyMerkleProof(merkleProof, mpIndex, amount); require( isValid, "MerkleDistributor: Invalid proof." ); return isValid; } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses)<=mintPasses[mpIndex].maxPerWallet,"Claim: Not allowed to claim that many from one wallet"
363,278
mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses)<=mintPasses[mpIndex].maxPerWallet
"Purchase would exceed max supply"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { // verify contract is not paused require(mintPasses[mpIndex].saleIsOpen, "Sale is paused"); require(!paused(), "Claim: claiming is paused"); // verify mint pass for given index exists require(mintPasses[mpIndex].windowOpens != 0, "Claim: Mint pass does not exist"); // Verify within window require (block.timestamp > mintPasses[mpIndex].windowOpens && block.timestamp < mintPasses[mpIndex].windowCloses, "Claim: time window closed"); // Verify minting price require(msg.value >= numPasses.mul(mintPasses[mpIndex].mintPrice), "Claim: Ether value incorrect"); // Verify numPasses is within remaining claimable amount require(mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses) <= amount, "Claim: Not allowed to claim given amount"); require(mintPasses[mpIndex].claimedMPs[msg.sender].add(numPasses) <= mintPasses[mpIndex].maxPerWallet, "Claim: Not allowed to claim that many from one wallet"); require(numPasses <= mintPasses[mpIndex].maxMintPerTxn, "Max quantity per transaction exceeded"); require(<FILL_ME>) bool isValid = verifyMerkleProof(merkleProof, mpIndex, amount); require( isValid, "MerkleDistributor: Invalid proof." ); return isValid; } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
totalSupply(mpIndex)+numPasses<=mintPasses[mpIndex].maxSupply,"Purchase would exceed max supply"
363,278
totalSupply(mpIndex)+numPasses<=mintPasses[mpIndex].maxSupply
"URI: nonexistent token"
// SPDX-License-Identifier: MIT /* cc:ccccccldONMMMNxccc:cc:cc:co0WMMMMMKocccckNMMMMMM0l:c:c::ccldOXWMMNkcc:ccc:ccc::lOW0l:cc:cccccoxKWMMWkccccc:ccccccOWXdcccl0WMMW0l:co0WXdcccc::ccc::c c:cccc:c:cclxKWMNxcc:cccccccco0WMMMMNxc::ccoKWMMMMW0lcc:cc:cc:cldKWMNkc:::ccccccccl0W0l:cc:ccc:cccoONMWkccccccccccclOWXd::ccdKWMW0l::o0WXd:cccccc:cc:c ::cccc:ccccccdXWNxccclk000000KNMMMMWOl::::ccdXMMMMW0l:c:cc:ccccccoKWNkccclx0000000KNW0l::cccccccccclOWWkccccx0000000NWXdc::ccoKWW0l::o0MWKOOOOOkoc::co cc:::::ccccc:l0WNxc::lOXXXXXNWMMMMWKocc:cc::ckNMMMW0l:ccc:ccccccccOWNkccclONNNNNNWWMW0lc:c:ccc::cccckNNkccclkXXXXXNWMMXd:ccccco0N0l::o0MMMMMMWKxl::lkX cc:ccc::cc:cccOWXxc:ccllllllkNMMMMXxccccc:cc:l0WMMW0l::ccc:::ccccckNNkcccclooooookXMW0l:cc:::cccc:coKWWkcccccllllldXMMXdcccoocco0Ol::l0MMMMMNOocccd0WM ::cccc::::cc:cOWXxc::cloooookNMMMNkcccc:::cc:cdXMMM0l:ccccc::::::ckWNkcc:ccllllllxXMW0l:c::c::ccclxKWMWkccccloooooxXMMXd::ckKdcclol::l0MMMWKdc:clkXMMM :::cccc::cccclOWXxc:co0NNNNNWWMMW0lcc::c::::c:ckNMW0lcccccccc:::ccOWNkcc:lkKXXXXXNWMW0l:ccoOkoc:coKWMMWkc::lOXNNNNNWMMXdc:cOWKdcccc::l0MMNOlcccd0WWMMM ::ccccccc::ccdXWNxc:clk000000KNWKdcccclllllcc:clOWW0l:cccc:ccc:ccoKWNxcc:l0WWMMMMMMMW0lc:cxNW0o::cdKWMWkc::cx0000000NWKdc:cOWWXxcc::cl0WXxc:cclxOOOOOO cccc:c::c:clxKWMNxcc::ccccccco0Nxcc:lkKXXXX0oc::oKW0l::c:cccc:cldKWMNkc::l0WWMMMMMMMW0oc:cxNMWOlc:cdKWWkcc::ccccccclOWXdcccOWMMXxccccl0W0l:cccc:c::cc: cccccccccld0NWMMNxccccccccccco00occcdXMMMMMNkcccckN0l:cccccccldONWMMNkcccl0WWMMMMMMMW0occckNMMNxccccxNWkccccccccccclOWXdcccOWMMMKdccco0W0lcccccccccccc DeadFrenz by @DeadFellaz Dev by @props */ pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import './AbstractMintPassFactory.sol'; import "hardhat/console.sol"; contract CollectibleMintPassFactory is AbstractMintPassFactory { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private mpCounter; mapping(uint256 => MintPass) public mintPasses; event Claimed(uint index, address indexed account, uint amount); event ClaimedMultiple(uint[] index, address indexed account, uint[] amount); struct MintPass { bytes32 merkleRoot; bool saleIsOpen; uint256 windowOpens; uint256 windowCloses; uint256 mintPrice; uint256 maxSupply; uint256 maxPerWallet; uint256 maxMintPerTxn; string ipfsMetadataHash; address redeemableContract; // contract of the redeemable NFT mapping(address => uint256) claimedMPs; } string public _contractURI; constructor( string memory _name, string memory _symbol, string memory metaDataURI ) ERC1155("ipfs://ipfs/") { } function addMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMintPass( bytes32 _merkleRoot, uint256 _windowOpens, uint256 _windowCloses, uint256 _mintPrice, uint256 _maxSupply, uint256 _maxMintPerTxn, string memory _ipfsMetadataHash, address _redeemableContract, uint256 _mpIndex, bool _saleIsOpen, uint256 _maxPerWallet ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editMaxPerWallet( uint256 _maxPerWallet, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenIPFSMetaDataHash( string memory _ipfsMetadataHash, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxMintPerTransaction( uint256 _maxMintPerTxn, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMaxSupply( uint256 _maxSupply, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenMintPrice( uint256 _mintPrice, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowOpens( uint256 _windowOpens, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWindowCloses( uint256 _windowCloses, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenRedeemableContract( address _redeemableContract, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function editTokenWhiteListMerkleRoot( bytes32 _merkleRoot, uint256 _mpIndex ) external onlyRole(DEFAULT_ADMIN_ROLE) { } function burnFromRedeem( address account, uint256 mpIndex, uint256 amount ) external { } function claim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof ) external payable { } function claimMultiple( uint256[] calldata numPasses, uint256[] calldata amounts, uint256[] calldata mpIndexs, bytes32[][] calldata merkleProofs ) external payable { } function mint( address to, uint256 numPasses, uint256 mpIndex) public onlyOwner { } function mintBatch( address to, uint256[] calldata numPasses, uint256[] calldata mpIndexs) public onlyOwner { } function isValidClaim( uint256 numPasses, uint256 amount, uint256 mpIndex, bytes32[] calldata merkleProof) internal view returns (bool) { } function isSaleOpen(uint256 mpIndex) public view returns (bool) { } function getTokenSupply(uint256 mpIndex) public view returns (uint256) { } function turnSaleOn(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function turnSaleOff(uint256 mpIndex) external onlyRole(DEFAULT_ADMIN_ROLE) { } function makeLeaf(address _addr, uint amount) public pure returns (string memory) { } function arrayIsUnique(uint256[] memory items) internal pure returns (bool) { } function verifyMerkleProof(bytes32[] calldata merkleProof, uint256 mpIndex, uint amount) public view returns (bool) { } function toAsciiString(address x) internal pure returns (string memory) { } function char(bytes1 b) internal pure returns (bytes1 c) { } function withdrawEther(address payable _to, uint256 _amount) public onlyOwner { } function getClaimedMps(uint256 poolId, address userAdress) public view returns (uint256) { } function uri(uint256 _id) public view override returns (string memory) { require(<FILL_ME>) return string(abi.encodePacked(super.uri(_id), mintPasses[_id].ipfsMetadataHash)); } function setContractURI(string memory uri) external onlyRole(DEFAULT_ADMIN_ROLE){ } function contractURI() public view returns (string memory) { } }
totalSupply(_id)>0,"URI: nonexistent token"
363,278
totalSupply(_id)>0
"SafeCast: value doesn't fit in 128 bits"
pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such 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. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { require(<FILL_ME>) return int128(value); } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { } }
value>=-2**127&&value<2**127,"SafeCast: value doesn't fit in 128 bits"
363,303
value>=-2**127&&value<2**127
"SafeCast: value doesn't fit in 64 bits"
pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such 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. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { require(<FILL_ME>) return int64(value); } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { } }
value>=-2**63&&value<2**63,"SafeCast: value doesn't fit in 64 bits"
363,303
value>=-2**63&&value<2**63
"SafeCast: value doesn't fit in 32 bits"
pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such 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. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { require(<FILL_ME>) return int32(value); } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { } }
value>=-2**31&&value<2**31,"SafeCast: value doesn't fit in 32 bits"
363,303
value>=-2**31&&value<2**31
"SafeCast: value doesn't fit in 16 bits"
pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such 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. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { require(<FILL_ME>) return int16(value); } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { } }
value>=-2**15&&value<2**15,"SafeCast: value doesn't fit in 16 bits"
363,303
value>=-2**15&&value<2**15
"SafeCast: value doesn't fit in 8 bits"
pragma solidity ^0.7.0; /** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such 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. * * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing * all math on `uint256` and `int256` and then downcasting. */ library SafeCast { /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits. */ function toUint8(uint256 value) internal pure returns (uint8) { } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits * * _Available since v3.1._ */ function toInt128(int256 value) internal pure returns (int128) { } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits * * _Available since v3.1._ */ function toInt64(int256 value) internal pure returns (int64) { } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits * * _Available since v3.1._ */ function toInt32(int256 value) internal pure returns (int32) { } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits * * _Available since v3.1._ */ function toInt16(int256 value) internal pure returns (int16) { } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits. * * _Available since v3.1._ */ function toInt8(int256 value) internal pure returns (int8) { require(<FILL_ME>) return int8(value); } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { } }
value>=-2**7&&value<2**7,"SafeCast: value doesn't fit in 8 bits"
363,303
value>=-2**7&&value<2**7
"You are not whitelisted"
// SPDX-License-Identifier: UNLICENSED // solium-disable linebreak-style pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract CyberWarriorsArmyNFT is Context, Ownable, ERC721 { using Address for address; using Strings for uint256; string private _baseTokenURI; string private _notRevealedURI; uint8 public LIMIT_TOKENS_PER_WALLET_PUBLIC = 20; uint8 public LIMIT_TOKENS_PER_WALLET_PRIVATE = 5; uint8 public LIMIT_TOKENS_FOR_GIVEAWAYS = 250; uint256 public PRIVATE_MINT_TOKEN_PRICE = 0.035 ether; uint256 public PUBLIC_MINT_TOKEN_PRICE = 0.050 ether; bool public revealed = false; bool public isPublic = false; bool public isOpen = false; uint256 public maxSupply; uint256 private nextTokenId = 1; mapping(address => bool) private _whitelisted; mapping(address => uint256) public countPurchasedTokens; /** Events */ event AddedToWhitelist(address indexed account); event RemoveFromWhitelist(address indexed account); /** Constructor */ constructor( address superOwner, string memory name, string memory symbol, uint256 initMaxSupply, string memory baseTokenURI, string memory notRevealedURI ) ERC721(name, symbol) { } /** Functions */ /// The required currency value in wei during the method execution based on the price for the token from the current round /// @dev Buy tokens by single wallet function buyToken(uint8 _amount) public payable { require(isOpen, "Minting is not open yet"); require(msg.sender == tx.origin, "no bots"); // solium-disable-line security/no-tx-origin uint256 _nextTokenId = nextTokenId; uint256 _currentSupply = _nextTokenId - 1; uint256 _purchasedByWallet = countPurchasedTokens[msg.sender]; uint8 maxWalletSupply = LIMIT_TOKENS_PER_WALLET_PUBLIC; uint256 currentTokenPrice = PUBLIC_MINT_TOKEN_PRICE; if (isPublic == false) { require(<FILL_ME>) maxWalletSupply = LIMIT_TOKENS_PER_WALLET_PRIVATE; currentTokenPrice = PRIVATE_MINT_TOKEN_PRICE; } require(_amount * currentTokenPrice == msg.value, "invalid coin amount"); require(_currentSupply + _amount <= maxSupply, "mint: maxSupply reached"); require(_purchasedByWallet + _amount <= LIMIT_TOKENS_PER_WALLET_PUBLIC, "mint: limit tokens for this wallet reached"); for (uint8 i = 0; i < _amount; i++) { _safeMint(msg.sender, _nextTokenId); unchecked { _nextTokenId++; _purchasedByWallet++; } } unchecked { countPurchasedTokens[msg.sender] = _purchasedByWallet; nextTokenId = _nextTokenId; } } function _baseURI() internal view virtual override returns (string memory) { } /// Only owner /// @dev Change baseURI /// @param newTokenURI New uri to new folder with metadata function setBaseURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// Only owner /// @dev Change baseURI for not revealed tokens /// @param newTokenURI New uri to new folder with metadata function setNotRevealedURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// @dev Return all available tokens function availableTokens() public view returns (uint256) { } /// @dev Return all available tokens function totalSupply() public view returns (uint256) { } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// Only owner /// @dev Reveal URI of tokens function reveal() public onlyOwner { } /// Only owner /// @dev Sets public mint /// @param _isPublic isPublic indicator function setPublic(bool _isPublic) public onlyOwner { } /// Only owner /// @dev Sets open mint /// @param _isOpen isOpen indicator function setOpen(bool _isOpen) public onlyOwner { } /// Only owner /// @dev Add array of addresses to whitelist /// @param _addresses array of addresses function addToWhitelist(address[] memory _addresses) public onlyOwner { } /// Only owner /// @dev Remove array of addresses from whitelist /// @param _addresses array of addresses function removeFromWhitelist(address[] memory _addresses) public onlyOwner { } /// @dev Check if address is on whitelist /// @param _address address to check function isWhitelisted(address _address) public view returns(bool) { } /// Only owner /// @dev Withdraw funds to the receiver address /// @param receiver wallet of receiver funds /// @param amount amount of funds function withdraw(address payable receiver, uint256 amount) public onlyOwner { } /// Only owner /// @dev Creates Giveaways tokens /// @param tokensAmount amount of tokens to be created function createGiveawayTokens( uint8 tokensAmount ) public onlyOwner { } function tokensOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { } }
_whitelisted[msg.sender],"You are not whitelisted"
363,322
_whitelisted[msg.sender]
"invalid coin amount"
// SPDX-License-Identifier: UNLICENSED // solium-disable linebreak-style pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract CyberWarriorsArmyNFT is Context, Ownable, ERC721 { using Address for address; using Strings for uint256; string private _baseTokenURI; string private _notRevealedURI; uint8 public LIMIT_TOKENS_PER_WALLET_PUBLIC = 20; uint8 public LIMIT_TOKENS_PER_WALLET_PRIVATE = 5; uint8 public LIMIT_TOKENS_FOR_GIVEAWAYS = 250; uint256 public PRIVATE_MINT_TOKEN_PRICE = 0.035 ether; uint256 public PUBLIC_MINT_TOKEN_PRICE = 0.050 ether; bool public revealed = false; bool public isPublic = false; bool public isOpen = false; uint256 public maxSupply; uint256 private nextTokenId = 1; mapping(address => bool) private _whitelisted; mapping(address => uint256) public countPurchasedTokens; /** Events */ event AddedToWhitelist(address indexed account); event RemoveFromWhitelist(address indexed account); /** Constructor */ constructor( address superOwner, string memory name, string memory symbol, uint256 initMaxSupply, string memory baseTokenURI, string memory notRevealedURI ) ERC721(name, symbol) { } /** Functions */ /// The required currency value in wei during the method execution based on the price for the token from the current round /// @dev Buy tokens by single wallet function buyToken(uint8 _amount) public payable { require(isOpen, "Minting is not open yet"); require(msg.sender == tx.origin, "no bots"); // solium-disable-line security/no-tx-origin uint256 _nextTokenId = nextTokenId; uint256 _currentSupply = _nextTokenId - 1; uint256 _purchasedByWallet = countPurchasedTokens[msg.sender]; uint8 maxWalletSupply = LIMIT_TOKENS_PER_WALLET_PUBLIC; uint256 currentTokenPrice = PUBLIC_MINT_TOKEN_PRICE; if (isPublic == false) { require(_whitelisted[msg.sender], "You are not whitelisted"); maxWalletSupply = LIMIT_TOKENS_PER_WALLET_PRIVATE; currentTokenPrice = PRIVATE_MINT_TOKEN_PRICE; } require(<FILL_ME>) require(_currentSupply + _amount <= maxSupply, "mint: maxSupply reached"); require(_purchasedByWallet + _amount <= LIMIT_TOKENS_PER_WALLET_PUBLIC, "mint: limit tokens for this wallet reached"); for (uint8 i = 0; i < _amount; i++) { _safeMint(msg.sender, _nextTokenId); unchecked { _nextTokenId++; _purchasedByWallet++; } } unchecked { countPurchasedTokens[msg.sender] = _purchasedByWallet; nextTokenId = _nextTokenId; } } function _baseURI() internal view virtual override returns (string memory) { } /// Only owner /// @dev Change baseURI /// @param newTokenURI New uri to new folder with metadata function setBaseURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// Only owner /// @dev Change baseURI for not revealed tokens /// @param newTokenURI New uri to new folder with metadata function setNotRevealedURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// @dev Return all available tokens function availableTokens() public view returns (uint256) { } /// @dev Return all available tokens function totalSupply() public view returns (uint256) { } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// Only owner /// @dev Reveal URI of tokens function reveal() public onlyOwner { } /// Only owner /// @dev Sets public mint /// @param _isPublic isPublic indicator function setPublic(bool _isPublic) public onlyOwner { } /// Only owner /// @dev Sets open mint /// @param _isOpen isOpen indicator function setOpen(bool _isOpen) public onlyOwner { } /// Only owner /// @dev Add array of addresses to whitelist /// @param _addresses array of addresses function addToWhitelist(address[] memory _addresses) public onlyOwner { } /// Only owner /// @dev Remove array of addresses from whitelist /// @param _addresses array of addresses function removeFromWhitelist(address[] memory _addresses) public onlyOwner { } /// @dev Check if address is on whitelist /// @param _address address to check function isWhitelisted(address _address) public view returns(bool) { } /// Only owner /// @dev Withdraw funds to the receiver address /// @param receiver wallet of receiver funds /// @param amount amount of funds function withdraw(address payable receiver, uint256 amount) public onlyOwner { } /// Only owner /// @dev Creates Giveaways tokens /// @param tokensAmount amount of tokens to be created function createGiveawayTokens( uint8 tokensAmount ) public onlyOwner { } function tokensOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { } }
_amount*currentTokenPrice==msg.value,"invalid coin amount"
363,322
_amount*currentTokenPrice==msg.value
"mint: maxSupply reached"
// SPDX-License-Identifier: UNLICENSED // solium-disable linebreak-style pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract CyberWarriorsArmyNFT is Context, Ownable, ERC721 { using Address for address; using Strings for uint256; string private _baseTokenURI; string private _notRevealedURI; uint8 public LIMIT_TOKENS_PER_WALLET_PUBLIC = 20; uint8 public LIMIT_TOKENS_PER_WALLET_PRIVATE = 5; uint8 public LIMIT_TOKENS_FOR_GIVEAWAYS = 250; uint256 public PRIVATE_MINT_TOKEN_PRICE = 0.035 ether; uint256 public PUBLIC_MINT_TOKEN_PRICE = 0.050 ether; bool public revealed = false; bool public isPublic = false; bool public isOpen = false; uint256 public maxSupply; uint256 private nextTokenId = 1; mapping(address => bool) private _whitelisted; mapping(address => uint256) public countPurchasedTokens; /** Events */ event AddedToWhitelist(address indexed account); event RemoveFromWhitelist(address indexed account); /** Constructor */ constructor( address superOwner, string memory name, string memory symbol, uint256 initMaxSupply, string memory baseTokenURI, string memory notRevealedURI ) ERC721(name, symbol) { } /** Functions */ /// The required currency value in wei during the method execution based on the price for the token from the current round /// @dev Buy tokens by single wallet function buyToken(uint8 _amount) public payable { require(isOpen, "Minting is not open yet"); require(msg.sender == tx.origin, "no bots"); // solium-disable-line security/no-tx-origin uint256 _nextTokenId = nextTokenId; uint256 _currentSupply = _nextTokenId - 1; uint256 _purchasedByWallet = countPurchasedTokens[msg.sender]; uint8 maxWalletSupply = LIMIT_TOKENS_PER_WALLET_PUBLIC; uint256 currentTokenPrice = PUBLIC_MINT_TOKEN_PRICE; if (isPublic == false) { require(_whitelisted[msg.sender], "You are not whitelisted"); maxWalletSupply = LIMIT_TOKENS_PER_WALLET_PRIVATE; currentTokenPrice = PRIVATE_MINT_TOKEN_PRICE; } require(_amount * currentTokenPrice == msg.value, "invalid coin amount"); require(<FILL_ME>) require(_purchasedByWallet + _amount <= LIMIT_TOKENS_PER_WALLET_PUBLIC, "mint: limit tokens for this wallet reached"); for (uint8 i = 0; i < _amount; i++) { _safeMint(msg.sender, _nextTokenId); unchecked { _nextTokenId++; _purchasedByWallet++; } } unchecked { countPurchasedTokens[msg.sender] = _purchasedByWallet; nextTokenId = _nextTokenId; } } function _baseURI() internal view virtual override returns (string memory) { } /// Only owner /// @dev Change baseURI /// @param newTokenURI New uri to new folder with metadata function setBaseURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// Only owner /// @dev Change baseURI for not revealed tokens /// @param newTokenURI New uri to new folder with metadata function setNotRevealedURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// @dev Return all available tokens function availableTokens() public view returns (uint256) { } /// @dev Return all available tokens function totalSupply() public view returns (uint256) { } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// Only owner /// @dev Reveal URI of tokens function reveal() public onlyOwner { } /// Only owner /// @dev Sets public mint /// @param _isPublic isPublic indicator function setPublic(bool _isPublic) public onlyOwner { } /// Only owner /// @dev Sets open mint /// @param _isOpen isOpen indicator function setOpen(bool _isOpen) public onlyOwner { } /// Only owner /// @dev Add array of addresses to whitelist /// @param _addresses array of addresses function addToWhitelist(address[] memory _addresses) public onlyOwner { } /// Only owner /// @dev Remove array of addresses from whitelist /// @param _addresses array of addresses function removeFromWhitelist(address[] memory _addresses) public onlyOwner { } /// @dev Check if address is on whitelist /// @param _address address to check function isWhitelisted(address _address) public view returns(bool) { } /// Only owner /// @dev Withdraw funds to the receiver address /// @param receiver wallet of receiver funds /// @param amount amount of funds function withdraw(address payable receiver, uint256 amount) public onlyOwner { } /// Only owner /// @dev Creates Giveaways tokens /// @param tokensAmount amount of tokens to be created function createGiveawayTokens( uint8 tokensAmount ) public onlyOwner { } function tokensOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { } }
_currentSupply+_amount<=maxSupply,"mint: maxSupply reached"
363,322
_currentSupply+_amount<=maxSupply
"mint: limit tokens for this wallet reached"
// SPDX-License-Identifier: UNLICENSED // solium-disable linebreak-style pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract CyberWarriorsArmyNFT is Context, Ownable, ERC721 { using Address for address; using Strings for uint256; string private _baseTokenURI; string private _notRevealedURI; uint8 public LIMIT_TOKENS_PER_WALLET_PUBLIC = 20; uint8 public LIMIT_TOKENS_PER_WALLET_PRIVATE = 5; uint8 public LIMIT_TOKENS_FOR_GIVEAWAYS = 250; uint256 public PRIVATE_MINT_TOKEN_PRICE = 0.035 ether; uint256 public PUBLIC_MINT_TOKEN_PRICE = 0.050 ether; bool public revealed = false; bool public isPublic = false; bool public isOpen = false; uint256 public maxSupply; uint256 private nextTokenId = 1; mapping(address => bool) private _whitelisted; mapping(address => uint256) public countPurchasedTokens; /** Events */ event AddedToWhitelist(address indexed account); event RemoveFromWhitelist(address indexed account); /** Constructor */ constructor( address superOwner, string memory name, string memory symbol, uint256 initMaxSupply, string memory baseTokenURI, string memory notRevealedURI ) ERC721(name, symbol) { } /** Functions */ /// The required currency value in wei during the method execution based on the price for the token from the current round /// @dev Buy tokens by single wallet function buyToken(uint8 _amount) public payable { require(isOpen, "Minting is not open yet"); require(msg.sender == tx.origin, "no bots"); // solium-disable-line security/no-tx-origin uint256 _nextTokenId = nextTokenId; uint256 _currentSupply = _nextTokenId - 1; uint256 _purchasedByWallet = countPurchasedTokens[msg.sender]; uint8 maxWalletSupply = LIMIT_TOKENS_PER_WALLET_PUBLIC; uint256 currentTokenPrice = PUBLIC_MINT_TOKEN_PRICE; if (isPublic == false) { require(_whitelisted[msg.sender], "You are not whitelisted"); maxWalletSupply = LIMIT_TOKENS_PER_WALLET_PRIVATE; currentTokenPrice = PRIVATE_MINT_TOKEN_PRICE; } require(_amount * currentTokenPrice == msg.value, "invalid coin amount"); require(_currentSupply + _amount <= maxSupply, "mint: maxSupply reached"); require(<FILL_ME>) for (uint8 i = 0; i < _amount; i++) { _safeMint(msg.sender, _nextTokenId); unchecked { _nextTokenId++; _purchasedByWallet++; } } unchecked { countPurchasedTokens[msg.sender] = _purchasedByWallet; nextTokenId = _nextTokenId; } } function _baseURI() internal view virtual override returns (string memory) { } /// Only owner /// @dev Change baseURI /// @param newTokenURI New uri to new folder with metadata function setBaseURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// Only owner /// @dev Change baseURI for not revealed tokens /// @param newTokenURI New uri to new folder with metadata function setNotRevealedURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// @dev Return all available tokens function availableTokens() public view returns (uint256) { } /// @dev Return all available tokens function totalSupply() public view returns (uint256) { } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// Only owner /// @dev Reveal URI of tokens function reveal() public onlyOwner { } /// Only owner /// @dev Sets public mint /// @param _isPublic isPublic indicator function setPublic(bool _isPublic) public onlyOwner { } /// Only owner /// @dev Sets open mint /// @param _isOpen isOpen indicator function setOpen(bool _isOpen) public onlyOwner { } /// Only owner /// @dev Add array of addresses to whitelist /// @param _addresses array of addresses function addToWhitelist(address[] memory _addresses) public onlyOwner { } /// Only owner /// @dev Remove array of addresses from whitelist /// @param _addresses array of addresses function removeFromWhitelist(address[] memory _addresses) public onlyOwner { } /// @dev Check if address is on whitelist /// @param _address address to check function isWhitelisted(address _address) public view returns(bool) { } /// Only owner /// @dev Withdraw funds to the receiver address /// @param receiver wallet of receiver funds /// @param amount amount of funds function withdraw(address payable receiver, uint256 amount) public onlyOwner { } /// Only owner /// @dev Creates Giveaways tokens /// @param tokensAmount amount of tokens to be created function createGiveawayTokens( uint8 tokensAmount ) public onlyOwner { } function tokensOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { } }
_purchasedByWallet+_amount<=LIMIT_TOKENS_PER_WALLET_PUBLIC,"mint: limit tokens for this wallet reached"
363,322
_purchasedByWallet+_amount<=LIMIT_TOKENS_PER_WALLET_PUBLIC
"createGiveawaysTokens: limit tokens for giveaway wallet reached"
// SPDX-License-Identifier: UNLICENSED // solium-disable linebreak-style pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract CyberWarriorsArmyNFT is Context, Ownable, ERC721 { using Address for address; using Strings for uint256; string private _baseTokenURI; string private _notRevealedURI; uint8 public LIMIT_TOKENS_PER_WALLET_PUBLIC = 20; uint8 public LIMIT_TOKENS_PER_WALLET_PRIVATE = 5; uint8 public LIMIT_TOKENS_FOR_GIVEAWAYS = 250; uint256 public PRIVATE_MINT_TOKEN_PRICE = 0.035 ether; uint256 public PUBLIC_MINT_TOKEN_PRICE = 0.050 ether; bool public revealed = false; bool public isPublic = false; bool public isOpen = false; uint256 public maxSupply; uint256 private nextTokenId = 1; mapping(address => bool) private _whitelisted; mapping(address => uint256) public countPurchasedTokens; /** Events */ event AddedToWhitelist(address indexed account); event RemoveFromWhitelist(address indexed account); /** Constructor */ constructor( address superOwner, string memory name, string memory symbol, uint256 initMaxSupply, string memory baseTokenURI, string memory notRevealedURI ) ERC721(name, symbol) { } /** Functions */ /// The required currency value in wei during the method execution based on the price for the token from the current round /// @dev Buy tokens by single wallet function buyToken(uint8 _amount) public payable { } function _baseURI() internal view virtual override returns (string memory) { } /// Only owner /// @dev Change baseURI /// @param newTokenURI New uri to new folder with metadata function setBaseURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// Only owner /// @dev Change baseURI for not revealed tokens /// @param newTokenURI New uri to new folder with metadata function setNotRevealedURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// @dev Return all available tokens function availableTokens() public view returns (uint256) { } /// @dev Return all available tokens function totalSupply() public view returns (uint256) { } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// Only owner /// @dev Reveal URI of tokens function reveal() public onlyOwner { } /// Only owner /// @dev Sets public mint /// @param _isPublic isPublic indicator function setPublic(bool _isPublic) public onlyOwner { } /// Only owner /// @dev Sets open mint /// @param _isOpen isOpen indicator function setOpen(bool _isOpen) public onlyOwner { } /// Only owner /// @dev Add array of addresses to whitelist /// @param _addresses array of addresses function addToWhitelist(address[] memory _addresses) public onlyOwner { } /// Only owner /// @dev Remove array of addresses from whitelist /// @param _addresses array of addresses function removeFromWhitelist(address[] memory _addresses) public onlyOwner { } /// @dev Check if address is on whitelist /// @param _address address to check function isWhitelisted(address _address) public view returns(bool) { } /// Only owner /// @dev Withdraw funds to the receiver address /// @param receiver wallet of receiver funds /// @param amount amount of funds function withdraw(address payable receiver, uint256 amount) public onlyOwner { } /// Only owner /// @dev Creates Giveaways tokens /// @param tokensAmount amount of tokens to be created function createGiveawayTokens( uint8 tokensAmount ) public onlyOwner { uint256 _nextTokenId = nextTokenId; uint256 _currentSupply = totalSupply(); uint256 _purchasedTokensByWallet = countPurchasedTokens[msg.sender]; require(<FILL_ME>) require(_currentSupply + tokensAmount <= maxSupply, "createGiveawaysTokens: Total tokens limit reached"); for (uint8 i = 0; i < tokensAmount; i++) { _safeMint(msg.sender, _nextTokenId); _nextTokenId++; _purchasedTokensByWallet++; } nextTokenId = _nextTokenId; countPurchasedTokens[msg.sender] = _purchasedTokensByWallet; } function tokensOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { } }
_purchasedTokensByWallet+tokensAmount<=LIMIT_TOKENS_FOR_GIVEAWAYS,"createGiveawaysTokens: limit tokens for giveaway wallet reached"
363,322
_purchasedTokensByWallet+tokensAmount<=LIMIT_TOKENS_FOR_GIVEAWAYS
"createGiveawaysTokens: Total tokens limit reached"
// SPDX-License-Identifier: UNLICENSED // solium-disable linebreak-style pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; contract CyberWarriorsArmyNFT is Context, Ownable, ERC721 { using Address for address; using Strings for uint256; string private _baseTokenURI; string private _notRevealedURI; uint8 public LIMIT_TOKENS_PER_WALLET_PUBLIC = 20; uint8 public LIMIT_TOKENS_PER_WALLET_PRIVATE = 5; uint8 public LIMIT_TOKENS_FOR_GIVEAWAYS = 250; uint256 public PRIVATE_MINT_TOKEN_PRICE = 0.035 ether; uint256 public PUBLIC_MINT_TOKEN_PRICE = 0.050 ether; bool public revealed = false; bool public isPublic = false; bool public isOpen = false; uint256 public maxSupply; uint256 private nextTokenId = 1; mapping(address => bool) private _whitelisted; mapping(address => uint256) public countPurchasedTokens; /** Events */ event AddedToWhitelist(address indexed account); event RemoveFromWhitelist(address indexed account); /** Constructor */ constructor( address superOwner, string memory name, string memory symbol, uint256 initMaxSupply, string memory baseTokenURI, string memory notRevealedURI ) ERC721(name, symbol) { } /** Functions */ /// The required currency value in wei during the method execution based on the price for the token from the current round /// @dev Buy tokens by single wallet function buyToken(uint8 _amount) public payable { } function _baseURI() internal view virtual override returns (string memory) { } /// Only owner /// @dev Change baseURI /// @param newTokenURI New uri to new folder with metadata function setBaseURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// Only owner /// @dev Change baseURI for not revealed tokens /// @param newTokenURI New uri to new folder with metadata function setNotRevealedURI(string memory newTokenURI) public onlyOwner returns (bool) { } /// @dev Return all available tokens function availableTokens() public view returns (uint256) { } /// @dev Return all available tokens function totalSupply() public view returns (uint256) { } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// Only owner /// @dev Reveal URI of tokens function reveal() public onlyOwner { } /// Only owner /// @dev Sets public mint /// @param _isPublic isPublic indicator function setPublic(bool _isPublic) public onlyOwner { } /// Only owner /// @dev Sets open mint /// @param _isOpen isOpen indicator function setOpen(bool _isOpen) public onlyOwner { } /// Only owner /// @dev Add array of addresses to whitelist /// @param _addresses array of addresses function addToWhitelist(address[] memory _addresses) public onlyOwner { } /// Only owner /// @dev Remove array of addresses from whitelist /// @param _addresses array of addresses function removeFromWhitelist(address[] memory _addresses) public onlyOwner { } /// @dev Check if address is on whitelist /// @param _address address to check function isWhitelisted(address _address) public view returns(bool) { } /// Only owner /// @dev Withdraw funds to the receiver address /// @param receiver wallet of receiver funds /// @param amount amount of funds function withdraw(address payable receiver, uint256 amount) public onlyOwner { } /// Only owner /// @dev Creates Giveaways tokens /// @param tokensAmount amount of tokens to be created function createGiveawayTokens( uint8 tokensAmount ) public onlyOwner { uint256 _nextTokenId = nextTokenId; uint256 _currentSupply = totalSupply(); uint256 _purchasedTokensByWallet = countPurchasedTokens[msg.sender]; require( _purchasedTokensByWallet + tokensAmount <= LIMIT_TOKENS_FOR_GIVEAWAYS, "createGiveawaysTokens: limit tokens for giveaway wallet reached" ); require(<FILL_ME>) for (uint8 i = 0; i < tokensAmount; i++) { _safeMint(msg.sender, _nextTokenId); _nextTokenId++; _purchasedTokensByWallet++; } nextTokenId = _nextTokenId; countPurchasedTokens[msg.sender] = _purchasedTokensByWallet; } function tokensOfOwnerByIndex(address _owner, uint256 _index) public view returns (uint256) { } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721) returns (bool) { } }
_currentSupply+tokensAmount<=maxSupply,"createGiveawaysTokens: Total tokens limit reached"
363,322
_currentSupply+tokensAmount<=maxSupply
"ERC721: transfer of token that is not own"
pragma solidity ^0.8.11; //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //---------------------------------------------------------------------------- // Openzeppelin contracts //---------------------------------------------------------------------------- /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721 * [ERC721] Non-Fungible Token Standard * * This implmentation of ERC721 needs a maximum number of NFTs to provide * efficient minting. Storage for balance are no longer required reducing * gas significantly. This comes at the price of calculating the balance by * iterating through the entire number of maximum NFTs, but enables the * possibility of creating sections of sequential mint. */ contract ERC721QD is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; //Max Supply uint256 private _maxSupply; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) internal _owners; // 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; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_, uint256 maxSupply_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256 balance) { } /** * @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 Returns the MaxSupply for the Smart Contract */ function maxSupply() public view virtual returns (uint256) { } /** * @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 Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @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 See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @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 { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual{ } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(<FILL_ME>) require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { } /** * @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) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
ERC721QD.ownerOf(tokenId)==from,"ERC721: transfer of token that is not own"
363,388
ERC721QD.ownerOf(tokenId)==from
"invalid message must be 'rotate'"
pragma solidity ^0.6.6; pragma experimental ABIEncoderV2; import "./SymbolConfiguration.sol"; import "../OpenOraclePriceData.sol"; interface AnchorOracle { function numBlocksPerPeriod() external view returns (uint); // approximately 1 hour: 60 seconds/minute * 60 minutes/hour * 1 block/15 seconds function assetPrices(address asset) external view returns (uint); struct Anchor { // floor(block.number / numBlocksPerPeriod) + 1 uint period; // Price in ETH, scaled by 10**18 uint priceMantissa; } function anchors(address asset) external view returns (Anchor memory); } /** * @notice Price feed conforming to Price Oracle Proxy interface. * @dev Use a single open oracle reporter and anchored to and falling back to the Compound v2 oracle system. * @dev The reporter must report at a minimum the USD/ETH price, so that anchor ETH/TOKEN prices can be converted to USD/TOKEN * @author Compound Labs, Inc. */ contract AnchoredView is SymbolConfiguration { /// @notice The mapping of anchored reporter prices by symbol mapping(string => uint) public _prices; /// @notice Circuit breaker for using anchor price oracle directly, ignoring reporter bool public reporterBreaker; /// @notice Circuit breaker for using reporter price without anchor bool public anchorBreaker; /// @notice the Open Oracle Reporter price reporter address public immutable reporter; /// @notice The anchor oracle ( Compound Oracle V1 ) AnchorOracle public immutable anchor; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The highest ratio of the new median price to the anchor price that will still trigger the median price to be updated uint immutable upperBoundAnchorRatio; /// @notice The lowest ratio of the new median price to the anchor price that will still trigger the median price to be updated uint immutable lowerBoundAnchorRatio; /// @notice Average blocks per day, for checking anchor staleness /// @dev 1 day / 15 uint constant blocksInADay = 5760; /// @notice The event emitted when the median price is updated event PriceUpdated(string symbol, uint price); /// @notice The event emitted when new prices are posted but the stored price is not updated due to the anchor event PriceGuarded(string symbol, uint reporter, uint anchor); /// @notice The event emitted when reporter invalidates itself event ReporterInvalidated(address reporter); /// @notice The event emitted when the anchor is cut for staleness event AnchorCut(address anchor); /** * @param data_ Address of the Oracle Data contract * @param reporter_ The reporter address whose price will be used if it matches the anchor * @param anchor_ The PriceOracleProxy that will be used to verify reporter price, or serve prices not given by the reporter * @param anchorToleranceMantissa_ The tolerance allowed between the anchor and median. A tolerance of 10e16 means a new median that is 10% off from the anchor will still be saved * @param tokens_ The CTokens struct that contains addresses for CToken contracts */ constructor(OpenOraclePriceData data_, address reporter_, AnchorOracle anchor_, uint anchorToleranceMantissa_, CTokens memory tokens_) SymbolConfiguration(tokens_) public { } /** * @notice Post open oracle reporter prices, and recalculate stored price by comparing to anchor * @dev We let anyone pay to post anything, but only prices from configured reporter will be stored in the view * @param messages The messages to post to the oracle * @param signatures The signatures for the corresponding messages * @param symbols The symbols to compare to anchor for authoritative reading */ function postPrices(bytes[] calldata messages, bytes[] calldata signatures, string[] calldata symbols) external { } /** * @notice Returns price denominated in USD, with 6 decimals * @dev If price was posted by reporter, return it. Otherwise, return anchor price converted through reporter ETH price. */ function prices(string calldata symbol) external view returns (uint) { } /** * @dev fetch price in eth from proxy and convert to usd price using anchor usdc price. * @dev Anchor price has 36 - underlying decimals, so scale back up to 36 decimals before dividing by by usdc price (30 decimals), yielding 6 decimal usd price */ function getAnchorInUsd(address cToken, uint ethPerUsdc) public view returns (uint) { } function getAnchorInUsd(CTokenMetadata memory tokenConfig, uint ethPerUsdc) internal view returns (uint) { } /** * @notice Implements the method of the PriceOracle interface of Compound v2 and returns returns the Eth price for an asset. * @dev converts from 1e6 decimals of Open Oracle to 1e(36 - underlyingDecimals) of PriceOracleProxy * @param cToken The cToken address for price retrieval * @return The price for the given cToken address */ function getUnderlyingPrice(address cToken) public view returns (uint) { } /** * @notice Get the underlying price of a listed cToken asset * @param cToken The cToken to get the underlying price of * @return The underlying asset price mantissa (scaled by 1e18) */ function readAnchor(address cToken) public view returns (uint) { } function readAnchor(CTokenMetadata memory tokenConfig) internal view returns (uint) { } /// @notice invalidate the reporter, and fall back to using anchor directly in all cases function invalidate(bytes memory message, bytes memory signature) public { (string memory decoded_message, ) = abi.decode(message, (string, address)); require(<FILL_ME>) require(priceData.source(message, signature) == reporter, "invalidation message must come from the reporter"); reporterBreaker = true; emit ReporterInvalidated(reporter); } /// @notice invalidate the anchor, and fall back to using reporter without anchor /// @dev determine if anchor is stale by checking when usdc was last updated /// @dev all anchor prices are converted through usdc price, so if it is stale they are all stale function cutAnchor() external { } // @notice overflow proof multiplication function mul(uint a, uint b) internal pure returns (uint) { } }
keccak256(abi.encodePacked(decoded_message))==keccak256(abi.encodePacked("rotate")),"invalid message must be 'rotate'"
363,504
keccak256(abi.encodePacked(decoded_message))==keccak256(abi.encodePacked("rotate"))
"invalidation message must come from the reporter"
pragma solidity ^0.6.6; pragma experimental ABIEncoderV2; import "./SymbolConfiguration.sol"; import "../OpenOraclePriceData.sol"; interface AnchorOracle { function numBlocksPerPeriod() external view returns (uint); // approximately 1 hour: 60 seconds/minute * 60 minutes/hour * 1 block/15 seconds function assetPrices(address asset) external view returns (uint); struct Anchor { // floor(block.number / numBlocksPerPeriod) + 1 uint period; // Price in ETH, scaled by 10**18 uint priceMantissa; } function anchors(address asset) external view returns (Anchor memory); } /** * @notice Price feed conforming to Price Oracle Proxy interface. * @dev Use a single open oracle reporter and anchored to and falling back to the Compound v2 oracle system. * @dev The reporter must report at a minimum the USD/ETH price, so that anchor ETH/TOKEN prices can be converted to USD/TOKEN * @author Compound Labs, Inc. */ contract AnchoredView is SymbolConfiguration { /// @notice The mapping of anchored reporter prices by symbol mapping(string => uint) public _prices; /// @notice Circuit breaker for using anchor price oracle directly, ignoring reporter bool public reporterBreaker; /// @notice Circuit breaker for using reporter price without anchor bool public anchorBreaker; /// @notice the Open Oracle Reporter price reporter address public immutable reporter; /// @notice The anchor oracle ( Compound Oracle V1 ) AnchorOracle public immutable anchor; /// @notice The Open Oracle Price Data contract OpenOraclePriceData public immutable priceData; /// @notice The highest ratio of the new median price to the anchor price that will still trigger the median price to be updated uint immutable upperBoundAnchorRatio; /// @notice The lowest ratio of the new median price to the anchor price that will still trigger the median price to be updated uint immutable lowerBoundAnchorRatio; /// @notice Average blocks per day, for checking anchor staleness /// @dev 1 day / 15 uint constant blocksInADay = 5760; /// @notice The event emitted when the median price is updated event PriceUpdated(string symbol, uint price); /// @notice The event emitted when new prices are posted but the stored price is not updated due to the anchor event PriceGuarded(string symbol, uint reporter, uint anchor); /// @notice The event emitted when reporter invalidates itself event ReporterInvalidated(address reporter); /// @notice The event emitted when the anchor is cut for staleness event AnchorCut(address anchor); /** * @param data_ Address of the Oracle Data contract * @param reporter_ The reporter address whose price will be used if it matches the anchor * @param anchor_ The PriceOracleProxy that will be used to verify reporter price, or serve prices not given by the reporter * @param anchorToleranceMantissa_ The tolerance allowed between the anchor and median. A tolerance of 10e16 means a new median that is 10% off from the anchor will still be saved * @param tokens_ The CTokens struct that contains addresses for CToken contracts */ constructor(OpenOraclePriceData data_, address reporter_, AnchorOracle anchor_, uint anchorToleranceMantissa_, CTokens memory tokens_) SymbolConfiguration(tokens_) public { } /** * @notice Post open oracle reporter prices, and recalculate stored price by comparing to anchor * @dev We let anyone pay to post anything, but only prices from configured reporter will be stored in the view * @param messages The messages to post to the oracle * @param signatures The signatures for the corresponding messages * @param symbols The symbols to compare to anchor for authoritative reading */ function postPrices(bytes[] calldata messages, bytes[] calldata signatures, string[] calldata symbols) external { } /** * @notice Returns price denominated in USD, with 6 decimals * @dev If price was posted by reporter, return it. Otherwise, return anchor price converted through reporter ETH price. */ function prices(string calldata symbol) external view returns (uint) { } /** * @dev fetch price in eth from proxy and convert to usd price using anchor usdc price. * @dev Anchor price has 36 - underlying decimals, so scale back up to 36 decimals before dividing by by usdc price (30 decimals), yielding 6 decimal usd price */ function getAnchorInUsd(address cToken, uint ethPerUsdc) public view returns (uint) { } function getAnchorInUsd(CTokenMetadata memory tokenConfig, uint ethPerUsdc) internal view returns (uint) { } /** * @notice Implements the method of the PriceOracle interface of Compound v2 and returns returns the Eth price for an asset. * @dev converts from 1e6 decimals of Open Oracle to 1e(36 - underlyingDecimals) of PriceOracleProxy * @param cToken The cToken address for price retrieval * @return The price for the given cToken address */ function getUnderlyingPrice(address cToken) public view returns (uint) { } /** * @notice Get the underlying price of a listed cToken asset * @param cToken The cToken to get the underlying price of * @return The underlying asset price mantissa (scaled by 1e18) */ function readAnchor(address cToken) public view returns (uint) { } function readAnchor(CTokenMetadata memory tokenConfig) internal view returns (uint) { } /// @notice invalidate the reporter, and fall back to using anchor directly in all cases function invalidate(bytes memory message, bytes memory signature) public { (string memory decoded_message, ) = abi.decode(message, (string, address)); require(keccak256(abi.encodePacked(decoded_message)) == keccak256(abi.encodePacked("rotate")), "invalid message must be 'rotate'"); require(<FILL_ME>) reporterBreaker = true; emit ReporterInvalidated(reporter); } /// @notice invalidate the anchor, and fall back to using reporter without anchor /// @dev determine if anchor is stale by checking when usdc was last updated /// @dev all anchor prices are converted through usdc price, so if it is stale they are all stale function cutAnchor() external { } // @notice overflow proof multiplication function mul(uint a, uint b) internal pure returns (uint) { } }
priceData.source(message,signature)==reporter,"invalidation message must come from the reporter"
363,504
priceData.source(message,signature)==reporter
"Cannot exceed max mint amount."
// Creator: Chiru Labs pragma solidity ^0.8.4; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**128 - 1 (max value of uint128). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; } // Compiler will pack the following // _currentIndex and _burnCounter into a single 256bit word. // The tokenId of the next token to be minted. uint128 internal _currentIndex; // The number of tokens burned. uint128 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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(string memory name_, string memory symbol_) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenByIndex(uint256 index) public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } function _numberBurned(address owner) internal view returns (uint256) { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view 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 Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @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 { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } /** * @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) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } pragma solidity ^0.8.4; contract ChumChums is ERC721A, Ownable { uint256 constant public MAX_MINT = 10000; uint256 constant public MAX_MINT_PER_TX = 5; uint256 public cost = 0.056 ether; string public baseURI = ""; string public baseExtension = ".json"; bool public paused; constructor() ERC721A("Chum Chums", "CHUMCHUMS") {} function PublicSaleMint(uint256 quantity) external payable { require(!paused, "Sale is currently paused."); require(quantity > 0, "Mint quantity less than 0."); require(<FILL_ME>) require(quantity <= MAX_MINT_PER_TX, "Cannot exeeds 5 quantity per tx."); require(msg.value >= quantity * cost, "Exceeds mint quantity or not enough eth sent"); _safeMint(msg.sender, quantity); } function WhiteListMint(uint256 quantity) external payable { } function DevMint(uint256 quantity) external onlyOwner { } function setCost(uint256 _newCost) external onlyOwner() { } function setBaseExtension(uint256 _newCost) external onlyOwner() { } function setBaseURI(string calldata uri) external onlyOwner { } function toggleSale() external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function withdraw() external onlyOwner { } }
totalSupply()+quantity<=MAX_MINT,"Cannot exceed max mint amount."
363,640
totalSupply()+quantity<=MAX_MINT
null
pragma solidity ^0.6.0; /** * * UniPower's Liquidity Vault * * Simple smart contract to decentralize the uniswap liquidity, providing proof of liquidity indefinitely. * For more info visit: https://unipower.network * */ contract LiquidityVault { ERC20 constant AludraNetwork = ERC20(0xb339FcA531367067e98d7c4f9303Ffeadff7B881); ERC20 constant liquidityToken = ERC20(0x9076a5277eD7D8A89496B7132c0Bf4503a9A9F93); address cash = msg.sender; uint256 public lastTradingFeeDistribution; uint256 public migrationLock; address public migrationRecipient; function distributeWeekly(address recipient) external { uint256 liquidityBalance = liquidityToken.balanceOf(address(this)); require(<FILL_ME>) // Max once a day require(msg.sender == cash); liquidityToken.transfer(recipient, (liquidityBalance / 100)); lastTradingFeeDistribution = now; } function startLiquidityMigration(address recipient) external { } function processMigration() external { } function getcash() public view returns (address){ } function getLiquidityBalance() public view returns (uint256){ } } interface ERC20 { 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 approveAndCall(address spender, uint tokens, bytes calldata data) external returns (bool success); 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); }
lastTradingFeeDistribution+7days<now
363,649
lastTradingFeeDistribution+7days<now
null
pragma solidity ^0.4.11; // // SafeMath // // Ownable // Destructible // Pausable // // ERC20Basic // ERC20 : ERC20Basic // BasicToken : ERC20Basic // StandardToken : ERC20, BasicToken // MintableToken : StandardToken, Ownable // PausableToken : StandardToken, Pausable // // VanityToken : MintableToken, PausableToken // // VanityCrowdsale : Ownable // /** * @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) { } } /** * @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. */ function Ownable() 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 Destructible * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner. */ contract Destructible is Ownable { function Destructible() public payable { } /** * @dev Transfers the current balance to the owner and terminates the contract. */ function destroy() onlyOwner public { } function destroyAndSend(address _recipient) 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() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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 Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint256 balance) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @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 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 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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner public returns (bool) { } } /** * @title Pausable token * * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { } } contract VanityToken is MintableToken, PausableToken { // Metadata string public constant symbol = "VIP"; string public constant name = "VipCoin"; uint8 public constant decimals = 18; string public constant version = "1.0"; } contract VanityCrowdsale is Ownable { using SafeMath for uint256; // Constants uint256 public constant TOKEN_RATE = 1000; // 1 ETH = 1000 VPL uint256 public constant OWNER_TOKENS_PERCENT = 100; // 1:1 // Variables uint256 public startTime; uint256 public endTime; address public ownerWallet; mapping(address => uint) public registeredInDay; address[] public participants; uint256 public totalUsdAmount; uint256 public bonusMultiplier; VanityToken public token; bool public finalized; bool public distributed; uint256 public distributedCount; uint256 public distributedTokens; // Events event Finalized(); event Distributed(); // Constructor and accessors function VanityCrowdsale(uint256 _startTime, uint256 _endTime, address _ownerWallet) public { } function registered(address wallet) public constant returns(bool) { } function participantsCount() public constant returns(uint) { } function setOwnerWallet(address _ownerWallet) public onlyOwner { } function computeTotalEthAmount() public constant returns(uint256) { } function setTotalUsdAmount(uint256 _totalUsdAmount) public onlyOwner { } // Participants methods function () public payable { } function registerParticipant() public payable { require(!finalized); require(startTime <= now && now <= endTime); require(<FILL_ME>) registeredInDay[msg.sender] = 1 + now.sub(startTime).div(24*60*60); participants.push(msg.sender); if (msg.value > 0) { // No money => No need to handle recirsive calls msg.sender.transfer(msg.value); } } // Owner methods function finalize() public onlyOwner { } function participantBonus(address participant) public constant returns(uint) { } function distribute(uint count) public onlyOwner { } }
registeredInDay[msg.sender]==0
363,739
registeredInDay[msg.sender]==0
null
pragma solidity ^0.4.11; // // SafeMath // // Ownable // Destructible // Pausable // // ERC20Basic // ERC20 : ERC20Basic // BasicToken : ERC20Basic // StandardToken : ERC20, BasicToken // MintableToken : StandardToken, Ownable // PausableToken : StandardToken, Pausable // // VanityToken : MintableToken, PausableToken // // VanityCrowdsale : Ownable // /** * @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) { } } /** * @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. */ function Ownable() 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 Destructible * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner. */ contract Destructible is Ownable { function Destructible() public payable { } /** * @dev Transfers the current balance to the owner and terminates the contract. */ function destroy() onlyOwner public { } function destroyAndSend(address _recipient) 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() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @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 Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint256 balance) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @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 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 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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner public returns (bool) { } } /** * @title Pausable token * * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { } } contract VanityToken is MintableToken, PausableToken { // Metadata string public constant symbol = "VIP"; string public constant name = "VipCoin"; uint8 public constant decimals = 18; string public constant version = "1.0"; } contract VanityCrowdsale is Ownable { using SafeMath for uint256; // Constants uint256 public constant TOKEN_RATE = 1000; // 1 ETH = 1000 VPL uint256 public constant OWNER_TOKENS_PERCENT = 100; // 1:1 // Variables uint256 public startTime; uint256 public endTime; address public ownerWallet; mapping(address => uint) public registeredInDay; address[] public participants; uint256 public totalUsdAmount; uint256 public bonusMultiplier; VanityToken public token; bool public finalized; bool public distributed; uint256 public distributedCount; uint256 public distributedTokens; // Events event Finalized(); event Distributed(); // Constructor and accessors function VanityCrowdsale(uint256 _startTime, uint256 _endTime, address _ownerWallet) public { } function registered(address wallet) public constant returns(bool) { } function participantsCount() public constant returns(uint) { } function setOwnerWallet(address _ownerWallet) public onlyOwner { } function computeTotalEthAmount() public constant returns(uint256) { } function setTotalUsdAmount(uint256 _totalUsdAmount) public onlyOwner { } // Participants methods function () public payable { } function registerParticipant() public payable { } // Owner methods function finalize() public onlyOwner { } function participantBonus(address participant) public constant returns(uint) { } function distribute(uint count) public onlyOwner { require(<FILL_ME>) require(count > 0 && distributedCount + count <= participants.length); for (uint i = 0; i < count; i++) { address participant = participants[distributedCount + i]; uint256 bonus = participantBonus(participant); uint256 tokens = participant.balance.mul(TOKEN_RATE).mul(100 + bonus).div(100); token.mint(participant, tokens); distributedTokens += tokens; } distributedCount += count; if (distributedCount == participants.length) { uint256 ownerTokens = distributedTokens.mul(OWNER_TOKENS_PERCENT).div(100); token.mint(ownerWallet, ownerTokens); token.finishMinting(); token.unpause(); distributed = true; Distributed(); } } }
finalized&&!distributed
363,739
finalized&&!distributed
"CrownyToken: totalSupply cannot exceed the max supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract CrownyToken is ERC20, Pausable, Ownable { using SafeMath for uint256; uint256 immutable public maxSupply; constructor (string memory _name, string memory _symbol, uint256 _maxSupply) ERC20(_name, _symbol) { } function burn(uint256 amount) external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function mint(address to, uint256 amount) external onlyOwner { require(<FILL_ME>) _mint(to, amount); } function _beforeTokenTransfer(address from, address to, uint256 amount) internal override { } }
totalSupply().add(amount)<=maxSupply,"CrownyToken: totalSupply cannot exceed the max supply"
363,758
totalSupply().add(amount)<=maxSupply
null
pragma solidity ^0.5.12; // EtherBuy is a DApp to buy and sell anything on Ethereum. contract EtherBuy { struct oneSale { address payable seller; string title; string content; uint price; uint locked; //money will be locked until the buyer sends feedback or the seller cancels sale bool available; } struct oneBuy { address payable buyer; string message; bool lockReleased; bool hasReceived; string commentByBuyer; string commentBySeller; } oneSale[] public sales; mapping(uint => oneBuy[]) public buys; event SellEvent(); event BuyEvent(uint SaleID, string message); event CancelEvent(uint SaleID); event FeedbackEvent(uint SaleID, uint BuyID); function sell(string memory title, string memory content, uint price, uint locked) public { } function buy(uint SaleID, string memory message) public payable { require(<FILL_ME>) require(msg.value==sales[SaleID].price+sales[SaleID].locked); buys[SaleID].push(oneBuy( msg.sender, message, false, false, "", "" )); sales[SaleID].seller.transfer(sales[SaleID].price); emit BuyEvent(SaleID, message); } function cancel(uint SaleID) public { } function buyerFeedback(uint SaleID, uint BuyID, bool hasReceived, string memory comment) public { } function sellerFeedback(uint SaleID, uint BuyID, string memory comment) public { } function getCountOfSales() view public returns (uint) { } function getCountOfBuys(uint SaleID) view public returns (uint) { } }
sales[SaleID].available
363,883
sales[SaleID].available
null
pragma solidity ^0.5.11; contract Owned { // State variable address payable owner; // Modifiers modifier onlyOwner() { } // constructor constructor() public { } } contract MoneyPotSystem is Owned { // Custom types struct Donation { address payable donor; uint amount; } struct MoneyPot { uint id; address payable author; address payable beneficiary; string name; string description; address[] donors; mapping(uint32 => Donation) donations; uint32 donationsCounter; bool open; uint feesAmount; } // State variables mapping(uint => MoneyPot) public moneypots; mapping(address => uint256[]) public addressToMoneyPot; uint fees; uint feesAmount; uint moneypotCounter; bool contractOpen; // Modifiers modifier onlyContractOpen() { } // Events event createMoneyPotEvent ( uint indexed _id, address payable indexed _author, string _name, uint _feesAmount, address[] _donors ); event chipInEvent ( uint indexed _id, address payable indexed _donor, uint256 _amount, string _name, uint _donation, uint32 indexed _donationId ); event closeEvent ( uint indexed _id, address payable indexed _benefeciary, uint256 _amount, string _name, address payable indexed _sender ); event addDonorEvent( uint indexed _id, address payable indexed _donor ); event feesAmountChangeEvent( uint _oldFeesAmount, uint _newFeesAmount ); event withdrawFeesEvent( uint _feesAmount ); constructor() public { } function createMoneyPot(string memory _name, string memory _description, address payable _benefeciary, address[] memory _donors) onlyContractOpen public { } function addDonor(uint _id, address payable _donor) public { // we check whether the money pot exists require(_id >= 0 && _id <= moneypotCounter); MoneyPot storage myMoneyPot = moneypots[_id]; // we check if moneypot is open require(<FILL_ME>) //check caller is author require(myMoneyPot.author == msg.sender); // check if donor already exist bool donorFound = false; for (uint j = 0; j < myMoneyPot.donors.length; j++) { if (myMoneyPot.donors[j] == _donor) { donorFound = true; break; } } require(!donorFound); // Add donor myMoneyPot.donors.push(_donor); // le bénéficiaire possède deja l'identififiant de son pot commun if(myMoneyPot.beneficiary != _donor) { addressToMoneyPot[_donor].push(_id); } emit addDonorEvent(_id, _donor); } // fetch the number of money pots in the truffleContract function getNumberOfMoneyPots() public view returns (uint256) { } function getNumberOfMyMoneyPots() public view returns (uint256) { } function getMyMoneyPotsIds(address who) public view returns (uint256[] memory) { } function getDonors(uint256 moneyPotId) public view returns (address[] memory) { } function getDonation(uint moneyPotId, uint32 donationId) public view returns (address donor, uint amount) { } function chipIn(uint _id) payable public { } function withdrawFees() onlyOwner public { } function getFeesAmount() public view returns (uint) { } function setFeesAmount(uint _amount) onlyOwner public { } function getFees() onlyOwner public view returns (uint) { } function getMoneyPotAmount(uint _id) public view returns (uint256) { } function close(uint _id) public { } function closeAllMoneypot() onlyOwner public { } function closeContract() onlyOwner public { } function openContract() onlyOwner public { } function isOpen() public view returns (bool) { } // kill the smart contract function kill() onlyOwner public { } }
myMoneyPot.open
363,977
myMoneyPot.open
null
pragma solidity ^0.5.11; contract Owned { // State variable address payable owner; // Modifiers modifier onlyOwner() { } // constructor constructor() public { } } contract MoneyPotSystem is Owned { // Custom types struct Donation { address payable donor; uint amount; } struct MoneyPot { uint id; address payable author; address payable beneficiary; string name; string description; address[] donors; mapping(uint32 => Donation) donations; uint32 donationsCounter; bool open; uint feesAmount; } // State variables mapping(uint => MoneyPot) public moneypots; mapping(address => uint256[]) public addressToMoneyPot; uint fees; uint feesAmount; uint moneypotCounter; bool contractOpen; // Modifiers modifier onlyContractOpen() { } // Events event createMoneyPotEvent ( uint indexed _id, address payable indexed _author, string _name, uint _feesAmount, address[] _donors ); event chipInEvent ( uint indexed _id, address payable indexed _donor, uint256 _amount, string _name, uint _donation, uint32 indexed _donationId ); event closeEvent ( uint indexed _id, address payable indexed _benefeciary, uint256 _amount, string _name, address payable indexed _sender ); event addDonorEvent( uint indexed _id, address payable indexed _donor ); event feesAmountChangeEvent( uint _oldFeesAmount, uint _newFeesAmount ); event withdrawFeesEvent( uint _feesAmount ); constructor() public { } function createMoneyPot(string memory _name, string memory _description, address payable _benefeciary, address[] memory _donors) onlyContractOpen public { } function addDonor(uint _id, address payable _donor) public { // we check whether the money pot exists require(_id >= 0 && _id <= moneypotCounter); MoneyPot storage myMoneyPot = moneypots[_id]; // we check if moneypot is open require(myMoneyPot.open); //check caller is author require(myMoneyPot.author == msg.sender); // check if donor already exist bool donorFound = false; for (uint j = 0; j < myMoneyPot.donors.length; j++) { if (myMoneyPot.donors[j] == _donor) { donorFound = true; break; } } require(<FILL_ME>) // Add donor myMoneyPot.donors.push(_donor); // le bénéficiaire possède deja l'identififiant de son pot commun if(myMoneyPot.beneficiary != _donor) { addressToMoneyPot[_donor].push(_id); } emit addDonorEvent(_id, _donor); } // fetch the number of money pots in the truffleContract function getNumberOfMoneyPots() public view returns (uint256) { } function getNumberOfMyMoneyPots() public view returns (uint256) { } function getMyMoneyPotsIds(address who) public view returns (uint256[] memory) { } function getDonors(uint256 moneyPotId) public view returns (address[] memory) { } function getDonation(uint moneyPotId, uint32 donationId) public view returns (address donor, uint amount) { } function chipIn(uint _id) payable public { } function withdrawFees() onlyOwner public { } function getFeesAmount() public view returns (uint) { } function setFeesAmount(uint _amount) onlyOwner public { } function getFees() onlyOwner public view returns (uint) { } function getMoneyPotAmount(uint _id) public view returns (uint256) { } function close(uint _id) public { } function closeAllMoneypot() onlyOwner public { } function closeContract() onlyOwner public { } function openContract() onlyOwner public { } function isOpen() public view returns (bool) { } // kill the smart contract function kill() onlyOwner public { } }
!donorFound
363,977
!donorFound
null
pragma solidity ^0.5.11; contract Owned { // State variable address payable owner; // Modifiers modifier onlyOwner() { } // constructor constructor() public { } } contract MoneyPotSystem is Owned { // Custom types struct Donation { address payable donor; uint amount; } struct MoneyPot { uint id; address payable author; address payable beneficiary; string name; string description; address[] donors; mapping(uint32 => Donation) donations; uint32 donationsCounter; bool open; uint feesAmount; } // State variables mapping(uint => MoneyPot) public moneypots; mapping(address => uint256[]) public addressToMoneyPot; uint fees; uint feesAmount; uint moneypotCounter; bool contractOpen; // Modifiers modifier onlyContractOpen() { } // Events event createMoneyPotEvent ( uint indexed _id, address payable indexed _author, string _name, uint _feesAmount, address[] _donors ); event chipInEvent ( uint indexed _id, address payable indexed _donor, uint256 _amount, string _name, uint _donation, uint32 indexed _donationId ); event closeEvent ( uint indexed _id, address payable indexed _benefeciary, uint256 _amount, string _name, address payable indexed _sender ); event addDonorEvent( uint indexed _id, address payable indexed _donor ); event feesAmountChangeEvent( uint _oldFeesAmount, uint _newFeesAmount ); event withdrawFeesEvent( uint _feesAmount ); constructor() public { } function createMoneyPot(string memory _name, string memory _description, address payable _benefeciary, address[] memory _donors) onlyContractOpen public { } function addDonor(uint _id, address payable _donor) public { } // fetch the number of money pots in the truffleContract function getNumberOfMoneyPots() public view returns (uint256) { } function getNumberOfMyMoneyPots() public view returns (uint256) { } function getMyMoneyPotsIds(address who) public view returns (uint256[] memory) { } function getDonors(uint256 moneyPotId) public view returns (address[] memory) { } function getDonation(uint moneyPotId, uint32 donationId) public view returns (address donor, uint amount) { } function chipIn(uint _id) payable public { } function withdrawFees() onlyOwner public { } function getFeesAmount() public view returns (uint) { } function setFeesAmount(uint _amount) onlyOwner public { } function getFees() onlyOwner public view returns (uint) { } function getMoneyPotAmount(uint _id) public view returns (uint256) { } function close(uint _id) public { } function closeAllMoneypot() onlyOwner public { } function closeContract() onlyOwner public { } function openContract() onlyOwner public { require(<FILL_ME>) contractOpen = true; } function isOpen() public view returns (bool) { } // kill the smart contract function kill() onlyOwner public { } }
!contractOpen
363,977
!contractOpen
null
pragma solidity ^0.5.0; contract OldBaseRegistrarImplementation is BaseRegistrar, ERC721 { // Expiration timestamp for migrated domains. uint public transferPeriodEnds; // The interim registrar Registrar public previousRegistrar; // A map of expiry times mapping(uint256=>uint) expiries; uint constant public MIGRATION_LOCK_PERIOD = 28 days; bytes4 constant private INTERFACE_META_ID = bytes4(keccak256("supportsInterface(bytes4)")); bytes4 constant private ERC721_ID = bytes4( keccak256("balanceOf(uint256)") ^ keccak256("ownerOf(uint256)") ^ keccak256("approve(address,uint256)") ^ keccak256("getApproved(uint256)") ^ keccak256("setApprovalForAll(address,bool)") ^ keccak256("isApprovedForAll(address,address)") ^ keccak256("transferFrom(address,address,uint256)") ^ keccak256("safeTransferFrom(address,address,uint256)") ^ keccak256("safeTransferFrom(address,address,uint256,bytes)") ); bytes4 constant private RECLAIM_ID = bytes4(keccak256("reclaim(uint256,address)")); constructor(ENS _ens, HashRegistrar _previousRegistrar, bytes32 _baseNode, uint _transferPeriodEnds) public { } modifier live { require(<FILL_ME>) _; } modifier onlyController { } /** * @dev Gets the owner of the specified token ID. Names become unowned * when their registration expires. * @param tokenId uint256 ID of the token to query the owner of * @return address currently marked as the owner of the given token ID */ function ownerOf(uint256 tokenId) public view returns (address) { } // Authorises a controller, who can register and renew domains. function addController(address controller) external onlyOwner { } // Revoke controller permission for an address. function removeController(address controller) external onlyOwner { } // Set the resolver for the TLD this registrar manages. function setResolver(address resolver) external onlyOwner { } // Returns the expiration timestamp of the specified id. function nameExpires(uint256 id) external view returns(uint) { } // Returns true iff the specified name is available for registration. function available(uint256 id) public view returns(bool) { } /** * @dev Register a name. */ function register(uint256 id, address owner, uint duration) external returns(uint) { } /** * @dev Register a name. */ function registerOnly(uint256 id, address owner, uint duration) external returns(uint) { } /** * @dev Register a name. */ function _register(uint256 id, address owner, uint duration, bool updateRegistry) internal live onlyController returns(uint) { } function renew(uint256 id, uint duration) external live onlyController returns(uint) { } /** * @dev Reclaim ownership of a name in ENS, if you own it in the registrar. */ function reclaim(uint256 id, address owner) external live { } /** * @dev Transfers a registration from the initial registrar. * This function is called by the initial registrar when a user calls `transferRegistrars`. */ function acceptRegistrarTransfer(bytes32 label, Deed deed, uint) external live { } function supportsInterface(bytes4 interfaceID) external view returns (bool) { } }
ens.owner(baseNode)==address(this)
364,001
ens.owner(baseNode)==address(this)