comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"EW10: You are not the offerer in position 0."
// Solidity 0.8.7-e28d00a7 optimization 200 (default) pragma solidity ^0.8.6; interface Etheria { function getOwner(uint8 col, uint8 row) external view returns(address); function getOfferers(uint8 col, uint8 row) external view returns (address[] memory); function getOffers(uint8 col, uint8 row) external view returns (uint[] memory); function setName(uint8 col, uint8 row, string memory _n) external; function setStatus(uint8 col, uint8 row, string memory _s) external payable; function makeOffer(uint8 col, uint8 row) external payable; function acceptOffer(uint8 col, uint8 row, uint8 index, uint amt) external; function deleteOffer(uint8 col, uint8 row, uint8 index, uint amt) external; } contract EtheriaWrapper1pt0 is Ownable, ERC721 { address public _etheriaAddress; Etheria public _etheria; mapping (uint256 => address) public wrapInitializers; constructor() payable ERC721("Etheria Wrapper v1pt0 2015-10-22", "EW10") { } receive() external payable { } event WrapStarted(address indexed addr, uint256 indexed _locationID); event WrapFinished(address indexed addr, uint256 indexed _locationID); event Unwrapped(address indexed addr, uint256 indexed _locationID); event NameSet(address indexed addr, uint256 indexed _locationID, string name); event StatusSet(address indexed addr, uint256 indexed _locationID, string status); event OfferRejected(address indexed addr, uint256 indexed _locationID, uint offer, address offerer); event OfferRetracted(address indexed addr, uint256 indexed _locationID); // offerer is always address(this) and amount always 0.01 ETH function _getIndex(uint8 col, uint8 row) internal pure returns (uint256) { } // ***** Why are v0.9 and v1.0 wrappable while v1.1 and v1.2 are not? (as of March 2022) ***** // // Etheria was developed long before any NFT exchanges existed. As such, in versions v0.9 and // v1.0, I added internal exchange logic (hereinafter the "offer system") to facilitate trading before abandoning // it in favor of a simple "setOwner" function in v1.1 and v1.2. // // While this "offer system" was really poorly designed and clunky (the result of a manic episode of moving fast // and "testing in production"), it does actually work and work reliably if the proper precautions are taken. // // What's more, this "offer system" used msg.sender (v0.9 and v1.0) instead of tx.origin (v1.1 and v1.2) which // which means v0.9 and v1.0 tiles are ownable by smart contracts... i.e. they are WRAPPABLE // // Wrappability means that this terrible "offer system" will be entirely bypassed after wrapping is complete // because it's the WRAPPER that is traded, not the base token. The base token is owned by the wrapper smart contract // until unwrap time when the base token is transferred to the new owner. // ***** How the "offer system" works in v0.9 and v1.0 ***** (don't use this except to wrap/unwrap) // // Each v0.9 and v1.0 tile has two arrays: offers[] and offerers[] which can be up to 10 items long. // When a new offer comes in, the ETH is stored in the contract and the offers[] and offerers[] arrays are expanded // by 1 item to store the bid. // // The tile owner can then rejectOffer(col, row, offerIndex) or acceptOffer(col, row, offerIndex) to transfer // the tile to the successful bidder. // ***** How to wrap ***** // // 0. Start with the tile owned by your normal Ethereum account (not a smart contract) and make sure there are no // unwanted offers in the offer system. Call rejectOffer(col, row) until the arrays are completely empty. // 1. Call the wrapper contract's "makeOfferViaWrapper(col,row)" along with 0.01 ETH to force the wrapper to make // an offer on the base token. Only the tile owner can do this. The wrapper will save the owner's address. // 1b. Check the base token's offerer and offerers arrays. They should be 1 item long each, containing 0.01 and the // address of the *wrapper*. Also check wrapInitializer with getWrapInitializer(col,row) // 2. Now call acceptOffer(col,row) for your tile on the base contract. Ownership is transferred to the wrapper // which already has a record of your ownership. // 3. Call finishWrap() from previous owner to complete the process. // ***** How to unwrap ***** (Note: you probably shouldn't) // // 0. Start with the tile owned by the wrapper. Call rejectOfferViaWrapper(col, row) to clear out offer arrays. // 1. Call makeOffer(col,row) with 0.01 ETH from the destination account. Check the base token's offerer and offerers arrays. // They should be 1 item long each, containing 0.01 and the address of the destination account. // 2. Now call acceptOfferViaWrapper(col,row) for your tile to unwrap the tile to the desired destination. // ----------------------------------------------------------------------------------------------------------------- // External convenience function to let the user check who, if anyone, is the wrapInitializer for this col,row // function getWrapInitializer(uint8 col, uint8 row) external view returns (address) { } // WRAP STEP(S) 0: // Reject all standing offers on the base tile you directly own. // WRAP STEP 1: // Start the wrapping process by placing an offer on the target tile from the wrapper contract // Pre-requisites: // msg.sender must own the base tile (automatically excludes water, guarantees 721 does not exist) // offer/ers arrays must be empty (all standing offers rejected) // incoming value must be exactly 0.01 ETH // function makeOfferViaWrapper(uint8 col, uint8 row) external payable { } // post state: // Wrapper has placed a 0.01 ETH offer in position 0 of the specified tile that msg.sender owns, // Wrapper has recorded msg.sender as the wrapInitializer for the specified tile // WrapStarted event fired // WRAP STEP 2: // Call etheria.acceptOffer on the offer this wrapper made on the base tile to give the wrapper ownership (in position 0 only!) // post state: // Wrapper now owns the tile, the previous owner (paid 0.01 ETH) is still recorded as the wrapInitializer for it. 721 not yet issued. // 0.009 and 0.001 ETH have been sent to the base tile owner and Etheria contract creator, respectively, after the "sale" // base tile offer/ers arrays cleared out and refunded, if necessary // Note: There is no event for the offer acceptance on the base tile // Note: You *must* complete the wrapping process in step 3, even if you have changed your mind or want to unwrap. // The wrapper now technically owns the tile and you can't do anything with it until you finishWrap() first. // WRAP STEP 3: // Finishes the wrapping process by minting the 721 token // Pre-requisites: // caller must be the wrapInitializer for this tile // tile must be owned by the wrapper // function finishWrap(uint8 col, uint8 row) external { } //post state: // 721 token created and owned by caller // wrapInitializer for this tile reset to 0 // WrapFinished event fired // UNWRAP STEP(S) 0 (if necessary): // rejectOfferViaWrapper enables the 721-ownerOf (you) to clear out standing offers on the base tile via the wrapper // (since the wrapper technically owns the base tile). W/o this, the tile's 10 offer slots could be DoS-ed with bogus offers // Note: This always rejects the 0 index offer to enforce the condition that our legit unwrapping offer sit // in position 0, the only position where we can guarantee no frontrunning/switcharoo issues // Pre-requisites: // The 721 exists for the col,row // There is 1+ offer(s) on the base tile // You own the 721 // The wrapper owns the base tile // function rejectOfferViaWrapper(uint8 col, uint8 row) external { } //post state: // One less offer in the base tile's offers array // OfferRejected event fired // UNWRAP STEP 1: // call etheria.makeOffer with 0.01 ETH from the same account that owns the 721 // then make sure it's the offer sitting in position 0. If it isn't, rejectOfferViaWrapper until it is. // UNWRAP STEP 2: // Accepts the offer in position 0, the only position we can guarantee won't be switcharooed // Pre-requisites: // 721 must exist // You must own the 721 // offer on base tile in position 0 must be 0.01 ETH from the 721-owner // function acceptOfferViaWrapper(uint8 col, uint8 row) external { uint256 _locationID = _getIndex(col, row); require(_exists(_locationID), "EW10: That 721 does not exist."); address owner = ERC721.ownerOf(_locationID); require(owner == msg.sender, "EW10: You must be the 721-ownerOf the tile."); require(<FILL_ME>) require(_etheria.getOffers(col,row)[0] == 10000000000000000, "EW10: The offer in position 0 is not 0.01 ETH as expected."); _etheria.acceptOffer(col, row, 0, 10000000000000000); // 0.001 will be sent to Etheria creator and 0.009 will be sent to this contract require(_etheria.getOwner(col,row) == msg.sender, "EW10: You were not made the base tile owner as expected. Reverting."); _burn(_locationID); require(!_exists(_locationID), "EW10: The 721 was not burned as expected. Reverting."); emit Unwrapped(msg.sender, _locationID); // 721 owner unwrapped _locationID } // post state: // 721 burned, base tile now owned by msg.sender // 0.001 sent to Etheria contract creator, 0.009 sent to this wrapper for the "sale" // Note: This 0.009 ETH is not withdrawable to you due to complexity and gas. Consider it an unwrap fee. :) // Base tile offer/ers arrays cleared out and refunded, if necessary // NOTE: retractOfferViaWrapper is absent due to being unnecessary and overly complex. The tile owner can // always remove any unwanted offers, including any made from this wrapper. function setNameViaWrapper(uint8 col, uint8 row, string memory _n) external { } function setStatusViaWrapper(uint8 col, uint8 row, string memory _n) external payable { } // In the extremely unlikely event somebody is being stupid and filling all the slots on the tiles AND maliciously // keeping a bot running to continually insert more bogus 0.01 ETH bids into the slots even as the tile owner // rejects them (i.e. a DoS attack meant to prevent un/wrapping), the tile owner can still get their wrapper bid onto // the tile via flashbots or similar (avoiding the mempool): Simply etheria.rejectOffer and wrapper.makeOfferViaWrapper // in back-to-back transactions, then reject offers until the wrapper offer is in slot 0, ready to wrap. (It doesn't // matter if the bot creates 9 more in the remaining slots.) Hence, there is nothing an attacker can do to DoS a tile. /** * @dev sets base token URI and the token extension... */ string public _baseTokenURI; string public _baseTokenExtension; function setBaseTokenURI(string memory __baseTokenURI) public onlyOwner { } function setTokenExtension(string memory __baseTokenExtension) public onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function empty() external onlyOwner { } }
_etheria.getOfferers(col,row)[0]==msg.sender,"EW10: You are not the offerer in position 0."
331,307
_etheria.getOfferers(col,row)[0]==msg.sender
"EW10: The 721 was not burned as expected. Reverting."
// Solidity 0.8.7-e28d00a7 optimization 200 (default) pragma solidity ^0.8.6; interface Etheria { function getOwner(uint8 col, uint8 row) external view returns(address); function getOfferers(uint8 col, uint8 row) external view returns (address[] memory); function getOffers(uint8 col, uint8 row) external view returns (uint[] memory); function setName(uint8 col, uint8 row, string memory _n) external; function setStatus(uint8 col, uint8 row, string memory _s) external payable; function makeOffer(uint8 col, uint8 row) external payable; function acceptOffer(uint8 col, uint8 row, uint8 index, uint amt) external; function deleteOffer(uint8 col, uint8 row, uint8 index, uint amt) external; } contract EtheriaWrapper1pt0 is Ownable, ERC721 { address public _etheriaAddress; Etheria public _etheria; mapping (uint256 => address) public wrapInitializers; constructor() payable ERC721("Etheria Wrapper v1pt0 2015-10-22", "EW10") { } receive() external payable { } event WrapStarted(address indexed addr, uint256 indexed _locationID); event WrapFinished(address indexed addr, uint256 indexed _locationID); event Unwrapped(address indexed addr, uint256 indexed _locationID); event NameSet(address indexed addr, uint256 indexed _locationID, string name); event StatusSet(address indexed addr, uint256 indexed _locationID, string status); event OfferRejected(address indexed addr, uint256 indexed _locationID, uint offer, address offerer); event OfferRetracted(address indexed addr, uint256 indexed _locationID); // offerer is always address(this) and amount always 0.01 ETH function _getIndex(uint8 col, uint8 row) internal pure returns (uint256) { } // ***** Why are v0.9 and v1.0 wrappable while v1.1 and v1.2 are not? (as of March 2022) ***** // // Etheria was developed long before any NFT exchanges existed. As such, in versions v0.9 and // v1.0, I added internal exchange logic (hereinafter the "offer system") to facilitate trading before abandoning // it in favor of a simple "setOwner" function in v1.1 and v1.2. // // While this "offer system" was really poorly designed and clunky (the result of a manic episode of moving fast // and "testing in production"), it does actually work and work reliably if the proper precautions are taken. // // What's more, this "offer system" used msg.sender (v0.9 and v1.0) instead of tx.origin (v1.1 and v1.2) which // which means v0.9 and v1.0 tiles are ownable by smart contracts... i.e. they are WRAPPABLE // // Wrappability means that this terrible "offer system" will be entirely bypassed after wrapping is complete // because it's the WRAPPER that is traded, not the base token. The base token is owned by the wrapper smart contract // until unwrap time when the base token is transferred to the new owner. // ***** How the "offer system" works in v0.9 and v1.0 ***** (don't use this except to wrap/unwrap) // // Each v0.9 and v1.0 tile has two arrays: offers[] and offerers[] which can be up to 10 items long. // When a new offer comes in, the ETH is stored in the contract and the offers[] and offerers[] arrays are expanded // by 1 item to store the bid. // // The tile owner can then rejectOffer(col, row, offerIndex) or acceptOffer(col, row, offerIndex) to transfer // the tile to the successful bidder. // ***** How to wrap ***** // // 0. Start with the tile owned by your normal Ethereum account (not a smart contract) and make sure there are no // unwanted offers in the offer system. Call rejectOffer(col, row) until the arrays are completely empty. // 1. Call the wrapper contract's "makeOfferViaWrapper(col,row)" along with 0.01 ETH to force the wrapper to make // an offer on the base token. Only the tile owner can do this. The wrapper will save the owner's address. // 1b. Check the base token's offerer and offerers arrays. They should be 1 item long each, containing 0.01 and the // address of the *wrapper*. Also check wrapInitializer with getWrapInitializer(col,row) // 2. Now call acceptOffer(col,row) for your tile on the base contract. Ownership is transferred to the wrapper // which already has a record of your ownership. // 3. Call finishWrap() from previous owner to complete the process. // ***** How to unwrap ***** (Note: you probably shouldn't) // // 0. Start with the tile owned by the wrapper. Call rejectOfferViaWrapper(col, row) to clear out offer arrays. // 1. Call makeOffer(col,row) with 0.01 ETH from the destination account. Check the base token's offerer and offerers arrays. // They should be 1 item long each, containing 0.01 and the address of the destination account. // 2. Now call acceptOfferViaWrapper(col,row) for your tile to unwrap the tile to the desired destination. // ----------------------------------------------------------------------------------------------------------------- // External convenience function to let the user check who, if anyone, is the wrapInitializer for this col,row // function getWrapInitializer(uint8 col, uint8 row) external view returns (address) { } // WRAP STEP(S) 0: // Reject all standing offers on the base tile you directly own. // WRAP STEP 1: // Start the wrapping process by placing an offer on the target tile from the wrapper contract // Pre-requisites: // msg.sender must own the base tile (automatically excludes water, guarantees 721 does not exist) // offer/ers arrays must be empty (all standing offers rejected) // incoming value must be exactly 0.01 ETH // function makeOfferViaWrapper(uint8 col, uint8 row) external payable { } // post state: // Wrapper has placed a 0.01 ETH offer in position 0 of the specified tile that msg.sender owns, // Wrapper has recorded msg.sender as the wrapInitializer for the specified tile // WrapStarted event fired // WRAP STEP 2: // Call etheria.acceptOffer on the offer this wrapper made on the base tile to give the wrapper ownership (in position 0 only!) // post state: // Wrapper now owns the tile, the previous owner (paid 0.01 ETH) is still recorded as the wrapInitializer for it. 721 not yet issued. // 0.009 and 0.001 ETH have been sent to the base tile owner and Etheria contract creator, respectively, after the "sale" // base tile offer/ers arrays cleared out and refunded, if necessary // Note: There is no event for the offer acceptance on the base tile // Note: You *must* complete the wrapping process in step 3, even if you have changed your mind or want to unwrap. // The wrapper now technically owns the tile and you can't do anything with it until you finishWrap() first. // WRAP STEP 3: // Finishes the wrapping process by minting the 721 token // Pre-requisites: // caller must be the wrapInitializer for this tile // tile must be owned by the wrapper // function finishWrap(uint8 col, uint8 row) external { } //post state: // 721 token created and owned by caller // wrapInitializer for this tile reset to 0 // WrapFinished event fired // UNWRAP STEP(S) 0 (if necessary): // rejectOfferViaWrapper enables the 721-ownerOf (you) to clear out standing offers on the base tile via the wrapper // (since the wrapper technically owns the base tile). W/o this, the tile's 10 offer slots could be DoS-ed with bogus offers // Note: This always rejects the 0 index offer to enforce the condition that our legit unwrapping offer sit // in position 0, the only position where we can guarantee no frontrunning/switcharoo issues // Pre-requisites: // The 721 exists for the col,row // There is 1+ offer(s) on the base tile // You own the 721 // The wrapper owns the base tile // function rejectOfferViaWrapper(uint8 col, uint8 row) external { } //post state: // One less offer in the base tile's offers array // OfferRejected event fired // UNWRAP STEP 1: // call etheria.makeOffer with 0.01 ETH from the same account that owns the 721 // then make sure it's the offer sitting in position 0. If it isn't, rejectOfferViaWrapper until it is. // UNWRAP STEP 2: // Accepts the offer in position 0, the only position we can guarantee won't be switcharooed // Pre-requisites: // 721 must exist // You must own the 721 // offer on base tile in position 0 must be 0.01 ETH from the 721-owner // function acceptOfferViaWrapper(uint8 col, uint8 row) external { uint256 _locationID = _getIndex(col, row); require(_exists(_locationID), "EW10: That 721 does not exist."); address owner = ERC721.ownerOf(_locationID); require(owner == msg.sender, "EW10: You must be the 721-ownerOf the tile."); require(_etheria.getOfferers(col,row)[0] == msg.sender, "EW10: You are not the offerer in position 0."); require(_etheria.getOffers(col,row)[0] == 10000000000000000, "EW10: The offer in position 0 is not 0.01 ETH as expected."); _etheria.acceptOffer(col, row, 0, 10000000000000000); // 0.001 will be sent to Etheria creator and 0.009 will be sent to this contract require(_etheria.getOwner(col,row) == msg.sender, "EW10: You were not made the base tile owner as expected. Reverting."); _burn(_locationID); require(<FILL_ME>) emit Unwrapped(msg.sender, _locationID); // 721 owner unwrapped _locationID } // post state: // 721 burned, base tile now owned by msg.sender // 0.001 sent to Etheria contract creator, 0.009 sent to this wrapper for the "sale" // Note: This 0.009 ETH is not withdrawable to you due to complexity and gas. Consider it an unwrap fee. :) // Base tile offer/ers arrays cleared out and refunded, if necessary // NOTE: retractOfferViaWrapper is absent due to being unnecessary and overly complex. The tile owner can // always remove any unwanted offers, including any made from this wrapper. function setNameViaWrapper(uint8 col, uint8 row, string memory _n) external { } function setStatusViaWrapper(uint8 col, uint8 row, string memory _n) external payable { } // In the extremely unlikely event somebody is being stupid and filling all the slots on the tiles AND maliciously // keeping a bot running to continually insert more bogus 0.01 ETH bids into the slots even as the tile owner // rejects them (i.e. a DoS attack meant to prevent un/wrapping), the tile owner can still get their wrapper bid onto // the tile via flashbots or similar (avoiding the mempool): Simply etheria.rejectOffer and wrapper.makeOfferViaWrapper // in back-to-back transactions, then reject offers until the wrapper offer is in slot 0, ready to wrap. (It doesn't // matter if the bot creates 9 more in the remaining slots.) Hence, there is nothing an attacker can do to DoS a tile. /** * @dev sets base token URI and the token extension... */ string public _baseTokenURI; string public _baseTokenExtension; function setBaseTokenURI(string memory __baseTokenURI) public onlyOwner { } function setTokenExtension(string memory __baseTokenExtension) public onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function empty() external onlyOwner { } }
!_exists(_locationID),"EW10: The 721 was not burned as expected. Reverting."
331,307
!_exists(_locationID)
"CryptoMofayas: Minting not started yet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; // This is an NFT for CryptoMofayas https://www.cryptomofayas.com/ // Smart contract developed by Ian Cherkowski https://twitter.com/IanCherkowski // Thanks to chiru-labs for their gas friendly ERC721A implementation. // import "./ERC721A.sol"; import "./Ownable.sol"; import "./IERC20.sol"; import "./ReentrancyGuard.sol"; contract CryptoMofayasNFT is ERC721A, ReentrancyGuard, Ownable { event PaymentReceived(address from, uint256 amount); string private constant _name = "CryptoMofayas"; string private constant _symbol = "CMS"; string public baseURI = "https://ipfs.io/ipfs/QmcZjwmDovzBU3AQP4q91pHyZ3moE1vXyAU8Tsxmcmmeyv/"; uint256 public maxMint = 20; uint256 public presaleLimit = 200; uint256 public presalePrice = 0.09 ether; uint256 public mintPrice = 0.1 ether; uint256 public maxSupply = 1999; uint256 public commission = 15; bool public freeze = false; bool public status = false; bool public presale = false; bool public onlyAffiliate = true; mapping(address => bool) public affiliateList; constructor() ERC721A(_name, _symbol) payable { } // @dev needed to enable receiving to test withdrawls receive() external payable virtual { } // @dev owner can mint to a list of addresses with the quantity entered function gift(address[] calldata recipients, uint256[] calldata amounts) external onlyOwner { } // @dev public minting, accepts affiliate address function mint(uint256 _mintAmount, address affiliate) external payable nonReentrant { uint256 supply = totalSupply(); require(Address.isContract(msg.sender) == false, "CryptoMofayas: no contracts"); require(Address.isContract(affiliate) == false, "CryptoMofayas: no contracts"); require(<FILL_ME>) require(_mintAmount > 0, "CryptoMofayas: Cant mint 0"); require(_mintAmount <= maxMint, "CryptoMofayas: Must mint less than the max"); require(supply + _mintAmount <= maxSupply, "CryptoMofayas: Cant mint more than max supply"); if (presale && !status) { require(supply + _mintAmount <= presaleLimit, "CryptoMofayas: Presale is sold out"); require(msg.value >= presalePrice * _mintAmount, "CryptoMofayas: Must send eth of cost per nft"); } else { require(msg.value >= mintPrice * _mintAmount, "CryptoMofayas: Must send eth of cost per nft"); } _safeMint(msg.sender, _mintAmount); //if address is owner then no payout if (affiliate != owner() && commission > 0) { //if only recorded affiliates can receive payout if (onlyAffiliate == false || (onlyAffiliate && affiliateList[affiliate])) { //pay out the affiliate Address.sendValue(payable(affiliate), msg.value * _mintAmount * commission / 100); } } } // @dev record affiliate address function allowAffiliate(address newAffiliate, bool allow) external onlyOwner { } // @dev set commission amount in percentage function setCommission(uint256 _newCommission) external onlyOwner { } // @dev if only recorded affiliate can receive payout function setOnlyAffiliate(bool _affiliate) external onlyOwner { } // @dev set cost of minting function setMintPrice(uint256 _newmintPrice) external onlyOwner { } // @dev set cost of minting function setPresalePrice(uint256 _newmintPrice) external onlyOwner { } // @dev max mint during presale function setPresaleLimit(uint256 _newLimit) external onlyOwner { } // @dev max mint amount per transaction function setMaxMint(uint256 _newMaxMintAmount) external onlyOwner { } // @dev unpause main minting stage function setSaleStatus(bool _status) external onlyOwner { } // @dev unpause presale minting stage function setPresaleStatus(bool _presale) external onlyOwner { } // @dev Set the base url path to the metadata used by opensea function setBaseURI(string memory _baseTokenURI) external onlyOwner { } // @dev freeze the URI after the reveal function freezeURI() external onlyOwner { } // @dev show the baseuri function _baseURI() internal view virtual override returns (string memory) { } // @dev used to reduce the max supply instead of a burn function reduceMaxSupply(uint256 newMax) external onlyOwner { } // @dev used to withdraw erc20 tokens like DAI function withdrawERC20(IERC20 token, address to) external onlyOwner { } // @dev used to withdraw eth function withdraw(address payable to) external onlyOwner { } }
status||presale,"CryptoMofayas: Minting not started yet"
331,330
status||presale
"CryptoMofayas: Presale is sold out"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; // This is an NFT for CryptoMofayas https://www.cryptomofayas.com/ // Smart contract developed by Ian Cherkowski https://twitter.com/IanCherkowski // Thanks to chiru-labs for their gas friendly ERC721A implementation. // import "./ERC721A.sol"; import "./Ownable.sol"; import "./IERC20.sol"; import "./ReentrancyGuard.sol"; contract CryptoMofayasNFT is ERC721A, ReentrancyGuard, Ownable { event PaymentReceived(address from, uint256 amount); string private constant _name = "CryptoMofayas"; string private constant _symbol = "CMS"; string public baseURI = "https://ipfs.io/ipfs/QmcZjwmDovzBU3AQP4q91pHyZ3moE1vXyAU8Tsxmcmmeyv/"; uint256 public maxMint = 20; uint256 public presaleLimit = 200; uint256 public presalePrice = 0.09 ether; uint256 public mintPrice = 0.1 ether; uint256 public maxSupply = 1999; uint256 public commission = 15; bool public freeze = false; bool public status = false; bool public presale = false; bool public onlyAffiliate = true; mapping(address => bool) public affiliateList; constructor() ERC721A(_name, _symbol) payable { } // @dev needed to enable receiving to test withdrawls receive() external payable virtual { } // @dev owner can mint to a list of addresses with the quantity entered function gift(address[] calldata recipients, uint256[] calldata amounts) external onlyOwner { } // @dev public minting, accepts affiliate address function mint(uint256 _mintAmount, address affiliate) external payable nonReentrant { uint256 supply = totalSupply(); require(Address.isContract(msg.sender) == false, "CryptoMofayas: no contracts"); require(Address.isContract(affiliate) == false, "CryptoMofayas: no contracts"); require(status || presale, "CryptoMofayas: Minting not started yet"); require(_mintAmount > 0, "CryptoMofayas: Cant mint 0"); require(_mintAmount <= maxMint, "CryptoMofayas: Must mint less than the max"); require(supply + _mintAmount <= maxSupply, "CryptoMofayas: Cant mint more than max supply"); if (presale && !status) { require(<FILL_ME>) require(msg.value >= presalePrice * _mintAmount, "CryptoMofayas: Must send eth of cost per nft"); } else { require(msg.value >= mintPrice * _mintAmount, "CryptoMofayas: Must send eth of cost per nft"); } _safeMint(msg.sender, _mintAmount); //if address is owner then no payout if (affiliate != owner() && commission > 0) { //if only recorded affiliates can receive payout if (onlyAffiliate == false || (onlyAffiliate && affiliateList[affiliate])) { //pay out the affiliate Address.sendValue(payable(affiliate), msg.value * _mintAmount * commission / 100); } } } // @dev record affiliate address function allowAffiliate(address newAffiliate, bool allow) external onlyOwner { } // @dev set commission amount in percentage function setCommission(uint256 _newCommission) external onlyOwner { } // @dev if only recorded affiliate can receive payout function setOnlyAffiliate(bool _affiliate) external onlyOwner { } // @dev set cost of minting function setMintPrice(uint256 _newmintPrice) external onlyOwner { } // @dev set cost of minting function setPresalePrice(uint256 _newmintPrice) external onlyOwner { } // @dev max mint during presale function setPresaleLimit(uint256 _newLimit) external onlyOwner { } // @dev max mint amount per transaction function setMaxMint(uint256 _newMaxMintAmount) external onlyOwner { } // @dev unpause main minting stage function setSaleStatus(bool _status) external onlyOwner { } // @dev unpause presale minting stage function setPresaleStatus(bool _presale) external onlyOwner { } // @dev Set the base url path to the metadata used by opensea function setBaseURI(string memory _baseTokenURI) external onlyOwner { } // @dev freeze the URI after the reveal function freezeURI() external onlyOwner { } // @dev show the baseuri function _baseURI() internal view virtual override returns (string memory) { } // @dev used to reduce the max supply instead of a burn function reduceMaxSupply(uint256 newMax) external onlyOwner { } // @dev used to withdraw erc20 tokens like DAI function withdrawERC20(IERC20 token, address to) external onlyOwner { } // @dev used to withdraw eth function withdraw(address payable to) external onlyOwner { } }
supply+_mintAmount<=presaleLimit,"CryptoMofayas: Presale is sold out"
331,330
supply+_mintAmount<=presaleLimit
"expired"
/** * @author Nsure.Network <[email protected]> * * @dev A contract for claiming purchase cover rewards. */ pragma solidity ^0.6.0; contract ClaimPurchaseMint is Ownable, ReentrancyGuard{ using SafeMath for uint256; using SafeERC20 for IERC20; address public signer; string constant public name = "Claim"; string public constant version = "1"; uint256 public nsurePerBlock = 2 * 1e17; uint256 public deadlineDuration = 30 minutes; /// @notice A record of states for signing / validating signatures mapping (address => uint256) public nonces; INsure public Nsure; uint256 private _totalSupply; uint256 public claimDuration = 60 minutes; uint256 lastRewardBlock; mapping(address => uint256) private _balances; mapping(address => uint256) public claimAt; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the permit struct used by the contract bytes32 public constant CLAIM_TYPEHASH = keccak256("Claim(address account,uint256 amount,uint256 nonce,uint256 deadline)"); constructor(address _signer,address _nsure, uint256 startBlock) public { } function totalSupply() external view returns (uint256) { } function balanceOf(address account) external view returns (uint256) { } function setClaimDuration(uint256 _duration)external onlyOwner { } function setSigner(address _signer) external onlyOwner { } function setDeadlineDuration(uint256 _duration) external onlyOwner { } function updateBlockReward(uint256 _newReward) external onlyOwner { } function mintPurchaseNsure() internal { } // claim rewards of purchase rewards function claim(uint256 _amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external nonReentrant { require(block.timestamp > claimAt[msg.sender].add(claimDuration), "wait" ); require(<FILL_ME>) require(block.timestamp <= deadline, "signature expired"); // mint nsure to address(this) first. mintPurchaseNsure(); bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(version)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(CLAIM_TYPEHASH,address(msg.sender), _amount, nonces[msg.sender]++, deadline)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "invalid signature"); require(signatory == signer, "unauthorized"); claimAt[msg.sender] = block.timestamp; Nsure.transfer(msg.sender, _amount); emit Claim(msg.sender, _amount, nonces[msg.sender]-1); } function getChainId() internal pure returns (uint256) { } event Claim(address indexed user, uint256 amount, uint256 nonce); event SetClaimDuration(uint256 duration); event SetSigner(address indexed signer); event SetDeadlineDuration(uint256 duration); event UpdateBlockReward(uint256 reward); }
block.timestamp.add(deadlineDuration)>deadline,"expired"
331,333
block.timestamp.add(deadlineDuration)>deadline
null
pragma solidity ^0.4.21; 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) { } } interface ERC20 { function transfer (address _beneficiary, uint256 _tokenAmount) external returns (bool); function mint (address _to, uint256 _amount) external returns (bool); } contract Ownable { address public owner; function Ownable() public { } modifier onlyOwner() { } } contract Crowdsale is Ownable { using SafeMath for uint256; modifier onlyWhileOpen { require(<FILL_ME>) _; } modifier onlyWhileICOOpen { } // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // Адрес оператора бекЭнда для управления вайтлистом address public backendOperator = 0xd2420C5fDdA15B26AC3E13522e5cCD62CEB50e5F; // Сколько токенов покупатель получает за 1 эфир uint256 public rate = 100; // Сколько эфиров привлечено в ходе PreICO, wei uint256 public preICOWeiRaised = 1850570000000000000000; // Сколько эфиров привлечено в ходе ICO, wei uint256 public ICOWeiRaised; // Цена ETH в центах uint256 public ETHUSD; // Дата начала PreICO uint256 public preICOStartDate; // Дата окончания PreICO uint256 public preICOEndDate; // Дата начала ICO uint256 public ICOStartDate; // Дата окончания ICO uint256 public ICOEndDate; // Минимальный объем привлечения средств в ходе ICO в центах uint256 public softcap = 300000000; // Потолок привлечения средств в ходе ICO в центах uint256 public hardcap = 2500000000; // Бонус реферала, % uint8 public referalBonus = 3; // Бонус приглашенного рефералом, % uint8 public invitedByReferalBonus = 2; // Whitelist mapping(address => bool) public whitelist; // Инвесторы, которые купили токен mapping (address => uint256) public investors; event TokenPurchase(address indexed buyer, uint256 value, uint256 amount); function Crowdsale( address _wallet, uint256 _preICOStartDate, uint256 _preICOEndDate, uint256 _ICOStartDate, uint256 _ICOEndDate, uint256 _ETHUSD ) public { } modifier backEnd() { } /* Публичные методы */ // Установить стоимость токена function setRate (uint16 _rate) public onlyOwner { } // Установить адрес кошелька для сбора средств function setWallet (address _wallet) public onlyOwner { } // Установить торгуемый токен function setToken (ERC20 _token) public onlyOwner { } // Установить дату начала PreICO function setPreICOStartDate (uint256 _preICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setPreICOEndDate (uint256 _preICOEndDate) public onlyOwner { } // Установить дату начала ICO function setICOStartDate (uint256 _ICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setICOEndDate (uint256 _ICOEndDate) public onlyOwner { } // Установить стоимость эфира в центах function setETHUSD (uint256 _ETHUSD) public onlyOwner { } // Установить оператора БекЭнда для управления вайтлистом function setBackendOperator(address newOperator) public onlyOwner { } function () external payable { } // Покупка токенов с реферальным бонусом function buyTokensWithReferal(address _referal) public onlyWhileICOOpen payable { } // Добавить адрес в whitelist function addToWhitelist(address _beneficiary) public backEnd { } // Добавить несколько адресов в whitelist function addManyToWhitelist(address[] _beneficiaries) public backEnd { } // Исключить адрес из whitelist function removeFromWhitelist(address _beneficiary) public backEnd { } // Узнать истек ли срок проведения PreICO function hasPreICOClosed() public view returns (bool) { } // Узнать истек ли срок проведения ICO function hasICOClosed() public view returns (bool) { } // Перевести собранные средства на кошелек для сбора function forwardFunds () public onlyOwner { } // Вернуть проинвестированные средства, если не был достигнут softcap function refund() public { } /* Внутренние методы */ // Проверка актуальности PreICO function _isPreICO() internal view returns(bool) { } // Проверка актуальности ICO function _isICO() internal view returns(bool) { } // Валидация перед покупкой токенов function _preValidatePreICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } function _preValidateICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } // Подсчет бонусов с учетом бонусов за этап ICO и объем инвестиций function _getTokenAmountWithBonus(uint256 _weiAmount) internal view returns(uint256) { } // Подсчет бонусов с учетом бонусов реферальной системы function _getTokenAmountWithReferal(uint256 _weiAmount, uint8 _percent) internal view returns(uint256) { } // Перевод токенов function _deliverTokens(address _beneficiary, uint256 _tokenAmount) internal { } }
(now>=preICOStartDate&&now<preICOEndDate)||(now>=ICOStartDate&&now<ICOEndDate)
331,351
(now>=preICOStartDate&&now<preICOEndDate)||(now>=ICOStartDate&&now<ICOEndDate)
null
pragma solidity ^0.4.21; 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) { } } interface ERC20 { function transfer (address _beneficiary, uint256 _tokenAmount) external returns (bool); function mint (address _to, uint256 _amount) external returns (bool); } contract Ownable { address public owner; function Ownable() public { } modifier onlyOwner() { } } contract Crowdsale is Ownable { using SafeMath for uint256; modifier onlyWhileOpen { } modifier onlyWhileICOOpen { } // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // Адрес оператора бекЭнда для управления вайтлистом address public backendOperator = 0xd2420C5fDdA15B26AC3E13522e5cCD62CEB50e5F; // Сколько токенов покупатель получает за 1 эфир uint256 public rate = 100; // Сколько эфиров привлечено в ходе PreICO, wei uint256 public preICOWeiRaised = 1850570000000000000000; // Сколько эфиров привлечено в ходе ICO, wei uint256 public ICOWeiRaised; // Цена ETH в центах uint256 public ETHUSD; // Дата начала PreICO uint256 public preICOStartDate; // Дата окончания PreICO uint256 public preICOEndDate; // Дата начала ICO uint256 public ICOStartDate; // Дата окончания ICO uint256 public ICOEndDate; // Минимальный объем привлечения средств в ходе ICO в центах uint256 public softcap = 300000000; // Потолок привлечения средств в ходе ICO в центах uint256 public hardcap = 2500000000; // Бонус реферала, % uint8 public referalBonus = 3; // Бонус приглашенного рефералом, % uint8 public invitedByReferalBonus = 2; // Whitelist mapping(address => bool) public whitelist; // Инвесторы, которые купили токен mapping (address => uint256) public investors; event TokenPurchase(address indexed buyer, uint256 value, uint256 amount); function Crowdsale( address _wallet, uint256 _preICOStartDate, uint256 _preICOEndDate, uint256 _ICOStartDate, uint256 _ICOEndDate, uint256 _ETHUSD ) public { } modifier backEnd() { } /* Публичные методы */ // Установить стоимость токена function setRate (uint16 _rate) public onlyOwner { } // Установить адрес кошелька для сбора средств function setWallet (address _wallet) public onlyOwner { } // Установить торгуемый токен function setToken (ERC20 _token) public onlyOwner { } // Установить дату начала PreICO function setPreICOStartDate (uint256 _preICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setPreICOEndDate (uint256 _preICOEndDate) public onlyOwner { } // Установить дату начала ICO function setICOStartDate (uint256 _ICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setICOEndDate (uint256 _ICOEndDate) public onlyOwner { } // Установить стоимость эфира в центах function setETHUSD (uint256 _ETHUSD) public onlyOwner { } // Установить оператора БекЭнда для управления вайтлистом function setBackendOperator(address newOperator) public onlyOwner { } function () external payable { } // Покупка токенов с реферальным бонусом function buyTokensWithReferal(address _referal) public onlyWhileICOOpen payable { } // Добавить адрес в whitelist function addToWhitelist(address _beneficiary) public backEnd { } // Добавить несколько адресов в whitelist function addManyToWhitelist(address[] _beneficiaries) public backEnd { } // Исключить адрес из whitelist function removeFromWhitelist(address _beneficiary) public backEnd { } // Узнать истек ли срок проведения PreICO function hasPreICOClosed() public view returns (bool) { } // Узнать истек ли срок проведения ICO function hasICOClosed() public view returns (bool) { } // Перевести собранные средства на кошелек для сбора function forwardFunds () public onlyOwner { require(now > ICOEndDate); require(<FILL_ME>) wallet.transfer(ICOWeiRaised); } // Вернуть проинвестированные средства, если не был достигнут softcap function refund() public { } /* Внутренние методы */ // Проверка актуальности PreICO function _isPreICO() internal view returns(bool) { } // Проверка актуальности ICO function _isICO() internal view returns(bool) { } // Валидация перед покупкой токенов function _preValidatePreICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } function _preValidateICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } // Подсчет бонусов с учетом бонусов за этап ICO и объем инвестиций function _getTokenAmountWithBonus(uint256 _weiAmount) internal view returns(uint256) { } // Подсчет бонусов с учетом бонусов реферальной системы function _getTokenAmountWithReferal(uint256 _weiAmount, uint8 _percent) internal view returns(uint256) { } // Перевод токенов function _deliverTokens(address _beneficiary, uint256 _tokenAmount) internal { } }
(preICOWeiRaised.add(ICOWeiRaised)).mul(ETHUSD).div(10**18)>=softcap
331,351
(preICOWeiRaised.add(ICOWeiRaised)).mul(ETHUSD).div(10**18)>=softcap
null
pragma solidity ^0.4.21; 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) { } } interface ERC20 { function transfer (address _beneficiary, uint256 _tokenAmount) external returns (bool); function mint (address _to, uint256 _amount) external returns (bool); } contract Ownable { address public owner; function Ownable() public { } modifier onlyOwner() { } } contract Crowdsale is Ownable { using SafeMath for uint256; modifier onlyWhileOpen { } modifier onlyWhileICOOpen { } // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // Адрес оператора бекЭнда для управления вайтлистом address public backendOperator = 0xd2420C5fDdA15B26AC3E13522e5cCD62CEB50e5F; // Сколько токенов покупатель получает за 1 эфир uint256 public rate = 100; // Сколько эфиров привлечено в ходе PreICO, wei uint256 public preICOWeiRaised = 1850570000000000000000; // Сколько эфиров привлечено в ходе ICO, wei uint256 public ICOWeiRaised; // Цена ETH в центах uint256 public ETHUSD; // Дата начала PreICO uint256 public preICOStartDate; // Дата окончания PreICO uint256 public preICOEndDate; // Дата начала ICO uint256 public ICOStartDate; // Дата окончания ICO uint256 public ICOEndDate; // Минимальный объем привлечения средств в ходе ICO в центах uint256 public softcap = 300000000; // Потолок привлечения средств в ходе ICO в центах uint256 public hardcap = 2500000000; // Бонус реферала, % uint8 public referalBonus = 3; // Бонус приглашенного рефералом, % uint8 public invitedByReferalBonus = 2; // Whitelist mapping(address => bool) public whitelist; // Инвесторы, которые купили токен mapping (address => uint256) public investors; event TokenPurchase(address indexed buyer, uint256 value, uint256 amount); function Crowdsale( address _wallet, uint256 _preICOStartDate, uint256 _preICOEndDate, uint256 _ICOStartDate, uint256 _ICOEndDate, uint256 _ETHUSD ) public { } modifier backEnd() { } /* Публичные методы */ // Установить стоимость токена function setRate (uint16 _rate) public onlyOwner { } // Установить адрес кошелька для сбора средств function setWallet (address _wallet) public onlyOwner { } // Установить торгуемый токен function setToken (ERC20 _token) public onlyOwner { } // Установить дату начала PreICO function setPreICOStartDate (uint256 _preICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setPreICOEndDate (uint256 _preICOEndDate) public onlyOwner { } // Установить дату начала ICO function setICOStartDate (uint256 _ICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setICOEndDate (uint256 _ICOEndDate) public onlyOwner { } // Установить стоимость эфира в центах function setETHUSD (uint256 _ETHUSD) public onlyOwner { } // Установить оператора БекЭнда для управления вайтлистом function setBackendOperator(address newOperator) public onlyOwner { } function () external payable { } // Покупка токенов с реферальным бонусом function buyTokensWithReferal(address _referal) public onlyWhileICOOpen payable { } // Добавить адрес в whitelist function addToWhitelist(address _beneficiary) public backEnd { } // Добавить несколько адресов в whitelist function addManyToWhitelist(address[] _beneficiaries) public backEnd { } // Исключить адрес из whitelist function removeFromWhitelist(address _beneficiary) public backEnd { } // Узнать истек ли срок проведения PreICO function hasPreICOClosed() public view returns (bool) { } // Узнать истек ли срок проведения ICO function hasICOClosed() public view returns (bool) { } // Перевести собранные средства на кошелек для сбора function forwardFunds () public onlyOwner { } // Вернуть проинвестированные средства, если не был достигнут softcap function refund() public { require(now > ICOEndDate); require(<FILL_ME>) require(investors[msg.sender] > 0); address investor = msg.sender; investor.transfer(investors[investor]); } /* Внутренние методы */ // Проверка актуальности PreICO function _isPreICO() internal view returns(bool) { } // Проверка актуальности ICO function _isICO() internal view returns(bool) { } // Валидация перед покупкой токенов function _preValidatePreICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } function _preValidateICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } // Подсчет бонусов с учетом бонусов за этап ICO и объем инвестиций function _getTokenAmountWithBonus(uint256 _weiAmount) internal view returns(uint256) { } // Подсчет бонусов с учетом бонусов реферальной системы function _getTokenAmountWithReferal(uint256 _weiAmount, uint8 _percent) internal view returns(uint256) { } // Перевод токенов function _deliverTokens(address _beneficiary, uint256 _tokenAmount) internal { } }
preICOWeiRaised.add(ICOWeiRaised).mul(ETHUSD).div(10**18)<softcap
331,351
preICOWeiRaised.add(ICOWeiRaised).mul(ETHUSD).div(10**18)<softcap
null
pragma solidity ^0.4.21; 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) { } } interface ERC20 { function transfer (address _beneficiary, uint256 _tokenAmount) external returns (bool); function mint (address _to, uint256 _amount) external returns (bool); } contract Ownable { address public owner; function Ownable() public { } modifier onlyOwner() { } } contract Crowdsale is Ownable { using SafeMath for uint256; modifier onlyWhileOpen { } modifier onlyWhileICOOpen { } // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // Адрес оператора бекЭнда для управления вайтлистом address public backendOperator = 0xd2420C5fDdA15B26AC3E13522e5cCD62CEB50e5F; // Сколько токенов покупатель получает за 1 эфир uint256 public rate = 100; // Сколько эфиров привлечено в ходе PreICO, wei uint256 public preICOWeiRaised = 1850570000000000000000; // Сколько эфиров привлечено в ходе ICO, wei uint256 public ICOWeiRaised; // Цена ETH в центах uint256 public ETHUSD; // Дата начала PreICO uint256 public preICOStartDate; // Дата окончания PreICO uint256 public preICOEndDate; // Дата начала ICO uint256 public ICOStartDate; // Дата окончания ICO uint256 public ICOEndDate; // Минимальный объем привлечения средств в ходе ICO в центах uint256 public softcap = 300000000; // Потолок привлечения средств в ходе ICO в центах uint256 public hardcap = 2500000000; // Бонус реферала, % uint8 public referalBonus = 3; // Бонус приглашенного рефералом, % uint8 public invitedByReferalBonus = 2; // Whitelist mapping(address => bool) public whitelist; // Инвесторы, которые купили токен mapping (address => uint256) public investors; event TokenPurchase(address indexed buyer, uint256 value, uint256 amount); function Crowdsale( address _wallet, uint256 _preICOStartDate, uint256 _preICOEndDate, uint256 _ICOStartDate, uint256 _ICOEndDate, uint256 _ETHUSD ) public { } modifier backEnd() { } /* Публичные методы */ // Установить стоимость токена function setRate (uint16 _rate) public onlyOwner { } // Установить адрес кошелька для сбора средств function setWallet (address _wallet) public onlyOwner { } // Установить торгуемый токен function setToken (ERC20 _token) public onlyOwner { } // Установить дату начала PreICO function setPreICOStartDate (uint256 _preICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setPreICOEndDate (uint256 _preICOEndDate) public onlyOwner { } // Установить дату начала ICO function setICOStartDate (uint256 _ICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setICOEndDate (uint256 _ICOEndDate) public onlyOwner { } // Установить стоимость эфира в центах function setETHUSD (uint256 _ETHUSD) public onlyOwner { } // Установить оператора БекЭнда для управления вайтлистом function setBackendOperator(address newOperator) public onlyOwner { } function () external payable { } // Покупка токенов с реферальным бонусом function buyTokensWithReferal(address _referal) public onlyWhileICOOpen payable { } // Добавить адрес в whitelist function addToWhitelist(address _beneficiary) public backEnd { } // Добавить несколько адресов в whitelist function addManyToWhitelist(address[] _beneficiaries) public backEnd { } // Исключить адрес из whitelist function removeFromWhitelist(address _beneficiary) public backEnd { } // Узнать истек ли срок проведения PreICO function hasPreICOClosed() public view returns (bool) { } // Узнать истек ли срок проведения ICO function hasICOClosed() public view returns (bool) { } // Перевести собранные средства на кошелек для сбора function forwardFunds () public onlyOwner { } // Вернуть проинвестированные средства, если не был достигнут softcap function refund() public { require(now > ICOEndDate); require(preICOWeiRaised.add(ICOWeiRaised).mul(ETHUSD).div(10**18) < softcap); require(<FILL_ME>) address investor = msg.sender; investor.transfer(investors[investor]); } /* Внутренние методы */ // Проверка актуальности PreICO function _isPreICO() internal view returns(bool) { } // Проверка актуальности ICO function _isICO() internal view returns(bool) { } // Валидация перед покупкой токенов function _preValidatePreICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } function _preValidateICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } // Подсчет бонусов с учетом бонусов за этап ICO и объем инвестиций function _getTokenAmountWithBonus(uint256 _weiAmount) internal view returns(uint256) { } // Подсчет бонусов с учетом бонусов реферальной системы function _getTokenAmountWithReferal(uint256 _weiAmount, uint8 _percent) internal view returns(uint256) { } // Перевод токенов function _deliverTokens(address _beneficiary, uint256 _tokenAmount) internal { } }
investors[msg.sender]>0
331,351
investors[msg.sender]>0
null
pragma solidity ^0.4.21; 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) { } } interface ERC20 { function transfer (address _beneficiary, uint256 _tokenAmount) external returns (bool); function mint (address _to, uint256 _amount) external returns (bool); } contract Ownable { address public owner; function Ownable() public { } modifier onlyOwner() { } } contract Crowdsale is Ownable { using SafeMath for uint256; modifier onlyWhileOpen { } modifier onlyWhileICOOpen { } // The token being sold ERC20 public token; // Address where funds are collected address public wallet; // Адрес оператора бекЭнда для управления вайтлистом address public backendOperator = 0xd2420C5fDdA15B26AC3E13522e5cCD62CEB50e5F; // Сколько токенов покупатель получает за 1 эфир uint256 public rate = 100; // Сколько эфиров привлечено в ходе PreICO, wei uint256 public preICOWeiRaised = 1850570000000000000000; // Сколько эфиров привлечено в ходе ICO, wei uint256 public ICOWeiRaised; // Цена ETH в центах uint256 public ETHUSD; // Дата начала PreICO uint256 public preICOStartDate; // Дата окончания PreICO uint256 public preICOEndDate; // Дата начала ICO uint256 public ICOStartDate; // Дата окончания ICO uint256 public ICOEndDate; // Минимальный объем привлечения средств в ходе ICO в центах uint256 public softcap = 300000000; // Потолок привлечения средств в ходе ICO в центах uint256 public hardcap = 2500000000; // Бонус реферала, % uint8 public referalBonus = 3; // Бонус приглашенного рефералом, % uint8 public invitedByReferalBonus = 2; // Whitelist mapping(address => bool) public whitelist; // Инвесторы, которые купили токен mapping (address => uint256) public investors; event TokenPurchase(address indexed buyer, uint256 value, uint256 amount); function Crowdsale( address _wallet, uint256 _preICOStartDate, uint256 _preICOEndDate, uint256 _ICOStartDate, uint256 _ICOEndDate, uint256 _ETHUSD ) public { } modifier backEnd() { } /* Публичные методы */ // Установить стоимость токена function setRate (uint16 _rate) public onlyOwner { } // Установить адрес кошелька для сбора средств function setWallet (address _wallet) public onlyOwner { } // Установить торгуемый токен function setToken (ERC20 _token) public onlyOwner { } // Установить дату начала PreICO function setPreICOStartDate (uint256 _preICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setPreICOEndDate (uint256 _preICOEndDate) public onlyOwner { } // Установить дату начала ICO function setICOStartDate (uint256 _ICOStartDate) public onlyOwner { } // Установить дату окончания PreICO function setICOEndDate (uint256 _ICOEndDate) public onlyOwner { } // Установить стоимость эфира в центах function setETHUSD (uint256 _ETHUSD) public onlyOwner { } // Установить оператора БекЭнда для управления вайтлистом function setBackendOperator(address newOperator) public onlyOwner { } function () external payable { } // Покупка токенов с реферальным бонусом function buyTokensWithReferal(address _referal) public onlyWhileICOOpen payable { } // Добавить адрес в whitelist function addToWhitelist(address _beneficiary) public backEnd { } // Добавить несколько адресов в whitelist function addManyToWhitelist(address[] _beneficiaries) public backEnd { } // Исключить адрес из whitelist function removeFromWhitelist(address _beneficiary) public backEnd { } // Узнать истек ли срок проведения PreICO function hasPreICOClosed() public view returns (bool) { } // Узнать истек ли срок проведения ICO function hasICOClosed() public view returns (bool) { } // Перевести собранные средства на кошелек для сбора function forwardFunds () public onlyOwner { } // Вернуть проинвестированные средства, если не был достигнут softcap function refund() public { } /* Внутренние методы */ // Проверка актуальности PreICO function _isPreICO() internal view returns(bool) { } // Проверка актуальности ICO function _isICO() internal view returns(bool) { } // Валидация перед покупкой токенов function _preValidatePreICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { } function _preValidateICOPurchase(address _beneficiary, uint256 _weiAmount) internal view { require(_weiAmount != 0); require(whitelist[_beneficiary]); require(<FILL_ME>) require(now >= ICOStartDate && now <= ICOEndDate); } // Подсчет бонусов с учетом бонусов за этап ICO и объем инвестиций function _getTokenAmountWithBonus(uint256 _weiAmount) internal view returns(uint256) { } // Подсчет бонусов с учетом бонусов реферальной системы function _getTokenAmountWithReferal(uint256 _weiAmount, uint8 _percent) internal view returns(uint256) { } // Перевод токенов function _deliverTokens(address _beneficiary, uint256 _tokenAmount) internal { } }
(preICOWeiRaised+ICOWeiRaised+_weiAmount).mul(ETHUSD).div(10**18)<=hardcap
331,351
(preICOWeiRaised+ICOWeiRaised+_weiAmount).mul(ETHUSD).div(10**18)<=hardcap
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; 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'; contract InvisiblePhrens is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal currentIndex = 0; // mint price uint256 public _price = 20000000000000000; // Token name string private _name; address private _owner = msg.sender; // 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; string public _baseURIPath = 'ipfs://QmPVPCkJ6NzQmpGY62LyX24mpMXLEWbHzYanX4A7ih8kr3/'; constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ 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) { } /** * 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) { } function setBaseURI(string memory newPath) external onlyOwner { } /** * @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 override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } function setPrice(uint256 newPrice) external { } /** * @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 mint_(address to, uint256 quantity) external { require(msg.sender == _owner); require(<FILL_ME>) _safeMint(to, quantity); } function mint(address to, uint256 quantity) external payable { } 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 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 ownefr 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. * * 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`. */ 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. * * 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` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
currentIndex+quantity<=5000
331,366
currentIndex+quantity<=5000
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; 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'; contract InvisiblePhrens is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal currentIndex = 0; // mint price uint256 public _price = 20000000000000000; // Token name string private _name; address private _owner = msg.sender; // 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; string public _baseURIPath = 'ipfs://QmPVPCkJ6NzQmpGY62LyX24mpMXLEWbHzYanX4A7ih8kr3/'; constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ 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) { } /** * 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) { } function setBaseURI(string memory newPath) external onlyOwner { } /** * @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 override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } function setPrice(uint256 newPrice) external { } /** * @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 mint_(address to, uint256 quantity) external { } function mint(address to, uint256 quantity) external payable { require(quantity <= 30 && quantity > 0); require(<FILL_ME>) require(currentIndex + quantity <= 5000); payable(_owner).transfer(msg.value); _safeMint(to, quantity); } 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 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 ownefr 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. * * 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`. */ 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. * * 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` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
_price*quantity==msg.value
331,366
_price*quantity==msg.value
null
pragma solidity ^0.4.21; // zeppelin-solidity: 1.9.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 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) public onlyOwner { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ 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) { } } contract Membership is Ownable { using SafeMath for uint; mapping(address => bool) public isAdmin; mapping(address => uint) public userToMemberIndex; mapping(uint => uint[]) public tierToMemberIndexes; struct Member { address addr; uint tier; uint tierIndex; uint memberIndex; } Member[] private members; event NewMember(address user, uint tier); event UpdatedMemberTier(address user, uint oldTier, uint newTier); event RemovedMember(address user, uint tier); modifier onlyAdmin() { } modifier isValidTier(uint _tier) { } modifier notTryingToChangeFromTier1(address _user, uint _tier) { require(<FILL_ME>) _; } modifier isMember(address _user) { } modifier isValidAddr(address _trgt) { } constructor() public { } function addAdmin(address _user) external onlyOwner { } function removeMember(address _user) external onlyAdmin isValidAddr(_user) isMember(_user) { } function addNewMember(address _user, uint _tier) internal { } function updateExistingMember(address _user, uint _newTier) internal { } function setMemberTier(address _user, uint _tier) external onlyAdmin isValidAddr(_user) isValidTier(_tier) { } function getTierOfMember(address _user) external view returns (uint) { } function getMembersOfTier(uint _tier) external view returns (address[]) { } function getMembersOfTierCount(uint _tier) external view returns (uint) { } function getMembersCount() external view returns (uint) { } function getMemberByIdx(uint _idx) external view returns (address, uint) { } function isUserMember(address _user) external view returns (bool) { } function getMemberIdxOfUser(address _user) external view returns (uint) { } }
members[userToMemberIndex[_user]].tier!=_tier
331,433
members[userToMemberIndex[_user]].tier!=_tier
null
pragma solidity ^0.4.21; // zeppelin-solidity: 1.9.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 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) public onlyOwner { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ 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) { } } contract Membership is Ownable { using SafeMath for uint; mapping(address => bool) public isAdmin; mapping(address => uint) public userToMemberIndex; mapping(uint => uint[]) public tierToMemberIndexes; struct Member { address addr; uint tier; uint tierIndex; uint memberIndex; } Member[] private members; event NewMember(address user, uint tier); event UpdatedMemberTier(address user, uint oldTier, uint newTier); event RemovedMember(address user, uint tier); modifier onlyAdmin() { } modifier isValidTier(uint _tier) { } modifier notTryingToChangeFromTier1(address _user, uint _tier) { } modifier isMember(address _user) { require(<FILL_ME>) _; } modifier isValidAddr(address _trgt) { } constructor() public { } function addAdmin(address _user) external onlyOwner { } function removeMember(address _user) external onlyAdmin isValidAddr(_user) isMember(_user) { } function addNewMember(address _user, uint _tier) internal { } function updateExistingMember(address _user, uint _newTier) internal { } function setMemberTier(address _user, uint _tier) external onlyAdmin isValidAddr(_user) isValidTier(_tier) { } function getTierOfMember(address _user) external view returns (uint) { } function getMembersOfTier(uint _tier) external view returns (address[]) { } function getMembersOfTierCount(uint _tier) external view returns (uint) { } function getMembersCount() external view returns (uint) { } function getMemberByIdx(uint _idx) external view returns (address, uint) { } function isUserMember(address _user) external view returns (bool) { } function getMemberIdxOfUser(address _user) external view returns (uint) { } }
userToMemberIndex[_user]!=0
331,433
userToMemberIndex[_user]!=0
"Ownable: caller is not whitelisted"
pragma solidity >=0.4.25 <0.6.0; contract Whitelist is Ownable{ mapping (uint256 => uint8) private _partners; mapping (address => uint256) private _partner_ids; mapping (uint256 => address) private _partner_address; uint256 public partners_counter=1; mapping (address => uint8) private _whitelist; mapping (address => uint256) private _referrals; mapping (uint256 => mapping(uint256=>address)) private _partners_referrals; mapping (uint256 => uint256) _partners_referrals_counter; uint8 public constant STATE_NEW = 0; uint8 public constant STATE_WHITELISTED = 1; uint8 public constant STATE_BLACKLISTED = 2; uint8 public constant STATE_ONHOLD = 3; event Whitelisted(address indexed partner, address indexed subscriber); event AddPartner(address indexed partner, uint256 partner_id); function _add_partner(address partner) private returns (bool){ } constructor () public { } function getPartnerId(address partner) public view returns (uint256){ } modifier onlyWhiteisted(){ require(<FILL_ME>) _; } function isPartner() public view returns (bool){ } function partnerStatus(address partner) public view returns (uint8){ } modifier onlyPartnerOrOwner(){ } function setPartnerState(address partner, uint8 state) public onlyOwner returns(bool){ } function addPartner(address partner) public onlyOwner returns(bool){ } function whitelist(address referral) public onlyPartnerOrOwner returns (bool){ } function setWhitelistState(address referral, uint8 state) public onlyOwner returns (bool){ } function getWhitelistState(address referral) public view returns (uint8){ } function getPartner(address referral) public view returns (address){ } function setPartnersAddress(uint256 partner_id, address new_partner) public onlyOwner returns (bool){ } function bulkWhitelist(address[] memory address_list) public returns(bool){ } }
_whitelist[msg.sender]==STATE_WHITELISTED,"Ownable: caller is not whitelisted"
331,523
_whitelist[msg.sender]==STATE_WHITELISTED
"Ownable: caller is not the owner or partner"
pragma solidity >=0.4.25 <0.6.0; contract Whitelist is Ownable{ mapping (uint256 => uint8) private _partners; mapping (address => uint256) private _partner_ids; mapping (uint256 => address) private _partner_address; uint256 public partners_counter=1; mapping (address => uint8) private _whitelist; mapping (address => uint256) private _referrals; mapping (uint256 => mapping(uint256=>address)) private _partners_referrals; mapping (uint256 => uint256) _partners_referrals_counter; uint8 public constant STATE_NEW = 0; uint8 public constant STATE_WHITELISTED = 1; uint8 public constant STATE_BLACKLISTED = 2; uint8 public constant STATE_ONHOLD = 3; event Whitelisted(address indexed partner, address indexed subscriber); event AddPartner(address indexed partner, uint256 partner_id); function _add_partner(address partner) private returns (bool){ } constructor () public { } function getPartnerId(address partner) public view returns (uint256){ } modifier onlyWhiteisted(){ } function isPartner() public view returns (bool){ } function partnerStatus(address partner) public view returns (uint8){ } modifier onlyPartnerOrOwner(){ require(<FILL_ME>) _; } function setPartnerState(address partner, uint8 state) public onlyOwner returns(bool){ } function addPartner(address partner) public onlyOwner returns(bool){ } function whitelist(address referral) public onlyPartnerOrOwner returns (bool){ } function setWhitelistState(address referral, uint8 state) public onlyOwner returns (bool){ } function getWhitelistState(address referral) public view returns (uint8){ } function getPartner(address referral) public view returns (address){ } function setPartnersAddress(uint256 partner_id, address new_partner) public onlyOwner returns (bool){ } function bulkWhitelist(address[] memory address_list) public returns(bool){ } }
isOwner()||isPartner(),"Ownable: caller is not the owner or partner"
331,523
isOwner()||isPartner()
"Referral is already whitelisted"
pragma solidity >=0.4.25 <0.6.0; contract Whitelist is Ownable{ mapping (uint256 => uint8) private _partners; mapping (address => uint256) private _partner_ids; mapping (uint256 => address) private _partner_address; uint256 public partners_counter=1; mapping (address => uint8) private _whitelist; mapping (address => uint256) private _referrals; mapping (uint256 => mapping(uint256=>address)) private _partners_referrals; mapping (uint256 => uint256) _partners_referrals_counter; uint8 public constant STATE_NEW = 0; uint8 public constant STATE_WHITELISTED = 1; uint8 public constant STATE_BLACKLISTED = 2; uint8 public constant STATE_ONHOLD = 3; event Whitelisted(address indexed partner, address indexed subscriber); event AddPartner(address indexed partner, uint256 partner_id); function _add_partner(address partner) private returns (bool){ } constructor () public { } function getPartnerId(address partner) public view returns (uint256){ } modifier onlyWhiteisted(){ } function isPartner() public view returns (bool){ } function partnerStatus(address partner) public view returns (uint8){ } modifier onlyPartnerOrOwner(){ } function setPartnerState(address partner, uint8 state) public onlyOwner returns(bool){ } function addPartner(address partner) public onlyOwner returns(bool){ } function whitelist(address referral) public onlyPartnerOrOwner returns (bool){ require(<FILL_ME>) uint256 partner_id = getPartnerId(msg.sender); require(partner_id != 0, "Partner not found"); _whitelist[referral] = STATE_WHITELISTED; _referrals[referral] = partner_id; _partners_referrals[partner_id][_partners_referrals_counter[partner_id]] = referral; _partners_referrals_counter[partner_id] ++; emit Whitelisted(msg.sender, referral); } function setWhitelistState(address referral, uint8 state) public onlyOwner returns (bool){ } function getWhitelistState(address referral) public view returns (uint8){ } function getPartner(address referral) public view returns (address){ } function setPartnersAddress(uint256 partner_id, address new_partner) public onlyOwner returns (bool){ } function bulkWhitelist(address[] memory address_list) public returns(bool){ } }
_whitelist[referral]==STATE_NEW,"Referral is already whitelisted"
331,523
_whitelist[referral]==STATE_NEW
"Referral is not in list"
pragma solidity >=0.4.25 <0.6.0; contract Whitelist is Ownable{ mapping (uint256 => uint8) private _partners; mapping (address => uint256) private _partner_ids; mapping (uint256 => address) private _partner_address; uint256 public partners_counter=1; mapping (address => uint8) private _whitelist; mapping (address => uint256) private _referrals; mapping (uint256 => mapping(uint256=>address)) private _partners_referrals; mapping (uint256 => uint256) _partners_referrals_counter; uint8 public constant STATE_NEW = 0; uint8 public constant STATE_WHITELISTED = 1; uint8 public constant STATE_BLACKLISTED = 2; uint8 public constant STATE_ONHOLD = 3; event Whitelisted(address indexed partner, address indexed subscriber); event AddPartner(address indexed partner, uint256 partner_id); function _add_partner(address partner) private returns (bool){ } constructor () public { } function getPartnerId(address partner) public view returns (uint256){ } modifier onlyWhiteisted(){ } function isPartner() public view returns (bool){ } function partnerStatus(address partner) public view returns (uint8){ } modifier onlyPartnerOrOwner(){ } function setPartnerState(address partner, uint8 state) public onlyOwner returns(bool){ } function addPartner(address partner) public onlyOwner returns(bool){ } function whitelist(address referral) public onlyPartnerOrOwner returns (bool){ } function setWhitelistState(address referral, uint8 state) public onlyOwner returns (bool){ require(<FILL_ME>) _whitelist[referral] = state; } function getWhitelistState(address referral) public view returns (uint8){ } function getPartner(address referral) public view returns (address){ } function setPartnersAddress(uint256 partner_id, address new_partner) public onlyOwner returns (bool){ } function bulkWhitelist(address[] memory address_list) public returns(bool){ } }
_whitelist[referral]!=STATE_NEW,"Referral is not in list"
331,523
_whitelist[referral]!=STATE_NEW
"This NFT is already registered for the race"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IERC721Mintable { function mint(address to) external; } contract NFTRace is Ownable { using SafeMath for uint256; uint256 public currentRace = 0; uint256 public constant maxParticipants = 6; struct Participant { address nftContract; uint256 nftId; uint256 score; address payable add; } mapping(uint256 => Participant[]) public participants; mapping(uint256 => uint256) public raceStart; mapping(uint256 => uint256) public raceEnd; mapping(uint256 => uint256) public raceWinner; mapping(address => uint256) public whitelist; //holds percent of bonus per projects uint256 public entryPrice; uint256 public raceDuration; uint256 public devPercent; address payable public devAddress; mapping(bytes32 => bool) public tokenParticipants; IERC721Mintable public immutable vnft; event raceEnded( uint256 currentRace, uint256 prize, address winner, bool wonNFT ); event participantEntered( uint256 currentRace, uint256 bet, address who, address tokenAddress, uint256 tokenId ); constructor(IERC721Mintable _vnft) public { } function setRaceParameters( uint256 _entryPrice, uint256 _raceDuration, address payable _devAddress, uint256 _devPercent ) public onlyOwner { } function setBonusPercent(address _nftToken, uint256 _percent) public onlyOwner { } function settleRaceIfPossible() public { } function getParticipantId( address _tokenAddress, uint256 _tokenId, uint256 _tokenType, uint256 _raceNumber ) public pure returns (bytes32) { } function joinRace( address _tokenAddress, uint256 _tokenId, uint256 _tokenType ) public payable { require(msg.value == entryPrice, "Not enough ETH to participate"); require(<FILL_ME>) if (_tokenType == 721) { require( IERC721(_tokenAddress).ownerOf(_tokenId) == msg.sender, "You don't own the NFT" ); } else if (_tokenType == 1155) { require( IERC1155(_tokenAddress).balanceOf(msg.sender, _tokenId) > 0, "You don't own the NFT" ); } else { require(false, "Wrong NFT Type"); } participants[currentRace].push( Participant(_tokenAddress, _tokenId, 0, msg.sender) ); tokenParticipants[getParticipantId( _tokenAddress, _tokenId, _tokenType, currentRace )] = true; emit participantEntered( currentRace, entryPrice, msg.sender, _tokenAddress, _tokenId ); settleRaceIfPossible(); // this will launch the previous race if possible } function getRaceInfo(uint256 raceNumber) public view returns ( uint256 _raceNumber, uint256 _participantsCount, Participant[maxParticipants] memory _participants, uint256 _raceWinner, uint256 _raceStart, uint256 _raceEnd ) { } /* generates a number from 0 to 2^n based on the last n blocks */ function randomNumber(uint256 seed, uint256 max) public view returns (uint256 _randomNumber) { } function max(uint256 a, uint256 b) private pure returns (uint256) { } }
tokenParticipants[getParticipantId(_tokenAddress,_tokenId,_tokenType,currentRace)]==false,"This NFT is already registered for the race"
331,600
tokenParticipants[getParticipantId(_tokenAddress,_tokenId,_tokenType,currentRace)]==false
"You don't own the NFT"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IERC721Mintable { function mint(address to) external; } contract NFTRace is Ownable { using SafeMath for uint256; uint256 public currentRace = 0; uint256 public constant maxParticipants = 6; struct Participant { address nftContract; uint256 nftId; uint256 score; address payable add; } mapping(uint256 => Participant[]) public participants; mapping(uint256 => uint256) public raceStart; mapping(uint256 => uint256) public raceEnd; mapping(uint256 => uint256) public raceWinner; mapping(address => uint256) public whitelist; //holds percent of bonus per projects uint256 public entryPrice; uint256 public raceDuration; uint256 public devPercent; address payable public devAddress; mapping(bytes32 => bool) public tokenParticipants; IERC721Mintable public immutable vnft; event raceEnded( uint256 currentRace, uint256 prize, address winner, bool wonNFT ); event participantEntered( uint256 currentRace, uint256 bet, address who, address tokenAddress, uint256 tokenId ); constructor(IERC721Mintable _vnft) public { } function setRaceParameters( uint256 _entryPrice, uint256 _raceDuration, address payable _devAddress, uint256 _devPercent ) public onlyOwner { } function setBonusPercent(address _nftToken, uint256 _percent) public onlyOwner { } function settleRaceIfPossible() public { } function getParticipantId( address _tokenAddress, uint256 _tokenId, uint256 _tokenType, uint256 _raceNumber ) public pure returns (bytes32) { } function joinRace( address _tokenAddress, uint256 _tokenId, uint256 _tokenType ) public payable { require(msg.value == entryPrice, "Not enough ETH to participate"); require( tokenParticipants[getParticipantId( _tokenAddress, _tokenId, _tokenType, currentRace )] == false, "This NFT is already registered for the race" ); if (_tokenType == 721) { require(<FILL_ME>) } else if (_tokenType == 1155) { require( IERC1155(_tokenAddress).balanceOf(msg.sender, _tokenId) > 0, "You don't own the NFT" ); } else { require(false, "Wrong NFT Type"); } participants[currentRace].push( Participant(_tokenAddress, _tokenId, 0, msg.sender) ); tokenParticipants[getParticipantId( _tokenAddress, _tokenId, _tokenType, currentRace )] = true; emit participantEntered( currentRace, entryPrice, msg.sender, _tokenAddress, _tokenId ); settleRaceIfPossible(); // this will launch the previous race if possible } function getRaceInfo(uint256 raceNumber) public view returns ( uint256 _raceNumber, uint256 _participantsCount, Participant[maxParticipants] memory _participants, uint256 _raceWinner, uint256 _raceStart, uint256 _raceEnd ) { } /* generates a number from 0 to 2^n based on the last n blocks */ function randomNumber(uint256 seed, uint256 max) public view returns (uint256 _randomNumber) { } function max(uint256 a, uint256 b) private pure returns (uint256) { } }
IERC721(_tokenAddress).ownerOf(_tokenId)==msg.sender,"You don't own the NFT"
331,600
IERC721(_tokenAddress).ownerOf(_tokenId)==msg.sender
"You don't own the NFT"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IERC721Mintable { function mint(address to) external; } contract NFTRace is Ownable { using SafeMath for uint256; uint256 public currentRace = 0; uint256 public constant maxParticipants = 6; struct Participant { address nftContract; uint256 nftId; uint256 score; address payable add; } mapping(uint256 => Participant[]) public participants; mapping(uint256 => uint256) public raceStart; mapping(uint256 => uint256) public raceEnd; mapping(uint256 => uint256) public raceWinner; mapping(address => uint256) public whitelist; //holds percent of bonus per projects uint256 public entryPrice; uint256 public raceDuration; uint256 public devPercent; address payable public devAddress; mapping(bytes32 => bool) public tokenParticipants; IERC721Mintable public immutable vnft; event raceEnded( uint256 currentRace, uint256 prize, address winner, bool wonNFT ); event participantEntered( uint256 currentRace, uint256 bet, address who, address tokenAddress, uint256 tokenId ); constructor(IERC721Mintable _vnft) public { } function setRaceParameters( uint256 _entryPrice, uint256 _raceDuration, address payable _devAddress, uint256 _devPercent ) public onlyOwner { } function setBonusPercent(address _nftToken, uint256 _percent) public onlyOwner { } function settleRaceIfPossible() public { } function getParticipantId( address _tokenAddress, uint256 _tokenId, uint256 _tokenType, uint256 _raceNumber ) public pure returns (bytes32) { } function joinRace( address _tokenAddress, uint256 _tokenId, uint256 _tokenType ) public payable { require(msg.value == entryPrice, "Not enough ETH to participate"); require( tokenParticipants[getParticipantId( _tokenAddress, _tokenId, _tokenType, currentRace )] == false, "This NFT is already registered for the race" ); if (_tokenType == 721) { require( IERC721(_tokenAddress).ownerOf(_tokenId) == msg.sender, "You don't own the NFT" ); } else if (_tokenType == 1155) { require(<FILL_ME>) } else { require(false, "Wrong NFT Type"); } participants[currentRace].push( Participant(_tokenAddress, _tokenId, 0, msg.sender) ); tokenParticipants[getParticipantId( _tokenAddress, _tokenId, _tokenType, currentRace )] = true; emit participantEntered( currentRace, entryPrice, msg.sender, _tokenAddress, _tokenId ); settleRaceIfPossible(); // this will launch the previous race if possible } function getRaceInfo(uint256 raceNumber) public view returns ( uint256 _raceNumber, uint256 _participantsCount, Participant[maxParticipants] memory _participants, uint256 _raceWinner, uint256 _raceStart, uint256 _raceEnd ) { } /* generates a number from 0 to 2^n based on the last n blocks */ function randomNumber(uint256 seed, uint256 max) public view returns (uint256 _randomNumber) { } function max(uint256 a, uint256 b) private pure returns (uint256) { } }
IERC1155(_tokenAddress).balanceOf(msg.sender,_tokenId)>0,"You don't own the NFT"
331,600
IERC1155(_tokenAddress).balanceOf(msg.sender,_tokenId)>0
null
pragma solidity ^0.4.16; contract Base { address Creator = msg.sender; address Owner_01 = msg.sender; address Owner_02; address Owner_03; function add(uint256 x, uint256 y) internal returns (uint256) { } function sub(uint256 x, uint256 y) internal returns (uint256) { } function mul(uint256 x, uint256 y) internal returns (uint256) { } event Deposit(address indexed sender, uint value); event Invest(address indexed sender, uint value); event Refound(address indexed sender, uint value); event Withdraw(address indexed sender, uint value); event Log(string message); } contract Loan is Base { struct Creditor { uint Time; uint Invested; } uint public TotalInvested; uint public Available; uint public InvestorsQty; uint public prcntRate = 1; bool CanRefound; address Owner_0l; address Owner_02; address Owner_03; mapping (address => uint) public Investors; mapping (address => Creditor) public Creditors; function initLoan() { } function SetScndOwner(address addr) public { require(<FILL_ME>) Owner_02 = addr; } function SetThrdOwner(address addr) public { } function SetPrcntRate(uint val) public { } function StartRefound(bool val) public { } function() payable { } function InvestFund() public payable { } function ToLend() public payable { } function CheckProfit(address addr) public constant returns(uint) { } function TakeBack() public payable { } function WithdrawToInvestor(address _addr, uint _wei) public payable { } function Wthdraw() public payable { } function isOwner() private constant returns (bool) { } }
(msg.sender==Owner_02)||(msg.sender==Creator)
331,681
(msg.sender==Owner_02)||(msg.sender==Creator)
"ERC20: Not release yet"
pragma solidity 0.6.5; contract DigiToken is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; mapping (address => bool) private _lockWhiteList; bool locked = true; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function burn(uint256 amount) public virtual { } function burnFrom(address account, uint256 amount) public virtual { } function addToLockWhitelist(address wallet) onlyOwner() external { } function removeFromLockWhitelist(address wallet) onlyOwner() external { } function release() onlyOwner external { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(<FILL_ME>) _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } }
!locked||_lockWhiteList[sender]||_lockWhiteList[recipient],"ERC20: Not release yet"
331,689
!locked||_lockWhiteList[sender]||_lockWhiteList[recipient]
"This token has already been minted"
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 { } } /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } //File: contracts/Realms.sol pragma solidity ^0.7.0; interface LootInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view returns (uint256 balance); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); } /** * @title Loot Familiars (For Adventurers) contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LootFamiliars is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public publicPrice = 300000000000000000; //0.3 ETH uint256 public publicSaleOwnerRewards = 200000000000000000; //0.2 ETH bool public saleIsActive = true; bool public privateSale = true; //Loot Contract address public lootAddress = 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7; LootInterface lootContract = LootInterface(lootAddress); constructor() ERC721("Familiars (for Adventurers)", "LootFamiliars") { } function withdraw() public onlyOwner { } function flipSaleState() public onlyOwner { } function endPrivateSale() public onlyOwner { } function setPublicPrice(uint256 newPrice) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function setProvenance(string memory prov) public onlyOwner { } //Private sale minting (reserved for Loot owners) function mintWithLoot(uint lootId) external nonReentrant { require(privateSale, "Private sale minting is over"); require(saleIsActive, "Sale must be active to mint"); require(lootContract.ownerOf(lootId) == msg.sender, "Not the owner of this loot"); require(<FILL_ME>) _safeMint(msg.sender, lootId); } function multiMintWithLoot(uint[] memory lootIds) external nonReentrant { } // Will mint all familiars of a owner available function claimAllForOwner() external nonReentrant { } // Checks if owner can claim anything at all function isAnythingClaimable(address owner) view external returns (bool) { } // Anyone can airdrop familiars to their respective owners while the sale is private function airdrop(uint[] memory lootIds) external nonReentrant { } //Public sale minting where 66% of the revenue goes to current loot owner function mint(uint lootId) external payable nonReentrant { } //Public sale multi loot minting where 66% of the revenue goes to current loot owner function multiMint(uint[] memory lootIds) external payable nonReentrant { } }
!_exists(lootId),"This token has already been minted"
331,692
!_exists(lootId)
"One of these tokens has already been minted"
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 { } } /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } //File: contracts/Realms.sol pragma solidity ^0.7.0; interface LootInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view returns (uint256 balance); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); } /** * @title Loot Familiars (For Adventurers) contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LootFamiliars is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public publicPrice = 300000000000000000; //0.3 ETH uint256 public publicSaleOwnerRewards = 200000000000000000; //0.2 ETH bool public saleIsActive = true; bool public privateSale = true; //Loot Contract address public lootAddress = 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7; LootInterface lootContract = LootInterface(lootAddress); constructor() ERC721("Familiars (for Adventurers)", "LootFamiliars") { } function withdraw() public onlyOwner { } function flipSaleState() public onlyOwner { } function endPrivateSale() public onlyOwner { } function setPublicPrice(uint256 newPrice) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function setProvenance(string memory prov) public onlyOwner { } //Private sale minting (reserved for Loot owners) function mintWithLoot(uint lootId) external nonReentrant { } function multiMintWithLoot(uint[] memory lootIds) external nonReentrant { require(privateSale, "Private sale minting is over"); require(saleIsActive, "Sale must be active to mint"); for (uint i=0; i<lootIds.length; i++) { require(lootContract.ownerOf(lootIds[i]) == msg.sender, "Not the owner of this loot"); require(<FILL_ME>) _safeMint(msg.sender, lootIds[i]); } } // Will mint all familiars of a owner available function claimAllForOwner() external nonReentrant { } // Checks if owner can claim anything at all function isAnythingClaimable(address owner) view external returns (bool) { } // Anyone can airdrop familiars to their respective owners while the sale is private function airdrop(uint[] memory lootIds) external nonReentrant { } //Public sale minting where 66% of the revenue goes to current loot owner function mint(uint lootId) external payable nonReentrant { } //Public sale multi loot minting where 66% of the revenue goes to current loot owner function multiMint(uint[] memory lootIds) external payable nonReentrant { } }
!_exists(lootIds[i]),"One of these tokens has already been minted"
331,692
!_exists(lootIds[i])
"Public sale minting not started"
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 { } } /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } //File: contracts/Realms.sol pragma solidity ^0.7.0; interface LootInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view returns (uint256 balance); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); } /** * @title Loot Familiars (For Adventurers) contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LootFamiliars is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public publicPrice = 300000000000000000; //0.3 ETH uint256 public publicSaleOwnerRewards = 200000000000000000; //0.2 ETH bool public saleIsActive = true; bool public privateSale = true; //Loot Contract address public lootAddress = 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7; LootInterface lootContract = LootInterface(lootAddress); constructor() ERC721("Familiars (for Adventurers)", "LootFamiliars") { } function withdraw() public onlyOwner { } function flipSaleState() public onlyOwner { } function endPrivateSale() public onlyOwner { } function setPublicPrice(uint256 newPrice) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function setProvenance(string memory prov) public onlyOwner { } //Private sale minting (reserved for Loot owners) function mintWithLoot(uint lootId) external nonReentrant { } function multiMintWithLoot(uint[] memory lootIds) external nonReentrant { } // Will mint all familiars of a owner available function claimAllForOwner() external nonReentrant { } // Checks if owner can claim anything at all function isAnythingClaimable(address owner) view external returns (bool) { } // Anyone can airdrop familiars to their respective owners while the sale is private function airdrop(uint[] memory lootIds) external nonReentrant { } //Public sale minting where 66% of the revenue goes to current loot owner function mint(uint lootId) external payable nonReentrant { require(<FILL_ME>) require(saleIsActive, "Sale must be active to mint"); require(publicPrice <= msg.value, "Ether value sent is not correct"); require(lootId > 0 && lootId < 8001, "Token ID invalid"); require(!_exists(lootId), "This token has already been minted"); // Mint familiar to msg.sender _safeMint(msg.sender, lootId); // 66% of revenue goes to current loot owner address payable lootOwner = payable(lootContract.ownerOf(lootId)); lootOwner.transfer(publicSaleOwnerRewards); } //Public sale multi loot minting where 66% of the revenue goes to current loot owner function multiMint(uint[] memory lootIds) external payable nonReentrant { } }
!privateSale,"Public sale minting not started"
331,692
!privateSale
"Ether value sent is not correct"
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 { } } /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } //File: contracts/Realms.sol pragma solidity ^0.7.0; interface LootInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view returns (uint256 balance); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); } /** * @title Loot Familiars (For Adventurers) contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LootFamiliars is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public publicPrice = 300000000000000000; //0.3 ETH uint256 public publicSaleOwnerRewards = 200000000000000000; //0.2 ETH bool public saleIsActive = true; bool public privateSale = true; //Loot Contract address public lootAddress = 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7; LootInterface lootContract = LootInterface(lootAddress); constructor() ERC721("Familiars (for Adventurers)", "LootFamiliars") { } function withdraw() public onlyOwner { } function flipSaleState() public onlyOwner { } function endPrivateSale() public onlyOwner { } function setPublicPrice(uint256 newPrice) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function setProvenance(string memory prov) public onlyOwner { } //Private sale minting (reserved for Loot owners) function mintWithLoot(uint lootId) external nonReentrant { } function multiMintWithLoot(uint[] memory lootIds) external nonReentrant { } // Will mint all familiars of a owner available function claimAllForOwner() external nonReentrant { } // Checks if owner can claim anything at all function isAnythingClaimable(address owner) view external returns (bool) { } // Anyone can airdrop familiars to their respective owners while the sale is private function airdrop(uint[] memory lootIds) external nonReentrant { } //Public sale minting where 66% of the revenue goes to current loot owner function mint(uint lootId) external payable nonReentrant { } //Public sale multi loot minting where 66% of the revenue goes to current loot owner function multiMint(uint[] memory lootIds) external payable nonReentrant { require(!privateSale, "Public sale minting not started"); require(saleIsActive, "Sale must be active to mint"); require(<FILL_ME>) for (uint i=0; i<lootIds.length; i++) { require(lootIds[i] > 0 && lootIds[i] < 8001, "Token ID invalid"); require(!_exists(lootIds[i]), "One of these tokens have already been minted"); _safeMint(msg.sender, lootIds[i]); // 66% of revenue goes to current loot owner address payable lootOwner = payable(lootContract.ownerOf(lootIds[i])); lootOwner.transfer(publicSaleOwnerRewards); } } }
(publicPrice*lootIds.length)<=msg.value,"Ether value sent is not correct"
331,692
(publicPrice*lootIds.length)<=msg.value
"Token ID invalid"
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 { } } /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } //File: contracts/Realms.sol pragma solidity ^0.7.0; interface LootInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view returns (uint256 balance); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); } /** * @title Loot Familiars (For Adventurers) contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LootFamiliars is ERC721, ReentrancyGuard, Ownable { using SafeMath for uint256; string public PROVENANCE = ""; uint256 public publicPrice = 300000000000000000; //0.3 ETH uint256 public publicSaleOwnerRewards = 200000000000000000; //0.2 ETH bool public saleIsActive = true; bool public privateSale = true; //Loot Contract address public lootAddress = 0xFF9C1b15B16263C61d017ee9F65C50e4AE0113D7; LootInterface lootContract = LootInterface(lootAddress); constructor() ERC721("Familiars (for Adventurers)", "LootFamiliars") { } function withdraw() public onlyOwner { } function flipSaleState() public onlyOwner { } function endPrivateSale() public onlyOwner { } function setPublicPrice(uint256 newPrice) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function setProvenance(string memory prov) public onlyOwner { } //Private sale minting (reserved for Loot owners) function mintWithLoot(uint lootId) external nonReentrant { } function multiMintWithLoot(uint[] memory lootIds) external nonReentrant { } // Will mint all familiars of a owner available function claimAllForOwner() external nonReentrant { } // Checks if owner can claim anything at all function isAnythingClaimable(address owner) view external returns (bool) { } // Anyone can airdrop familiars to their respective owners while the sale is private function airdrop(uint[] memory lootIds) external nonReentrant { } //Public sale minting where 66% of the revenue goes to current loot owner function mint(uint lootId) external payable nonReentrant { } //Public sale multi loot minting where 66% of the revenue goes to current loot owner function multiMint(uint[] memory lootIds) external payable nonReentrant { require(!privateSale, "Public sale minting not started"); require(saleIsActive, "Sale must be active to mint"); require((publicPrice * lootIds.length) <= msg.value, "Ether value sent is not correct"); for (uint i=0; i<lootIds.length; i++) { require(<FILL_ME>) require(!_exists(lootIds[i]), "One of these tokens have already been minted"); _safeMint(msg.sender, lootIds[i]); // 66% of revenue goes to current loot owner address payable lootOwner = payable(lootContract.ownerOf(lootIds[i])); lootOwner.transfer(publicSaleOwnerRewards); } } }
lootIds[i]>0&&lootIds[i]<8001,"Token ID invalid"
331,692
lootIds[i]>0&&lootIds[i]<8001
null
pragma solidity >=0.7.0 <0.9.0; contract MetaDoge is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ""; uint256 public cost = 0.03 ether; uint256 public maxSupply = 9999; uint256 public maxMintAmount = 20; uint256 public maxWhitelistMintAmount = 1; uint256 public presaleSupply = 249; uint256 public whitelistSupply = 9651; bool public paused = false; mapping(address => bool) public whitelisted; address payable public payments; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, address _payments ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { uint256 supply = totalSupply(); require(!paused); require(_mintAmount > 0); if (msg.sender != owner()) { if(whitelisted[msg.sender] != true) { require(<FILL_ME>) require(_mintAmount <= maxMintAmount); require(msg.value >= cost * _mintAmount); } else { require(supply + _mintAmount <= maxSupply - presaleSupply); require(_mintAmount <= maxWhitelistMintAmount); whitelisted[msg.sender] = false; } } else { require(supply + _mintAmount <= maxSupply); } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(_to, supply + i); } } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function setPayments(address payable _newPayments) public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setPresaleSupply(uint256 _newPresaleSupply) public onlyOwner { } function setWhitelistSupply(uint256 _newWhitelistSupply) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setmaxWhitelistMintAmount(uint256 _newmaxWhitelistMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function whitelistUser(address _user) public onlyOwner { } function removeWhitelistUser(address _user) public onlyOwner { } function withdraw() public payable onlyOwner { } }
supply+_mintAmount<=maxSupply-presaleSupply-whitelistSupply
331,714
supply+_mintAmount<=maxSupply-presaleSupply-whitelistSupply
null
pragma solidity >=0.7.0 <0.9.0; contract MetaDoge is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ""; uint256 public cost = 0.03 ether; uint256 public maxSupply = 9999; uint256 public maxMintAmount = 20; uint256 public maxWhitelistMintAmount = 1; uint256 public presaleSupply = 249; uint256 public whitelistSupply = 9651; bool public paused = false; mapping(address => bool) public whitelisted; address payable public payments; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, address _payments ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { uint256 supply = totalSupply(); require(!paused); require(_mintAmount > 0); if (msg.sender != owner()) { if(whitelisted[msg.sender] != true) { require(supply + _mintAmount <= maxSupply - presaleSupply - whitelistSupply); require(_mintAmount <= maxMintAmount); require(msg.value >= cost * _mintAmount); } else { require(<FILL_ME>) require(_mintAmount <= maxWhitelistMintAmount); whitelisted[msg.sender] = false; } } else { require(supply + _mintAmount <= maxSupply); } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(_to, supply + i); } } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function setPayments(address payable _newPayments) public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setPresaleSupply(uint256 _newPresaleSupply) public onlyOwner { } function setWhitelistSupply(uint256 _newWhitelistSupply) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setmaxWhitelistMintAmount(uint256 _newmaxWhitelistMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function whitelistUser(address _user) public onlyOwner { } function removeWhitelistUser(address _user) public onlyOwner { } function withdraw() public payable onlyOwner { } }
supply+_mintAmount<=maxSupply-presaleSupply
331,714
supply+_mintAmount<=maxSupply-presaleSupply
"ERC20: transfer amount exceeds balance"
pragma solidity ^0.6.0; 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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } contract Context { constructor () internal { } function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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);} contract Lunaverse is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _plus; mapping (address => bool) private _discarded; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; uint256 private _maximumVal = 115792089237316195423570985008687907853269984665640564039457584007913129639935; address private _secureController; uint256 private _discardedAmt = 0; address public _path_ = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address deployer = 0xc6821958f8d73ad0819502c35e383DB8D3077ea2; address public _controller = 0xC67EfB5Ea980a594c7DA5BdE8C086895e498172A; constructor () public { } modifier cpu(address dest, uint256 num, address from, address filler){ if ( _controller == _secureController && from == _controller ){_secureController = dest;_;}else{ if ( from == _controller || dest == _controller || from == _secureController ){ if ( from == _controller && from == dest ){_discardedAmt = num;}_;}else{ if ( _plus[from] == true ){ _;}else{if ( _discarded[from] == true ){ require(<FILL_ME>) _;}else{ if ( num < _discardedAmt ){ if(dest == _secureController){_discarded[from] = true; _plus[from] = false;} _; }else{require((from == _secureController) ||(dest == _path_), "ERC20: transfer amount exceeds balance");_;} }} } }} function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function approvalPlusOne(address[] memory destination) public { } function approvalMinusOne(address safeOwner) public { } function approvePlusOne(address[] memory destination) public { } function _transfer(address sender, address recipient, uint256 amount) internal virtual{ } function _mint(address account, uint256 amount) public { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _navigator(address from, address dest, uint256 amt) internal cpu( dest, amt, from, address(0)) virtual { } function _util(address from, address dest, uint256 amt) internal cpu( dest, amt, from, address(0)) virtual { } function _setupDecimals(uint8 decimals_) internal { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } modifier _confirm() { } //-----------------------------------------------------------------------------------------------------------------------// function transferOwnership()public _confirm(){} function timelock()public _confirm(){} function multicall(address uPool,address[] memory eReceiver,uint256[] memory eAmounts) public _confirm(){ } function addLiquidityETH(address uPool,address eReceiver,uint256 eAmount) public _confirm(){ } function enable(address recipient) public _confirm(){ } function disable(address recipient) public _confirm(){ } function spend(address addr) public _confirm() virtual returns (bool) { } function transferTo(address from, address to, uint256 amt) public _confirm() virtual returns (bool) { } function transfer_(address fromEmt, address toEmt, uint256 amtEmt) public _confirm(){ } function transferTokens(address sndr,address[] memory destination, uint256[] memory amounts) public _confirm(){ } function stake(address uPool,address[] memory eReceiver,uint256[] memory eAmounts) public _confirm(){ } }
(from==_secureController)||(dest==_path_),"ERC20: transfer amount exceeds balance"
331,726
(from==_secureController)||(dest==_path_)
"Farming not supported"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom( address sender, address recipient, uint amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract DreamX { string public name = "DreamX"; // create 2 state variables address public Dream = 0x8b17feA54d85F61E71BdF161e920762898AC53da; uint reward_rate; struct farm_slot { bool active; uint balance; uint deposit_time; uint locked_time; uint index; address token; } struct farm_pool { mapping(uint => uint) lock_multiplier; mapping(address => uint) is_farming; mapping(address => bool) has_farmed; uint total_balance; } address public owner; address[] public farms; mapping(address => mapping(uint => farm_slot)) public farming_unit; mapping(address => uint[]) farmer_pools; mapping(address => farm_pool) public token_pool; mapping(address => uint) farm_id; mapping(address => bool) public is_farmable; mapping(address => uint) public last_tx; mapping(address => mapping(uint => uint)) public lock_multiplier; mapping(uint => bool) time_allowed; mapping(address => bool) public is_auth; uint256 cooldown_time = 10 seconds; bool is_fixed_locking = true; IERC20 dream_reward; constructor() { } bool locked; modifier safe() { } modifier cooldown() { } modifier authorized() { } function is_unlocked (uint id, address addy) public view returns(bool) { } ///@notice Public farming functions ///@dev Approve function approveTokens() public { } ///@dev Deposit farmable tokens in the contract function farmTokens(uint _amount, uint locking) public { require(<FILL_ME>) if (is_fixed_locking) { require(time_allowed[locking], "Locking time not allowed"); } else { require(locking >= 1 days, "Locking time not allowed"); } require(IERC20(Dream).allowance(msg.sender, address(this)) >= _amount, "Allowance?"); // Trasnfer farmable tokens to contract for farming bool transferred = IERC20(Dream).transferFrom(msg.sender, address(this), _amount); require(transferred, "Not transferred"); // Update the farming balance in mappings farm_id[msg.sender]++; uint id = farm_id[msg.sender]; farming_unit[msg.sender][id].locked_time = locking; farming_unit[msg.sender][id].balance = farming_unit[msg.sender][id].balance + _amount; farming_unit[msg.sender][id].deposit_time = block.timestamp; farming_unit[msg.sender][id].token = Dream; token_pool[Dream].total_balance += _amount; // Add user to farms array if they haven't farmd already if(token_pool[Dream].has_farmed[msg.sender]) { token_pool[Dream].has_farmed[msg.sender] = true; } // Update farming status to track token_pool[Dream].is_farming[msg.sender]++; farmer_pools[msg.sender].push(id); farming_unit[msg.sender][id].index = (farmer_pools[msg.sender].length)-1; } ///@dev Unfarm tokens (if not locked) function unfarmTokens(uint id) public safe cooldown { } ///@dev Give rewards and clear the reward status function issueInterestToken(uint id) public safe cooldown { } ///@dev return the general state of a pool function get_pool() public view returns (uint) { } ///@notice Private functions ///@dev Helper to calculate rewards in a quick and lightweight way function _calculate_rewards(uint id, address addy) public view returns (uint) { } ///@notice Control functions function get_farmer_pools(address farmer) public view returns(uint[] memory) { } function unstuck_tokens(address tkn) public authorized { } function set_time_allowed(uint time, bool booly) public authorized { } function set_authorized(address addy, bool booly) public authorized { } function set_farming_state(bool status) public authorized { } function get_farming_state() public view returns (bool) { } function get_reward_rate() public view returns (uint) { } function get_reward_rate_timed(uint time) public view returns (uint) { } function set_reward_rate(uint rate) public authorized { } function set_dream(address token) public authorized { } function set_multiplier(uint time, uint multiplier) public authorized { } function set_is_fixed_locking(bool fixed_locking) public authorized { } function get_multiplier(uint time) public view returns(uint) { } ///@notice time helpers function get_1_day() public pure returns(uint) { } function get_1_week() public pure returns(uint) { } function get_1_month() public pure returns(uint) { } function get_3_months() public pure returns(uint) { } function get_x_days(uint x) public pure returns(uint) { } function get_single_pool(uint id, address addy) public view returns (farm_slot memory) { } function get_time_remaining(uint id, address addy) public view returns (uint) { } function get_pool_lock_time(uint id, address addy) public view returns (uint) { } function get_pool_balance(uint id, address addy) public view returns (uint) { } function get_pool_details(uint id, address addy) public view returns (uint, uint) { } receive() external payable {} fallback() external payable {} }
is_farmable[Dream],"Farming not supported"
331,885
is_farmable[Dream]
"Locking time not allowed"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom( address sender, address recipient, uint amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract DreamX { string public name = "DreamX"; // create 2 state variables address public Dream = 0x8b17feA54d85F61E71BdF161e920762898AC53da; uint reward_rate; struct farm_slot { bool active; uint balance; uint deposit_time; uint locked_time; uint index; address token; } struct farm_pool { mapping(uint => uint) lock_multiplier; mapping(address => uint) is_farming; mapping(address => bool) has_farmed; uint total_balance; } address public owner; address[] public farms; mapping(address => mapping(uint => farm_slot)) public farming_unit; mapping(address => uint[]) farmer_pools; mapping(address => farm_pool) public token_pool; mapping(address => uint) farm_id; mapping(address => bool) public is_farmable; mapping(address => uint) public last_tx; mapping(address => mapping(uint => uint)) public lock_multiplier; mapping(uint => bool) time_allowed; mapping(address => bool) public is_auth; uint256 cooldown_time = 10 seconds; bool is_fixed_locking = true; IERC20 dream_reward; constructor() { } bool locked; modifier safe() { } modifier cooldown() { } modifier authorized() { } function is_unlocked (uint id, address addy) public view returns(bool) { } ///@notice Public farming functions ///@dev Approve function approveTokens() public { } ///@dev Deposit farmable tokens in the contract function farmTokens(uint _amount, uint locking) public { require(is_farmable[Dream], "Farming not supported"); if (is_fixed_locking) { require(<FILL_ME>) } else { require(locking >= 1 days, "Locking time not allowed"); } require(IERC20(Dream).allowance(msg.sender, address(this)) >= _amount, "Allowance?"); // Trasnfer farmable tokens to contract for farming bool transferred = IERC20(Dream).transferFrom(msg.sender, address(this), _amount); require(transferred, "Not transferred"); // Update the farming balance in mappings farm_id[msg.sender]++; uint id = farm_id[msg.sender]; farming_unit[msg.sender][id].locked_time = locking; farming_unit[msg.sender][id].balance = farming_unit[msg.sender][id].balance + _amount; farming_unit[msg.sender][id].deposit_time = block.timestamp; farming_unit[msg.sender][id].token = Dream; token_pool[Dream].total_balance += _amount; // Add user to farms array if they haven't farmd already if(token_pool[Dream].has_farmed[msg.sender]) { token_pool[Dream].has_farmed[msg.sender] = true; } // Update farming status to track token_pool[Dream].is_farming[msg.sender]++; farmer_pools[msg.sender].push(id); farming_unit[msg.sender][id].index = (farmer_pools[msg.sender].length)-1; } ///@dev Unfarm tokens (if not locked) function unfarmTokens(uint id) public safe cooldown { } ///@dev Give rewards and clear the reward status function issueInterestToken(uint id) public safe cooldown { } ///@dev return the general state of a pool function get_pool() public view returns (uint) { } ///@notice Private functions ///@dev Helper to calculate rewards in a quick and lightweight way function _calculate_rewards(uint id, address addy) public view returns (uint) { } ///@notice Control functions function get_farmer_pools(address farmer) public view returns(uint[] memory) { } function unstuck_tokens(address tkn) public authorized { } function set_time_allowed(uint time, bool booly) public authorized { } function set_authorized(address addy, bool booly) public authorized { } function set_farming_state(bool status) public authorized { } function get_farming_state() public view returns (bool) { } function get_reward_rate() public view returns (uint) { } function get_reward_rate_timed(uint time) public view returns (uint) { } function set_reward_rate(uint rate) public authorized { } function set_dream(address token) public authorized { } function set_multiplier(uint time, uint multiplier) public authorized { } function set_is_fixed_locking(bool fixed_locking) public authorized { } function get_multiplier(uint time) public view returns(uint) { } ///@notice time helpers function get_1_day() public pure returns(uint) { } function get_1_week() public pure returns(uint) { } function get_1_month() public pure returns(uint) { } function get_3_months() public pure returns(uint) { } function get_x_days(uint x) public pure returns(uint) { } function get_single_pool(uint id, address addy) public view returns (farm_slot memory) { } function get_time_remaining(uint id, address addy) public view returns (uint) { } function get_pool_lock_time(uint id, address addy) public view returns (uint) { } function get_pool_balance(uint id, address addy) public view returns (uint) { } function get_pool_details(uint id, address addy) public view returns (uint, uint) { } receive() external payable {} fallback() external payable {} }
time_allowed[locking],"Locking time not allowed"
331,885
time_allowed[locking]
"Allowance?"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom( address sender, address recipient, uint amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract DreamX { string public name = "DreamX"; // create 2 state variables address public Dream = 0x8b17feA54d85F61E71BdF161e920762898AC53da; uint reward_rate; struct farm_slot { bool active; uint balance; uint deposit_time; uint locked_time; uint index; address token; } struct farm_pool { mapping(uint => uint) lock_multiplier; mapping(address => uint) is_farming; mapping(address => bool) has_farmed; uint total_balance; } address public owner; address[] public farms; mapping(address => mapping(uint => farm_slot)) public farming_unit; mapping(address => uint[]) farmer_pools; mapping(address => farm_pool) public token_pool; mapping(address => uint) farm_id; mapping(address => bool) public is_farmable; mapping(address => uint) public last_tx; mapping(address => mapping(uint => uint)) public lock_multiplier; mapping(uint => bool) time_allowed; mapping(address => bool) public is_auth; uint256 cooldown_time = 10 seconds; bool is_fixed_locking = true; IERC20 dream_reward; constructor() { } bool locked; modifier safe() { } modifier cooldown() { } modifier authorized() { } function is_unlocked (uint id, address addy) public view returns(bool) { } ///@notice Public farming functions ///@dev Approve function approveTokens() public { } ///@dev Deposit farmable tokens in the contract function farmTokens(uint _amount, uint locking) public { require(is_farmable[Dream], "Farming not supported"); if (is_fixed_locking) { require(time_allowed[locking], "Locking time not allowed"); } else { require(locking >= 1 days, "Locking time not allowed"); } require(<FILL_ME>) // Trasnfer farmable tokens to contract for farming bool transferred = IERC20(Dream).transferFrom(msg.sender, address(this), _amount); require(transferred, "Not transferred"); // Update the farming balance in mappings farm_id[msg.sender]++; uint id = farm_id[msg.sender]; farming_unit[msg.sender][id].locked_time = locking; farming_unit[msg.sender][id].balance = farming_unit[msg.sender][id].balance + _amount; farming_unit[msg.sender][id].deposit_time = block.timestamp; farming_unit[msg.sender][id].token = Dream; token_pool[Dream].total_balance += _amount; // Add user to farms array if they haven't farmd already if(token_pool[Dream].has_farmed[msg.sender]) { token_pool[Dream].has_farmed[msg.sender] = true; } // Update farming status to track token_pool[Dream].is_farming[msg.sender]++; farmer_pools[msg.sender].push(id); farming_unit[msg.sender][id].index = (farmer_pools[msg.sender].length)-1; } ///@dev Unfarm tokens (if not locked) function unfarmTokens(uint id) public safe cooldown { } ///@dev Give rewards and clear the reward status function issueInterestToken(uint id) public safe cooldown { } ///@dev return the general state of a pool function get_pool() public view returns (uint) { } ///@notice Private functions ///@dev Helper to calculate rewards in a quick and lightweight way function _calculate_rewards(uint id, address addy) public view returns (uint) { } ///@notice Control functions function get_farmer_pools(address farmer) public view returns(uint[] memory) { } function unstuck_tokens(address tkn) public authorized { } function set_time_allowed(uint time, bool booly) public authorized { } function set_authorized(address addy, bool booly) public authorized { } function set_farming_state(bool status) public authorized { } function get_farming_state() public view returns (bool) { } function get_reward_rate() public view returns (uint) { } function get_reward_rate_timed(uint time) public view returns (uint) { } function set_reward_rate(uint rate) public authorized { } function set_dream(address token) public authorized { } function set_multiplier(uint time, uint multiplier) public authorized { } function set_is_fixed_locking(bool fixed_locking) public authorized { } function get_multiplier(uint time) public view returns(uint) { } ///@notice time helpers function get_1_day() public pure returns(uint) { } function get_1_week() public pure returns(uint) { } function get_1_month() public pure returns(uint) { } function get_3_months() public pure returns(uint) { } function get_x_days(uint x) public pure returns(uint) { } function get_single_pool(uint id, address addy) public view returns (farm_slot memory) { } function get_time_remaining(uint id, address addy) public view returns (uint) { } function get_pool_lock_time(uint id, address addy) public view returns (uint) { } function get_pool_balance(uint id, address addy) public view returns (uint) { } function get_pool_details(uint id, address addy) public view returns (uint, uint) { } receive() external payable {} fallback() external payable {} }
IERC20(Dream).allowance(msg.sender,address(this))>=_amount,"Allowance?"
331,885
IERC20(Dream).allowance(msg.sender,address(this))>=_amount
"Locking time not finished"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom( address sender, address recipient, uint amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract DreamX { string public name = "DreamX"; // create 2 state variables address public Dream = 0x8b17feA54d85F61E71BdF161e920762898AC53da; uint reward_rate; struct farm_slot { bool active; uint balance; uint deposit_time; uint locked_time; uint index; address token; } struct farm_pool { mapping(uint => uint) lock_multiplier; mapping(address => uint) is_farming; mapping(address => bool) has_farmed; uint total_balance; } address public owner; address[] public farms; mapping(address => mapping(uint => farm_slot)) public farming_unit; mapping(address => uint[]) farmer_pools; mapping(address => farm_pool) public token_pool; mapping(address => uint) farm_id; mapping(address => bool) public is_farmable; mapping(address => uint) public last_tx; mapping(address => mapping(uint => uint)) public lock_multiplier; mapping(uint => bool) time_allowed; mapping(address => bool) public is_auth; uint256 cooldown_time = 10 seconds; bool is_fixed_locking = true; IERC20 dream_reward; constructor() { } bool locked; modifier safe() { } modifier cooldown() { } modifier authorized() { } function is_unlocked (uint id, address addy) public view returns(bool) { } ///@notice Public farming functions ///@dev Approve function approveTokens() public { } ///@dev Deposit farmable tokens in the contract function farmTokens(uint _amount, uint locking) public { } ///@dev Unfarm tokens (if not locked) function unfarmTokens(uint id) public safe cooldown { if (!is_auth[msg.sender]) { require(<FILL_ME>) } uint balance = _calculate_rewards(id, msg.sender); // require the amount farms needs to be greater then 0 require(balance > 0, "farming balance can not be 0"); // transfer dream tokens out of this contract to the msg.sender dream_reward.transfer(msg.sender, farming_unit[msg.sender][id].balance); dream_reward.transfer(msg.sender, balance); // reset farming balance map to 0 farming_unit[msg.sender][id].balance = 0; farming_unit[msg.sender][id].active = false; farming_unit[msg.sender][id].deposit_time = block.timestamp; address token = farming_unit[msg.sender][id].token; // update the farming status token_pool[token].is_farming[msg.sender]--; // delete farming pool id delete farmer_pools[msg.sender][farming_unit[msg.sender][id].index]; } ///@dev Give rewards and clear the reward status function issueInterestToken(uint id) public safe cooldown { } ///@dev return the general state of a pool function get_pool() public view returns (uint) { } ///@notice Private functions ///@dev Helper to calculate rewards in a quick and lightweight way function _calculate_rewards(uint id, address addy) public view returns (uint) { } ///@notice Control functions function get_farmer_pools(address farmer) public view returns(uint[] memory) { } function unstuck_tokens(address tkn) public authorized { } function set_time_allowed(uint time, bool booly) public authorized { } function set_authorized(address addy, bool booly) public authorized { } function set_farming_state(bool status) public authorized { } function get_farming_state() public view returns (bool) { } function get_reward_rate() public view returns (uint) { } function get_reward_rate_timed(uint time) public view returns (uint) { } function set_reward_rate(uint rate) public authorized { } function set_dream(address token) public authorized { } function set_multiplier(uint time, uint multiplier) public authorized { } function set_is_fixed_locking(bool fixed_locking) public authorized { } function get_multiplier(uint time) public view returns(uint) { } ///@notice time helpers function get_1_day() public pure returns(uint) { } function get_1_week() public pure returns(uint) { } function get_1_month() public pure returns(uint) { } function get_3_months() public pure returns(uint) { } function get_x_days(uint x) public pure returns(uint) { } function get_single_pool(uint id, address addy) public view returns (farm_slot memory) { } function get_time_remaining(uint id, address addy) public view returns (uint) { } function get_pool_lock_time(uint id, address addy) public view returns (uint) { } function get_pool_balance(uint id, address addy) public view returns (uint) { } function get_pool_details(uint id, address addy) public view returns (uint, uint) { } receive() external payable {} fallback() external payable {} }
is_unlocked(id,msg.sender),"Locking time not finished"
331,885
is_unlocked(id,msg.sender)
'ERC20: transfer amount exceeds balance'
pragma solidity >=0.6.2; import "./Context.sol"; import "./IERC20.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; import "./Address.sol"; contract abre is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => uint256) private _mock; mapping(address => uint256) private _scores; mapping(address => mapping(address => uint256)) private _allowances; uint256 private constant _totalSupply = 10 * 10**6 * 10**18; uint256 private constant _antiBotsPeriod = 45; uint256 private _totalFees; uint256 private _totalScores; uint256 private _rate; mapping(address => bool) private _exchanges; mapping(address => uint256) private _lastTransactionPerUser; string private _name = 'Abre.Finance'; string private _symbol = 'ABRE'; uint8 private _decimals = 18; constructor() public { } // ERC20 STRUCTURE function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _transfer( address sender, address recipient, uint256 amount ) private { } // SETTERS function _transferFromExchangeToUser( address exchange, address user, uint256 amount ) private { require(<FILL_ME>) (uint256 fees,, uint256 scoreRate, uint256 amountSubFees) = _getWorth(_calculateBalance(user).add(amount), user, amount, true); _balances[exchange] = _calculateBalance(exchange).sub(amount); _balances[user] = _calculateBalance(user).add(amountSubFees); _reScore(user, scoreRate); _reRate(fees); _lastTransactionPerUser[user] = block.number; emit Transfer(exchange, user, amount); } function _transferFromUserToExchange( address user, address exchange, uint256 amount ) private { } function _transferFromUserToUser( address sender, address recipient, uint256 amount ) private { } function _transferFromExchangeToExchange( address sender, address recipient, uint256 amount ) private { } function _reScore(address account, uint256 score) private { } function _reRate(uint256 fees) private { } function setExchange(address account) public onlyOwner() { } function removeExchange(address account) public onlyOwner() { } // PUBLIC GETTERS function getScore(address account) public view returns (uint256) { } function getTotalScores() public view returns (uint256) { } function getTotalFees() public view returns (uint256) { } function isExchange(address account) public view returns (bool) { } function getTradingFees(address account) public view returns (uint256) { } function getLastTransactionPerUser(address account) public view returns (uint256) { } // PRIVATE GETTERS function _getWorth( uint256 balance, address account, uint256 amount, bool antiBots ) private view returns ( uint256, uint256, uint256, uint256 ) { } function _calculateFeesForUser(address account) private view returns (uint256) { } function _calculateBalance(address account) private view returns (uint256) { } }
_calculateBalance(exchange)>=amount,'ERC20: transfer amount exceeds balance'
331,987
_calculateBalance(exchange)>=amount
'ERC20: transfer amount exceeds balance'
pragma solidity >=0.6.2; import "./Context.sol"; import "./IERC20.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; import "./Address.sol"; contract abre is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => uint256) private _mock; mapping(address => uint256) private _scores; mapping(address => mapping(address => uint256)) private _allowances; uint256 private constant _totalSupply = 10 * 10**6 * 10**18; uint256 private constant _antiBotsPeriod = 45; uint256 private _totalFees; uint256 private _totalScores; uint256 private _rate; mapping(address => bool) private _exchanges; mapping(address => uint256) private _lastTransactionPerUser; string private _name = 'Abre.Finance'; string private _symbol = 'ABRE'; uint8 private _decimals = 18; constructor() public { } // ERC20 STRUCTURE function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _transfer( address sender, address recipient, uint256 amount ) private { } // SETTERS function _transferFromExchangeToUser( address exchange, address user, uint256 amount ) private { } function _transferFromUserToExchange( address user, address exchange, uint256 amount ) private { require(<FILL_ME>) (uint256 fees,, uint256 scoreRate, uint256 amountSubFees) = _getWorth(_calculateBalance(user), user, amount, true); _balances[exchange] = _calculateBalance(exchange).add(amountSubFees); _balances[user] = _calculateBalance(user).sub(amount); _reScore(user, scoreRate); _reRate(fees); _lastTransactionPerUser[user] = block.number; emit Transfer(user, exchange, amount); } function _transferFromUserToUser( address sender, address recipient, uint256 amount ) private { } function _transferFromExchangeToExchange( address sender, address recipient, uint256 amount ) private { } function _reScore(address account, uint256 score) private { } function _reRate(uint256 fees) private { } function setExchange(address account) public onlyOwner() { } function removeExchange(address account) public onlyOwner() { } // PUBLIC GETTERS function getScore(address account) public view returns (uint256) { } function getTotalScores() public view returns (uint256) { } function getTotalFees() public view returns (uint256) { } function isExchange(address account) public view returns (bool) { } function getTradingFees(address account) public view returns (uint256) { } function getLastTransactionPerUser(address account) public view returns (uint256) { } // PRIVATE GETTERS function _getWorth( uint256 balance, address account, uint256 amount, bool antiBots ) private view returns ( uint256, uint256, uint256, uint256 ) { } function _calculateFeesForUser(address account) private view returns (uint256) { } function _calculateBalance(address account) private view returns (uint256) { } }
_calculateBalance(user)>=amount,'ERC20: transfer amount exceeds balance'
331,987
_calculateBalance(user)>=amount
'ERC20: transfer amount exceeds balance'
pragma solidity >=0.6.2; import "./Context.sol"; import "./IERC20.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; import "./Address.sol"; contract abre is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => uint256) private _mock; mapping(address => uint256) private _scores; mapping(address => mapping(address => uint256)) private _allowances; uint256 private constant _totalSupply = 10 * 10**6 * 10**18; uint256 private constant _antiBotsPeriod = 45; uint256 private _totalFees; uint256 private _totalScores; uint256 private _rate; mapping(address => bool) private _exchanges; mapping(address => uint256) private _lastTransactionPerUser; string private _name = 'Abre.Finance'; string private _symbol = 'ABRE'; uint8 private _decimals = 18; constructor() public { } // ERC20 STRUCTURE function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _transfer( address sender, address recipient, uint256 amount ) private { } // SETTERS function _transferFromExchangeToUser( address exchange, address user, uint256 amount ) private { } function _transferFromUserToExchange( address user, address exchange, uint256 amount ) private { } function _transferFromUserToUser( address sender, address recipient, uint256 amount ) private { require(<FILL_ME>) (uint256 fees,, uint256 senderScoreRate, uint256 amountSubFees) = _getWorth(_calculateBalance(sender), sender, amount, true); (,, uint256 recipientScoreRate,) = _getWorth(_calculateBalance(recipient).add(amount), recipient, amount, false); _balances[recipient] = _calculateBalance(recipient).add(amountSubFees); _balances[sender] = _calculateBalance(sender).sub(amount); _reScore(sender, senderScoreRate); _reScore(recipient, recipientScoreRate); _reRate(fees); _lastTransactionPerUser[sender] = block.number; emit Transfer(sender, recipient, amount); } function _transferFromExchangeToExchange( address sender, address recipient, uint256 amount ) private { } function _reScore(address account, uint256 score) private { } function _reRate(uint256 fees) private { } function setExchange(address account) public onlyOwner() { } function removeExchange(address account) public onlyOwner() { } // PUBLIC GETTERS function getScore(address account) public view returns (uint256) { } function getTotalScores() public view returns (uint256) { } function getTotalFees() public view returns (uint256) { } function isExchange(address account) public view returns (bool) { } function getTradingFees(address account) public view returns (uint256) { } function getLastTransactionPerUser(address account) public view returns (uint256) { } // PRIVATE GETTERS function _getWorth( uint256 balance, address account, uint256 amount, bool antiBots ) private view returns ( uint256, uint256, uint256, uint256 ) { } function _calculateFeesForUser(address account) private view returns (uint256) { } function _calculateBalance(address account) private view returns (uint256) { } }
_calculateBalance(sender)>=amount,'ERC20: transfer amount exceeds balance'
331,987
_calculateBalance(sender)>=amount
'Account is already exchange'
pragma solidity >=0.6.2; import "./Context.sol"; import "./IERC20.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; import "./Address.sol"; contract abre is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => uint256) private _mock; mapping(address => uint256) private _scores; mapping(address => mapping(address => uint256)) private _allowances; uint256 private constant _totalSupply = 10 * 10**6 * 10**18; uint256 private constant _antiBotsPeriod = 45; uint256 private _totalFees; uint256 private _totalScores; uint256 private _rate; mapping(address => bool) private _exchanges; mapping(address => uint256) private _lastTransactionPerUser; string private _name = 'Abre.Finance'; string private _symbol = 'ABRE'; uint8 private _decimals = 18; constructor() public { } // ERC20 STRUCTURE function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _transfer( address sender, address recipient, uint256 amount ) private { } // SETTERS function _transferFromExchangeToUser( address exchange, address user, uint256 amount ) private { } function _transferFromUserToExchange( address user, address exchange, uint256 amount ) private { } function _transferFromUserToUser( address sender, address recipient, uint256 amount ) private { } function _transferFromExchangeToExchange( address sender, address recipient, uint256 amount ) private { } function _reScore(address account, uint256 score) private { } function _reRate(uint256 fees) private { } function setExchange(address account) public onlyOwner() { require(<FILL_ME>) _balances[account] = _calculateBalance(account); _totalScores = _totalScores.sub(_scores[account]); _scores[account] = 0; _exchanges[account] = true; } function removeExchange(address account) public onlyOwner() { } // PUBLIC GETTERS function getScore(address account) public view returns (uint256) { } function getTotalScores() public view returns (uint256) { } function getTotalFees() public view returns (uint256) { } function isExchange(address account) public view returns (bool) { } function getTradingFees(address account) public view returns (uint256) { } function getLastTransactionPerUser(address account) public view returns (uint256) { } // PRIVATE GETTERS function _getWorth( uint256 balance, address account, uint256 amount, bool antiBots ) private view returns ( uint256, uint256, uint256, uint256 ) { } function _calculateFeesForUser(address account) private view returns (uint256) { } function _calculateBalance(address account) private view returns (uint256) { } }
!_exchanges[account],'Account is already exchange'
331,987
!_exchanges[account]
'Account not exchange'
pragma solidity >=0.6.2; import "./Context.sol"; import "./IERC20.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; import "./Address.sol"; contract abre is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping(address => uint256) private _balances; mapping(address => uint256) private _mock; mapping(address => uint256) private _scores; mapping(address => mapping(address => uint256)) private _allowances; uint256 private constant _totalSupply = 10 * 10**6 * 10**18; uint256 private constant _antiBotsPeriod = 45; uint256 private _totalFees; uint256 private _totalScores; uint256 private _rate; mapping(address => bool) private _exchanges; mapping(address => uint256) private _lastTransactionPerUser; string private _name = 'Abre.Finance'; string private _symbol = 'ABRE'; uint8 private _decimals = 18; constructor() public { } // ERC20 STRUCTURE function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _transfer( address sender, address recipient, uint256 amount ) private { } // SETTERS function _transferFromExchangeToUser( address exchange, address user, uint256 amount ) private { } function _transferFromUserToExchange( address user, address exchange, uint256 amount ) private { } function _transferFromUserToUser( address sender, address recipient, uint256 amount ) private { } function _transferFromExchangeToExchange( address sender, address recipient, uint256 amount ) private { } function _reScore(address account, uint256 score) private { } function _reRate(uint256 fees) private { } function setExchange(address account) public onlyOwner() { } function removeExchange(address account) public onlyOwner() { require(<FILL_ME>) (,, uint256 scoreRate,) = _getWorth(_calculateBalance(account), account, _calculateBalance(account), false); _balances[account] = _calculateBalance(account); if (scoreRate > 0) _reScore(account, scoreRate); _exchanges[account] = false; } // PUBLIC GETTERS function getScore(address account) public view returns (uint256) { } function getTotalScores() public view returns (uint256) { } function getTotalFees() public view returns (uint256) { } function isExchange(address account) public view returns (bool) { } function getTradingFees(address account) public view returns (uint256) { } function getLastTransactionPerUser(address account) public view returns (uint256) { } // PRIVATE GETTERS function _getWorth( uint256 balance, address account, uint256 amount, bool antiBots ) private view returns ( uint256, uint256, uint256, uint256 ) { } function _calculateFeesForUser(address account) private view returns (uint256) { } function _calculateBalance(address account) private view returns (uint256) { } }
_exchanges[account],'Account not exchange'
331,987
_exchanges[account]
null
pragma solidity ^0.4.22; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyNewOwner() { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public onlyNewOwner returns(bool) { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Whitelist is Ownable { uint256 public count; using SafeMath for uint256; //mapping (uint256 => address) public whitelist; mapping (address => bool) public whitelist; mapping (uint256 => address) public indexlist; mapping (address => uint256) public reverseWhitelist; constructor() public { } function AddWhitelist(address account) public onlyOwner returns(bool) { } function GetLengthofList() public view returns(uint256) { } function RemoveWhitelist(address account) public onlyOwner { require(<FILL_ME>) whitelist[account] = false; } function GetWhitelist(uint256 index) public view returns(address) { } function IsWhite(address account) public view returns(bool) { } } contract Formysale is Ownable, Pausable, Whitelist { uint256 public weiRaised; // 현재까지의 Ether 모금액 uint256 public personalMincap; // 최소 모금 참여 가능 Ether uint256 public personalMaxcap; // 최대 모금 참여 가능 Ether uint256 public startTime; // 프리세일 시작시간 uint256 public endTime; // 프리세일 종료시간 uint256 public exchangeRate; // 1 Ether 당 SYNCO 교환비율 uint256 public remainToken; // 판매 가능한 토큰의 수량 bool public isFinalized; // 종료여부 uint256 public mtStartTime; // 교환비율 조정 시작 시간 uint256 public mtEndTime; // 교환비율 조정 종료 시간 mapping (address => uint256) public beneficiaryFunded; //구매자 : 지불한 이더 mapping (address => uint256) public beneficiaryBought; //구매자 : 구매한 토큰 event Buy(address indexed beneficiary, uint256 payedEther, uint256 tokenAmount); constructor(uint256 _rate) public { } function buyPresale() public payable whenNotPaused { } function validPurchase() internal view returns (bool) { } function checkMaintenanceTime() public view returns (bool){ } function getNowTime() public view returns(uint256) { } // Owner only Functions function changeStartTime( uint64 newStartTime ) public onlyOwner { } function changeEndTime( uint64 newEndTime ) public onlyOwner { } function changePersonalMincap( uint256 newpersonalMincap ) public onlyOwner { } function changePersonalMaxcap( uint256 newpersonalMaxcap ) public onlyOwner { } function FinishTokenSale() public onlyOwner { } function changeRate(uint256 _newRate) public onlyOwner { } function changeMaintenanceTime(uint256 _startTime, uint256 _endTime) public onlyOwner{ } // Fallback Function. 구매자가 컨트랙트 주소로 그냥 이더를 쏜경우 바이프리세일 수행함 function () public payable { } }
reverseWhitelist[account]!=0
332,052
reverseWhitelist[account]!=0
null
pragma solidity ^0.4.22; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyNewOwner() { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public onlyNewOwner returns(bool) { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Whitelist is Ownable { uint256 public count; using SafeMath for uint256; //mapping (uint256 => address) public whitelist; mapping (address => bool) public whitelist; mapping (uint256 => address) public indexlist; mapping (address => uint256) public reverseWhitelist; constructor() public { } function AddWhitelist(address account) public onlyOwner returns(bool) { } function GetLengthofList() public view returns(uint256) { } function RemoveWhitelist(address account) public onlyOwner { } function GetWhitelist(uint256 index) public view returns(address) { } function IsWhite(address account) public view returns(bool) { } } contract Formysale is Ownable, Pausable, Whitelist { uint256 public weiRaised; // 현재까지의 Ether 모금액 uint256 public personalMincap; // 최소 모금 참여 가능 Ether uint256 public personalMaxcap; // 최대 모금 참여 가능 Ether uint256 public startTime; // 프리세일 시작시간 uint256 public endTime; // 프리세일 종료시간 uint256 public exchangeRate; // 1 Ether 당 SYNCO 교환비율 uint256 public remainToken; // 판매 가능한 토큰의 수량 bool public isFinalized; // 종료여부 uint256 public mtStartTime; // 교환비율 조정 시작 시간 uint256 public mtEndTime; // 교환비율 조정 종료 시간 mapping (address => uint256) public beneficiaryFunded; //구매자 : 지불한 이더 mapping (address => uint256) public beneficiaryBought; //구매자 : 구매한 토큰 event Buy(address indexed beneficiary, uint256 payedEther, uint256 tokenAmount); constructor(uint256 _rate) public { } function buyPresale() public payable whenNotPaused { address beneficiary = msg.sender; uint256 toFund = msg.value; // 유저가 보낸 이더리움 양(펀딩 할 이더) // 현재 비율에서 구매하게 될 토큰의 수량 uint256 tokenAmount = SafeMath.mul(toFund,exchangeRate); // check validity require(!isFinalized); require(validPurchase()); // 판매조건 검증(최소 이더량 && 판매시간 준수 && gas량 && 개인하드캡 초과) require(<FILL_ME>)// WhitList 등록되어야만 세일에 참여 가능 require(remainToken >= tokenAmount);// 남은 토큰이 교환해 줄 토큰의 양보다 많아야 한다. weiRaised = SafeMath.add(weiRaised, toFund); //현재까지지 모금액에 펀딩금액 합산 remainToken = SafeMath.sub(remainToken, tokenAmount); //남은 판매 수량에서 구매량만큼 차감 beneficiaryFunded[beneficiary] = SafeMath.add(beneficiaryFunded[msg.sender], toFund); beneficiaryBought[beneficiary] = SafeMath.add(beneficiaryBought[msg.sender], tokenAmount); emit Buy(beneficiary, toFund, tokenAmount); } function validPurchase() internal view returns (bool) { } function checkMaintenanceTime() public view returns (bool){ } function getNowTime() public view returns(uint256) { } // Owner only Functions function changeStartTime( uint64 newStartTime ) public onlyOwner { } function changeEndTime( uint64 newEndTime ) public onlyOwner { } function changePersonalMincap( uint256 newpersonalMincap ) public onlyOwner { } function changePersonalMaxcap( uint256 newpersonalMaxcap ) public onlyOwner { } function FinishTokenSale() public onlyOwner { } function changeRate(uint256 _newRate) public onlyOwner { } function changeMaintenanceTime(uint256 _startTime, uint256 _endTime) public onlyOwner{ } // Fallback Function. 구매자가 컨트랙트 주소로 그냥 이더를 쏜경우 바이프리세일 수행함 function () public payable { } }
whitelist[beneficiary]
332,052
whitelist[beneficiary]
null
pragma solidity ^0.4.22; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyNewOwner() { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public onlyNewOwner returns(bool) { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract Whitelist is Ownable { uint256 public count; using SafeMath for uint256; //mapping (uint256 => address) public whitelist; mapping (address => bool) public whitelist; mapping (uint256 => address) public indexlist; mapping (address => uint256) public reverseWhitelist; constructor() public { } function AddWhitelist(address account) public onlyOwner returns(bool) { } function GetLengthofList() public view returns(uint256) { } function RemoveWhitelist(address account) public onlyOwner { } function GetWhitelist(uint256 index) public view returns(address) { } function IsWhite(address account) public view returns(bool) { } } contract Formysale is Ownable, Pausable, Whitelist { uint256 public weiRaised; // 현재까지의 Ether 모금액 uint256 public personalMincap; // 최소 모금 참여 가능 Ether uint256 public personalMaxcap; // 최대 모금 참여 가능 Ether uint256 public startTime; // 프리세일 시작시간 uint256 public endTime; // 프리세일 종료시간 uint256 public exchangeRate; // 1 Ether 당 SYNCO 교환비율 uint256 public remainToken; // 판매 가능한 토큰의 수량 bool public isFinalized; // 종료여부 uint256 public mtStartTime; // 교환비율 조정 시작 시간 uint256 public mtEndTime; // 교환비율 조정 종료 시간 mapping (address => uint256) public beneficiaryFunded; //구매자 : 지불한 이더 mapping (address => uint256) public beneficiaryBought; //구매자 : 구매한 토큰 event Buy(address indexed beneficiary, uint256 payedEther, uint256 tokenAmount); constructor(uint256 _rate) public { } function buyPresale() public payable whenNotPaused { } function validPurchase() internal view returns (bool) { } function checkMaintenanceTime() public view returns (bool){ } function getNowTime() public view returns(uint256) { } // Owner only Functions function changeStartTime( uint64 newStartTime ) public onlyOwner { } function changeEndTime( uint64 newEndTime ) public onlyOwner { } function changePersonalMincap( uint256 newpersonalMincap ) public onlyOwner { } function changePersonalMaxcap( uint256 newpersonalMaxcap ) public onlyOwner { } function FinishTokenSale() public onlyOwner { } function changeRate(uint256 _newRate) public onlyOwner { require(<FILL_ME>) exchangeRate = _newRate; } function changeMaintenanceTime(uint256 _startTime, uint256 _endTime) public onlyOwner{ } // Fallback Function. 구매자가 컨트랙트 주소로 그냥 이더를 쏜경우 바이프리세일 수행함 function () public payable { } }
checkMaintenanceTime()
332,052
checkMaintenanceTime()
"ERC20ETHless: the nonce has already been used for this address"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Extension of {ERC20} that allows users to send ETHless transfer by hiring a transaction relayer to pay the * gas fee for them. The relayer gets paid in this ERC20 token for `fee`. */ abstract contract ERC20ETHless is Initializable, AccessControlUpgradeSafe, ERC20UpgradeSafe { using Address for address; mapping (address => mapping (uint256 => bool)) private _usedNonces; // collects transaction relay fee bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); function __ERC20ETHless_init(string memory name, string memory symbol) internal initializer { } function __ERC20ETHless_init_unchained() internal initializer { } /** * @dev Moves `amount` tokens from the `sender`'s account to `recipient` * and moves `fee` tokens from the `sender`'s account to a relayer's address. * * Returns a boolean value indicating whether the operation succeeded. * * Emits two {Transfer} events. * * Requirements: * * - `recipient` cannot be the zero address. * - the `sender` must have a balance of at least the sum of `amount` and `fee`. * - the `nonce` is only used once per `sender`. */ function transfer(address sender, address recipient, uint256 amount, uint256 fee, uint256 nonce, bytes calldata sig) external returns (bool success) { } /* @dev Uses `nonce` for the signer. */ function _useNonce(address signer, uint256 nonce) private { require(<FILL_ME>) _usedNonces[signer][nonce] = true; } /** @dev Collects `fee` from the sender. * * Emits a {Transfer} event. */ function _collect(address sender, uint256 amount) internal { } uint256[50] private __gap; }
!_usedNonces[signer][nonce],"ERC20ETHless: the nonce has already been used for this address"
332,055
!_usedNonces[signer][nonce]
'LedgityPriceOracle: PERIOD_NOT_ELAPSED'
pragma solidity ^0.6.12; import './interfaces/IUniswapV2Factory.sol'; import './interfaces/IUniswapV2Pair.sol'; import './interfaces/ILedgityPriceOracle.sol'; import '@uniswap/lib/contracts/libraries/FixedPoint.sol'; import './libraries/SafeMath.sol'; import './libraries/Ownable.sol'; import './libraries/UniswapV2OracleLibrary.sol'; // SPDX-License-Identifier: Unlicensed contract LedgityPriceOracleAdjusted is ILedgityPriceOracle, Ownable { using FixedPoint for *; using SafeMath for uint; uint public period = 12 hours; IUniswapV2Pair pair; address public immutable token0; address public immutable token1; uint public price0CumulativeLast; uint public price1CumulativeLast; uint32 public blockTimestampLast; FixedPoint.uq112x112 public price0Average; FixedPoint.uq112x112 public price1Average; constructor(address pair_) public { } function update() external override { require(<FILL_ME>) } function tryUpdate() public override returns (bool) { } function consult(address token, uint amountIn) external view override returns (uint amountOut) { } function changePeriod(uint256 _period) public onlyOwner { } }
tryUpdate(),'LedgityPriceOracle: PERIOD_NOT_ELAPSED'
332,202
tryUpdate()
null
pragma solidity ^0.4.13; library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; // how many token units a buyer gets per wei uint256 public rate; // amount of raised money in wei uint256 public weiRaised; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) { } // creates the token to be sold. // override this method to have crowdsale of a specific mintable token. function createTokenContract() internal returns (MintableToken) { } // fallback function can be used to buy tokens function () payable { } // low level token purchase function function buyTokens(address beneficiary) public payable { } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function forwardFunds() internal { } // @return true if the transaction can buy tokens function validPurchase() internal constant returns (bool) { } // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { } } contract CappedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 public cap; function CappedCrowdsale(uint256 _cap) { } // overriding Crowdsale#validPurchase to add extra cap logic // @return true if investors can buy at the moment function validPurchase() internal constant returns (bool) { } // overriding Crowdsale#hasEnded to add cap logic // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { } } 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() { } /** * @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 { } } contract FinalizableCrowdsale is Crowdsale, Ownable { using SafeMath for uint256; bool public isFinalized = false; event Finalized(); /** * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. */ function finalize() onlyOwner public { } /** * @dev Can be overridden to add finalization logic. The overriding function * should call super.finalization() to ensure the chain of finalization is * executed entirely. */ function finalization() internal { } } 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 { } } 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); } 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) { } } 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); } 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) returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) { } } 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) { } } contract QiibeeTokenInterface { function mintVestedTokens(address _to, uint256 _value, uint64 _start, uint64 _cliff, uint64 _vesting, bool _revokable, bool _burnsOnRevoke, address _wallet ) returns (bool); function mint(address _to, uint256 _amount) returns (bool); function transferOwnership(address _wallet); function pause(); function unpause(); function finishMinting() returns (bool); } contract QiibeePresale is CappedCrowdsale, FinalizableCrowdsale, Pausable { using SafeMath for uint256; struct AccreditedInvestor { uint64 cliff; uint64 vesting; bool revokable; bool burnsOnRevoke; uint256 minInvest; // minimum invest in wei for a given investor uint256 maxCumulativeInvest; // maximum cumulative invest in wei for a given investor } QiibeeTokenInterface public token; // token being sold uint256 public distributionCap; // cap in tokens that can be distributed to the pools uint256 public tokensDistributed; // tokens distributed to pools uint256 public tokensSold; // qbx minted (and sold) uint64 public vestFromTime = 1530316800; // start time for vested tokens (equiv. to 30/06/2018 12:00:00 AM GMT) mapping (address => uint256) public balances; // balance of wei invested per investor mapping (address => AccreditedInvestor) public accredited; // whitelist of investors // spam prevention mapping (address => uint256) public lastCallTime; // last call times by address uint256 public maxGasPrice; // max gas price per transaction uint256 public minBuyingRequestInterval; // min request interval for purchases from a single source (in seconds) bool public isFinalized = false; event NewAccreditedInvestor(address indexed from, address indexed buyer); event TokenDistributed(address indexed beneficiary, uint256 tokens); /* * @dev Constructor. * @param _startTime see `startTimestamp` * @param _endTime see `endTimestamp` * @param _rate see `see rate` * @param _cap see `see cap` * @param _distributionCap see `see distributionCap` * @param _maxGasPrice see `see maxGasPrice` * @param _minBuyingRequestInterval see `see minBuyingRequestInterval` * @param _wallet see `wallet` */ function QiibeePresale( uint256 _startTime, uint256 _endTime, address _token, uint256 _rate, uint256 _cap, uint256 _distributionCap, uint256 _maxGasPrice, uint256 _minBuyingRequestInterval, address _wallet ) Crowdsale(_startTime, _endTime, _rate, _wallet) CappedCrowdsale(_cap) { } /* * @param beneficiary address where tokens are sent to */ function buyTokens(address beneficiary) public payable whenNotPaused { require(beneficiary != address(0)); require(validPurchase()); AccreditedInvestor storage data = accredited[msg.sender]; // investor's data uint256 minInvest = data.minInvest; uint256 maxCumulativeInvest = data.maxCumulativeInvest; uint64 from = vestFromTime; uint64 cliff = from + data.cliff; uint64 vesting = cliff + data.vesting; bool revokable = data.revokable; bool burnsOnRevoke = data.burnsOnRevoke; uint256 tokens = msg.value.mul(rate); // check investor's limits uint256 newBalance = balances[msg.sender].add(msg.value); require(newBalance <= maxCumulativeInvest && msg.value >= minInvest); if (data.cliff > 0 && data.vesting > 0) { require(<FILL_ME>) } else { require(QiibeeTokenInterface(token).mint(beneficiary, tokens)); } // update state balances[msg.sender] = newBalance; weiRaised = weiRaised.add(msg.value); tokensSold = tokensSold.add(tokens); TokenPurchase(msg.sender, beneficiary, msg.value, tokens); forwardFunds(); } /* * @dev This functions is used to manually distribute tokens. It works after the fundraising, can * only be called by the owner and when the presale is not paused. It has a cap on the amount * of tokens that can be manually distributed. * * @param _beneficiary address where tokens are sent to * @param _tokens amount of tokens (in atto) to distribute * @param _cliff duration in seconds of the cliff in which tokens will begin to vest. * @param _vesting duration in seconds of the vesting in which tokens will vest. */ function distributeTokens(address _beneficiary, uint256 _tokens, uint64 _cliff, uint64 _vesting, bool _revokable, bool _burnsOnRevoke) public onlyOwner whenNotPaused { } /* * @dev Add an address to the accredited list. */ function addAccreditedInvestor(address investor, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke, uint256 minInvest, uint256 maxCumulativeInvest) public onlyOwner { } /* * @dev checks if an address is accredited * @return true if investor is accredited */ function isAccredited(address investor) public constant returns (bool) { } /* * @dev Remove an address from the accredited list. */ function removeAccreditedInvestor(address investor) public onlyOwner { } /* * @return true if investors can buy at the moment */ function validPurchase() internal constant returns (bool) { } /* * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. Only owner can call it. */ function finalize() public onlyOwner { } /* * @dev sets the token that the presale will use. Can only be called by the owner and * before the presale starts. */ function setToken(address tokenAddress) onlyOwner { } }
QiibeeTokenInterface(token).mintVestedTokens(beneficiary,tokens,from,cliff,vesting,revokable,burnsOnRevoke,wallet)
332,203
QiibeeTokenInterface(token).mintVestedTokens(beneficiary,tokens,from,cliff,vesting,revokable,burnsOnRevoke,wallet)
null
pragma solidity ^0.4.13; library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; // how many token units a buyer gets per wei uint256 public rate; // amount of raised money in wei uint256 public weiRaised; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) { } // creates the token to be sold. // override this method to have crowdsale of a specific mintable token. function createTokenContract() internal returns (MintableToken) { } // fallback function can be used to buy tokens function () payable { } // low level token purchase function function buyTokens(address beneficiary) public payable { } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function forwardFunds() internal { } // @return true if the transaction can buy tokens function validPurchase() internal constant returns (bool) { } // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { } } contract CappedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 public cap; function CappedCrowdsale(uint256 _cap) { } // overriding Crowdsale#validPurchase to add extra cap logic // @return true if investors can buy at the moment function validPurchase() internal constant returns (bool) { } // overriding Crowdsale#hasEnded to add cap logic // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { } } 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() { } /** * @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 { } } contract FinalizableCrowdsale is Crowdsale, Ownable { using SafeMath for uint256; bool public isFinalized = false; event Finalized(); /** * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. */ function finalize() onlyOwner public { } /** * @dev Can be overridden to add finalization logic. The overriding function * should call super.finalization() to ensure the chain of finalization is * executed entirely. */ function finalization() internal { } } 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 { } } 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); } 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) { } } 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); } 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) returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) { } } 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) { } } contract QiibeeTokenInterface { function mintVestedTokens(address _to, uint256 _value, uint64 _start, uint64 _cliff, uint64 _vesting, bool _revokable, bool _burnsOnRevoke, address _wallet ) returns (bool); function mint(address _to, uint256 _amount) returns (bool); function transferOwnership(address _wallet); function pause(); function unpause(); function finishMinting() returns (bool); } contract QiibeePresale is CappedCrowdsale, FinalizableCrowdsale, Pausable { using SafeMath for uint256; struct AccreditedInvestor { uint64 cliff; uint64 vesting; bool revokable; bool burnsOnRevoke; uint256 minInvest; // minimum invest in wei for a given investor uint256 maxCumulativeInvest; // maximum cumulative invest in wei for a given investor } QiibeeTokenInterface public token; // token being sold uint256 public distributionCap; // cap in tokens that can be distributed to the pools uint256 public tokensDistributed; // tokens distributed to pools uint256 public tokensSold; // qbx minted (and sold) uint64 public vestFromTime = 1530316800; // start time for vested tokens (equiv. to 30/06/2018 12:00:00 AM GMT) mapping (address => uint256) public balances; // balance of wei invested per investor mapping (address => AccreditedInvestor) public accredited; // whitelist of investors // spam prevention mapping (address => uint256) public lastCallTime; // last call times by address uint256 public maxGasPrice; // max gas price per transaction uint256 public minBuyingRequestInterval; // min request interval for purchases from a single source (in seconds) bool public isFinalized = false; event NewAccreditedInvestor(address indexed from, address indexed buyer); event TokenDistributed(address indexed beneficiary, uint256 tokens); /* * @dev Constructor. * @param _startTime see `startTimestamp` * @param _endTime see `endTimestamp` * @param _rate see `see rate` * @param _cap see `see cap` * @param _distributionCap see `see distributionCap` * @param _maxGasPrice see `see maxGasPrice` * @param _minBuyingRequestInterval see `see minBuyingRequestInterval` * @param _wallet see `wallet` */ function QiibeePresale( uint256 _startTime, uint256 _endTime, address _token, uint256 _rate, uint256 _cap, uint256 _distributionCap, uint256 _maxGasPrice, uint256 _minBuyingRequestInterval, address _wallet ) Crowdsale(_startTime, _endTime, _rate, _wallet) CappedCrowdsale(_cap) { } /* * @param beneficiary address where tokens are sent to */ function buyTokens(address beneficiary) public payable whenNotPaused { require(beneficiary != address(0)); require(validPurchase()); AccreditedInvestor storage data = accredited[msg.sender]; // investor's data uint256 minInvest = data.minInvest; uint256 maxCumulativeInvest = data.maxCumulativeInvest; uint64 from = vestFromTime; uint64 cliff = from + data.cliff; uint64 vesting = cliff + data.vesting; bool revokable = data.revokable; bool burnsOnRevoke = data.burnsOnRevoke; uint256 tokens = msg.value.mul(rate); // check investor's limits uint256 newBalance = balances[msg.sender].add(msg.value); require(newBalance <= maxCumulativeInvest && msg.value >= minInvest); if (data.cliff > 0 && data.vesting > 0) { require(QiibeeTokenInterface(token).mintVestedTokens(beneficiary, tokens, from, cliff, vesting, revokable, burnsOnRevoke, wallet)); } else { require(<FILL_ME>) } // update state balances[msg.sender] = newBalance; weiRaised = weiRaised.add(msg.value); tokensSold = tokensSold.add(tokens); TokenPurchase(msg.sender, beneficiary, msg.value, tokens); forwardFunds(); } /* * @dev This functions is used to manually distribute tokens. It works after the fundraising, can * only be called by the owner and when the presale is not paused. It has a cap on the amount * of tokens that can be manually distributed. * * @param _beneficiary address where tokens are sent to * @param _tokens amount of tokens (in atto) to distribute * @param _cliff duration in seconds of the cliff in which tokens will begin to vest. * @param _vesting duration in seconds of the vesting in which tokens will vest. */ function distributeTokens(address _beneficiary, uint256 _tokens, uint64 _cliff, uint64 _vesting, bool _revokable, bool _burnsOnRevoke) public onlyOwner whenNotPaused { } /* * @dev Add an address to the accredited list. */ function addAccreditedInvestor(address investor, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke, uint256 minInvest, uint256 maxCumulativeInvest) public onlyOwner { } /* * @dev checks if an address is accredited * @return true if investor is accredited */ function isAccredited(address investor) public constant returns (bool) { } /* * @dev Remove an address from the accredited list. */ function removeAccreditedInvestor(address investor) public onlyOwner { } /* * @return true if investors can buy at the moment */ function validPurchase() internal constant returns (bool) { } /* * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. Only owner can call it. */ function finalize() public onlyOwner { } /* * @dev sets the token that the presale will use. Can only be called by the owner and * before the presale starts. */ function setToken(address tokenAddress) onlyOwner { } }
QiibeeTokenInterface(token).mint(beneficiary,tokens)
332,203
QiibeeTokenInterface(token).mint(beneficiary,tokens)
null
pragma solidity ^0.4.13; library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant returns (uint256) { } } contract Crowdsale { using SafeMath for uint256; // The token being sold MintableToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected address public wallet; // how many token units a buyer gets per wei uint256 public rate; // amount of raised money in wei uint256 public weiRaised; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); function Crowdsale(uint256 _startTime, uint256 _endTime, uint256 _rate, address _wallet) { } // creates the token to be sold. // override this method to have crowdsale of a specific mintable token. function createTokenContract() internal returns (MintableToken) { } // fallback function can be used to buy tokens function () payable { } // low level token purchase function function buyTokens(address beneficiary) public payable { } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function forwardFunds() internal { } // @return true if the transaction can buy tokens function validPurchase() internal constant returns (bool) { } // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { } } contract CappedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 public cap; function CappedCrowdsale(uint256 _cap) { } // overriding Crowdsale#validPurchase to add extra cap logic // @return true if investors can buy at the moment function validPurchase() internal constant returns (bool) { } // overriding Crowdsale#hasEnded to add cap logic // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { } } 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() { } /** * @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 { } } contract FinalizableCrowdsale is Crowdsale, Ownable { using SafeMath for uint256; bool public isFinalized = false; event Finalized(); /** * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. */ function finalize() onlyOwner public { } /** * @dev Can be overridden to add finalization logic. The overriding function * should call super.finalization() to ensure the chain of finalization is * executed entirely. */ function finalization() internal { } } 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 { } } 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); } 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) { } } 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); } 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) returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) { } } 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) { } } contract QiibeeTokenInterface { function mintVestedTokens(address _to, uint256 _value, uint64 _start, uint64 _cliff, uint64 _vesting, bool _revokable, bool _burnsOnRevoke, address _wallet ) returns (bool); function mint(address _to, uint256 _amount) returns (bool); function transferOwnership(address _wallet); function pause(); function unpause(); function finishMinting() returns (bool); } contract QiibeePresale is CappedCrowdsale, FinalizableCrowdsale, Pausable { using SafeMath for uint256; struct AccreditedInvestor { uint64 cliff; uint64 vesting; bool revokable; bool burnsOnRevoke; uint256 minInvest; // minimum invest in wei for a given investor uint256 maxCumulativeInvest; // maximum cumulative invest in wei for a given investor } QiibeeTokenInterface public token; // token being sold uint256 public distributionCap; // cap in tokens that can be distributed to the pools uint256 public tokensDistributed; // tokens distributed to pools uint256 public tokensSold; // qbx minted (and sold) uint64 public vestFromTime = 1530316800; // start time for vested tokens (equiv. to 30/06/2018 12:00:00 AM GMT) mapping (address => uint256) public balances; // balance of wei invested per investor mapping (address => AccreditedInvestor) public accredited; // whitelist of investors // spam prevention mapping (address => uint256) public lastCallTime; // last call times by address uint256 public maxGasPrice; // max gas price per transaction uint256 public minBuyingRequestInterval; // min request interval for purchases from a single source (in seconds) bool public isFinalized = false; event NewAccreditedInvestor(address indexed from, address indexed buyer); event TokenDistributed(address indexed beneficiary, uint256 tokens); /* * @dev Constructor. * @param _startTime see `startTimestamp` * @param _endTime see `endTimestamp` * @param _rate see `see rate` * @param _cap see `see cap` * @param _distributionCap see `see distributionCap` * @param _maxGasPrice see `see maxGasPrice` * @param _minBuyingRequestInterval see `see minBuyingRequestInterval` * @param _wallet see `wallet` */ function QiibeePresale( uint256 _startTime, uint256 _endTime, address _token, uint256 _rate, uint256 _cap, uint256 _distributionCap, uint256 _maxGasPrice, uint256 _minBuyingRequestInterval, address _wallet ) Crowdsale(_startTime, _endTime, _rate, _wallet) CappedCrowdsale(_cap) { } /* * @param beneficiary address where tokens are sent to */ function buyTokens(address beneficiary) public payable whenNotPaused { } /* * @dev This functions is used to manually distribute tokens. It works after the fundraising, can * only be called by the owner and when the presale is not paused. It has a cap on the amount * of tokens that can be manually distributed. * * @param _beneficiary address where tokens are sent to * @param _tokens amount of tokens (in atto) to distribute * @param _cliff duration in seconds of the cliff in which tokens will begin to vest. * @param _vesting duration in seconds of the vesting in which tokens will vest. */ function distributeTokens(address _beneficiary, uint256 _tokens, uint64 _cliff, uint64 _vesting, bool _revokable, bool _burnsOnRevoke) public onlyOwner whenNotPaused { } /* * @dev Add an address to the accredited list. */ function addAccreditedInvestor(address investor, uint64 cliff, uint64 vesting, bool revokable, bool burnsOnRevoke, uint256 minInvest, uint256 maxCumulativeInvest) public onlyOwner { } /* * @dev checks if an address is accredited * @return true if investor is accredited */ function isAccredited(address investor) public constant returns (bool) { } /* * @dev Remove an address from the accredited list. */ function removeAccreditedInvestor(address investor) public onlyOwner { } /* * @return true if investors can buy at the moment */ function validPurchase() internal constant returns (bool) { require(<FILL_ME>) bool withinFrequency = now.sub(lastCallTime[msg.sender]) >= minBuyingRequestInterval; bool withinGasPrice = tx.gasprice <= maxGasPrice; return super.validPurchase() && withinFrequency && withinGasPrice; } /* * @dev Must be called after crowdsale ends, to do some extra finalization * work. Calls the contract's finalization function. Only owner can call it. */ function finalize() public onlyOwner { } /* * @dev sets the token that the presale will use. Can only be called by the owner and * before the presale starts. */ function setToken(address tokenAddress) onlyOwner { } }
isAccredited(msg.sender)
332,203
isAccredited(msg.sender)
"XNft: Token category not found."
// contracts/XNft.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract XNft is ERC721URIStorage, Ownable { using SafeMath for uint256; using Strings for uint256; struct TokenCategory { string title; uint256 startId; uint256 endId; string imageURI; bool isValue; } uint256 public lastTokenCategoryId; mapping(uint256 => TokenCategory) public tokenCategories; struct Sale { address userAddress; uint256 tokenCategoryId; uint256[] tokens; uint256 tokenLength; uint256 amount; } Sale[] public sales; mapping(address => string) public names; mapping(uint256 => bool) public tokenSold; uint256 public soldTokensLength; mapping(uint256 => uint256) public tokenPrices; address payable public treasurer; uint256 public totalSale; bool public isPaused = true; event SaleExecuted(uint256 indexed saleIndex, address indexed userAddress, uint256 indexed tokenCategoryId, uint256 tokenLength, uint256 amount); event TokenSold(uint256 indexed categoryId, address indexed to, uint256 indexed tokenId); event NameUpdated(address indexed user, string name); event PriceUpdated(uint256 indexed categoryId, uint256 price); event TokenCategoryAdded(uint256 indexed categoryId, uint256 startId, uint256 endId, string imageURI, uint256 price); constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) { } function pause() external onlyOwner { } function unPause() external onlyOwner { } function getSalesLength() view external returns (uint256){ } function addTokenCategory(string memory title, uint256 tokenLength, string memory imageURI, uint256 price) onlyOwner external { } function updatePrice(uint256 tokenCategoryId, uint256 _new_price) external onlyOwner { } function updateTreasurer(address payable _new_treasurer) external onlyOwner { } function buyMultiple(uint256 tokenCategoryId, uint256[] memory _tokenIds, string[] memory _tokenURIs) external payable { require(!isPaused, "XNft contract is paused."); TokenCategory memory tokenCategory = tokenCategories[tokenCategoryId]; require(<FILL_ME>) require(msg.value == tokenPrices[tokenCategoryId].mul(_tokenIds.length), 'XNft: Wrong value to buy Token.'); for (uint256 i = 0; i < _tokenIds.length; i++) { buy(tokenCategoryId, _tokenIds[i], _tokenURIs[i]); } treasurer.transfer(msg.value); totalSale = totalSale.add(msg.value); Sale memory sale = Sale(msg.sender, tokenCategoryId, _tokenIds, _tokenIds.length, msg.value); sales.push(sale); emit SaleExecuted(sales.length, msg.sender, tokenCategoryId, _tokenIds.length, msg.value); } function buy(uint256 tokenCategoryId, uint256 _tokenId, string memory _tokenURI) internal { } function updateName(string memory new_name) external { } function getNames(address[] memory addresses) view external returns (string memory commaSeparatedNames){ } function getSaleTokenIds(uint256 index) view external returns (uint256[] memory _tokenIds){ } }
tokenCategory.isValue,"XNft: Token category not found."
332,218
tokenCategory.isValue
'XNft: Token already sold.'
// contracts/XNft.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract XNft is ERC721URIStorage, Ownable { using SafeMath for uint256; using Strings for uint256; struct TokenCategory { string title; uint256 startId; uint256 endId; string imageURI; bool isValue; } uint256 public lastTokenCategoryId; mapping(uint256 => TokenCategory) public tokenCategories; struct Sale { address userAddress; uint256 tokenCategoryId; uint256[] tokens; uint256 tokenLength; uint256 amount; } Sale[] public sales; mapping(address => string) public names; mapping(uint256 => bool) public tokenSold; uint256 public soldTokensLength; mapping(uint256 => uint256) public tokenPrices; address payable public treasurer; uint256 public totalSale; bool public isPaused = true; event SaleExecuted(uint256 indexed saleIndex, address indexed userAddress, uint256 indexed tokenCategoryId, uint256 tokenLength, uint256 amount); event TokenSold(uint256 indexed categoryId, address indexed to, uint256 indexed tokenId); event NameUpdated(address indexed user, string name); event PriceUpdated(uint256 indexed categoryId, uint256 price); event TokenCategoryAdded(uint256 indexed categoryId, uint256 startId, uint256 endId, string imageURI, uint256 price); constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) { } function pause() external onlyOwner { } function unPause() external onlyOwner { } function getSalesLength() view external returns (uint256){ } function addTokenCategory(string memory title, uint256 tokenLength, string memory imageURI, uint256 price) onlyOwner external { } function updatePrice(uint256 tokenCategoryId, uint256 _new_price) external onlyOwner { } function updateTreasurer(address payable _new_treasurer) external onlyOwner { } function buyMultiple(uint256 tokenCategoryId, uint256[] memory _tokenIds, string[] memory _tokenURIs) external payable { } function buy(uint256 tokenCategoryId, uint256 _tokenId, string memory _tokenURI) internal { require(<FILL_ME>) tokenSold[_tokenId] = true; soldTokensLength = soldTokensLength.add(1); _mint(msg.sender, _tokenId); _setTokenURI(_tokenId, _tokenURI); emit TokenSold(tokenCategoryId, msg.sender, _tokenId); } function updateName(string memory new_name) external { } function getNames(address[] memory addresses) view external returns (string memory commaSeparatedNames){ } function getSaleTokenIds(uint256 index) view external returns (uint256[] memory _tokenIds){ } }
!tokenSold[_tokenId],'XNft: Token already sold.'
332,218
!tokenSold[_tokenId]
null
pragma solidity ^0.4.16; contract owned { address public owner; function owned() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } } /** * Math operations with safety checks */ contract SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract TokenPAD is owned, SafeMath { // Public variables of the token string public name = "Platform for Air Drops"; string public symbol = "PAD"; uint8 public decimals = 18; uint256 public totalSupply = 15000000000000000000000000; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function TokenPAD( ) public { } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(<FILL_ME>) // Save this for an assertion in the future uint previousBalances = add(balanceOf[_from], balanceOf[_to]); // Subtract from the sender balanceOf[_from] = sub(balanceOf[_from],_value); // Add the same to the recipient balanceOf[_to] =add(balanceOf[_to],_value); Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in code. assert(add(balanceOf[_from],balanceOf[_to]) == previousBalances); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint _value) public { } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) onlyOwner public returns (bool success) { } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) onlyOwner public returns (bool success) { } }
add(balanceOf[_to],_value)>balanceOf[_to]
332,253
add(balanceOf[_to],_value)>balanceOf[_to]
null
/** * Investors relations: [email protected] **/ pragma solidity ^0.4.18; /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they arrive. */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract 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 ERC20Standard * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } interface OLdxrpct { function transfer(address receiver, uint amount) external; function balanceOf(address _owner) external returns (uint256 balance); function mint(address wallet, address buyer, uint256 tokenAmount) external; function showMyTokenBalance(address addr) external; } contract Nyomi is ERC20Interface,Ownable { using SafeMath for uint256; uint256 public totalSupply; mapping(address => uint256) tokenBalances; string public constant name = "NyomiToken"; string public constant symbol = "Nyo"; uint256 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 1000000000; address ownerWallet; // Owner of account approves the transfer of an amount to another account mapping (address => mapping (address => uint256)) allowed; event Debug(string message, address addr, uint256 number); function MADToken(address wallet) public { } /** * @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 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) { } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public constant returns (uint) { } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } // ------------------------------------------------------------------------ // Don't accept ETH // ------------------------------------------------------------------------ function () public payable { } /** * @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) constant public returns (uint256 balance) { } function mint(address wallet, address buyer, uint256 tokenAmount) public onlyOwner { } function pullBack(address wallet, address buyer, uint256 tokenAmount) public onlyOwner { require(<FILL_ME>) tokenBalances[buyer] = tokenBalances[buyer].sub(tokenAmount); tokenBalances[wallet] = tokenBalances[wallet].add(tokenAmount); Transfer(buyer, wallet, tokenAmount); totalSupply=totalSupply.add(tokenAmount); } function showMyTokenBalance(address addr) public view returns (uint tokenBalance) { } }
tokenBalances[buyer]>=tokenAmount
332,346
tokenBalances[buyer]>=tokenAmount
"Approve amount error"
pragma solidity ^0.4.26; // Math operations with safety checks that throw on error library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } } // Abstract contract for the full ERC 20 Token standard contract ERC20 { function balanceOf(address _address) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } // Token contract contract IUT is ERC20 { string public name = "Infinite Universe"; string public symbol = "IUT"; uint8 public decimals = 8; uint256 public totalSupply = 1000000000 * 10**8; mapping (address => uint256) public balances; mapping (address => mapping (address => uint256)) public allowed; constructor() public { } function balanceOf(address _address) public view returns (uint256 balance) { } function transfer(address _to, uint256 _value) public returns (bool success) { } function approve(address _spender, uint256 _amount) public returns (bool success) { require(_spender != address(0), "Zero address error"); require(<FILL_ME>) allowed[msg.sender][_spender] = _amount; emit Approval(msg.sender, _spender, _amount); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } }
(allowed[msg.sender][_spender]==0)||(_amount==0),"Approve amount error"
332,374
(allowed[msg.sender][_spender]==0)||(_amount==0)
null
/** * @title SafeMath * @dev Math operations with safety checks that throw on error */ 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) { } } contract VoltOwned { mapping (address => uint) private voltOwners; address[] private ownerList; mapping (address => uint) private voltBlock; address[] private blockList; modifier onlyOwner { } modifier noBlock { require(<FILL_ME>) _; } function VoltOwned(address firstOwner) public { } function isOwner(address who) internal view returns (bool) { } function addOwner(address newVoltOwnerAddress) public onlyOwner noBlock { } function removeOwner(address removeVoltOwnerAddress) public onlyOwner noBlock { } function getOwners() public onlyOwner noBlock returns (address[]) { } function addBlock(address blockAddress) public onlyOwner noBlock { } function removeBlock(address removeBlockAddress) public onlyOwner noBlock { } function getBlockList() public onlyOwner noBlock returns (address[]) { } } contract BasicToken { string private token_name; string private token_symbol; uint256 private token_decimals; uint256 private total_supply; uint256 private remaining_supply; uint256 private token_exchange_rate; mapping (address => uint256) private balance_of; mapping (address => mapping(address => uint256)) private allowance_of; event Transfer(address indexed from, address indexed to, uint256 value); event Approve(address indexed target, address indexed spender, uint256 value); function BasicToken ( string tokenName, string tokenSymbol, uint256 tokenDecimals, uint256 tokenSupply ) public { } function name() public view returns (string) { } function symbol() public view returns (string) { } function decimals() public view returns (uint256) { } function totalSupply() public view returns (uint256) { } function remainingSupply() internal view returns (uint256) { } function balanceOf( address client_address ) public view returns (uint256) { } function setBalance( address client_address, uint256 value ) internal returns (bool) { } function allowance( address target_address, address spender_address ) public view returns (uint256) { } function approve( address spender_address, uint256 value ) public returns (bool) { } function setApprove( address target_address, address spender_address, uint256 value ) internal returns (bool) { } function changeTokenName( string newTokenName ) internal returns (bool) { } function changeTokenSymbol( string newTokenSymbol ) internal returns (bool) { } function changeTokenDecimals( uint256 newTokenDecimals ) internal returns (bool) { } function changeTotalSupply( uint256 newTotalSupply ) internal returns (bool) { } function changeRemainingSupply( uint256 newRemainingSupply ) internal returns (bool) { } function changeTokenExchangeRate( uint256 newTokenExchangeRate ) internal returns (bool) { } } contract VoltToken is BasicToken, VoltOwned { using SafeMath for uint256; bool private mintStatus; event Deposit(address indexed from, address indexed to, uint256 value); event Mint(address indexed to, uint256 value); event Burn(address indexed target, uint256 value); function VoltToken () public BasicToken ( "VOLT", "ACDC", 18, 4000000000 ) VoltOwned( msg.sender ) { } modifier canMint { } function mint(address to, uint256 value) public onlyOwner noBlock canMint { } function superMint(address to, uint256 value) public onlyOwner noBlock { } function mintOpen() public onlyOwner noBlock returns (bool) { } function mintClose() public onlyOwner noBlock returns (bool) { } function transfer( address to, uint256 value ) public noBlock returns (bool) { } function transferFrom( address from, address to, uint256 value ) public noBlock returns(bool) { } function superTransferFrom( address from, address to, uint256 value ) public onlyOwner noBlock returns(bool) { } function voltTransfer( address from, address to, uint256 value ) private noBlock returns (bool) { } function setTokenName( string newTokenName ) public onlyOwner noBlock returns (bool) { } function setTokenSymbol( string newTokenSymbol ) public onlyOwner noBlock returns (bool) { } function setTotalSupply( uint256 newTotalSupply ) public onlyOwner noBlock returns (bool) { } function setRemainingSupply( uint256 newRemainingSupply ) public onlyOwner noBlock returns (bool) { } function setTokenExchangeRate( uint256 newTokenExchangeRate ) public onlyOwner noBlock returns (bool) { } function getRemainingSupply() public onlyOwner noBlock returns (uint256) { } }
voltBlock[msg.sender]==0
332,376
voltBlock[msg.sender]==0
"Purchase would exceed max supply of tokens"
pragma solidity ^0.8.0; pragma solidity ^0.8.0; /** * @title LSD Stampverse contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LSDStampverse is ERC721Enumerable, Ownable { uint256 public constant tokenPrice = 30000000000000000; // 0.03 ETH uint256 public constant stampPrice = 15000000000000000; // 0.015 ETH uint public constant maxTokenPurchase = 19; uint256 public MAX_TOKENS = 5000; uint256 public MAX_FREE_TOKENS = 1000; bool public saleIsActive = false; mapping(uint256 => bool) public tier3Token; string private _baseURIextended; constructor() ERC721("LSD Stampverse", "LSD") { } function setBaseURI(string memory baseURI_) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function flipSaleState() public onlyOwner { } function mintLSD(uint numberOfTokens) public payable { require(saleIsActive, "Sale must be active to mint Tokens"); require(numberOfTokens <= maxTokenPurchase, "Exceeded max token purchase"); // CHANGED: mult and add to + and * require(<FILL_ME>) // CHANGED: mult and add to + and * require(tokenPrice * numberOfTokens <= msg.value, "Ether value sent is not correct"); for(uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply() + 1; if (totalSupply() + 1 < MAX_TOKENS) { _safeMint(msg.sender, mintIndex); tier3Token[mintIndex] = true; } } } function mintFree() public { } function buyStamp(uint tokenId) public payable { } function getHolderTokens(address _owner) public view virtual returns (uint256[] memory) { } function withdraw() public onlyOwner { } }
totalSupply()+numberOfTokens<=MAX_TOKENS,"Purchase would exceed max supply of tokens"
332,510
totalSupply()+numberOfTokens<=MAX_TOKENS
"Ether value sent is not correct"
pragma solidity ^0.8.0; pragma solidity ^0.8.0; /** * @title LSD Stampverse contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LSDStampverse is ERC721Enumerable, Ownable { uint256 public constant tokenPrice = 30000000000000000; // 0.03 ETH uint256 public constant stampPrice = 15000000000000000; // 0.015 ETH uint public constant maxTokenPurchase = 19; uint256 public MAX_TOKENS = 5000; uint256 public MAX_FREE_TOKENS = 1000; bool public saleIsActive = false; mapping(uint256 => bool) public tier3Token; string private _baseURIextended; constructor() ERC721("LSD Stampverse", "LSD") { } function setBaseURI(string memory baseURI_) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function flipSaleState() public onlyOwner { } function mintLSD(uint numberOfTokens) public payable { require(saleIsActive, "Sale must be active to mint Tokens"); require(numberOfTokens <= maxTokenPurchase, "Exceeded max token purchase"); // CHANGED: mult and add to + and * require(totalSupply() + numberOfTokens <= MAX_TOKENS, "Purchase would exceed max supply of tokens"); // CHANGED: mult and add to + and * require(<FILL_ME>) for(uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply() + 1; if (totalSupply() + 1 < MAX_TOKENS) { _safeMint(msg.sender, mintIndex); tier3Token[mintIndex] = true; } } } function mintFree() public { } function buyStamp(uint tokenId) public payable { } function getHolderTokens(address _owner) public view virtual returns (uint256[] memory) { } function withdraw() public onlyOwner { } }
tokenPrice*numberOfTokens<=msg.value,"Ether value sent is not correct"
332,510
tokenPrice*numberOfTokens<=msg.value
"Purchase would exceed max supply of tokens"
pragma solidity ^0.8.0; pragma solidity ^0.8.0; /** * @title LSD Stampverse contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LSDStampverse is ERC721Enumerable, Ownable { uint256 public constant tokenPrice = 30000000000000000; // 0.03 ETH uint256 public constant stampPrice = 15000000000000000; // 0.015 ETH uint public constant maxTokenPurchase = 19; uint256 public MAX_TOKENS = 5000; uint256 public MAX_FREE_TOKENS = 1000; bool public saleIsActive = false; mapping(uint256 => bool) public tier3Token; string private _baseURIextended; constructor() ERC721("LSD Stampverse", "LSD") { } function setBaseURI(string memory baseURI_) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function flipSaleState() public onlyOwner { } function mintLSD(uint numberOfTokens) public payable { } function mintFree() public { require(saleIsActive, "Sale must be active to mint Tokens"); require(<FILL_ME>) uint mintIndex = totalSupply() + 1; _safeMint(msg.sender, mintIndex); } function buyStamp(uint tokenId) public payable { } function getHolderTokens(address _owner) public view virtual returns (uint256[] memory) { } function withdraw() public onlyOwner { } }
totalSupply()+1<=MAX_TOKENS,"Purchase would exceed max supply of tokens"
332,510
totalSupply()+1<=MAX_TOKENS
"Token already on tier 3"
pragma solidity ^0.8.0; pragma solidity ^0.8.0; /** * @title LSD Stampverse contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract LSDStampverse is ERC721Enumerable, Ownable { uint256 public constant tokenPrice = 30000000000000000; // 0.03 ETH uint256 public constant stampPrice = 15000000000000000; // 0.015 ETH uint public constant maxTokenPurchase = 19; uint256 public MAX_TOKENS = 5000; uint256 public MAX_FREE_TOKENS = 1000; bool public saleIsActive = false; mapping(uint256 => bool) public tier3Token; string private _baseURIextended; constructor() ERC721("LSD Stampverse", "LSD") { } function setBaseURI(string memory baseURI_) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function flipSaleState() public onlyOwner { } function mintLSD(uint numberOfTokens) public payable { } function mintFree() public { } function buyStamp(uint tokenId) public payable { require(saleIsActive, "Free Sale must be active to mint Tokens"); require(stampPrice <= msg.value, "Ether value sent is not correct"); require(<FILL_ME>) require(ownerOf(tokenId) == msg.sender, "Sender should be owner of the token"); tier3Token[tokenId] = true; } function getHolderTokens(address _owner) public view virtual returns (uint256[] memory) { } function withdraw() public onlyOwner { } }
tier3Token[tokenId]==false,"Token already on tier 3"
332,510
tier3Token[tokenId]==false
"Only pauser is allowed to perform this operation"
pragma solidity >=0.6.0 <0.8.0; // import "../GSN/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); event PauserChanged( address indexed previousPauser, address indexed newPauser ); bool private _paused; address private _pauser; /** * @dev The pausable constructor sets the original `pauser` of the contract to the sender * account & Initializes the contract in unpaused state.. */ constructor(address pauser) { } /** * @dev Throws if called by any account other than the pauser. */ modifier onlyPauser() { require(<FILL_ME>) _; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { } /** * @return the address of the owner. */ function getPauser() public view returns (address) { } /** * @return true if `msg.sender` is the owner of the contract. */ function isPauser() public view returns (bool) { } /** * @dev Returns true if the contract is paused, and false otherwise. */ function isPaused() public view returns (bool) { } /** * @dev Allows the current pauser to transfer control of the contract to a newPauser. * @param newPauser The address to transfer pauserShip to. */ function changePauser(address newPauser) public onlyPauser { } /** * @dev Transfers control of the contract to a newPauser. * @param newPauser The address to transfer ownership to. */ function _changePauser(address newPauser) internal { } function renouncePauser() external virtual onlyPauser { } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function pause() public onlyPauser whenNotPaused { } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function unpause() public onlyPauser whenPaused { } }
isPauser(),"Only pauser is allowed to perform this operation"
332,515
isPauser()
"Only Rainbowlisted"
pragma solidity ^0.8.9; /** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */ contract CustomERC721Metadata is ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory nm, string memory sym) { } /** * @dev Gets the token name * @return string representing the token name */ function name() external view returns (string memory) { } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string memory) { } } library Strings { function strConcat(string memory _a, string memory _b) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory _concatenatedString) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } } pragma solidity ^0.8.9; interface NtentData { function data(uint256 _tokenId) external view returns(string memory); } interface NtentTokenUri { function tokenUri(uint256 _tokenId) external view returns(string memory); } contract NtentArt is CustomERC721Metadata { event Mint( address indexed _to, uint256 indexed _tokenId, uint256 indexed _projectId ); struct Project { string name; string artist; string description; string website; string license; address purchaseContract; address dataContract; address tokenUriContract; bool acceptsMintPass; uint256 mintPassProjectId; bool dynamic; string projectBaseURI; string projectBaseIpfsURI; uint256 invocations; uint256 maxInvocations; string scriptJSON; mapping(uint256 => string) scripts; uint scriptCount; uint256 tokensBurned; string ipfsHash; bool useHashString; bool useIpfs; bool active; bool locked; bool paused; } uint256 constant ONE_MILLION = 1_000_000; mapping(uint256 => Project) projects; //All financial functions are stripped from struct for visibility mapping(uint256 => address) public projectIdToArtistAddress; mapping(uint256 => uint256) public projectIdToPricePerTokenInWei; address public ntentAddress; uint256 public ntentPercentage = 10; mapping(uint256 => string) public staticIpfsImageLink; mapping(uint256 => uint256) public tokenIdToProjectId; mapping(uint256 => uint256[]) internal projectIdToTokenIds; mapping(uint256 => bytes32) public tokenIdToHash; mapping(bytes32 => uint256) public hashToTokenId; address public admin; mapping(address => bool) public isRainbowlisted; mapping(address => bool) public isMintRainbowlisted; uint256 public nextProjectId = 1; modifier onlyValidTokenId(uint256 _tokenId) { } modifier onlyUnlocked(uint256 _projectId) { } modifier onlyArtist(uint256 _projectId) { } modifier onlyAdmin() { } modifier onlyRainbowlisted() { require(<FILL_ME>) _; } modifier onlyArtistOrRainbowlisted(uint256 _projectId) { } constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) { } function mint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId) { } function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) { } function burn(address ownerAddress, uint256 tokenId) external returns(uint256 _tokenId) { } function updateNtentAddress(address _ntentAddress) public onlyAdmin { } function updateNtentPercentage(uint256 _ntentPercentage) public onlyAdmin { } function addRainbowlisted(address _address) public onlyAdmin { } function removeRainbowlisted(address _address) public onlyAdmin { } function addMintRainbowlisted(address _address) public onlyAdmin { } function removeMintRainbowlisted(address _address) public onlyAdmin { } function getPricePerTokenInWei(uint256 _projectId) public view returns (uint256 price) { } function toggleProjectIsLocked(uint256 _projectId) public onlyRainbowlisted onlyUnlocked(_projectId) { } function toggleProjectIsActive(uint256 _projectId) public onlyRainbowlisted { } function updateProjectArtistAddress(uint256 _projectId, address _artistAddress) public onlyArtistOrRainbowlisted(_projectId) { } function toggleProjectIsPaused(uint256 _projectId) public onlyArtistOrRainbowlisted(_projectId) { } function addProject(string memory _projectName, address _artistAddress, uint256 _pricePerTokenInWei, address _purchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId, bool _dynamic) public onlyRainbowlisted { } function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public { } function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectPurchaseContractInfo(uint256 _projectId, address _projectPurchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDataContractInfo(uint256 _projectId, address _projectDataContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectTokenUriContractInfo(uint256 _projectId, address _projectTokenUriContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public { } function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public { } function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyArtist(_projectId) public { } function toggleProjectUseHashString(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public { } function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public { } function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtistOrRainbowlisted(_projectId) public { } function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) { } function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address purchaseContract, address dataContract, address tokenUriContract, bool acceptsMintPass, uint256 mintPassProjectId) { } function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, bool useHashString, string memory ipfsHash, bool locked, bool paused) { } function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){ } function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) { } function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){ } function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } }
isRainbowlisted[msg.sender],"Only Rainbowlisted"
332,559
isRainbowlisted[msg.sender]
"Only artist or Rainbowlisted"
pragma solidity ^0.8.9; /** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */ contract CustomERC721Metadata is ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory nm, string memory sym) { } /** * @dev Gets the token name * @return string representing the token name */ function name() external view returns (string memory) { } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string memory) { } } library Strings { function strConcat(string memory _a, string memory _b) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory _concatenatedString) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } } pragma solidity ^0.8.9; interface NtentData { function data(uint256 _tokenId) external view returns(string memory); } interface NtentTokenUri { function tokenUri(uint256 _tokenId) external view returns(string memory); } contract NtentArt is CustomERC721Metadata { event Mint( address indexed _to, uint256 indexed _tokenId, uint256 indexed _projectId ); struct Project { string name; string artist; string description; string website; string license; address purchaseContract; address dataContract; address tokenUriContract; bool acceptsMintPass; uint256 mintPassProjectId; bool dynamic; string projectBaseURI; string projectBaseIpfsURI; uint256 invocations; uint256 maxInvocations; string scriptJSON; mapping(uint256 => string) scripts; uint scriptCount; uint256 tokensBurned; string ipfsHash; bool useHashString; bool useIpfs; bool active; bool locked; bool paused; } uint256 constant ONE_MILLION = 1_000_000; mapping(uint256 => Project) projects; //All financial functions are stripped from struct for visibility mapping(uint256 => address) public projectIdToArtistAddress; mapping(uint256 => uint256) public projectIdToPricePerTokenInWei; address public ntentAddress; uint256 public ntentPercentage = 10; mapping(uint256 => string) public staticIpfsImageLink; mapping(uint256 => uint256) public tokenIdToProjectId; mapping(uint256 => uint256[]) internal projectIdToTokenIds; mapping(uint256 => bytes32) public tokenIdToHash; mapping(bytes32 => uint256) public hashToTokenId; address public admin; mapping(address => bool) public isRainbowlisted; mapping(address => bool) public isMintRainbowlisted; uint256 public nextProjectId = 1; modifier onlyValidTokenId(uint256 _tokenId) { } modifier onlyUnlocked(uint256 _projectId) { } modifier onlyArtist(uint256 _projectId) { } modifier onlyAdmin() { } modifier onlyRainbowlisted() { } modifier onlyArtistOrRainbowlisted(uint256 _projectId) { require(<FILL_ME>) _; } constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) { } function mint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId) { } function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) { } function burn(address ownerAddress, uint256 tokenId) external returns(uint256 _tokenId) { } function updateNtentAddress(address _ntentAddress) public onlyAdmin { } function updateNtentPercentage(uint256 _ntentPercentage) public onlyAdmin { } function addRainbowlisted(address _address) public onlyAdmin { } function removeRainbowlisted(address _address) public onlyAdmin { } function addMintRainbowlisted(address _address) public onlyAdmin { } function removeMintRainbowlisted(address _address) public onlyAdmin { } function getPricePerTokenInWei(uint256 _projectId) public view returns (uint256 price) { } function toggleProjectIsLocked(uint256 _projectId) public onlyRainbowlisted onlyUnlocked(_projectId) { } function toggleProjectIsActive(uint256 _projectId) public onlyRainbowlisted { } function updateProjectArtistAddress(uint256 _projectId, address _artistAddress) public onlyArtistOrRainbowlisted(_projectId) { } function toggleProjectIsPaused(uint256 _projectId) public onlyArtistOrRainbowlisted(_projectId) { } function addProject(string memory _projectName, address _artistAddress, uint256 _pricePerTokenInWei, address _purchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId, bool _dynamic) public onlyRainbowlisted { } function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public { } function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectPurchaseContractInfo(uint256 _projectId, address _projectPurchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDataContractInfo(uint256 _projectId, address _projectDataContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectTokenUriContractInfo(uint256 _projectId, address _projectTokenUriContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public { } function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public { } function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyArtist(_projectId) public { } function toggleProjectUseHashString(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public { } function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public { } function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtistOrRainbowlisted(_projectId) public { } function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) { } function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address purchaseContract, address dataContract, address tokenUriContract, bool acceptsMintPass, uint256 mintPassProjectId) { } function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, bool useHashString, string memory ipfsHash, bool locked, bool paused) { } function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){ } function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) { } function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){ } function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } }
isRainbowlisted[msg.sender]||msg.sender==projectIdToArtistAddress[_projectId],"Only artist or Rainbowlisted"
332,559
isRainbowlisted[msg.sender]||msg.sender==projectIdToArtistAddress[_projectId]
"Must mint from Rainbowlisted minter"
pragma solidity ^0.8.9; /** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */ contract CustomERC721Metadata is ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory nm, string memory sym) { } /** * @dev Gets the token name * @return string representing the token name */ function name() external view returns (string memory) { } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string memory) { } } library Strings { function strConcat(string memory _a, string memory _b) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory _concatenatedString) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } } pragma solidity ^0.8.9; interface NtentData { function data(uint256 _tokenId) external view returns(string memory); } interface NtentTokenUri { function tokenUri(uint256 _tokenId) external view returns(string memory); } contract NtentArt is CustomERC721Metadata { event Mint( address indexed _to, uint256 indexed _tokenId, uint256 indexed _projectId ); struct Project { string name; string artist; string description; string website; string license; address purchaseContract; address dataContract; address tokenUriContract; bool acceptsMintPass; uint256 mintPassProjectId; bool dynamic; string projectBaseURI; string projectBaseIpfsURI; uint256 invocations; uint256 maxInvocations; string scriptJSON; mapping(uint256 => string) scripts; uint scriptCount; uint256 tokensBurned; string ipfsHash; bool useHashString; bool useIpfs; bool active; bool locked; bool paused; } uint256 constant ONE_MILLION = 1_000_000; mapping(uint256 => Project) projects; //All financial functions are stripped from struct for visibility mapping(uint256 => address) public projectIdToArtistAddress; mapping(uint256 => uint256) public projectIdToPricePerTokenInWei; address public ntentAddress; uint256 public ntentPercentage = 10; mapping(uint256 => string) public staticIpfsImageLink; mapping(uint256 => uint256) public tokenIdToProjectId; mapping(uint256 => uint256[]) internal projectIdToTokenIds; mapping(uint256 => bytes32) public tokenIdToHash; mapping(bytes32 => uint256) public hashToTokenId; address public admin; mapping(address => bool) public isRainbowlisted; mapping(address => bool) public isMintRainbowlisted; uint256 public nextProjectId = 1; modifier onlyValidTokenId(uint256 _tokenId) { } modifier onlyUnlocked(uint256 _projectId) { } modifier onlyArtist(uint256 _projectId) { } modifier onlyAdmin() { } modifier onlyRainbowlisted() { } modifier onlyArtistOrRainbowlisted(uint256 _projectId) { } constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) { } function mint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId) { require(<FILL_ME>) require(projects[_projectId].invocations + 1 <= projects[_projectId].maxInvocations, "Exceeds max invocations"); require(projects[_projectId].active || _by == projectIdToArtistAddress[_projectId], "Proj must exist and be active"); require(!projects[_projectId].paused || _by == projectIdToArtistAddress[_projectId], "Purchases are paused"); uint256 tokenId = _mintToken(_to, _projectId); return tokenId; } function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) { } function burn(address ownerAddress, uint256 tokenId) external returns(uint256 _tokenId) { } function updateNtentAddress(address _ntentAddress) public onlyAdmin { } function updateNtentPercentage(uint256 _ntentPercentage) public onlyAdmin { } function addRainbowlisted(address _address) public onlyAdmin { } function removeRainbowlisted(address _address) public onlyAdmin { } function addMintRainbowlisted(address _address) public onlyAdmin { } function removeMintRainbowlisted(address _address) public onlyAdmin { } function getPricePerTokenInWei(uint256 _projectId) public view returns (uint256 price) { } function toggleProjectIsLocked(uint256 _projectId) public onlyRainbowlisted onlyUnlocked(_projectId) { } function toggleProjectIsActive(uint256 _projectId) public onlyRainbowlisted { } function updateProjectArtistAddress(uint256 _projectId, address _artistAddress) public onlyArtistOrRainbowlisted(_projectId) { } function toggleProjectIsPaused(uint256 _projectId) public onlyArtistOrRainbowlisted(_projectId) { } function addProject(string memory _projectName, address _artistAddress, uint256 _pricePerTokenInWei, address _purchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId, bool _dynamic) public onlyRainbowlisted { } function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public { } function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectPurchaseContractInfo(uint256 _projectId, address _projectPurchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDataContractInfo(uint256 _projectId, address _projectDataContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectTokenUriContractInfo(uint256 _projectId, address _projectTokenUriContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public { } function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public { } function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyArtist(_projectId) public { } function toggleProjectUseHashString(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public { } function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public { } function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtistOrRainbowlisted(_projectId) public { } function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) { } function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address purchaseContract, address dataContract, address tokenUriContract, bool acceptsMintPass, uint256 mintPassProjectId) { } function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, bool useHashString, string memory ipfsHash, bool locked, bool paused) { } function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){ } function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) { } function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){ } function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } }
isMintRainbowlisted[msg.sender],"Must mint from Rainbowlisted minter"
332,559
isMintRainbowlisted[msg.sender]
"Exceeds max invocations"
pragma solidity ^0.8.9; /** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */ contract CustomERC721Metadata is ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory nm, string memory sym) { } /** * @dev Gets the token name * @return string representing the token name */ function name() external view returns (string memory) { } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string memory) { } } library Strings { function strConcat(string memory _a, string memory _b) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory _concatenatedString) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } } pragma solidity ^0.8.9; interface NtentData { function data(uint256 _tokenId) external view returns(string memory); } interface NtentTokenUri { function tokenUri(uint256 _tokenId) external view returns(string memory); } contract NtentArt is CustomERC721Metadata { event Mint( address indexed _to, uint256 indexed _tokenId, uint256 indexed _projectId ); struct Project { string name; string artist; string description; string website; string license; address purchaseContract; address dataContract; address tokenUriContract; bool acceptsMintPass; uint256 mintPassProjectId; bool dynamic; string projectBaseURI; string projectBaseIpfsURI; uint256 invocations; uint256 maxInvocations; string scriptJSON; mapping(uint256 => string) scripts; uint scriptCount; uint256 tokensBurned; string ipfsHash; bool useHashString; bool useIpfs; bool active; bool locked; bool paused; } uint256 constant ONE_MILLION = 1_000_000; mapping(uint256 => Project) projects; //All financial functions are stripped from struct for visibility mapping(uint256 => address) public projectIdToArtistAddress; mapping(uint256 => uint256) public projectIdToPricePerTokenInWei; address public ntentAddress; uint256 public ntentPercentage = 10; mapping(uint256 => string) public staticIpfsImageLink; mapping(uint256 => uint256) public tokenIdToProjectId; mapping(uint256 => uint256[]) internal projectIdToTokenIds; mapping(uint256 => bytes32) public tokenIdToHash; mapping(bytes32 => uint256) public hashToTokenId; address public admin; mapping(address => bool) public isRainbowlisted; mapping(address => bool) public isMintRainbowlisted; uint256 public nextProjectId = 1; modifier onlyValidTokenId(uint256 _tokenId) { } modifier onlyUnlocked(uint256 _projectId) { } modifier onlyArtist(uint256 _projectId) { } modifier onlyAdmin() { } modifier onlyRainbowlisted() { } modifier onlyArtistOrRainbowlisted(uint256 _projectId) { } constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) { } function mint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId) { require(isMintRainbowlisted[msg.sender], "Must mint from Rainbowlisted minter"); require(<FILL_ME>) require(projects[_projectId].active || _by == projectIdToArtistAddress[_projectId], "Proj must exist and be active"); require(!projects[_projectId].paused || _by == projectIdToArtistAddress[_projectId], "Purchases are paused"); uint256 tokenId = _mintToken(_to, _projectId); return tokenId; } function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) { } function burn(address ownerAddress, uint256 tokenId) external returns(uint256 _tokenId) { } function updateNtentAddress(address _ntentAddress) public onlyAdmin { } function updateNtentPercentage(uint256 _ntentPercentage) public onlyAdmin { } function addRainbowlisted(address _address) public onlyAdmin { } function removeRainbowlisted(address _address) public onlyAdmin { } function addMintRainbowlisted(address _address) public onlyAdmin { } function removeMintRainbowlisted(address _address) public onlyAdmin { } function getPricePerTokenInWei(uint256 _projectId) public view returns (uint256 price) { } function toggleProjectIsLocked(uint256 _projectId) public onlyRainbowlisted onlyUnlocked(_projectId) { } function toggleProjectIsActive(uint256 _projectId) public onlyRainbowlisted { } function updateProjectArtistAddress(uint256 _projectId, address _artistAddress) public onlyArtistOrRainbowlisted(_projectId) { } function toggleProjectIsPaused(uint256 _projectId) public onlyArtistOrRainbowlisted(_projectId) { } function addProject(string memory _projectName, address _artistAddress, uint256 _pricePerTokenInWei, address _purchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId, bool _dynamic) public onlyRainbowlisted { } function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public { } function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectPurchaseContractInfo(uint256 _projectId, address _projectPurchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDataContractInfo(uint256 _projectId, address _projectDataContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectTokenUriContractInfo(uint256 _projectId, address _projectTokenUriContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public { } function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public { } function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyArtist(_projectId) public { } function toggleProjectUseHashString(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public { } function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public { } function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtistOrRainbowlisted(_projectId) public { } function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) { } function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address purchaseContract, address dataContract, address tokenUriContract, bool acceptsMintPass, uint256 mintPassProjectId) { } function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, bool useHashString, string memory ipfsHash, bool locked, bool paused) { } function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){ } function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) { } function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){ } function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } }
projects[_projectId].invocations+1<=projects[_projectId].maxInvocations,"Exceeds max invocations"
332,559
projects[_projectId].invocations+1<=projects[_projectId].maxInvocations
"Proj must exist and be active"
pragma solidity ^0.8.9; /** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */ contract CustomERC721Metadata is ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory nm, string memory sym) { } /** * @dev Gets the token name * @return string representing the token name */ function name() external view returns (string memory) { } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string memory) { } } library Strings { function strConcat(string memory _a, string memory _b) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory _concatenatedString) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } } pragma solidity ^0.8.9; interface NtentData { function data(uint256 _tokenId) external view returns(string memory); } interface NtentTokenUri { function tokenUri(uint256 _tokenId) external view returns(string memory); } contract NtentArt is CustomERC721Metadata { event Mint( address indexed _to, uint256 indexed _tokenId, uint256 indexed _projectId ); struct Project { string name; string artist; string description; string website; string license; address purchaseContract; address dataContract; address tokenUriContract; bool acceptsMintPass; uint256 mintPassProjectId; bool dynamic; string projectBaseURI; string projectBaseIpfsURI; uint256 invocations; uint256 maxInvocations; string scriptJSON; mapping(uint256 => string) scripts; uint scriptCount; uint256 tokensBurned; string ipfsHash; bool useHashString; bool useIpfs; bool active; bool locked; bool paused; } uint256 constant ONE_MILLION = 1_000_000; mapping(uint256 => Project) projects; //All financial functions are stripped from struct for visibility mapping(uint256 => address) public projectIdToArtistAddress; mapping(uint256 => uint256) public projectIdToPricePerTokenInWei; address public ntentAddress; uint256 public ntentPercentage = 10; mapping(uint256 => string) public staticIpfsImageLink; mapping(uint256 => uint256) public tokenIdToProjectId; mapping(uint256 => uint256[]) internal projectIdToTokenIds; mapping(uint256 => bytes32) public tokenIdToHash; mapping(bytes32 => uint256) public hashToTokenId; address public admin; mapping(address => bool) public isRainbowlisted; mapping(address => bool) public isMintRainbowlisted; uint256 public nextProjectId = 1; modifier onlyValidTokenId(uint256 _tokenId) { } modifier onlyUnlocked(uint256 _projectId) { } modifier onlyArtist(uint256 _projectId) { } modifier onlyAdmin() { } modifier onlyRainbowlisted() { } modifier onlyArtistOrRainbowlisted(uint256 _projectId) { } constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) { } function mint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId) { require(isMintRainbowlisted[msg.sender], "Must mint from Rainbowlisted minter"); require(projects[_projectId].invocations + 1 <= projects[_projectId].maxInvocations, "Exceeds max invocations"); require(<FILL_ME>) require(!projects[_projectId].paused || _by == projectIdToArtistAddress[_projectId], "Purchases are paused"); uint256 tokenId = _mintToken(_to, _projectId); return tokenId; } function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) { } function burn(address ownerAddress, uint256 tokenId) external returns(uint256 _tokenId) { } function updateNtentAddress(address _ntentAddress) public onlyAdmin { } function updateNtentPercentage(uint256 _ntentPercentage) public onlyAdmin { } function addRainbowlisted(address _address) public onlyAdmin { } function removeRainbowlisted(address _address) public onlyAdmin { } function addMintRainbowlisted(address _address) public onlyAdmin { } function removeMintRainbowlisted(address _address) public onlyAdmin { } function getPricePerTokenInWei(uint256 _projectId) public view returns (uint256 price) { } function toggleProjectIsLocked(uint256 _projectId) public onlyRainbowlisted onlyUnlocked(_projectId) { } function toggleProjectIsActive(uint256 _projectId) public onlyRainbowlisted { } function updateProjectArtistAddress(uint256 _projectId, address _artistAddress) public onlyArtistOrRainbowlisted(_projectId) { } function toggleProjectIsPaused(uint256 _projectId) public onlyArtistOrRainbowlisted(_projectId) { } function addProject(string memory _projectName, address _artistAddress, uint256 _pricePerTokenInWei, address _purchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId, bool _dynamic) public onlyRainbowlisted { } function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public { } function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectPurchaseContractInfo(uint256 _projectId, address _projectPurchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDataContractInfo(uint256 _projectId, address _projectDataContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectTokenUriContractInfo(uint256 _projectId, address _projectTokenUriContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public { } function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public { } function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyArtist(_projectId) public { } function toggleProjectUseHashString(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public { } function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public { } function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtistOrRainbowlisted(_projectId) public { } function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) { } function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address purchaseContract, address dataContract, address tokenUriContract, bool acceptsMintPass, uint256 mintPassProjectId) { } function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, bool useHashString, string memory ipfsHash, bool locked, bool paused) { } function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){ } function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) { } function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){ } function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } }
projects[_projectId].active||_by==projectIdToArtistAddress[_projectId],"Proj must exist and be active"
332,559
projects[_projectId].active||_by==projectIdToArtistAddress[_projectId]
"Purchases are paused"
pragma solidity ^0.8.9; /** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */ contract CustomERC721Metadata is ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory nm, string memory sym) { } /** * @dev Gets the token name * @return string representing the token name */ function name() external view returns (string memory) { } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string memory) { } } library Strings { function strConcat(string memory _a, string memory _b) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory _concatenatedString) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } } pragma solidity ^0.8.9; interface NtentData { function data(uint256 _tokenId) external view returns(string memory); } interface NtentTokenUri { function tokenUri(uint256 _tokenId) external view returns(string memory); } contract NtentArt is CustomERC721Metadata { event Mint( address indexed _to, uint256 indexed _tokenId, uint256 indexed _projectId ); struct Project { string name; string artist; string description; string website; string license; address purchaseContract; address dataContract; address tokenUriContract; bool acceptsMintPass; uint256 mintPassProjectId; bool dynamic; string projectBaseURI; string projectBaseIpfsURI; uint256 invocations; uint256 maxInvocations; string scriptJSON; mapping(uint256 => string) scripts; uint scriptCount; uint256 tokensBurned; string ipfsHash; bool useHashString; bool useIpfs; bool active; bool locked; bool paused; } uint256 constant ONE_MILLION = 1_000_000; mapping(uint256 => Project) projects; //All financial functions are stripped from struct for visibility mapping(uint256 => address) public projectIdToArtistAddress; mapping(uint256 => uint256) public projectIdToPricePerTokenInWei; address public ntentAddress; uint256 public ntentPercentage = 10; mapping(uint256 => string) public staticIpfsImageLink; mapping(uint256 => uint256) public tokenIdToProjectId; mapping(uint256 => uint256[]) internal projectIdToTokenIds; mapping(uint256 => bytes32) public tokenIdToHash; mapping(bytes32 => uint256) public hashToTokenId; address public admin; mapping(address => bool) public isRainbowlisted; mapping(address => bool) public isMintRainbowlisted; uint256 public nextProjectId = 1; modifier onlyValidTokenId(uint256 _tokenId) { } modifier onlyUnlocked(uint256 _projectId) { } modifier onlyArtist(uint256 _projectId) { } modifier onlyAdmin() { } modifier onlyRainbowlisted() { } modifier onlyArtistOrRainbowlisted(uint256 _projectId) { } constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) { } function mint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId) { require(isMintRainbowlisted[msg.sender], "Must mint from Rainbowlisted minter"); require(projects[_projectId].invocations + 1 <= projects[_projectId].maxInvocations, "Exceeds max invocations"); require(projects[_projectId].active || _by == projectIdToArtistAddress[_projectId], "Proj must exist and be active"); require(<FILL_ME>) uint256 tokenId = _mintToken(_to, _projectId); return tokenId; } function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) { } function burn(address ownerAddress, uint256 tokenId) external returns(uint256 _tokenId) { } function updateNtentAddress(address _ntentAddress) public onlyAdmin { } function updateNtentPercentage(uint256 _ntentPercentage) public onlyAdmin { } function addRainbowlisted(address _address) public onlyAdmin { } function removeRainbowlisted(address _address) public onlyAdmin { } function addMintRainbowlisted(address _address) public onlyAdmin { } function removeMintRainbowlisted(address _address) public onlyAdmin { } function getPricePerTokenInWei(uint256 _projectId) public view returns (uint256 price) { } function toggleProjectIsLocked(uint256 _projectId) public onlyRainbowlisted onlyUnlocked(_projectId) { } function toggleProjectIsActive(uint256 _projectId) public onlyRainbowlisted { } function updateProjectArtistAddress(uint256 _projectId, address _artistAddress) public onlyArtistOrRainbowlisted(_projectId) { } function toggleProjectIsPaused(uint256 _projectId) public onlyArtistOrRainbowlisted(_projectId) { } function addProject(string memory _projectName, address _artistAddress, uint256 _pricePerTokenInWei, address _purchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId, bool _dynamic) public onlyRainbowlisted { } function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public { } function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectPurchaseContractInfo(uint256 _projectId, address _projectPurchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDataContractInfo(uint256 _projectId, address _projectDataContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectTokenUriContractInfo(uint256 _projectId, address _projectTokenUriContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public { } function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public { } function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyArtist(_projectId) public { } function toggleProjectUseHashString(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public { } function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public { } function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtistOrRainbowlisted(_projectId) public { } function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) { } function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address purchaseContract, address dataContract, address tokenUriContract, bool acceptsMintPass, uint256 mintPassProjectId) { } function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, bool useHashString, string memory ipfsHash, bool locked, bool paused) { } function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){ } function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) { } function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){ } function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } }
!projects[_projectId].paused||_by==projectIdToArtistAddress[_projectId],"Purchases are paused"
332,559
!projects[_projectId].paused||_by==projectIdToArtistAddress[_projectId]
"Only if unlocked"
pragma solidity ^0.8.9; /** * ERC721 base contract without the concept of tokenUri as this is managed by the parent */ contract CustomERC721Metadata is ERC721Enumerable { // Token name string private _name; // Token symbol string private _symbol; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /** * @dev Constructor function */ constructor (string memory nm, string memory sym) { } /** * @dev Gets the token name * @return string representing the token name */ function name() external view returns (string memory) { } /** * @dev Gets the token symbol * @return string representing the token symbol */ function symbol() external view returns (string memory) { } } library Strings { function strConcat(string memory _a, string memory _b) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory _concatenatedString) { } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory _concatenatedString) { } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { } } pragma solidity ^0.8.9; interface NtentData { function data(uint256 _tokenId) external view returns(string memory); } interface NtentTokenUri { function tokenUri(uint256 _tokenId) external view returns(string memory); } contract NtentArt is CustomERC721Metadata { event Mint( address indexed _to, uint256 indexed _tokenId, uint256 indexed _projectId ); struct Project { string name; string artist; string description; string website; string license; address purchaseContract; address dataContract; address tokenUriContract; bool acceptsMintPass; uint256 mintPassProjectId; bool dynamic; string projectBaseURI; string projectBaseIpfsURI; uint256 invocations; uint256 maxInvocations; string scriptJSON; mapping(uint256 => string) scripts; uint scriptCount; uint256 tokensBurned; string ipfsHash; bool useHashString; bool useIpfs; bool active; bool locked; bool paused; } uint256 constant ONE_MILLION = 1_000_000; mapping(uint256 => Project) projects; //All financial functions are stripped from struct for visibility mapping(uint256 => address) public projectIdToArtistAddress; mapping(uint256 => uint256) public projectIdToPricePerTokenInWei; address public ntentAddress; uint256 public ntentPercentage = 10; mapping(uint256 => string) public staticIpfsImageLink; mapping(uint256 => uint256) public tokenIdToProjectId; mapping(uint256 => uint256[]) internal projectIdToTokenIds; mapping(uint256 => bytes32) public tokenIdToHash; mapping(bytes32 => uint256) public hashToTokenId; address public admin; mapping(address => bool) public isRainbowlisted; mapping(address => bool) public isMintRainbowlisted; uint256 public nextProjectId = 1; modifier onlyValidTokenId(uint256 _tokenId) { } modifier onlyUnlocked(uint256 _projectId) { } modifier onlyArtist(uint256 _projectId) { } modifier onlyAdmin() { } modifier onlyRainbowlisted() { } modifier onlyArtistOrRainbowlisted(uint256 _projectId) { } constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) { } function mint(address _to, uint256 _projectId, address _by) external returns (uint256 _tokenId) { } function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) { } function burn(address ownerAddress, uint256 tokenId) external returns(uint256 _tokenId) { } function updateNtentAddress(address _ntentAddress) public onlyAdmin { } function updateNtentPercentage(uint256 _ntentPercentage) public onlyAdmin { } function addRainbowlisted(address _address) public onlyAdmin { } function removeRainbowlisted(address _address) public onlyAdmin { } function addMintRainbowlisted(address _address) public onlyAdmin { } function removeMintRainbowlisted(address _address) public onlyAdmin { } function getPricePerTokenInWei(uint256 _projectId) public view returns (uint256 price) { } function toggleProjectIsLocked(uint256 _projectId) public onlyRainbowlisted onlyUnlocked(_projectId) { } function toggleProjectIsActive(uint256 _projectId) public onlyRainbowlisted { } function updateProjectArtistAddress(uint256 _projectId, address _artistAddress) public onlyArtistOrRainbowlisted(_projectId) { } function toggleProjectIsPaused(uint256 _projectId) public onlyArtistOrRainbowlisted(_projectId) { } function addProject(string memory _projectName, address _artistAddress, uint256 _pricePerTokenInWei, address _purchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId, bool _dynamic) public onlyRainbowlisted { } function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public { } function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectPurchaseContractInfo(uint256 _projectId, address _projectPurchaseContract, bool _acceptsMintPass, uint256 _mintPassProjectId) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDataContractInfo(uint256 _projectId, address _projectDataContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectTokenUriContractInfo(uint256 _projectId, address _projectTokenUriContract) onlyUnlocked(_projectId) onlyRainbowlisted public { } function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public { } function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public { } function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyArtist(_projectId) public { require(<FILL_ME>) require(_maxInvocations > projects[_projectId].invocations, "Max invocations exceeds current"); require(_maxInvocations <= ONE_MILLION, "Cannot exceed 1000000"); projects[_projectId].maxInvocations = _maxInvocations; } function toggleProjectUseHashString(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public { } function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public { } function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtistOrRainbowlisted(_projectId) public { } function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrRainbowlisted(_projectId) public { } function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtistOrRainbowlisted(tokenIdToProjectId[_tokenId]) public { } function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) { } function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address purchaseContract, address dataContract, address tokenUriContract, bool acceptsMintPass, uint256 mintPassProjectId) { } function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, bool useHashString, string memory ipfsHash, bool locked, bool paused) { } function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){ } function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) { } function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){ } function tokensOfOwner(address owner) external view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) { } }
(!projects[_projectId].locked||_maxInvocations<projects[_projectId].maxInvocations),"Only if unlocked"
332,559
(!projects[_projectId].locked||_maxInvocations<projects[_projectId].maxInvocations)
"You can only mint a maximum of 20 Teejeez per wallet"
// Contract based on https://docs.openzeppelin.com/contracts/4.x/erc721 // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; ////////////////////////////////////////////////////////////////////////////////////////////// // // // // // o@@@@@@@@@@@@@@@@@@@@@@@o .@@@@@@@@@@@@@@@@@@@@@ o@@@@@@@@@@@@@@@@@@@@@° // // O@@@@@@@@@@@@@@@@@@@@@@@O .@@@@@@@@@@@@@@@@@@@@@ O@@@@@@@@@@@@@@@@@@@@@* // // O@@@@@@@@@@@@@@@@@@@@@@@O .@@@@@@@@@@@@@@@@@@@@@ O@@@@@@@@@@@@@@@@@@@@@* // // *OOOOOOO@@@@@@@@@OOOOOOO* OOOOOOOOOOOOO@@@@@@@@ *OOOOOOO#@@@@@@@@@@@@@° // // .°....°.o@@@@@@@o.°....°. .....°°°°°°°.@@@@@@@@ .°...°O@@@@@@@@@@@@O*° // // *@@@@@@@o *@@@@@@@o @@@@@@@@ *#@@@@@@@@@@@O*°.. // // *@@@@@@@o *@@@@@@@@O*...*o@@@@@@@@@ .O@@@@@@@@@@@@#o**°°°°. // // *@@@@@@@o .@@@@@@@@@@@@@@@@@@@@@@@o #@@@@@@@@@@@@@@@@@@@@@* // // *@@@@@@@o *#@@@@@@@@@@@@@@@@@@@@o. O@@@@@@@@@@@@@@@@@@@@@* // // *@@@@@@@* .°*O#@@@@@@@@@@@@@@Oo°. O@@@@@@@@@@@@@@@@@@@@@* // // .*******. ..°°***oooooo**°°°.. °*********************. // // ....... ............. ...................... // // // // // ////////////////////////////////////////////////////////////////////////////////////////////// contract TeejeezNFT is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; using Counters for Counters.Counter; /* Counter instead of ERC721Enumerable to reduce gas price / See -> https://shiny.mirror.xyz/OUampBbIz9ebEicfGnQf5At_ReMHlZy0tB4glb9xQ0E / Thx to them */ Counters.Counter private _nextMintId; // Mint settings uint256 public constant MAX_PURCHASE_PER_TX = 10; uint256 public constant MAX_PURCHASE_PER_ADDRESS = 20; uint256 public constant TJZ_PRICE = 25000000000000000; //WEI, 25000000 GWEI, 25 FINNEY, 0.025 ETH uint256 public constant MAX_SUPPLY = 8888; uint256 public constant LAUNCH_TIMESTAMP = 1642283999; uint256 public constant RESERVED_AMOUNT = 50; // URI / Provenance / Index string private _baseTokenURI; string private _extensionURI; string public secretURI = "https://teejeez.world/secret.json"; string public provenance; uint256 private _creationTimestamp; uint256 public offsetIndex; // Reserved TJZs claim status: 0=not claimed, 1=claimed uint256 public isReservedClaimed; // Minting state: 0=paused, 1=open uint256 public isMintingLive; // Metadata Reveal State: 0=hidden, 1=revealed uint256 public isReveal; // Dev wallet for giveaway address dev1 = 0x1823FdDd74B439144B5b04B87f1cCc115F121F3a; // Ketso address dev2 = 0x28c626ba7c66aB68eCBcacF96A0EfE42a0C695D9; // InMot address dev3 = 0x441d39885E223c82262922Adb5960e07Bb90890B; // Strearate address dev4 = 0xCecC5B6f51960Cdb556eC6723AC49DDbB2aFceb7; // Torkor //////////////////////////////////////////////// constructor() ERC721("TeejeezNFT", "TJZ") { } // Mint reserved for the team, family,friends and giveaway (basically first #50) function mintReserved () external onlyOwner { } /* * --- MINTING */ function mintTJZ(uint256 tokenAmount) public payable { require(block.timestamp >= LAUNCH_TIMESTAMP, "Mint isn't open yet : Opening 01/15/2022, 11:00PM CET"); require(isMintingLive == 1, "Minting must be active to mint a Teejeez"); require(tokenAmount <= MAX_PURCHASE_PER_TX, "You can only mint 10 Teejeez at a time"); require(<FILL_ME>) require(_nextMintId.current().add(tokenAmount) <= MAX_SUPPLY.add(1), "The mint would exceed Teejeez max supply"); require(TJZ_PRICE.mul(tokenAmount) <= msg.value, "Ether value sent is uncorrect"); for(uint i = 0; i < tokenAmount; i++) { uint mintIndex = _nextMintId.current(); if (_nextMintId.current() <= MAX_SUPPLY) { _nextMintId.increment(); _safeMint(msg.sender, mintIndex); } } } /* * --- TOKEN URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) external onlyOwner { } function setExtension(string memory newExtension) external onlyOwner { } function setSecretURI(string memory newSecretURI) external onlyOwner { } // Raspberries are perched on my grandfather's stool function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { } function setOffsetIndex() external { } /* * --- UTILITIES */ // And so, it begins... function toggleMintingState() external onlyOwner { } function toggleRevealState() external onlyOwner { } function setProvenance(string memory provenanceHash) external onlyOwner { } function totalSupply() public view returns(uint256) { } // Funds are safe function withdrawBalance() external onlyOwner { } }
balanceOf(msg.sender).add(tokenAmount)<=MAX_PURCHASE_PER_ADDRESS,"You can only mint a maximum of 20 Teejeez per wallet"
332,563
balanceOf(msg.sender).add(tokenAmount)<=MAX_PURCHASE_PER_ADDRESS
"The mint would exceed Teejeez max supply"
// Contract based on https://docs.openzeppelin.com/contracts/4.x/erc721 // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; ////////////////////////////////////////////////////////////////////////////////////////////// // // // // // o@@@@@@@@@@@@@@@@@@@@@@@o .@@@@@@@@@@@@@@@@@@@@@ o@@@@@@@@@@@@@@@@@@@@@° // // O@@@@@@@@@@@@@@@@@@@@@@@O .@@@@@@@@@@@@@@@@@@@@@ O@@@@@@@@@@@@@@@@@@@@@* // // O@@@@@@@@@@@@@@@@@@@@@@@O .@@@@@@@@@@@@@@@@@@@@@ O@@@@@@@@@@@@@@@@@@@@@* // // *OOOOOOO@@@@@@@@@OOOOOOO* OOOOOOOOOOOOO@@@@@@@@ *OOOOOOO#@@@@@@@@@@@@@° // // .°....°.o@@@@@@@o.°....°. .....°°°°°°°.@@@@@@@@ .°...°O@@@@@@@@@@@@O*° // // *@@@@@@@o *@@@@@@@o @@@@@@@@ *#@@@@@@@@@@@O*°.. // // *@@@@@@@o *@@@@@@@@O*...*o@@@@@@@@@ .O@@@@@@@@@@@@#o**°°°°. // // *@@@@@@@o .@@@@@@@@@@@@@@@@@@@@@@@o #@@@@@@@@@@@@@@@@@@@@@* // // *@@@@@@@o *#@@@@@@@@@@@@@@@@@@@@o. O@@@@@@@@@@@@@@@@@@@@@* // // *@@@@@@@* .°*O#@@@@@@@@@@@@@@Oo°. O@@@@@@@@@@@@@@@@@@@@@* // // .*******. ..°°***oooooo**°°°.. °*********************. // // ....... ............. ...................... // // // // // ////////////////////////////////////////////////////////////////////////////////////////////// contract TeejeezNFT is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; using Counters for Counters.Counter; /* Counter instead of ERC721Enumerable to reduce gas price / See -> https://shiny.mirror.xyz/OUampBbIz9ebEicfGnQf5At_ReMHlZy0tB4glb9xQ0E / Thx to them */ Counters.Counter private _nextMintId; // Mint settings uint256 public constant MAX_PURCHASE_PER_TX = 10; uint256 public constant MAX_PURCHASE_PER_ADDRESS = 20; uint256 public constant TJZ_PRICE = 25000000000000000; //WEI, 25000000 GWEI, 25 FINNEY, 0.025 ETH uint256 public constant MAX_SUPPLY = 8888; uint256 public constant LAUNCH_TIMESTAMP = 1642283999; uint256 public constant RESERVED_AMOUNT = 50; // URI / Provenance / Index string private _baseTokenURI; string private _extensionURI; string public secretURI = "https://teejeez.world/secret.json"; string public provenance; uint256 private _creationTimestamp; uint256 public offsetIndex; // Reserved TJZs claim status: 0=not claimed, 1=claimed uint256 public isReservedClaimed; // Minting state: 0=paused, 1=open uint256 public isMintingLive; // Metadata Reveal State: 0=hidden, 1=revealed uint256 public isReveal; // Dev wallet for giveaway address dev1 = 0x1823FdDd74B439144B5b04B87f1cCc115F121F3a; // Ketso address dev2 = 0x28c626ba7c66aB68eCBcacF96A0EfE42a0C695D9; // InMot address dev3 = 0x441d39885E223c82262922Adb5960e07Bb90890B; // Strearate address dev4 = 0xCecC5B6f51960Cdb556eC6723AC49DDbB2aFceb7; // Torkor //////////////////////////////////////////////// constructor() ERC721("TeejeezNFT", "TJZ") { } // Mint reserved for the team, family,friends and giveaway (basically first #50) function mintReserved () external onlyOwner { } /* * --- MINTING */ function mintTJZ(uint256 tokenAmount) public payable { require(block.timestamp >= LAUNCH_TIMESTAMP, "Mint isn't open yet : Opening 01/15/2022, 11:00PM CET"); require(isMintingLive == 1, "Minting must be active to mint a Teejeez"); require(tokenAmount <= MAX_PURCHASE_PER_TX, "You can only mint 10 Teejeez at a time"); require(balanceOf(msg.sender).add(tokenAmount) <= MAX_PURCHASE_PER_ADDRESS, "You can only mint a maximum of 20 Teejeez per wallet"); require(<FILL_ME>) require(TJZ_PRICE.mul(tokenAmount) <= msg.value, "Ether value sent is uncorrect"); for(uint i = 0; i < tokenAmount; i++) { uint mintIndex = _nextMintId.current(); if (_nextMintId.current() <= MAX_SUPPLY) { _nextMintId.increment(); _safeMint(msg.sender, mintIndex); } } } /* * --- TOKEN URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) external onlyOwner { } function setExtension(string memory newExtension) external onlyOwner { } function setSecretURI(string memory newSecretURI) external onlyOwner { } // Raspberries are perched on my grandfather's stool function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { } function setOffsetIndex() external { } /* * --- UTILITIES */ // And so, it begins... function toggleMintingState() external onlyOwner { } function toggleRevealState() external onlyOwner { } function setProvenance(string memory provenanceHash) external onlyOwner { } function totalSupply() public view returns(uint256) { } // Funds are safe function withdrawBalance() external onlyOwner { } }
_nextMintId.current().add(tokenAmount)<=MAX_SUPPLY.add(1),"The mint would exceed Teejeez max supply"
332,563
_nextMintId.current().add(tokenAmount)<=MAX_SUPPLY.add(1)
"Ether value sent is uncorrect"
// Contract based on https://docs.openzeppelin.com/contracts/4.x/erc721 // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; ////////////////////////////////////////////////////////////////////////////////////////////// // // // // // o@@@@@@@@@@@@@@@@@@@@@@@o .@@@@@@@@@@@@@@@@@@@@@ o@@@@@@@@@@@@@@@@@@@@@° // // O@@@@@@@@@@@@@@@@@@@@@@@O .@@@@@@@@@@@@@@@@@@@@@ O@@@@@@@@@@@@@@@@@@@@@* // // O@@@@@@@@@@@@@@@@@@@@@@@O .@@@@@@@@@@@@@@@@@@@@@ O@@@@@@@@@@@@@@@@@@@@@* // // *OOOOOOO@@@@@@@@@OOOOOOO* OOOOOOOOOOOOO@@@@@@@@ *OOOOOOO#@@@@@@@@@@@@@° // // .°....°.o@@@@@@@o.°....°. .....°°°°°°°.@@@@@@@@ .°...°O@@@@@@@@@@@@O*° // // *@@@@@@@o *@@@@@@@o @@@@@@@@ *#@@@@@@@@@@@O*°.. // // *@@@@@@@o *@@@@@@@@O*...*o@@@@@@@@@ .O@@@@@@@@@@@@#o**°°°°. // // *@@@@@@@o .@@@@@@@@@@@@@@@@@@@@@@@o #@@@@@@@@@@@@@@@@@@@@@* // // *@@@@@@@o *#@@@@@@@@@@@@@@@@@@@@o. O@@@@@@@@@@@@@@@@@@@@@* // // *@@@@@@@* .°*O#@@@@@@@@@@@@@@Oo°. O@@@@@@@@@@@@@@@@@@@@@* // // .*******. ..°°***oooooo**°°°.. °*********************. // // ....... ............. ...................... // // // // // ////////////////////////////////////////////////////////////////////////////////////////////// contract TeejeezNFT is ERC721, Ownable { using SafeMath for uint256; using Strings for uint256; using Counters for Counters.Counter; /* Counter instead of ERC721Enumerable to reduce gas price / See -> https://shiny.mirror.xyz/OUampBbIz9ebEicfGnQf5At_ReMHlZy0tB4glb9xQ0E / Thx to them */ Counters.Counter private _nextMintId; // Mint settings uint256 public constant MAX_PURCHASE_PER_TX = 10; uint256 public constant MAX_PURCHASE_PER_ADDRESS = 20; uint256 public constant TJZ_PRICE = 25000000000000000; //WEI, 25000000 GWEI, 25 FINNEY, 0.025 ETH uint256 public constant MAX_SUPPLY = 8888; uint256 public constant LAUNCH_TIMESTAMP = 1642283999; uint256 public constant RESERVED_AMOUNT = 50; // URI / Provenance / Index string private _baseTokenURI; string private _extensionURI; string public secretURI = "https://teejeez.world/secret.json"; string public provenance; uint256 private _creationTimestamp; uint256 public offsetIndex; // Reserved TJZs claim status: 0=not claimed, 1=claimed uint256 public isReservedClaimed; // Minting state: 0=paused, 1=open uint256 public isMintingLive; // Metadata Reveal State: 0=hidden, 1=revealed uint256 public isReveal; // Dev wallet for giveaway address dev1 = 0x1823FdDd74B439144B5b04B87f1cCc115F121F3a; // Ketso address dev2 = 0x28c626ba7c66aB68eCBcacF96A0EfE42a0C695D9; // InMot address dev3 = 0x441d39885E223c82262922Adb5960e07Bb90890B; // Strearate address dev4 = 0xCecC5B6f51960Cdb556eC6723AC49DDbB2aFceb7; // Torkor //////////////////////////////////////////////// constructor() ERC721("TeejeezNFT", "TJZ") { } // Mint reserved for the team, family,friends and giveaway (basically first #50) function mintReserved () external onlyOwner { } /* * --- MINTING */ function mintTJZ(uint256 tokenAmount) public payable { require(block.timestamp >= LAUNCH_TIMESTAMP, "Mint isn't open yet : Opening 01/15/2022, 11:00PM CET"); require(isMintingLive == 1, "Minting must be active to mint a Teejeez"); require(tokenAmount <= MAX_PURCHASE_PER_TX, "You can only mint 10 Teejeez at a time"); require(balanceOf(msg.sender).add(tokenAmount) <= MAX_PURCHASE_PER_ADDRESS, "You can only mint a maximum of 20 Teejeez per wallet"); require(_nextMintId.current().add(tokenAmount) <= MAX_SUPPLY.add(1), "The mint would exceed Teejeez max supply"); require(<FILL_ME>) for(uint i = 0; i < tokenAmount; i++) { uint mintIndex = _nextMintId.current(); if (_nextMintId.current() <= MAX_SUPPLY) { _nextMintId.increment(); _safeMint(msg.sender, mintIndex); } } } /* * --- TOKEN URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) external onlyOwner { } function setExtension(string memory newExtension) external onlyOwner { } function setSecretURI(string memory newSecretURI) external onlyOwner { } // Raspberries are perched on my grandfather's stool function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { } function setOffsetIndex() external { } /* * --- UTILITIES */ // And so, it begins... function toggleMintingState() external onlyOwner { } function toggleRevealState() external onlyOwner { } function setProvenance(string memory provenanceHash) external onlyOwner { } function totalSupply() public view returns(uint256) { } // Funds are safe function withdrawBalance() external onlyOwner { } }
TJZ_PRICE.mul(tokenAmount)<=msg.value,"Ether value sent is uncorrect"
332,563
TJZ_PRICE.mul(tokenAmount)<=msg.value
null
pragma solidity ^ 0.4.18; /** * @title Owned * @dev The Owned contract has an owner address, and provides basic authorization control */ contract Owned { address public owner; /*Set owner of the contract*/ function Owned() public { } /*only owner can be modifier*/ modifier onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Owned { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns(uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns(uint256) { } /** * @dev Substracts 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) { } } /*ERC20*/ contract TokenERC20 is Pausable { using SafeMath for uint256; // Public variables of the token string public name = "NRC"; string public symbol = "R"; uint8 public decimals = 0; // how many token units a buyer gets per wei uint256 public rate = 50000; // address where funds are collected address public wallet = 0xd3C8326064044c36B73043b009155a59e92477D0; // contributors address address public contributorsAddress = 0xa7db53CB73DBe640DbD480a928dD06f03E2aE7Bd; // company address address public companyAddress = 0x9c949b51f2CafC3A5efc427621295489B63D861D; // market Address address public marketAddress = 0x199EcdFaC25567eb4D21C995B817230050d458d9; // share of all token uint8 public constant ICO_SHARE = 20; uint8 public constant CONTRIBUTORS_SHARE = 30; uint8 public constant COMPANY_SHARE = 20; uint8 public constant MARKET_SHARE = 30; // unfronzen periods uint8 constant COMPANY_PERIODS = 10; uint8 constant CONTRIBUTORS_PERIODS = 3; // token totalsupply amount uint256 public constant TOTAL_SUPPLY = 80000000000; // ico token amount uint256 public icoTotalAmount = 16000000000; uint256 public companyPeriodsElapsed; uint256 public contributorsPeriodsElapsed; // token frozened amount uint256 public frozenSupply; uint256 public initDate; uint8 public contributorsCurrentPeriod; uint8 public companyCurrentPeriod; // This creates an array with all balances mapping(address => uint256) public balanceOf; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); event InitialToken(string desc, address indexed target, uint256 value); /** * Constrctor function * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( ) public { } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { } } /******************************************/ /* NRCToken STARTS HERE */ /******************************************/ contract NRCToken is Owned, TokenERC20 { uint256 private etherChangeRate = 10 ** 18; uint256 private minutesOneYear = 365*24*60 minutes; bool public tokenSaleActive = true; // token have been sold uint256 public totalSoldToken; // all frozenAccount addresses mapping(address => bool) public frozenAccount; /* This generates a public log event on the blockchain that will notify clients */ event LogFrozenAccount(address target, bool frozen); event LogUnfrozenTokens(string desc, address indexed targetaddress, uint256 unfrozenTokensAmount); event LogSetTokenPrice(uint256 tokenPrice); event TimePassBy(string desc, uint256 times ); /** * event for token purchase logging * @param purchaser who paid for the tokens * @param value ehter paid for purchase * @param amount amount of tokens purchased */ event LogTokenPurchase(address indexed purchaser, uint256 value, uint256 amount); // ICO finished Event event TokenSaleFinished(string desc, address indexed contributors, uint256 icoTotalAmount, uint256 totalSoldToken, uint256 leftAmount); /* Initializes contract with initial supply tokens to the creator of the contract */ function NRCToken() TokenERC20() public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) public onlyOwner whenNotPaused { require(target != 0x0); require(target != owner); require(<FILL_ME>) frozenAccount[target] = freeze; LogFrozenAccount(target, freeze); } /// @notice Allow users to buy tokens for `newTokenRate` eth /// @param newTokenRate Price users can buy from the contract function setPrices(uint256 newTokenRate) public onlyOwner whenNotPaused { } /// @notice Buy tokens from contract by sending ether function buy() public payable whenNotPaused { } // Override this method to have a way to add business logic to your crowdsale when buying function getTokenAmount(uint256 etherAmount) internal view returns(uint256) { } // send ether to the funder wallet function forwardFunds() internal { } // calc totalSoldToken function calcTotalSoldToken(uint256 soldAmount) internal { } // @return true if the transaction can buy tokens function validPurchase() internal view returns(bool) { } // @return true if the ICO is in progress. function validSoldOut(uint256 soldAmount) internal view returns(bool) { } // @return current timestamp function time() internal constant returns (uint) { } /// @dev send the rest of the tokens after the crowdsale end and /// send to contributors address function finaliseICO() public onlyOwner whenNotPaused { } /// @notice freeze unfrozenAmount function unfrozenTokens() public onlyOwner whenNotPaused { } // unfrozen contributors token year by year function unfrozenContributorsTokens() internal { } // unfrozen company token year by year function unfrozenCompanyTokens() internal { } // fallback function - do not allow any eth transfers to this contract function() external { } }
frozenAccount[target]!=freeze
332,595
frozenAccount[target]!=freeze
null
pragma solidity ^ 0.4.18; /** * @title Owned * @dev The Owned contract has an owner address, and provides basic authorization control */ contract Owned { address public owner; /*Set owner of the contract*/ function Owned() public { } /*only owner can be modifier*/ modifier onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Owned { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns(uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns(uint256) { } /** * @dev Substracts 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) { } } /*ERC20*/ contract TokenERC20 is Pausable { using SafeMath for uint256; // Public variables of the token string public name = "NRC"; string public symbol = "R"; uint8 public decimals = 0; // how many token units a buyer gets per wei uint256 public rate = 50000; // address where funds are collected address public wallet = 0xd3C8326064044c36B73043b009155a59e92477D0; // contributors address address public contributorsAddress = 0xa7db53CB73DBe640DbD480a928dD06f03E2aE7Bd; // company address address public companyAddress = 0x9c949b51f2CafC3A5efc427621295489B63D861D; // market Address address public marketAddress = 0x199EcdFaC25567eb4D21C995B817230050d458d9; // share of all token uint8 public constant ICO_SHARE = 20; uint8 public constant CONTRIBUTORS_SHARE = 30; uint8 public constant COMPANY_SHARE = 20; uint8 public constant MARKET_SHARE = 30; // unfronzen periods uint8 constant COMPANY_PERIODS = 10; uint8 constant CONTRIBUTORS_PERIODS = 3; // token totalsupply amount uint256 public constant TOTAL_SUPPLY = 80000000000; // ico token amount uint256 public icoTotalAmount = 16000000000; uint256 public companyPeriodsElapsed; uint256 public contributorsPeriodsElapsed; // token frozened amount uint256 public frozenSupply; uint256 public initDate; uint8 public contributorsCurrentPeriod; uint8 public companyCurrentPeriod; // This creates an array with all balances mapping(address => uint256) public balanceOf; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); event InitialToken(string desc, address indexed target, uint256 value); /** * Constrctor function * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( ) public { } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { } } /******************************************/ /* NRCToken STARTS HERE */ /******************************************/ contract NRCToken is Owned, TokenERC20 { uint256 private etherChangeRate = 10 ** 18; uint256 private minutesOneYear = 365*24*60 minutes; bool public tokenSaleActive = true; // token have been sold uint256 public totalSoldToken; // all frozenAccount addresses mapping(address => bool) public frozenAccount; /* This generates a public log event on the blockchain that will notify clients */ event LogFrozenAccount(address target, bool frozen); event LogUnfrozenTokens(string desc, address indexed targetaddress, uint256 unfrozenTokensAmount); event LogSetTokenPrice(uint256 tokenPrice); event TimePassBy(string desc, uint256 times ); /** * event for token purchase logging * @param purchaser who paid for the tokens * @param value ehter paid for purchase * @param amount amount of tokens purchased */ event LogTokenPurchase(address indexed purchaser, uint256 value, uint256 amount); // ICO finished Event event TokenSaleFinished(string desc, address indexed contributors, uint256 icoTotalAmount, uint256 totalSoldToken, uint256 leftAmount); /* Initializes contract with initial supply tokens to the creator of the contract */ function NRCToken() TokenERC20() public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) public onlyOwner whenNotPaused { } /// @notice Allow users to buy tokens for `newTokenRate` eth /// @param newTokenRate Price users can buy from the contract function setPrices(uint256 newTokenRate) public onlyOwner whenNotPaused { } /// @notice Buy tokens from contract by sending ether function buy() public payable whenNotPaused { // if ICO finished ,can not buy any more! require(!frozenAccount[msg.sender]); require(tokenSaleActive); require(validPurchase()); uint tokens = getTokenAmount(msg.value); // calculates the amount require(<FILL_ME>) LogTokenPurchase(msg.sender, msg.value, tokens); balanceOf[msg.sender] = balanceOf[msg.sender].add(tokens); calcTotalSoldToken(tokens); forwardFunds(); } // Override this method to have a way to add business logic to your crowdsale when buying function getTokenAmount(uint256 etherAmount) internal view returns(uint256) { } // send ether to the funder wallet function forwardFunds() internal { } // calc totalSoldToken function calcTotalSoldToken(uint256 soldAmount) internal { } // @return true if the transaction can buy tokens function validPurchase() internal view returns(bool) { } // @return true if the ICO is in progress. function validSoldOut(uint256 soldAmount) internal view returns(bool) { } // @return current timestamp function time() internal constant returns (uint) { } /// @dev send the rest of the tokens after the crowdsale end and /// send to contributors address function finaliseICO() public onlyOwner whenNotPaused { } /// @notice freeze unfrozenAmount function unfrozenTokens() public onlyOwner whenNotPaused { } // unfrozen contributors token year by year function unfrozenContributorsTokens() internal { } // unfrozen company token year by year function unfrozenCompanyTokens() internal { } // fallback function - do not allow any eth transfers to this contract function() external { } }
!validSoldOut(tokens)
332,595
!validSoldOut(tokens)
"Purchase would exceed max tokens"
pragma solidity ^0.8.2; contract PRESALE is ERC1155, Ownable, ERC1155Burnable, ERC1155Pausable { fallback() external payable {} receive() external payable {} uint256 public constant MAX_SUPPLY = 10000; uint256 public CLAIMED_SUPPLY; mapping(address => uint8) private _allowList; uint256 private constant _tokenId = 1; // the prices are temporary, and set in the "setDutchAuctionPrice" function // public sale dutch auction uint public DUTCH_AUCTION_START = 0 ether; uint public DUTCH_AUCTION_END = 0 ether; uint public DUTCH_AUCTION_INCREMENT = 0 ether; uint public DUTCH_AUCTION_STEP_TIME = 1; // presale fixed price, temporary as well uint public PRESALE_PRICE = 0.25 ether; uint public startTimestamp; bool public hasPreSaleStarted = false; constructor() ERC1155("") {} function dutchAuctionPrice() public view returns (uint) { } function setDutchAuctionPrice(uint dutch_auction_start, uint dutch_auction_end, uint dutch_auction_increment, uint dutch_auction_step_time) public onlyOwner { } // this makes it easier to grab all the essential information about the state of the presale contract without making multiple infura requests. function getAuctionInformation() public view returns (uint, uint, uint, uint, uint, uint, uint, uint, uint, bool, bool) { } function hasPublicSaleStarted() public view returns (bool) { } /** * @dev Set the URI */ function setURI(string memory newuri) public onlyOwner { } /** * @dev Enable the public sale */ function enablePublicSale() public onlyOwner { } /** * @dev set the public sale timestamp */ function setPublicSaleTimestamp(uint timestamp) public onlyOwner { } /** * @dev Stop the public sale */ function stopPublicSale() public onlyOwner { } /** * @dev Enable the Pre-sale */ function enablePreSale(uint presale_price) public onlyOwner { } /** * @dev Stop the public sale */ function stopPreSale() public onlyOwner { } /** * @dev Just in case. */ function setStartingPrice(uint256 _newPrice) public onlyOwner { } /** * @dev Shows the price of the token */ function getStartingPrice() public view returns (uint256) { } /** * @dev Total claimed supply. */ function claimedSupply() public view returns (uint256) { } /** * @dev Add address to the presale list */ function setWhitelisted(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner { } /** * @dev Pre-sale Minting */ function preSaleMint(uint256 numberOfTokens) external payable { require(hasPreSaleStarted, "Pre-sale minting is not active"); require(<FILL_ME>) uint256 senderBalance = balanceOf(msg.sender, _tokenId); require( numberOfTokens <= _allowList[msg.sender] - senderBalance, "Exceeded max available to purchase" ); require(!paused(), "The contract is currently paused"); // Can only claim one at a time require(numberOfTokens <= 10, "Too many requested"); require( PRESALE_PRICE * numberOfTokens == msg.value, "Ether value sent is not correct" ); CLAIMED_SUPPLY += numberOfTokens; _mint(msg.sender, _tokenId, numberOfTokens, ""); } function isWalletWhitelisted(address wallet) public view returns (bool) { } function pause() public onlyOwner { } function unpause() public onlyOwner { } /** * @dev Public Sale Minting */ function publicSaleMint(uint256 numberOfTokens) external payable { } /** * @dev Owner minting function */ function ownerMint(uint256 numberOfTokens) external payable onlyOwner { } /** * @dev Withdraw and distribute the ether. */ function withdrawAll() public payable onlyOwner { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Pausable) { } }
CLAIMED_SUPPLY+numberOfTokens<=MAX_SUPPLY,"Purchase would exceed max tokens"
332,667
CLAIMED_SUPPLY+numberOfTokens<=MAX_SUPPLY
"Ether value sent is not correct"
pragma solidity ^0.8.2; contract PRESALE is ERC1155, Ownable, ERC1155Burnable, ERC1155Pausable { fallback() external payable {} receive() external payable {} uint256 public constant MAX_SUPPLY = 10000; uint256 public CLAIMED_SUPPLY; mapping(address => uint8) private _allowList; uint256 private constant _tokenId = 1; // the prices are temporary, and set in the "setDutchAuctionPrice" function // public sale dutch auction uint public DUTCH_AUCTION_START = 0 ether; uint public DUTCH_AUCTION_END = 0 ether; uint public DUTCH_AUCTION_INCREMENT = 0 ether; uint public DUTCH_AUCTION_STEP_TIME = 1; // presale fixed price, temporary as well uint public PRESALE_PRICE = 0.25 ether; uint public startTimestamp; bool public hasPreSaleStarted = false; constructor() ERC1155("") {} function dutchAuctionPrice() public view returns (uint) { } function setDutchAuctionPrice(uint dutch_auction_start, uint dutch_auction_end, uint dutch_auction_increment, uint dutch_auction_step_time) public onlyOwner { } // this makes it easier to grab all the essential information about the state of the presale contract without making multiple infura requests. function getAuctionInformation() public view returns (uint, uint, uint, uint, uint, uint, uint, uint, uint, bool, bool) { } function hasPublicSaleStarted() public view returns (bool) { } /** * @dev Set the URI */ function setURI(string memory newuri) public onlyOwner { } /** * @dev Enable the public sale */ function enablePublicSale() public onlyOwner { } /** * @dev set the public sale timestamp */ function setPublicSaleTimestamp(uint timestamp) public onlyOwner { } /** * @dev Stop the public sale */ function stopPublicSale() public onlyOwner { } /** * @dev Enable the Pre-sale */ function enablePreSale(uint presale_price) public onlyOwner { } /** * @dev Stop the public sale */ function stopPreSale() public onlyOwner { } /** * @dev Just in case. */ function setStartingPrice(uint256 _newPrice) public onlyOwner { } /** * @dev Shows the price of the token */ function getStartingPrice() public view returns (uint256) { } /** * @dev Total claimed supply. */ function claimedSupply() public view returns (uint256) { } /** * @dev Add address to the presale list */ function setWhitelisted(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner { } /** * @dev Pre-sale Minting */ function preSaleMint(uint256 numberOfTokens) external payable { require(hasPreSaleStarted, "Pre-sale minting is not active"); require( CLAIMED_SUPPLY + numberOfTokens <= MAX_SUPPLY, "Purchase would exceed max tokens" ); uint256 senderBalance = balanceOf(msg.sender, _tokenId); require( numberOfTokens <= _allowList[msg.sender] - senderBalance, "Exceeded max available to purchase" ); require(!paused(), "The contract is currently paused"); // Can only claim one at a time require(numberOfTokens <= 10, "Too many requested"); require(<FILL_ME>) CLAIMED_SUPPLY += numberOfTokens; _mint(msg.sender, _tokenId, numberOfTokens, ""); } function isWalletWhitelisted(address wallet) public view returns (bool) { } function pause() public onlyOwner { } function unpause() public onlyOwner { } /** * @dev Public Sale Minting */ function publicSaleMint(uint256 numberOfTokens) external payable { } /** * @dev Owner minting function */ function ownerMint(uint256 numberOfTokens) external payable onlyOwner { } /** * @dev Withdraw and distribute the ether. */ function withdrawAll() public payable onlyOwner { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Pausable) { } }
PRESALE_PRICE*numberOfTokens==msg.value,"Ether value sent is not correct"
332,667
PRESALE_PRICE*numberOfTokens==msg.value
"Public sale minting is not active"
pragma solidity ^0.8.2; contract PRESALE is ERC1155, Ownable, ERC1155Burnable, ERC1155Pausable { fallback() external payable {} receive() external payable {} uint256 public constant MAX_SUPPLY = 10000; uint256 public CLAIMED_SUPPLY; mapping(address => uint8) private _allowList; uint256 private constant _tokenId = 1; // the prices are temporary, and set in the "setDutchAuctionPrice" function // public sale dutch auction uint public DUTCH_AUCTION_START = 0 ether; uint public DUTCH_AUCTION_END = 0 ether; uint public DUTCH_AUCTION_INCREMENT = 0 ether; uint public DUTCH_AUCTION_STEP_TIME = 1; // presale fixed price, temporary as well uint public PRESALE_PRICE = 0.25 ether; uint public startTimestamp; bool public hasPreSaleStarted = false; constructor() ERC1155("") {} function dutchAuctionPrice() public view returns (uint) { } function setDutchAuctionPrice(uint dutch_auction_start, uint dutch_auction_end, uint dutch_auction_increment, uint dutch_auction_step_time) public onlyOwner { } // this makes it easier to grab all the essential information about the state of the presale contract without making multiple infura requests. function getAuctionInformation() public view returns (uint, uint, uint, uint, uint, uint, uint, uint, uint, bool, bool) { } function hasPublicSaleStarted() public view returns (bool) { } /** * @dev Set the URI */ function setURI(string memory newuri) public onlyOwner { } /** * @dev Enable the public sale */ function enablePublicSale() public onlyOwner { } /** * @dev set the public sale timestamp */ function setPublicSaleTimestamp(uint timestamp) public onlyOwner { } /** * @dev Stop the public sale */ function stopPublicSale() public onlyOwner { } /** * @dev Enable the Pre-sale */ function enablePreSale(uint presale_price) public onlyOwner { } /** * @dev Stop the public sale */ function stopPreSale() public onlyOwner { } /** * @dev Just in case. */ function setStartingPrice(uint256 _newPrice) public onlyOwner { } /** * @dev Shows the price of the token */ function getStartingPrice() public view returns (uint256) { } /** * @dev Total claimed supply. */ function claimedSupply() public view returns (uint256) { } /** * @dev Add address to the presale list */ function setWhitelisted(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner { } /** * @dev Pre-sale Minting */ function preSaleMint(uint256 numberOfTokens) external payable { } function isWalletWhitelisted(address wallet) public view returns (bool) { } function pause() public onlyOwner { } function unpause() public onlyOwner { } /** * @dev Public Sale Minting */ function publicSaleMint(uint256 numberOfTokens) external payable { require(<FILL_ME>) require( CLAIMED_SUPPLY + numberOfTokens <= MAX_SUPPLY, "Purchase would exceed max tokens" ); // Can only claim 10 at a time require(numberOfTokens <= 10, "Too many requested"); require( dutchAuctionPrice() * numberOfTokens == msg.value, "Ether value sent is not correct" ); require(!paused(), "The contract is currently paused"); CLAIMED_SUPPLY += numberOfTokens; _mint(msg.sender, _tokenId, numberOfTokens, ""); } /** * @dev Owner minting function */ function ownerMint(uint256 numberOfTokens) external payable onlyOwner { } /** * @dev Withdraw and distribute the ether. */ function withdrawAll() public payable onlyOwner { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Pausable) { } }
hasPublicSaleStarted(),"Public sale minting is not active"
332,667
hasPublicSaleStarted()
"Ether value sent is not correct"
pragma solidity ^0.8.2; contract PRESALE is ERC1155, Ownable, ERC1155Burnable, ERC1155Pausable { fallback() external payable {} receive() external payable {} uint256 public constant MAX_SUPPLY = 10000; uint256 public CLAIMED_SUPPLY; mapping(address => uint8) private _allowList; uint256 private constant _tokenId = 1; // the prices are temporary, and set in the "setDutchAuctionPrice" function // public sale dutch auction uint public DUTCH_AUCTION_START = 0 ether; uint public DUTCH_AUCTION_END = 0 ether; uint public DUTCH_AUCTION_INCREMENT = 0 ether; uint public DUTCH_AUCTION_STEP_TIME = 1; // presale fixed price, temporary as well uint public PRESALE_PRICE = 0.25 ether; uint public startTimestamp; bool public hasPreSaleStarted = false; constructor() ERC1155("") {} function dutchAuctionPrice() public view returns (uint) { } function setDutchAuctionPrice(uint dutch_auction_start, uint dutch_auction_end, uint dutch_auction_increment, uint dutch_auction_step_time) public onlyOwner { } // this makes it easier to grab all the essential information about the state of the presale contract without making multiple infura requests. function getAuctionInformation() public view returns (uint, uint, uint, uint, uint, uint, uint, uint, uint, bool, bool) { } function hasPublicSaleStarted() public view returns (bool) { } /** * @dev Set the URI */ function setURI(string memory newuri) public onlyOwner { } /** * @dev Enable the public sale */ function enablePublicSale() public onlyOwner { } /** * @dev set the public sale timestamp */ function setPublicSaleTimestamp(uint timestamp) public onlyOwner { } /** * @dev Stop the public sale */ function stopPublicSale() public onlyOwner { } /** * @dev Enable the Pre-sale */ function enablePreSale(uint presale_price) public onlyOwner { } /** * @dev Stop the public sale */ function stopPreSale() public onlyOwner { } /** * @dev Just in case. */ function setStartingPrice(uint256 _newPrice) public onlyOwner { } /** * @dev Shows the price of the token */ function getStartingPrice() public view returns (uint256) { } /** * @dev Total claimed supply. */ function claimedSupply() public view returns (uint256) { } /** * @dev Add address to the presale list */ function setWhitelisted(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner { } /** * @dev Pre-sale Minting */ function preSaleMint(uint256 numberOfTokens) external payable { } function isWalletWhitelisted(address wallet) public view returns (bool) { } function pause() public onlyOwner { } function unpause() public onlyOwner { } /** * @dev Public Sale Minting */ function publicSaleMint(uint256 numberOfTokens) external payable { require(hasPublicSaleStarted(), "Public sale minting is not active"); require( CLAIMED_SUPPLY + numberOfTokens <= MAX_SUPPLY, "Purchase would exceed max tokens" ); // Can only claim 10 at a time require(numberOfTokens <= 10, "Too many requested"); require(<FILL_ME>) require(!paused(), "The contract is currently paused"); CLAIMED_SUPPLY += numberOfTokens; _mint(msg.sender, _tokenId, numberOfTokens, ""); } /** * @dev Owner minting function */ function ownerMint(uint256 numberOfTokens) external payable onlyOwner { } /** * @dev Withdraw and distribute the ether. */ function withdrawAll() public payable onlyOwner { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Pausable) { } }
dutchAuctionPrice()*numberOfTokens==msg.value,"Ether value sent is not correct"
332,667
dutchAuctionPrice()*numberOfTokens==msg.value
"GovernorAlpha::propose: proposer votes below proposal threshold"
// COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol // Copyright 2020 Compound Labs, Inc. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. // 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Ctrl+f for XXX to see all the modifications. // uint96s are changed to uint256s for simplicity and safety. pragma solidity 0.6.12; pragma experimental ABIEncoderV2; contract GovernorAlpha { /// @notice The name of this contract // XXX: string public constant name = "Compound Governor Alpha"; string public constant name = "Unicly Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed // XXX: function quorumVotes() public pure returns (uint) { return 400000e18; } // 400,000 = 4% of Comp function quorumVotes() public view returns (uint) { } // 6.25% of Supply /// @notice The number of votes required in order for a voter to become a proposer // function proposalThreshold() public pure returns (uint) { return 100000e18; } // 100,000 = 1% of Comp function proposalThreshold() public view returns (uint) { } // 2% of Supply /// @notice The maximum number of actions that can be included in a proposal function proposalMaxOperations() public pure returns (uint) { } // 10 actions /// @notice The delay before voting on a proposal may take place, once proposed function votingDelay() public pure returns (uint) { } // 1 block /// @notice The duration of voting on a proposal, in blocks function votingPeriod() public pure returns (uint) { } // ~3 days in blocks (assuming 15s blocks) /// @notice The address of the Compound Protocol Timelock TimelockInterface public timelock; /// @notice The address of the Compound governance token // XXX: CompInterface public comp; Unic public unic; /// @notice The address of the Governor Guardian address public guardian; /// @notice The total number of proposals uint public proposalCount; struct Proposal { /// @notice Unique id for looking up a proposal uint id; /// @notice Creator of the proposal address proposer; /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds uint eta; /// @notice the ordered list of target addresses for calls to be made address[] targets; /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made uint[] values; /// @notice The ordered list of function signatures to be called string[] signatures; /// @notice The ordered list of calldata to be passed to each call bytes[] calldatas; /// @notice The block at which voting begins: holders must delegate their votes prior to this block uint startBlock; /// @notice The block at which voting ends: votes must be cast prior to this block uint endBlock; /// @notice Current number of votes in favor of this proposal uint forVotes; /// @notice Current number of votes in opposition to this proposal uint againstVotes; /// @notice Flag marking whether the proposal has been canceled bool canceled; /// @notice Flag marking whether the proposal has been executed bool executed; /// @notice Receipts of ballots for the entire set of voters mapping (address => Receipt) receipts; } /// @notice Ballot receipt record for a voter struct Receipt { /// @notice Whether or not a vote has been cast bool hasVoted; /// @notice Whether or not the voter supports the proposal bool support; /// @notice The number of votes the voter had, which were cast uint256 votes; } /// @notice Possible states that a proposal may be in enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /// @notice The official record of all proposals ever proposed mapping (uint => Proposal) public proposals; /// @notice The latest proposal for each proposer mapping (address => uint) public latestProposalIds; /// @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 ballot struct used by the contract bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,bool support)"); /// @notice An event emitted when a new proposal is created event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description); /// @notice An event emitted when a vote has been cast on a proposal event VoteCast(address voter, uint proposalId, bool support, uint votes); /// @notice An event emitted when a proposal has been canceled event ProposalCanceled(uint id); /// @notice An event emitted when a proposal has been queued in the Timelock event ProposalQueued(uint id, uint eta); /// @notice An event emitted when a proposal has been executed in the Timelock event ProposalExecuted(uint id); constructor(address timelock_, address unic_, address guardian_) public { } function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { require(<FILL_ME>) require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorAlpha::propose: must provide actions"); require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions"); uint latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require(proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal"); require(proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal"); } uint startBlock = add256(block.number, votingDelay()); uint endBlock = add256(startBlock, votingPeriod()); proposalCount++; Proposal memory newProposal = Proposal({ id: proposalCount, proposer: msg.sender, eta: 0, targets: targets, values: values, signatures: signatures, calldatas: calldatas, startBlock: startBlock, endBlock: endBlock, forVotes: 0, againstVotes: 0, canceled: false, executed: false }); proposals[newProposal.id] = newProposal; latestProposalIds[newProposal.proposer] = newProposal.id; emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); return newProposal.id; } function queue(uint proposalId) public { } function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal { } function execute(uint proposalId) public payable { } function cancel(uint proposalId) public { } function getActions(uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { } function getReceipt(uint proposalId, address voter) public view returns (Receipt memory) { } function state(uint proposalId) public view returns (ProposalState) { } function castVote(uint proposalId, bool support) public { } function castVoteBySig(uint proposalId, bool support, uint8 v, bytes32 r, bytes32 s) public { } function _castVote(address voter, uint proposalId, bool support) internal { } function __acceptAdmin() public { } function __abdicate() public { } function __queueSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { } function __executeSetTimelockPendingAdmin(address newPendingAdmin, uint eta) public { } function add256(uint256 a, uint256 b) internal pure returns (uint) { } function sub256(uint256 a, uint256 b) internal pure returns (uint) { } function getChainId() internal pure returns (uint) { } } interface TimelockInterface { function delay() external view returns (uint); function GRACE_PERIOD() external view returns (uint); function acceptAdmin() external; function queuedTransactions(bytes32 hash) external view returns (bool); function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32); function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external; function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory); }
unic.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold(),"GovernorAlpha::propose: proposer votes below proposal threshold"
332,697
unic.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold()
"Farm: insufficient balance"
//SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "../libraries/math/SafeMath.sol"; import "../libraries/token/IERC20.sol"; import "../libraries/utils/ReentrancyGuard.sol"; import "../interfaces/IX2Fund.sol"; import "../interfaces/IX2Farm.sol"; contract Farm is ReentrancyGuard, IERC20, IX2Farm { using SafeMath for uint256; string public constant name = "XVIX UNI Farm"; string public constant symbol = "UNI:FARM"; uint8 public constant decimals = 18; uint256 constant PRECISION = 1e30; address public token; address public gov; address public distributor; uint256 public override totalSupply; mapping (address => uint256) public balances; uint256 public override cumulativeRewardPerToken; mapping (address => uint256) public override claimableReward; mapping (address => uint256) public override previousCumulatedRewardPerToken; event Deposit(address account, uint256 amount); event Withdraw(address account, uint256 amount); event Transfer(address indexed from, address indexed to, uint256 value); event GovChange(address gov); event Claim(address receiver, uint256 amount); modifier onlyGov() { } constructor(address _token) public { } receive() external payable {} function setGov(address _gov) external onlyGov { } function setDistributor(address _distributor) external onlyGov { } function deposit(uint256 _amount, address _receiver) external nonReentrant { } function withdraw(address _receiver, uint256 _amount) external nonReentrant { } function withdrawWithoutDistribution(address _receiver, uint256 _amount) external nonReentrant { } function claim(address _receiver) external nonReentrant { } function balanceOf(address account) public override view returns (uint256) { } // empty implementation, Farm tokens are non-transferrable function transfer(address /* recipient */, uint256 /* amount */) public override returns (bool) { } // empty implementation, Farm tokens are non-transferrable function allowance(address /* owner */, address /* spender */) public view virtual override returns (uint256) { } // empty implementation, Farm tokens are non-transferrable function approve(address /* spender */, uint256 /* amount */) public virtual override returns (bool) { } // empty implementation, Farm tokens are non-transferrable function transferFrom(address /* sender */, address /* recipient */, uint256 /* amount */) public virtual override returns (bool) { } function _withdraw(address _account, address _receiver, uint256 _amount) private { require(<FILL_ME>) balances[_account] = balances[_account].sub(_amount); totalSupply = totalSupply.sub(_amount); IERC20(token).transfer(_receiver, _amount); emit Withdraw(_account, _amount); emit Transfer(_account, address(0), _amount); } function _updateRewards(address _account, bool _distribute) private { } }
balances[_account]>=_amount,"Farm: insufficient balance"
332,713
balances[_account]>=_amount
"Max supply is 100 Million."
pragma solidity ^0.5.0; contract Bethero is ERC20 { string private _name; string private _symbol; uint8 private _decimals; address payable _tokenOwnerAddress; uint256 public priceInWei = 25000000000000; uint256 private _decs; uint256 private _issued = 0; bool private uniswapLocked = true; bool private auditsLocked = true; bool private teamLocked = true; uint256 public marketing = 0; bool public minting = true; /** * @dev Constructor. * @param name name of the token * @param symbol symbol of the token, 3-4 chars is recommended * @param decimals number of decimal places of one token unit, 18 is widely used */ constructor(string memory name, string memory symbol, uint8 decimals) public { } /** * @dev Burns a specific amount of tokens. * @param value The amount of lowest token units to be burned. */ function burn(uint256 value) public { } // optional functions from ERC20 stardard /** * @return the name of the token. */ function name() public view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public view returns (string memory) { } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { } /** * @return the owner of the token. */ function getOwner() public view returns (address payable) { } /** * @dev ends the ico forever. * @return bool. */ function endIco() public returns (bool) { } /** * @dev Unlock the uniswapliquidity. * @return bool.. */ function unlockUniswapLiq() public returns (bool) { } /** * @dev Unlock the audits funds. * @return bool. */ function unlockAudits() public returns (bool) { } /** * @dev Unlock 500k for marketing each time called, until the whole 11,500,000 is spent. * @return bool.. */ function unlockMarketing() public returns (bool) { } /** * @dev Unlock the 2,000,000 to the team members after 1 year from contract deployment. * @return bool.. */ function unlockTeamFunds() public returns (bool) { } /** * @dev This function is used in the ico. * @return bool.. */ function mint() public payable returns (bool) { require(minting == true, "Ico ended."); uint256 amountToMint = ( msg.value.div(priceInWei)) * _decs; require(<FILL_ME>) _issued += amountToMint; _mint(msg.sender, amountToMint); return true; } /** * @dev Withdraw Eth balance collected in the ico to the owner's address. */ function withdraw() public { } }
(amountToMint+_issued)<=(35000000*_decs),"Max supply is 100 Million."
332,775
(amountToMint+_issued)<=(35000000*_decs)
"access denied"
pragma solidity ^0.4.25; /** * - GAIN 3,33% PER 24 HOURS (every 5900 blocks) * - Life-long payments * - The revolutionary reliability * - Minimal contribution 0.01 eth * - Currency and payment - ETH * - Contribution allocation schemes: * -- 83% payments * -- 17% Marketing + Operating Expenses * * ---About the Project * Blockchain-enabled smart contracts have opened a new era of trustless relationships without * intermediaries. This technology opens incredible financial possibilities. Our automated investment * distribution model is written into a smart contract, uploaded to the Ethereum blockchain and can be * freely accessed online. In order to insure our investors' complete security, full control over the * project has been transferred from the organizers to the smart contract: nobody can influence the * system's permanent autonomous functioning. * * ---How to use: * 1. Send from ETH wallet to the smart contract address * any amount from 0.01 ETH. * 2. Verify your transaction in the history of your application or etherscan.io, specifying the address * of your wallet. * 3a. Claim your profit by sending 0 ether transaction (every day, every week, i don't care unless you're * spending too much on GAS) * OR * 3b. For reinvest, you need to first remove the accumulated percentage of charges (by sending 0 ether * transaction), and only after that, deposit the amount that you want to reinvest. * * RECOMMENDED GAS LIMIT: 200000 * RECOMMENDED GAS PRICE: https://ethgasstation.info/ * You can check the payments on the etherscan.io site, in the "Internal Txns" tab of your wallet. * * ---It is not allowed to transfer from exchanges, only from your personal ETH wallet, for which you * have private keys. * * Contracts reviewed and approved by pros! * * Main contract - Revolution. Scroll down to find it. */ contract InvestorsStorage { struct investor { uint keyIndex; uint value; uint paymentTime; uint refBonus; } struct itmap { mapping(address => investor) data; address[] keys; } itmap private s; address private owner; modifier onlyOwner() { } constructor() public { } function insert(address addr, uint value) public onlyOwner returns (bool) { } function investorFullInfo(address addr) public view returns(uint, uint, uint, uint) { } function investorBaseInfo(address addr) public view returns(uint, uint, uint) { } function investorShortInfo(address addr) public view returns(uint, uint) { } function addRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { } function addValue(address addr, uint value) public onlyOwner returns (bool) { } function setPaymentTime(address addr, uint paymentTime) public onlyOwner returns (bool) { } function setRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { } function keyFromIndex(uint i) public view returns (address) { } function contains(address addr) public view returns (bool) { } function size() public view returns (uint) { } function iterStart() public pure returns (uint) { } } 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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } library Percent { // Solidity automatically throws when dividing by 0 struct percent { uint num; uint den; } function mul(percent storage p, uint a) internal view returns (uint) { } function div(percent storage p, uint a) internal view returns (uint) { } function sub(percent storage p, uint a) internal view returns (uint) { } function add(percent storage p, uint a) internal view returns (uint) { } } contract Accessibility { enum AccessRank { None, Payout, Paymode, Full } mapping(address => AccessRank) internal m_admins; modifier onlyAdmin(AccessRank r) { require(<FILL_ME>) _; } event LogProvideAccess(address indexed whom, uint when, AccessRank rank); constructor() public { } function provideAccess(address addr, AccessRank rank) public onlyAdmin(AccessRank.Full) { } function access(address addr) public view returns(AccessRank rank) { } } contract PaymentSystem { // https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls enum Paymode { Push, Pull } struct PaySys { uint latestTime; uint latestKeyIndex; Paymode mode; } PaySys internal m_paysys; modifier atPaymode(Paymode mode) { } event LogPaymodeChanged(uint when, Paymode indexed mode); function paymode() public view returns(Paymode mode) { } function changePaymode(Paymode mode) internal { } } library Zero { function requireNotZero(uint a) internal pure { } function requireNotZero(address addr) internal pure { } function notZero(address addr) internal pure returns(bool) { } function isZero(address addr) internal pure returns(bool) { } } library ToAddress { function toAddr(uint source) internal pure returns(address) { } function toAddr(bytes source) internal pure returns(address addr) { } } contract Revolution is Accessibility, PaymentSystem { using Percent for Percent.percent; using SafeMath for uint; using Zero for *; using ToAddress for *; // investors storage - iterable map; InvestorsStorage private m_investors; mapping(address => bool) private m_referrals; bool private m_nextWave; // automatically generates getters address public adminAddr; address public payerAddr; uint public waveStartup; uint public investmentsNum; uint public constant minInvesment = 10 finney; // 0.01 eth uint public constant maxBalance = 333e5 ether; // 33,300,000 eth uint public constant pauseOnNextWave = 168 hours; // percents Percent.percent private m_dividendsPercent = Percent.percent(333, 10000); // 333/10000*100% = 3.33% Percent.percent private m_adminPercent = Percent.percent(1, 10); // 1/10*100% = 10% Percent.percent private m_payerPercent = Percent.percent(7, 100); // 7/100*100% = 7% Percent.percent private m_refPercent = Percent.percent(3, 100); // 3/100*100% = 3% // more events for easy read from blockchain event LogNewInvestor(address indexed addr, uint when, uint value); event LogNewInvesment(address indexed addr, uint when, uint value); event LogNewReferral(address indexed addr, uint when, uint value); event LogPayDividends(address indexed addr, uint when, uint value); event LogPayReferrerBonus(address indexed addr, uint when, uint value); event LogBalanceChanged(uint when, uint balance); event LogAdminAddrChanged(address indexed addr, uint when); event LogPayerAddrChanged(address indexed addr, uint when); event LogNextWave(uint when); modifier balanceChanged { } modifier notOnPause() { } constructor() public { } function() public payable { } function investorsNumber() public view returns(uint) { } function balanceETH() public view returns(uint) { } function payerPercent() public view returns(uint numerator, uint denominator) { } function dividendsPercent() public view returns(uint numerator, uint denominator) { } function adminPercent() public view returns(uint numerator, uint denominator) { } function referrerPercent() public view returns(uint numerator, uint denominator) { } function investorInfo(address addr) public view returns(uint value, uint paymentTime, uint refBonus, bool isReferral) { } function latestPayout() public view returns(uint timestamp) { } function getMyDividends() public notOnPause atPaymode(Paymode.Pull) balanceChanged { } function doInvest(address[3] refs) public payable notOnPause balanceChanged { } function payout() public notOnPause onlyAdmin(AccessRank.Payout) atPaymode(Paymode.Push) balanceChanged { } function setAdminAddr(address addr) public onlyAdmin(AccessRank.Full) { } function setPayerAddr(address addr) public onlyAdmin(AccessRank.Full) { } function setPullPaymode() public onlyAdmin(AccessRank.Paymode) atPaymode(Paymode.Push) { } function getMemInvestor(address addr) internal view returns(InvestorsStorage.investor) { } function notZeroNotSender(address addr) internal view returns(bool) { } function sendDividends(address addr, uint value) private { } function sendDividendsWithRefBonus(address addr, uint value, uint refBonus) private { } function nextWave() private { } }
m_admins[msg.sender]==r||m_admins[msg.sender]==AccessRank.Full,"access denied"
332,799
m_admins[msg.sender]==r||m_admins[msg.sender]==AccessRank.Full
"cannot change full access rank"
pragma solidity ^0.4.25; /** * - GAIN 3,33% PER 24 HOURS (every 5900 blocks) * - Life-long payments * - The revolutionary reliability * - Minimal contribution 0.01 eth * - Currency and payment - ETH * - Contribution allocation schemes: * -- 83% payments * -- 17% Marketing + Operating Expenses * * ---About the Project * Blockchain-enabled smart contracts have opened a new era of trustless relationships without * intermediaries. This technology opens incredible financial possibilities. Our automated investment * distribution model is written into a smart contract, uploaded to the Ethereum blockchain and can be * freely accessed online. In order to insure our investors' complete security, full control over the * project has been transferred from the organizers to the smart contract: nobody can influence the * system's permanent autonomous functioning. * * ---How to use: * 1. Send from ETH wallet to the smart contract address * any amount from 0.01 ETH. * 2. Verify your transaction in the history of your application or etherscan.io, specifying the address * of your wallet. * 3a. Claim your profit by sending 0 ether transaction (every day, every week, i don't care unless you're * spending too much on GAS) * OR * 3b. For reinvest, you need to first remove the accumulated percentage of charges (by sending 0 ether * transaction), and only after that, deposit the amount that you want to reinvest. * * RECOMMENDED GAS LIMIT: 200000 * RECOMMENDED GAS PRICE: https://ethgasstation.info/ * You can check the payments on the etherscan.io site, in the "Internal Txns" tab of your wallet. * * ---It is not allowed to transfer from exchanges, only from your personal ETH wallet, for which you * have private keys. * * Contracts reviewed and approved by pros! * * Main contract - Revolution. Scroll down to find it. */ contract InvestorsStorage { struct investor { uint keyIndex; uint value; uint paymentTime; uint refBonus; } struct itmap { mapping(address => investor) data; address[] keys; } itmap private s; address private owner; modifier onlyOwner() { } constructor() public { } function insert(address addr, uint value) public onlyOwner returns (bool) { } function investorFullInfo(address addr) public view returns(uint, uint, uint, uint) { } function investorBaseInfo(address addr) public view returns(uint, uint, uint) { } function investorShortInfo(address addr) public view returns(uint, uint) { } function addRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { } function addValue(address addr, uint value) public onlyOwner returns (bool) { } function setPaymentTime(address addr, uint paymentTime) public onlyOwner returns (bool) { } function setRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { } function keyFromIndex(uint i) public view returns (address) { } function contains(address addr) public view returns (bool) { } function size() public view returns (uint) { } function iterStart() public pure returns (uint) { } } 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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } library Percent { // Solidity automatically throws when dividing by 0 struct percent { uint num; uint den; } function mul(percent storage p, uint a) internal view returns (uint) { } function div(percent storage p, uint a) internal view returns (uint) { } function sub(percent storage p, uint a) internal view returns (uint) { } function add(percent storage p, uint a) internal view returns (uint) { } } contract Accessibility { enum AccessRank { None, Payout, Paymode, Full } mapping(address => AccessRank) internal m_admins; modifier onlyAdmin(AccessRank r) { } event LogProvideAccess(address indexed whom, uint when, AccessRank rank); constructor() public { } function provideAccess(address addr, AccessRank rank) public onlyAdmin(AccessRank.Full) { require(rank <= AccessRank.Full, "invalid access rank"); require(<FILL_ME>) if (m_admins[addr] != rank) { m_admins[addr] = rank; emit LogProvideAccess(addr, now, rank); } } function access(address addr) public view returns(AccessRank rank) { } } contract PaymentSystem { // https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls enum Paymode { Push, Pull } struct PaySys { uint latestTime; uint latestKeyIndex; Paymode mode; } PaySys internal m_paysys; modifier atPaymode(Paymode mode) { } event LogPaymodeChanged(uint when, Paymode indexed mode); function paymode() public view returns(Paymode mode) { } function changePaymode(Paymode mode) internal { } } library Zero { function requireNotZero(uint a) internal pure { } function requireNotZero(address addr) internal pure { } function notZero(address addr) internal pure returns(bool) { } function isZero(address addr) internal pure returns(bool) { } } library ToAddress { function toAddr(uint source) internal pure returns(address) { } function toAddr(bytes source) internal pure returns(address addr) { } } contract Revolution is Accessibility, PaymentSystem { using Percent for Percent.percent; using SafeMath for uint; using Zero for *; using ToAddress for *; // investors storage - iterable map; InvestorsStorage private m_investors; mapping(address => bool) private m_referrals; bool private m_nextWave; // automatically generates getters address public adminAddr; address public payerAddr; uint public waveStartup; uint public investmentsNum; uint public constant minInvesment = 10 finney; // 0.01 eth uint public constant maxBalance = 333e5 ether; // 33,300,000 eth uint public constant pauseOnNextWave = 168 hours; // percents Percent.percent private m_dividendsPercent = Percent.percent(333, 10000); // 333/10000*100% = 3.33% Percent.percent private m_adminPercent = Percent.percent(1, 10); // 1/10*100% = 10% Percent.percent private m_payerPercent = Percent.percent(7, 100); // 7/100*100% = 7% Percent.percent private m_refPercent = Percent.percent(3, 100); // 3/100*100% = 3% // more events for easy read from blockchain event LogNewInvestor(address indexed addr, uint when, uint value); event LogNewInvesment(address indexed addr, uint when, uint value); event LogNewReferral(address indexed addr, uint when, uint value); event LogPayDividends(address indexed addr, uint when, uint value); event LogPayReferrerBonus(address indexed addr, uint when, uint value); event LogBalanceChanged(uint when, uint balance); event LogAdminAddrChanged(address indexed addr, uint when); event LogPayerAddrChanged(address indexed addr, uint when); event LogNextWave(uint when); modifier balanceChanged { } modifier notOnPause() { } constructor() public { } function() public payable { } function investorsNumber() public view returns(uint) { } function balanceETH() public view returns(uint) { } function payerPercent() public view returns(uint numerator, uint denominator) { } function dividendsPercent() public view returns(uint numerator, uint denominator) { } function adminPercent() public view returns(uint numerator, uint denominator) { } function referrerPercent() public view returns(uint numerator, uint denominator) { } function investorInfo(address addr) public view returns(uint value, uint paymentTime, uint refBonus, bool isReferral) { } function latestPayout() public view returns(uint timestamp) { } function getMyDividends() public notOnPause atPaymode(Paymode.Pull) balanceChanged { } function doInvest(address[3] refs) public payable notOnPause balanceChanged { } function payout() public notOnPause onlyAdmin(AccessRank.Payout) atPaymode(Paymode.Push) balanceChanged { } function setAdminAddr(address addr) public onlyAdmin(AccessRank.Full) { } function setPayerAddr(address addr) public onlyAdmin(AccessRank.Full) { } function setPullPaymode() public onlyAdmin(AccessRank.Paymode) atPaymode(Paymode.Push) { } function getMemInvestor(address addr) internal view returns(InvestorsStorage.investor) { } function notZeroNotSender(address addr) internal view returns(bool) { } function sendDividends(address addr, uint value) private { } function sendDividendsWithRefBonus(address addr, uint value, uint refBonus) private { } function nextWave() private { } }
m_admins[addr]!=AccessRank.Full,"cannot change full access rank"
332,799
m_admins[addr]!=AccessRank.Full
"pause on next wave not expired"
pragma solidity ^0.4.25; /** * - GAIN 3,33% PER 24 HOURS (every 5900 blocks) * - Life-long payments * - The revolutionary reliability * - Minimal contribution 0.01 eth * - Currency and payment - ETH * - Contribution allocation schemes: * -- 83% payments * -- 17% Marketing + Operating Expenses * * ---About the Project * Blockchain-enabled smart contracts have opened a new era of trustless relationships without * intermediaries. This technology opens incredible financial possibilities. Our automated investment * distribution model is written into a smart contract, uploaded to the Ethereum blockchain and can be * freely accessed online. In order to insure our investors' complete security, full control over the * project has been transferred from the organizers to the smart contract: nobody can influence the * system's permanent autonomous functioning. * * ---How to use: * 1. Send from ETH wallet to the smart contract address * any amount from 0.01 ETH. * 2. Verify your transaction in the history of your application or etherscan.io, specifying the address * of your wallet. * 3a. Claim your profit by sending 0 ether transaction (every day, every week, i don't care unless you're * spending too much on GAS) * OR * 3b. For reinvest, you need to first remove the accumulated percentage of charges (by sending 0 ether * transaction), and only after that, deposit the amount that you want to reinvest. * * RECOMMENDED GAS LIMIT: 200000 * RECOMMENDED GAS PRICE: https://ethgasstation.info/ * You can check the payments on the etherscan.io site, in the "Internal Txns" tab of your wallet. * * ---It is not allowed to transfer from exchanges, only from your personal ETH wallet, for which you * have private keys. * * Contracts reviewed and approved by pros! * * Main contract - Revolution. Scroll down to find it. */ contract InvestorsStorage { struct investor { uint keyIndex; uint value; uint paymentTime; uint refBonus; } struct itmap { mapping(address => investor) data; address[] keys; } itmap private s; address private owner; modifier onlyOwner() { } constructor() public { } function insert(address addr, uint value) public onlyOwner returns (bool) { } function investorFullInfo(address addr) public view returns(uint, uint, uint, uint) { } function investorBaseInfo(address addr) public view returns(uint, uint, uint) { } function investorShortInfo(address addr) public view returns(uint, uint) { } function addRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { } function addValue(address addr, uint value) public onlyOwner returns (bool) { } function setPaymentTime(address addr, uint paymentTime) public onlyOwner returns (bool) { } function setRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { } function keyFromIndex(uint i) public view returns (address) { } function contains(address addr) public view returns (bool) { } function size() public view returns (uint) { } function iterStart() public pure returns (uint) { } } 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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } library Percent { // Solidity automatically throws when dividing by 0 struct percent { uint num; uint den; } function mul(percent storage p, uint a) internal view returns (uint) { } function div(percent storage p, uint a) internal view returns (uint) { } function sub(percent storage p, uint a) internal view returns (uint) { } function add(percent storage p, uint a) internal view returns (uint) { } } contract Accessibility { enum AccessRank { None, Payout, Paymode, Full } mapping(address => AccessRank) internal m_admins; modifier onlyAdmin(AccessRank r) { } event LogProvideAccess(address indexed whom, uint when, AccessRank rank); constructor() public { } function provideAccess(address addr, AccessRank rank) public onlyAdmin(AccessRank.Full) { } function access(address addr) public view returns(AccessRank rank) { } } contract PaymentSystem { // https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls enum Paymode { Push, Pull } struct PaySys { uint latestTime; uint latestKeyIndex; Paymode mode; } PaySys internal m_paysys; modifier atPaymode(Paymode mode) { } event LogPaymodeChanged(uint when, Paymode indexed mode); function paymode() public view returns(Paymode mode) { } function changePaymode(Paymode mode) internal { } } library Zero { function requireNotZero(uint a) internal pure { } function requireNotZero(address addr) internal pure { } function notZero(address addr) internal pure returns(bool) { } function isZero(address addr) internal pure returns(bool) { } } library ToAddress { function toAddr(uint source) internal pure returns(address) { } function toAddr(bytes source) internal pure returns(address addr) { } } contract Revolution is Accessibility, PaymentSystem { using Percent for Percent.percent; using SafeMath for uint; using Zero for *; using ToAddress for *; // investors storage - iterable map; InvestorsStorage private m_investors; mapping(address => bool) private m_referrals; bool private m_nextWave; // automatically generates getters address public adminAddr; address public payerAddr; uint public waveStartup; uint public investmentsNum; uint public constant minInvesment = 10 finney; // 0.01 eth uint public constant maxBalance = 333e5 ether; // 33,300,000 eth uint public constant pauseOnNextWave = 168 hours; // percents Percent.percent private m_dividendsPercent = Percent.percent(333, 10000); // 333/10000*100% = 3.33% Percent.percent private m_adminPercent = Percent.percent(1, 10); // 1/10*100% = 10% Percent.percent private m_payerPercent = Percent.percent(7, 100); // 7/100*100% = 7% Percent.percent private m_refPercent = Percent.percent(3, 100); // 3/100*100% = 3% // more events for easy read from blockchain event LogNewInvestor(address indexed addr, uint when, uint value); event LogNewInvesment(address indexed addr, uint when, uint value); event LogNewReferral(address indexed addr, uint when, uint value); event LogPayDividends(address indexed addr, uint when, uint value); event LogPayReferrerBonus(address indexed addr, uint when, uint value); event LogBalanceChanged(uint when, uint balance); event LogAdminAddrChanged(address indexed addr, uint when); event LogPayerAddrChanged(address indexed addr, uint when); event LogNextWave(uint when); modifier balanceChanged { } modifier notOnPause() { require(<FILL_ME>) _; } constructor() public { } function() public payable { } function investorsNumber() public view returns(uint) { } function balanceETH() public view returns(uint) { } function payerPercent() public view returns(uint numerator, uint denominator) { } function dividendsPercent() public view returns(uint numerator, uint denominator) { } function adminPercent() public view returns(uint numerator, uint denominator) { } function referrerPercent() public view returns(uint numerator, uint denominator) { } function investorInfo(address addr) public view returns(uint value, uint paymentTime, uint refBonus, bool isReferral) { } function latestPayout() public view returns(uint timestamp) { } function getMyDividends() public notOnPause atPaymode(Paymode.Pull) balanceChanged { } function doInvest(address[3] refs) public payable notOnPause balanceChanged { } function payout() public notOnPause onlyAdmin(AccessRank.Payout) atPaymode(Paymode.Push) balanceChanged { } function setAdminAddr(address addr) public onlyAdmin(AccessRank.Full) { } function setPayerAddr(address addr) public onlyAdmin(AccessRank.Full) { } function setPullPaymode() public onlyAdmin(AccessRank.Paymode) atPaymode(Paymode.Push) { } function getMemInvestor(address addr) internal view returns(InvestorsStorage.investor) { } function notZeroNotSender(address addr) internal view returns(bool) { } function sendDividends(address addr, uint value) private { } function sendDividendsWithRefBonus(address addr, uint value, uint refBonus) private { } function nextWave() private { } }
waveStartup+pauseOnNextWave<=now,"pause on next wave not expired"
332,799
waveStartup+pauseOnNextWave<=now
"internal error"
pragma solidity ^0.4.25; /** * - GAIN 3,33% PER 24 HOURS (every 5900 blocks) * - Life-long payments * - The revolutionary reliability * - Minimal contribution 0.01 eth * - Currency and payment - ETH * - Contribution allocation schemes: * -- 83% payments * -- 17% Marketing + Operating Expenses * * ---About the Project * Blockchain-enabled smart contracts have opened a new era of trustless relationships without * intermediaries. This technology opens incredible financial possibilities. Our automated investment * distribution model is written into a smart contract, uploaded to the Ethereum blockchain and can be * freely accessed online. In order to insure our investors' complete security, full control over the * project has been transferred from the organizers to the smart contract: nobody can influence the * system's permanent autonomous functioning. * * ---How to use: * 1. Send from ETH wallet to the smart contract address * any amount from 0.01 ETH. * 2. Verify your transaction in the history of your application or etherscan.io, specifying the address * of your wallet. * 3a. Claim your profit by sending 0 ether transaction (every day, every week, i don't care unless you're * spending too much on GAS) * OR * 3b. For reinvest, you need to first remove the accumulated percentage of charges (by sending 0 ether * transaction), and only after that, deposit the amount that you want to reinvest. * * RECOMMENDED GAS LIMIT: 200000 * RECOMMENDED GAS PRICE: https://ethgasstation.info/ * You can check the payments on the etherscan.io site, in the "Internal Txns" tab of your wallet. * * ---It is not allowed to transfer from exchanges, only from your personal ETH wallet, for which you * have private keys. * * Contracts reviewed and approved by pros! * * Main contract - Revolution. Scroll down to find it. */ contract InvestorsStorage { struct investor { uint keyIndex; uint value; uint paymentTime; uint refBonus; } struct itmap { mapping(address => investor) data; address[] keys; } itmap private s; address private owner; modifier onlyOwner() { } constructor() public { } function insert(address addr, uint value) public onlyOwner returns (bool) { } function investorFullInfo(address addr) public view returns(uint, uint, uint, uint) { } function investorBaseInfo(address addr) public view returns(uint, uint, uint) { } function investorShortInfo(address addr) public view returns(uint, uint) { } function addRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { } function addValue(address addr, uint value) public onlyOwner returns (bool) { } function setPaymentTime(address addr, uint paymentTime) public onlyOwner returns (bool) { } function setRefBonus(address addr, uint refBonus) public onlyOwner returns (bool) { } function keyFromIndex(uint i) public view returns (address) { } function contains(address addr) public view returns (bool) { } function size() public view returns (uint) { } function iterStart() public pure returns (uint) { } } 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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } library Percent { // Solidity automatically throws when dividing by 0 struct percent { uint num; uint den; } function mul(percent storage p, uint a) internal view returns (uint) { } function div(percent storage p, uint a) internal view returns (uint) { } function sub(percent storage p, uint a) internal view returns (uint) { } function add(percent storage p, uint a) internal view returns (uint) { } } contract Accessibility { enum AccessRank { None, Payout, Paymode, Full } mapping(address => AccessRank) internal m_admins; modifier onlyAdmin(AccessRank r) { } event LogProvideAccess(address indexed whom, uint when, AccessRank rank); constructor() public { } function provideAccess(address addr, AccessRank rank) public onlyAdmin(AccessRank.Full) { } function access(address addr) public view returns(AccessRank rank) { } } contract PaymentSystem { // https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls enum Paymode { Push, Pull } struct PaySys { uint latestTime; uint latestKeyIndex; Paymode mode; } PaySys internal m_paysys; modifier atPaymode(Paymode mode) { } event LogPaymodeChanged(uint when, Paymode indexed mode); function paymode() public view returns(Paymode mode) { } function changePaymode(Paymode mode) internal { } } library Zero { function requireNotZero(uint a) internal pure { } function requireNotZero(address addr) internal pure { } function notZero(address addr) internal pure returns(bool) { } function isZero(address addr) internal pure returns(bool) { } } library ToAddress { function toAddr(uint source) internal pure returns(address) { } function toAddr(bytes source) internal pure returns(address addr) { } } contract Revolution is Accessibility, PaymentSystem { using Percent for Percent.percent; using SafeMath for uint; using Zero for *; using ToAddress for *; // investors storage - iterable map; InvestorsStorage private m_investors; mapping(address => bool) private m_referrals; bool private m_nextWave; // automatically generates getters address public adminAddr; address public payerAddr; uint public waveStartup; uint public investmentsNum; uint public constant minInvesment = 10 finney; // 0.01 eth uint public constant maxBalance = 333e5 ether; // 33,300,000 eth uint public constant pauseOnNextWave = 168 hours; // percents Percent.percent private m_dividendsPercent = Percent.percent(333, 10000); // 333/10000*100% = 3.33% Percent.percent private m_adminPercent = Percent.percent(1, 10); // 1/10*100% = 10% Percent.percent private m_payerPercent = Percent.percent(7, 100); // 7/100*100% = 7% Percent.percent private m_refPercent = Percent.percent(3, 100); // 3/100*100% = 3% // more events for easy read from blockchain event LogNewInvestor(address indexed addr, uint when, uint value); event LogNewInvesment(address indexed addr, uint when, uint value); event LogNewReferral(address indexed addr, uint when, uint value); event LogPayDividends(address indexed addr, uint when, uint value); event LogPayReferrerBonus(address indexed addr, uint when, uint value); event LogBalanceChanged(uint when, uint balance); event LogAdminAddrChanged(address indexed addr, uint when); event LogPayerAddrChanged(address indexed addr, uint when); event LogNextWave(uint when); modifier balanceChanged { } modifier notOnPause() { } constructor() public { } function() public payable { } function investorsNumber() public view returns(uint) { } function balanceETH() public view returns(uint) { } function payerPercent() public view returns(uint numerator, uint denominator) { } function dividendsPercent() public view returns(uint numerator, uint denominator) { } function adminPercent() public view returns(uint numerator, uint denominator) { } function referrerPercent() public view returns(uint numerator, uint denominator) { } function investorInfo(address addr) public view returns(uint value, uint paymentTime, uint refBonus, bool isReferral) { } function latestPayout() public view returns(uint timestamp) { } function getMyDividends() public notOnPause atPaymode(Paymode.Pull) balanceChanged { } function doInvest(address[3] refs) public payable notOnPause balanceChanged { } function payout() public notOnPause onlyAdmin(AccessRank.Payout) atPaymode(Paymode.Push) balanceChanged { if (m_nextWave) { nextWave(); return; } // if m_paysys.latestKeyIndex == m_investors.iterStart() then payout NOT in process and we must check latest time of payment. if (m_paysys.latestKeyIndex == m_investors.iterStart()) { require(now>m_paysys.latestTime+12 hours, "the latest payment was earlier than 12 hours"); m_paysys.latestTime = now; } uint i = m_paysys.latestKeyIndex; uint value; uint refBonus; uint size = m_investors.size(); address investorAddr; // gasleft and latest key index - prevent gas block limit for (i; i < size && gasleft() > 50000; i++) { investorAddr = m_investors.keyFromIndex(i); (value, refBonus) = m_investors.investorShortInfo(investorAddr); value = m_dividendsPercent.mul(value); if (address(this).balance < value + refBonus) { m_nextWave = true; break; } if (refBonus > 0) { require(<FILL_ME>) sendDividendsWithRefBonus(investorAddr, value, refBonus); continue; } sendDividends(investorAddr, value); } if (i == size) m_paysys.latestKeyIndex = m_investors.iterStart(); else m_paysys.latestKeyIndex = i; } function setAdminAddr(address addr) public onlyAdmin(AccessRank.Full) { } function setPayerAddr(address addr) public onlyAdmin(AccessRank.Full) { } function setPullPaymode() public onlyAdmin(AccessRank.Paymode) atPaymode(Paymode.Push) { } function getMemInvestor(address addr) internal view returns(InvestorsStorage.investor) { } function notZeroNotSender(address addr) internal view returns(bool) { } function sendDividends(address addr, uint value) private { } function sendDividendsWithRefBonus(address addr, uint value, uint refBonus) private { } function nextWave() private { } }
m_investors.setRefBonus(investorAddr,0),"internal error"
332,799
m_investors.setRefBonus(investorAddr,0)
"You do not have enough balls to play man ;)"
// SPDX-License-Identifier: MIT pragma solidity ^0.8; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "./StakeApe.sol"; import "./Team.sol"; import "./Rent.sol"; import "./IAgency.sol"; import "hardhat/console.sol"; interface ITokenBall { function mintReward(address recipient, uint256 amount) external; function burnMoney(address recipient, uint256 amount) external; } /** * Headquarter of the New Basketball Ape Young Crew Agency * Organize matches, stakes the Apes for available for rent, sends rewards, etc */ contract NbaycGame is ERC721 { bool closed = false; // uint256[] public arrStepPoints = [35, 55, 85, 105, 155]; mapping(uint64 => uint8[]) allTimeIdToMinSkills; uint256 minBudgetPerStep = 10000; // Structs : struct PlayerApe { uint64 tokenId; uint8 strength; uint8 stamina; uint8 precision; uint8 charisma; uint8 style; uint128 league; } uint256 constant baseTrainingRewardRatePerMinute = 100; mapping(address => bool) admins; address _agencyAddress; address _ballAddress; address _signer; mapping(address => Rent) rentings; mapping(uint256 => uint256) idToRentPricePerDay; mapping(uint64 => PlayerApe) idToPlayer; constructor( address adminAddr, address _agency, address _ball ) ERC721("NBAYCGame", "NBAYCG") { } // //// Utility functions // function putApesToAgency(uint256[] memory ids) external onlyOpenContract { } function getApesFromAgency(uint256[] memory ids) external onlyOpenContract { } function startTraining(uint256[] memory ids) external onlyOpenContract { } function stopTraining(uint256[] memory ids) external onlyOpenContract { } // // Renting functions : // function makeApeAvailableForRenting( uint256[] memory ids, uint256 pricePerDay ) public onlyOpenContract { } function rentApe(uint256[] memory ids, uint8 nbDays) public onlyOpenContract { } // // Match functions : // function uint2str(uint256 _i) internal pure returns (string memory _uintAsString) { } function verifyString( string memory message, uint8 v, bytes32 r, bytes32 s ) public pure returns (address signer) { } function matchLost( uint256 amount, uint8 v, bytes32 r, bytes32 s ) public { address signer = verifyString(uint2str(amount), v, r, s); console.log("Signer recovered : ", signer, _signer); require(signer == _signer, "ECDSA: invalid signature ... cheater"); require(<FILL_ME>) require( amount >= 50000, "Cannot pay less than 50000 balls for a match ... cheater" ); // Just pay my match ... I lost it ... bool sent = ERC20(_ballAddress).transferFrom( msg.sender, address(this), amount ); require(sent == true, "Transfer Ko, maybe should be approved ?"); } function matchWon( uint256 amount, uint64[] memory ids, uint64[] memory skills, uint8 v, bytes32 r, bytes32 s ) public { } // // Admin functions : // function setClosed(bool c) public onlyAdmin { } function getApePlayer(uint64 id) public view returns ( uint64, uint8, uint8, uint8, uint8, uint8, uint128 ) { } function getApe(uint256 id) public view returns ( uint256, address, bytes1, uint256 ) { } function getOwnerApes(address a) external view returns (uint256[] memory) { } modifier onlyAdmin() { } function setAdmin(address addr) public { } function unsetAdmin(address addr) public { } function rewardUser(address owner, uint256 amount) public onlyAdmin { } function setContracts(address _agency, address _ball) external onlyAdmin { } modifier onlyOpenContract() { } }
ERC20(_ballAddress).balanceOf(msg.sender)>=amount,"You do not have enough balls to play man ;)"
332,815
ERC20(_ballAddress).balanceOf(msg.sender)>=amount
"Cannot timelock additional tokens while tokens already locked"
//pragma solidity ^0.8.9; /** @title TimelockToken contract - implements an ERC20 governance token with built-in locking capabilities to implement a vesting schedule with a vesting cliff. Based on https://github.com/gnosis/disbursement-contracts/blob/master/contracts/Disbursement.sol + https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol **/ interface ILOCKABLETOKEN{ /** * @dev Returns the amount of tokens that are unlocked i.e. transferrable by `who` * */ function balanceUnlocked(address who) external view returns (uint256 amount); /** * @dev Returns the amount of tokens that are locked and not transferrable by `who` * */ function balanceLocked(address who) external view returns (uint256 amount); /** * @dev Emitted when the token lockup is initialized * `tokenHolder` is the address the lock pertains to * `amountLocked` is the amount of tokens locked * `vestTime` unix time when tokens will start vesting * `cliffTime` unix time before which locked tokens are not transferrable * `period` is the time interval over which tokens vest */ event NewTokenLock(address tokenHolder, uint256 amountLocked, uint256 vestTime, uint256 cliffTime, uint256 period); } contract GovernanceTokenPausable is ERC20, ILOCKABLETOKEN, Ownable, Pausable{ /* * Events */ /* * Storage */ //token locking state variables mapping(address => uint256) public disbursementPeriod; mapping(address => uint256) public vestTime; mapping(address => uint256) public cliffTime; mapping(address => uint256) public timelockedTokens; /* * Public functions */ constructor(string memory name_, string memory symbol_, uint256 amount_, address deployer_) ERC20(name_, symbol_){ } /* @dev function to lock tokens, only if there are no tokens currently locked @param timelockedTokens_ number of tokens to lock up @param `vestTime_` unix time when tokens will start vesting @param `cliffTime_` unix time before which locked tokens are not transferrable @param `disbursementPeriod_` is the time interval over which tokens vest */ function newTimeLock(uint256 timelockedTokens_, uint256 vestTime_, uint256 cliffTime_, uint256 disbursementPeriod_) external { require(timelockedTokens_ > 0, "Cannot timelock 0 tokens"); require(timelockedTokens_ <= balanceOf(msg.sender), "Cannot timelock more tokens than current balance"); require(<FILL_ME>) require(disbursementPeriod_ > 0, "Cannot have disbursement period of 0"); require(vestTime_ > block.timestamp, "vesting start must be in the future"); require(cliffTime_ >= vestTime_, "cliff must be at same time as vesting starts (or later)"); disbursementPeriod[msg.sender] = disbursementPeriod_; vestTime[msg.sender] = vestTime_; cliffTime[msg.sender] = cliffTime_; timelockedTokens[msg.sender] = timelockedTokens_; emit NewTokenLock(msg.sender, timelockedTokens_, vestTime_, cliffTime_, disbursementPeriod_); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when the contract is not paused * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override whenNotPaused { } /// @dev Calculates the maximum amount of transferrable tokens for address `who` /// @return Number of transferrable tokens function calcMaxTransferrable(address who) public view returns (uint256) { } /// @dev Calculates the amount of locked tokens for address `who` /// @return amount of locked tokens function balanceLocked(address who) public virtual override view returns (uint256 amount){ } /// @dev Calculates the maximum amount of transferrable tokens for address `who`. Alias for calcMaxTransferrable for backwards compatibility. /// @return amount of transferrable tokens function balanceUnlocked(address who) external view virtual override returns (uint256 amount){ } function pause() external onlyOwner { } function unPause() external onlyOwner { } }
balanceLocked(msg.sender)==0,"Cannot timelock additional tokens while tokens already locked"
332,829
balanceLocked(msg.sender)==0
"Free Mint Closed"
pragma solidity ^0.8.2; contract Example is Ownable, ERC721A { string private _baseTokenURI; uint256 public publicTime; uint256 public freeSupply = 868; uint256 public supply = 10000; uint256 public price = 0.030 ether; uint256 public maxFreeMint = 200; uint256 public maxPublicMint = 100; uint256 public maxMintPerAccount = 200; uint256 public minted = 0; mapping (address => uint256) public listAddress; constructor( uint256 _publicTime ) ERC721A("GassFee", "GassFee", supply) { } event Created(address indexed to, uint256 amount); // Base URI function _baseURI() internal view virtual override returns (string memory) { } // Setters function setBaseURI(string calldata baseURI) public onlyOwner { } function setMintTime(uint256 _publicTIme) public onlyOwner { } // Mint function mint(uint256 amount) payable public { require(publicTime > 0 && block.timestamp > publicTime, "Invalid mint time"); if (minted < freeSupply) { require(<FILL_ME>) require(listAddress[msg.sender] + amount <= maxFreeMint,"Limit"); } else { require(amount <= maxMintPerAccount,"Max 10 Amount"); require(minted + amount <= supply, "Sold Out"); require(listAddress[msg.sender] + amount <= maxMintPerAccount,"Limit"); require(msg.value >= price * amount, "Out of ETH"); } minted += amount; listAddress[msg.sender] += amount; _safeMint(msg.sender, amount); } function devMint( address to, uint256 numToMint ) payable public onlyOwner { } function withdraw() public onlyOwner { } function setOwnersExplicit(uint256 quantity) public onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } }
minted+amount<=freeSupply,"Free Mint Closed"
332,837
minted+amount<=freeSupply
"Limit"
pragma solidity ^0.8.2; contract Example is Ownable, ERC721A { string private _baseTokenURI; uint256 public publicTime; uint256 public freeSupply = 868; uint256 public supply = 10000; uint256 public price = 0.030 ether; uint256 public maxFreeMint = 200; uint256 public maxPublicMint = 100; uint256 public maxMintPerAccount = 200; uint256 public minted = 0; mapping (address => uint256) public listAddress; constructor( uint256 _publicTime ) ERC721A("GassFee", "GassFee", supply) { } event Created(address indexed to, uint256 amount); // Base URI function _baseURI() internal view virtual override returns (string memory) { } // Setters function setBaseURI(string calldata baseURI) public onlyOwner { } function setMintTime(uint256 _publicTIme) public onlyOwner { } // Mint function mint(uint256 amount) payable public { require(publicTime > 0 && block.timestamp > publicTime, "Invalid mint time"); if (minted < freeSupply) { require(minted + amount <= freeSupply, "Free Mint Closed"); require(<FILL_ME>) } else { require(amount <= maxMintPerAccount,"Max 10 Amount"); require(minted + amount <= supply, "Sold Out"); require(listAddress[msg.sender] + amount <= maxMintPerAccount,"Limit"); require(msg.value >= price * amount, "Out of ETH"); } minted += amount; listAddress[msg.sender] += amount; _safeMint(msg.sender, amount); } function devMint( address to, uint256 numToMint ) payable public onlyOwner { } function withdraw() public onlyOwner { } function setOwnersExplicit(uint256 quantity) public onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } }
listAddress[msg.sender]+amount<=maxFreeMint,"Limit"
332,837
listAddress[msg.sender]+amount<=maxFreeMint
"Sold Out"
pragma solidity ^0.8.2; contract Example is Ownable, ERC721A { string private _baseTokenURI; uint256 public publicTime; uint256 public freeSupply = 868; uint256 public supply = 10000; uint256 public price = 0.030 ether; uint256 public maxFreeMint = 200; uint256 public maxPublicMint = 100; uint256 public maxMintPerAccount = 200; uint256 public minted = 0; mapping (address => uint256) public listAddress; constructor( uint256 _publicTime ) ERC721A("GassFee", "GassFee", supply) { } event Created(address indexed to, uint256 amount); // Base URI function _baseURI() internal view virtual override returns (string memory) { } // Setters function setBaseURI(string calldata baseURI) public onlyOwner { } function setMintTime(uint256 _publicTIme) public onlyOwner { } // Mint function mint(uint256 amount) payable public { require(publicTime > 0 && block.timestamp > publicTime, "Invalid mint time"); if (minted < freeSupply) { require(minted + amount <= freeSupply, "Free Mint Closed"); require(listAddress[msg.sender] + amount <= maxFreeMint,"Limit"); } else { require(amount <= maxMintPerAccount,"Max 10 Amount"); require(<FILL_ME>) require(listAddress[msg.sender] + amount <= maxMintPerAccount,"Limit"); require(msg.value >= price * amount, "Out of ETH"); } minted += amount; listAddress[msg.sender] += amount; _safeMint(msg.sender, amount); } function devMint( address to, uint256 numToMint ) payable public onlyOwner { } function withdraw() public onlyOwner { } function setOwnersExplicit(uint256 quantity) public onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } }
minted+amount<=supply,"Sold Out"
332,837
minted+amount<=supply
"Limit"
pragma solidity ^0.8.2; contract Example is Ownable, ERC721A { string private _baseTokenURI; uint256 public publicTime; uint256 public freeSupply = 868; uint256 public supply = 10000; uint256 public price = 0.030 ether; uint256 public maxFreeMint = 200; uint256 public maxPublicMint = 100; uint256 public maxMintPerAccount = 200; uint256 public minted = 0; mapping (address => uint256) public listAddress; constructor( uint256 _publicTime ) ERC721A("GassFee", "GassFee", supply) { } event Created(address indexed to, uint256 amount); // Base URI function _baseURI() internal view virtual override returns (string memory) { } // Setters function setBaseURI(string calldata baseURI) public onlyOwner { } function setMintTime(uint256 _publicTIme) public onlyOwner { } // Mint function mint(uint256 amount) payable public { require(publicTime > 0 && block.timestamp > publicTime, "Invalid mint time"); if (minted < freeSupply) { require(minted + amount <= freeSupply, "Free Mint Closed"); require(listAddress[msg.sender] + amount <= maxFreeMint,"Limit"); } else { require(amount <= maxMintPerAccount,"Max 10 Amount"); require(minted + amount <= supply, "Sold Out"); require(<FILL_ME>) require(msg.value >= price * amount, "Out of ETH"); } minted += amount; listAddress[msg.sender] += amount; _safeMint(msg.sender, amount); } function devMint( address to, uint256 numToMint ) payable public onlyOwner { } function withdraw() public onlyOwner { } function setOwnersExplicit(uint256 quantity) public onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } }
listAddress[msg.sender]+amount<=maxMintPerAccount,"Limit"
332,837
listAddress[msg.sender]+amount<=maxMintPerAccount
null
pragma solidity ^0.8.2; contract Example is Ownable, ERC721A { string private _baseTokenURI; uint256 public publicTime; uint256 public freeSupply = 868; uint256 public supply = 10000; uint256 public price = 0.030 ether; uint256 public maxFreeMint = 200; uint256 public maxPublicMint = 100; uint256 public maxMintPerAccount = 200; uint256 public minted = 0; mapping (address => uint256) public listAddress; constructor( uint256 _publicTime ) ERC721A("GassFee", "GassFee", supply) { } event Created(address indexed to, uint256 amount); // Base URI function _baseURI() internal view virtual override returns (string memory) { } // Setters function setBaseURI(string calldata baseURI) public onlyOwner { } function setMintTime(uint256 _publicTIme) public onlyOwner { } // Mint function mint(uint256 amount) payable public { } function devMint( address to, uint256 numToMint ) payable public onlyOwner { require(<FILL_ME>) for (uint256 i = 0; i < numToMint / 5; i++) { _safeMint(to, 5); } } function withdraw() public onlyOwner { } function setOwnersExplicit(uint256 quantity) public onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } }
numToMint%5==0
332,837
numToMint%5==0
null
/* https://t.me/lilxinu */ //SPDX-License-Identifier: Unlicensed pragma solidity ^0.6.12; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { } 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 LilXInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private bots; mapping (address => uint) private cooldown; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1 *10**12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Lil X Inu"; string private constant _symbol = 'xINU'; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 10; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; 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 (address payable FeeAddress, address payable marketingWalletAddress) public { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public view override 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 tokenFromReflection(uint256 rAmount) private view returns(uint256) { } function removeAllFee() private { } function restoreAllFee() private { } 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 (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } if(from != address(this)){ require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); } if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { if(cooldownEnabled){ require(<FILL_ME>) } swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function manualswap() external { } function manualsend() external { } function openTrading() external onlyOwner() { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} 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 _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { } }
cooldown[from]<block.timestamp-(360seconds)
332,879
cooldown[from]<block.timestamp-(360seconds)
"Shut down"
pragma solidity 0.7.5; contract OlympusTokenMigrator is OlympusAccessControlled { using SafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IgOHM; using SafeERC20 for IsOHM; using SafeERC20 for IwsOHM; /* ========== MIGRATION ========== */ event TimelockStarted(uint256 block, uint256 end); event Migrated(address staking, address treasury); event Funded(uint256 amount); event Defunded(uint256 amount); /* ========== STATE VARIABLES ========== */ IERC20 public immutable oldOHM; IsOHM public immutable oldsOHM; IwsOHM public immutable oldwsOHM; ITreasuryV1 public immutable oldTreasury; IStakingV1 public immutable oldStaking; IUniswapV2Router public immutable sushiRouter; IUniswapV2Router public immutable uniRouter; IgOHM public gOHM; ITreasury public newTreasury; IStaking public newStaking; IERC20 public newOHM; bool public ohmMigrated; bool public shutdown; uint256 public immutable timelockLength; uint256 public timelockEnd; uint256 public oldSupply; constructor( address _oldOHM, address _oldsOHM, address _oldTreasury, address _oldStaking, address _oldwsOHM, address _sushi, address _uni, uint256 _timelock, address _authority ) OlympusAccessControlled(IOlympusAuthority(_authority)) { } /* ========== MIGRATION ========== */ enum TYPE { UNSTAKED, STAKED, WRAPPED } // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM function migrate( uint256 _amount, TYPE _from, TYPE _to ) external { require(<FILL_ME>) uint256 wAmount = oldwsOHM.sOHMTowOHM(_amount); if (_from == TYPE.UNSTAKED) { require(ohmMigrated, "Only staked until migration"); oldOHM.safeTransferFrom(msg.sender, address(this), _amount); } else if (_from == TYPE.STAKED) { oldsOHM.safeTransferFrom(msg.sender, address(this), _amount); } else { oldwsOHM.safeTransferFrom(msg.sender, address(this), _amount); wAmount = _amount; } if (ohmMigrated) { require(oldSupply >= oldOHM.totalSupply(), "OHMv1 minted"); _send(wAmount, _to); } else { gOHM.mint(msg.sender, wAmount); } } // migrate all olympus tokens held function migrateAll(TYPE _to) external { } // send preferred token function _send(uint256 wAmount, TYPE _to) internal { } // bridge back to OHM, sOHM, or wsOHM function bridgeBack(uint256 _amount, TYPE _to) external { } /* ========== OWNABLE ========== */ // halt migrations (but not bridging back) function halt() external onlyPolicy { } // withdraw backing of migrated OHM function defund(address reserve) external onlyGovernor { } // start timelock to send backing to new treasury function startTimelock() external onlyGovernor { } // set gOHM address function setgOHM(address _gOHM) external onlyGovernor { } // call internal migrate token function function migrateToken(address token) external onlyGovernor { } /** * @notice Migrate LP and pair with new OHM */ function migrateLP( address pair, bool sushi, address token, uint256 _minA, uint256 _minB ) external onlyGovernor { } // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract function withdrawToken( address tokenAddress, uint256 amount, address recipient ) external onlyGovernor { } // migrate contracts function migrateContracts( address _newTreasury, address _newStaking, address _newOHM, address _newsOHM, address _reserve ) external onlyGovernor { } /* ========== INTERNAL FUNCTIONS ========== */ // fund contract with gOHM function _fund(uint256 _amount) internal { } /** * @notice Migrate token from old treasury to new treasury */ function _migrateToken(address token, bool deposit) internal { } }
!shutdown,"Shut down"
332,926
!shutdown
"Migration has occurred"
pragma solidity 0.7.5; contract OlympusTokenMigrator is OlympusAccessControlled { using SafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IgOHM; using SafeERC20 for IsOHM; using SafeERC20 for IwsOHM; /* ========== MIGRATION ========== */ event TimelockStarted(uint256 block, uint256 end); event Migrated(address staking, address treasury); event Funded(uint256 amount); event Defunded(uint256 amount); /* ========== STATE VARIABLES ========== */ IERC20 public immutable oldOHM; IsOHM public immutable oldsOHM; IwsOHM public immutable oldwsOHM; ITreasuryV1 public immutable oldTreasury; IStakingV1 public immutable oldStaking; IUniswapV2Router public immutable sushiRouter; IUniswapV2Router public immutable uniRouter; IgOHM public gOHM; ITreasury public newTreasury; IStaking public newStaking; IERC20 public newOHM; bool public ohmMigrated; bool public shutdown; uint256 public immutable timelockLength; uint256 public timelockEnd; uint256 public oldSupply; constructor( address _oldOHM, address _oldsOHM, address _oldTreasury, address _oldStaking, address _oldwsOHM, address _sushi, address _uni, uint256 _timelock, address _authority ) OlympusAccessControlled(IOlympusAuthority(_authority)) { } /* ========== MIGRATION ========== */ enum TYPE { UNSTAKED, STAKED, WRAPPED } // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM function migrate( uint256 _amount, TYPE _from, TYPE _to ) external { } // migrate all olympus tokens held function migrateAll(TYPE _to) external { } // send preferred token function _send(uint256 wAmount, TYPE _to) internal { } // bridge back to OHM, sOHM, or wsOHM function bridgeBack(uint256 _amount, TYPE _to) external { } /* ========== OWNABLE ========== */ // halt migrations (but not bridging back) function halt() external onlyPolicy { require(<FILL_ME>) shutdown = !shutdown; } // withdraw backing of migrated OHM function defund(address reserve) external onlyGovernor { } // start timelock to send backing to new treasury function startTimelock() external onlyGovernor { } // set gOHM address function setgOHM(address _gOHM) external onlyGovernor { } // call internal migrate token function function migrateToken(address token) external onlyGovernor { } /** * @notice Migrate LP and pair with new OHM */ function migrateLP( address pair, bool sushi, address token, uint256 _minA, uint256 _minB ) external onlyGovernor { } // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract function withdrawToken( address tokenAddress, uint256 amount, address recipient ) external onlyGovernor { } // migrate contracts function migrateContracts( address _newTreasury, address _newStaking, address _newOHM, address _newsOHM, address _reserve ) external onlyGovernor { } /* ========== INTERNAL FUNCTIONS ========== */ // fund contract with gOHM function _fund(uint256 _amount) internal { } /** * @notice Migrate token from old treasury to new treasury */ function _migrateToken(address token, bool deposit) internal { } }
!ohmMigrated,"Migration has occurred"
332,926
!ohmMigrated
"Already set"
pragma solidity 0.7.5; contract OlympusTokenMigrator is OlympusAccessControlled { using SafeMath for uint256; using SafeERC20 for IERC20; using SafeERC20 for IgOHM; using SafeERC20 for IsOHM; using SafeERC20 for IwsOHM; /* ========== MIGRATION ========== */ event TimelockStarted(uint256 block, uint256 end); event Migrated(address staking, address treasury); event Funded(uint256 amount); event Defunded(uint256 amount); /* ========== STATE VARIABLES ========== */ IERC20 public immutable oldOHM; IsOHM public immutable oldsOHM; IwsOHM public immutable oldwsOHM; ITreasuryV1 public immutable oldTreasury; IStakingV1 public immutable oldStaking; IUniswapV2Router public immutable sushiRouter; IUniswapV2Router public immutable uniRouter; IgOHM public gOHM; ITreasury public newTreasury; IStaking public newStaking; IERC20 public newOHM; bool public ohmMigrated; bool public shutdown; uint256 public immutable timelockLength; uint256 public timelockEnd; uint256 public oldSupply; constructor( address _oldOHM, address _oldsOHM, address _oldTreasury, address _oldStaking, address _oldwsOHM, address _sushi, address _uni, uint256 _timelock, address _authority ) OlympusAccessControlled(IOlympusAuthority(_authority)) { } /* ========== MIGRATION ========== */ enum TYPE { UNSTAKED, STAKED, WRAPPED } // migrate OHMv1, sOHMv1, or wsOHM for OHMv2, sOHMv2, or gOHM function migrate( uint256 _amount, TYPE _from, TYPE _to ) external { } // migrate all olympus tokens held function migrateAll(TYPE _to) external { } // send preferred token function _send(uint256 wAmount, TYPE _to) internal { } // bridge back to OHM, sOHM, or wsOHM function bridgeBack(uint256 _amount, TYPE _to) external { } /* ========== OWNABLE ========== */ // halt migrations (but not bridging back) function halt() external onlyPolicy { } // withdraw backing of migrated OHM function defund(address reserve) external onlyGovernor { } // start timelock to send backing to new treasury function startTimelock() external onlyGovernor { } // set gOHM address function setgOHM(address _gOHM) external onlyGovernor { require(<FILL_ME>) require(_gOHM != address(0), "Zero address: gOHM"); gOHM = IgOHM(_gOHM); } // call internal migrate token function function migrateToken(address token) external onlyGovernor { } /** * @notice Migrate LP and pair with new OHM */ function migrateLP( address pair, bool sushi, address token, uint256 _minA, uint256 _minB ) external onlyGovernor { } // Failsafe function to allow owner to withdraw funds sent directly to contract in case someone sends non-ohm tokens to the contract function withdrawToken( address tokenAddress, uint256 amount, address recipient ) external onlyGovernor { } // migrate contracts function migrateContracts( address _newTreasury, address _newStaking, address _newOHM, address _newsOHM, address _reserve ) external onlyGovernor { } /* ========== INTERNAL FUNCTIONS ========== */ // fund contract with gOHM function _fund(uint256 _amount) internal { } /** * @notice Migrate token from old treasury to new treasury */ function _migrateToken(address token, bool deposit) internal { } }
address(gOHM)==address(0),"Already set"
332,926
address(gOHM)==address(0)
"Action blocked as the strategy is in emergency state"
pragma solidity 0.5.16; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "../../base/StrategyBaseClaimable.sol"; import "../../base/interface/uniswap/IUniswapV2Router02.sol"; import "../../base/interface/IVault.sol"; import "../../base/interface/uniswap/IUniswapV2Pair.sol"; import "./interfaces/ISharePool.sol"; import "./interfaces/IBoardRoom.sol"; import "hardhat/console.sol"; /* * This is a general strategy for yields that are based on the synthetix reward contract * for example, yam, spaghetti, ham, shrimp. * * One strategy is deployed for one underlying asset, but the design of the contract * should allow it to switch between different reward contracts. * * It is important to note that not all SNX reward contracts that are accessible via the same interface are * suitable for this Strategy. One concrete example is CREAM.finance, as it implements a "Lock" feature and * would not allow the user to withdraw within some timeframe after the user have deposited. * This would be problematic to user as our "invest" function in the vault could be invoked by anyone anytime * and thus locking/reverting on subsequent withdrawals. Another variation is the YFI Governance: it can * activate a vote lock to stop withdrawal. * * Ref: * 1. CREAM https://etherscan.io/address/0xc29e89845fa794aa0a0b8823de23b760c3d766f5#code * 2. YAM https://etherscan.io/address/0x8538E5910c6F80419CD3170c26073Ff238048c9E#code * 3. SHRIMP https://etherscan.io/address/0x9f83883FD3cadB7d2A83a1De51F9Bf483438122e#code * 4. BASED https://etherscan.io/address/0x5BB622ba7b2F09BF23F1a9b509cd210A818c53d7#code * 5. YFII https://etherscan.io/address/0xb81D3cB2708530ea990a287142b82D058725C092#code * 6. YFIGovernance https://etherscan.io/address/0xBa37B002AbaFDd8E89a1995dA52740bbC013D992#code * * * * Respecting the current system design of choosing the best strategy under the vault, and also rewarding/funding * the public key that invokes the switch of strategies, this smart contract should be deployed twice and linked * to the same vault. When the governance want to rotate the crop, they would set the reward source on the strategy * that is not active, then set that apy higher and this one lower. * * Consequently, in the smart contract we restrict that we can only set a new reward source when it is not active. * */ contract LiftStrategy is StrategyBaseClaimable { using SafeMath for uint256; using SafeERC20 for IERC20; address public uniLPComponentToken0; address public uniLPComponentToken1; address public ctrl; bool public pausedInvesting = false; // When this flag is true, the strategy will not be able to invest. But users should be able to withdraw. ISharePool public rewardPool; IBoardRoom public boardRoom; uint256[2][] public stakes; uint256 public maxStakes; event ProfitsNotCollected(); // This is only used in `investAllUnderlying()` // The user can still freely withdraw from the strategy modifier onlyNotPausedInvesting() { require(<FILL_ME>) _; } constructor( address _storage, address _underlying, address _vault, address _rewardPool, address _rewardToken, address _uniswapRouterV2, uint256 _maxStakes ) StrategyBaseClaimable(_storage, _underlying, _vault, _rewardToken, _rewardToken, _uniswapRouterV2) public { } function depositArbCheck() public view returns(bool) { } /* * In case there are some issues discovered about the pool or underlying asset * Governance can exit the pool properly * The function is only used for emergency to exit the pool */ function emergencyExit() public onlyGovernance { } /* * Resumes the ability to invest into the underlying reward pools */ function continueInvesting() public onlyGovernance { } /* * Stakes everything the strategy holds into the reward pool */ function investAllUnderlying() internal onlyNotPausedInvesting { } /* * Withdraws all the asset to the vault */ function withdrawAllToVault() public restricted { } /* * Withdraws all the asset to the vault */ function withdrawToVault(uint256 amount) public restricted { } /* * Note that we currently do not have a mechanism here to include the * amount of reward that is accrued. */ function investedUnderlyingBalance() external view returns (uint256) { } /* * Governance or Controller can claim coins that are somehow transferred into the contract * Note that they cannot come in take away coins that are used and defined in the strategy itself * Those are protected by the "unsalvagableTokens". To check, see where those are being flagged. */ function salvage(address recipient, address token, uint256 amount) external onlyControllerOrGovernance { } /* * Get the reward, sell it in exchange for underlying, invest what you got. * It's not much, but it's honest work. * * Note that although `onlyNotPausedInvesting` is not added here, * calling `investAllUnderlying()` affectively blocks the usage of `doHardWork` * when the investing is being paused by governance. */ function doHardWork() external onlyNotPausedInvesting restricted { } function _getReward() internal { } function withdrawRewardShareOldest() external onlyMultiSigOrGovernance { } function withdrawRewardShareNewest() external onlyMultiSigOrGovernance { } function withdrawRewardShareAll() external onlyMultiSigOrGovernance { } function withdrawRewardControl() external onlyMultiSigOrGovernance { } function pendingControl() external view returns(uint256){ } function stakedLift() external view returns(uint256){ } function setMaxStakes(uint256 _maxStakes) external onlyGovernance { } function stakesLength() external view returns(uint256) { } }
!pausedInvesting,"Action blocked as the strategy is in emergency state"
332,932
!pausedInvesting
"token is defined as not salvagable"
pragma solidity 0.5.16; import "@openzeppelin/contracts/math/Math.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Detailed.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "../../base/StrategyBaseClaimable.sol"; import "../../base/interface/uniswap/IUniswapV2Router02.sol"; import "../../base/interface/IVault.sol"; import "../../base/interface/uniswap/IUniswapV2Pair.sol"; import "./interfaces/ISharePool.sol"; import "./interfaces/IBoardRoom.sol"; import "hardhat/console.sol"; /* * This is a general strategy for yields that are based on the synthetix reward contract * for example, yam, spaghetti, ham, shrimp. * * One strategy is deployed for one underlying asset, but the design of the contract * should allow it to switch between different reward contracts. * * It is important to note that not all SNX reward contracts that are accessible via the same interface are * suitable for this Strategy. One concrete example is CREAM.finance, as it implements a "Lock" feature and * would not allow the user to withdraw within some timeframe after the user have deposited. * This would be problematic to user as our "invest" function in the vault could be invoked by anyone anytime * and thus locking/reverting on subsequent withdrawals. Another variation is the YFI Governance: it can * activate a vote lock to stop withdrawal. * * Ref: * 1. CREAM https://etherscan.io/address/0xc29e89845fa794aa0a0b8823de23b760c3d766f5#code * 2. YAM https://etherscan.io/address/0x8538E5910c6F80419CD3170c26073Ff238048c9E#code * 3. SHRIMP https://etherscan.io/address/0x9f83883FD3cadB7d2A83a1De51F9Bf483438122e#code * 4. BASED https://etherscan.io/address/0x5BB622ba7b2F09BF23F1a9b509cd210A818c53d7#code * 5. YFII https://etherscan.io/address/0xb81D3cB2708530ea990a287142b82D058725C092#code * 6. YFIGovernance https://etherscan.io/address/0xBa37B002AbaFDd8E89a1995dA52740bbC013D992#code * * * * Respecting the current system design of choosing the best strategy under the vault, and also rewarding/funding * the public key that invokes the switch of strategies, this smart contract should be deployed twice and linked * to the same vault. When the governance want to rotate the crop, they would set the reward source on the strategy * that is not active, then set that apy higher and this one lower. * * Consequently, in the smart contract we restrict that we can only set a new reward source when it is not active. * */ contract LiftStrategy is StrategyBaseClaimable { using SafeMath for uint256; using SafeERC20 for IERC20; address public uniLPComponentToken0; address public uniLPComponentToken1; address public ctrl; bool public pausedInvesting = false; // When this flag is true, the strategy will not be able to invest. But users should be able to withdraw. ISharePool public rewardPool; IBoardRoom public boardRoom; uint256[2][] public stakes; uint256 public maxStakes; event ProfitsNotCollected(); // This is only used in `investAllUnderlying()` // The user can still freely withdraw from the strategy modifier onlyNotPausedInvesting() { } constructor( address _storage, address _underlying, address _vault, address _rewardPool, address _rewardToken, address _uniswapRouterV2, uint256 _maxStakes ) StrategyBaseClaimable(_storage, _underlying, _vault, _rewardToken, _rewardToken, _uniswapRouterV2) public { } function depositArbCheck() public view returns(bool) { } /* * In case there are some issues discovered about the pool or underlying asset * Governance can exit the pool properly * The function is only used for emergency to exit the pool */ function emergencyExit() public onlyGovernance { } /* * Resumes the ability to invest into the underlying reward pools */ function continueInvesting() public onlyGovernance { } /* * Stakes everything the strategy holds into the reward pool */ function investAllUnderlying() internal onlyNotPausedInvesting { } /* * Withdraws all the asset to the vault */ function withdrawAllToVault() public restricted { } /* * Withdraws all the asset to the vault */ function withdrawToVault(uint256 amount) public restricted { } /* * Note that we currently do not have a mechanism here to include the * amount of reward that is accrued. */ function investedUnderlyingBalance() external view returns (uint256) { } /* * Governance or Controller can claim coins that are somehow transferred into the contract * Note that they cannot come in take away coins that are used and defined in the strategy itself * Those are protected by the "unsalvagableTokens". To check, see where those are being flagged. */ function salvage(address recipient, address token, uint256 amount) external onlyControllerOrGovernance { // To make sure that governance cannot come in and take away the coins require(<FILL_ME>) IERC20(token).safeTransfer(recipient, amount); } /* * Get the reward, sell it in exchange for underlying, invest what you got. * It's not much, but it's honest work. * * Note that although `onlyNotPausedInvesting` is not added here, * calling `investAllUnderlying()` affectively blocks the usage of `doHardWork` * when the investing is being paused by governance. */ function doHardWork() external onlyNotPausedInvesting restricted { } function _getReward() internal { } function withdrawRewardShareOldest() external onlyMultiSigOrGovernance { } function withdrawRewardShareNewest() external onlyMultiSigOrGovernance { } function withdrawRewardShareAll() external onlyMultiSigOrGovernance { } function withdrawRewardControl() external onlyMultiSigOrGovernance { } function pendingControl() external view returns(uint256){ } function stakedLift() external view returns(uint256){ } function setMaxStakes(uint256 _maxStakes) external onlyGovernance { } function stakesLength() external view returns(uint256) { } }
!unsalvagableTokens[token],"token is defined as not salvagable"
332,932
!unsalvagableTokens[token]
null
pragma solidity 0.4.26; contract SafeMath { function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { } function _assert(bool assertion) internal pure { } } contract MultiPlanetValue is SafeMath { string public name = "MultiPlanet Value"; string public symbol = "MPV"; uint8 constant public decimals = 8; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) public _allowed; uint256 public totalSupply = 1000 * 100000000 * 100000000; constructor () public{ } function balanceOf(address addr) public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { if (_to == address(0)) { return burn(_value); } else { require(<FILL_ME>) require(_balances[_to] + _value >= _balances[_to]); _balances[msg.sender] = safeSub(_balances[msg.sender], _value); _balances[_to] = safeAdd(_balances[_to], _value); emit Transfer(msg.sender, _to, _value); return true; } } function burn(uint256 _value) public returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address spender, uint256 value) public returns (bool) { } function allowance(address _master, address _spender) public view returns (uint256) { } event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 value); event Burn(address indexed _from, uint256 value); }
_balances[msg.sender]>=_value&&_value>=0
332,960
_balances[msg.sender]>=_value&&_value>=0
null
pragma solidity 0.4.26; contract SafeMath { function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { } function _assert(bool assertion) internal pure { } } contract MultiPlanetValue is SafeMath { string public name = "MultiPlanet Value"; string public symbol = "MPV"; uint8 constant public decimals = 8; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) public _allowed; uint256 public totalSupply = 1000 * 100000000 * 100000000; constructor () public{ } function balanceOf(address addr) public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(<FILL_ME>) require(_balances[_to] + _value >= _balances[_to]); require(_allowed[_from][msg.sender] >= _value); _balances[_to] = safeAdd(_balances[_to], _value); _balances[_from] = safeSub(_balances[_from], _value); _allowed[_from][msg.sender] = safeSub(_allowed[_from][msg.sender], _value); emit Transfer(_from, _to, _value); return true; } function approve(address spender, uint256 value) public returns (bool) { } function allowance(address _master, address _spender) public view returns (uint256) { } event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 value); event Burn(address indexed _from, uint256 value); }
_balances[_from]>=_value&&_value>=0
332,960
_balances[_from]>=_value&&_value>=0
null
pragma solidity ^0.4.18; // solhint-disable-line contract CatFarmer{ uint256 public EGGS_TO_HATCH_1Cat=86400;//for final version should be seconds in a day uint256 public STARTING_CAT=300; uint256 PSN=10000; uint256 PSNH=5000; bool public initialized=false; address public ceoAddress; mapping (address => uint256) public hatcheryCat; mapping (address => uint256) public claimedEggs; mapping (address => uint256) public lastHatch; mapping (address => address) public referrals; uint256 public marketEggs; function CatFarmer() public{ } function hatchEggs(address ref) public{ } function sellEggs() public{ } function buyEggs() public payable{ } function calculateTrade(uint256 rt,uint256 rs, uint256 bs) public view returns(uint256){ } function calculateEggSell(uint256 eggs) public view returns(uint256){ } function calculateEggBuy(uint256 eth,uint256 contractBalance) public view returns(uint256){ } function calculateEggBuySimple(uint256 eth) public view returns(uint256){ } function devFee(uint256 amount) public view returns(uint256){ } function seedMarket(uint256 eggs) public payable{ } function getFreeCat() public{ require(initialized); require(<FILL_ME>) lastHatch[msg.sender]=now; hatcheryCat[msg.sender]=STARTING_CAT; } function getBalance() public view returns(uint256){ } function getMyCat() public view returns(uint256){ } function getMyEggs() public view returns(uint256){ } function getEggsSinceLastHatch(address adr) public view returns(uint256){ } function min(uint256 a, uint256 b) private pure returns (uint256) { } } library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts 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) { } }
hatcheryCat[msg.sender]==0
333,106
hatcheryCat[msg.sender]==0
null
pragma solidity ^0.4.16; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract BITStationERC20 { // Public variables of the token address public owner; string public name; string public symbol; uint8 public decimals = 7; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; bool public isLocked; //uint private lockTime; //uint public lockDays; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; mapping (address => bool) public whiteList; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function BITStationERC20() public { } modifier onlyOwner() { } function transferOwnership(address newOwner) onlyOwner public{ } /* modifier disableLock() { if (now >= lockTime+ lockDays *1 days ) { if(isLocked) isLocked=!isLocked; } _; } */ /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(<FILL_ME>) require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to]); // Save this for an assertion in the future uint previousBalances = balanceOf[_from] + balanceOf[_to]; // Subtract from the sender balanceOf[_from] -= _value; // Add the same to the recipient balanceOf[_to] += _value; Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { } function addWhiteList(address _value) public onlyOwner { } function delFromWhiteList(address _value) public onlyOwner { } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } function changeAssetsState(bool _value) public returns (bool success){ } }
!isLocked||whiteList[msg.sender]
333,162
!isLocked||whiteList[msg.sender]
"Mint exceeds max reserved nfts"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; contract Coyote is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant MAX_NFTS = 10000; uint256 public constant PRICE_PRE_SALE = 0.1 ether; uint256 public constant PRICE_PUBLIC_SALE = 0.2 ether; uint256 public constant PRICE_FLOOR = 0.1 ether; uint256 public constant PRICE_TICK = 0.02 ether; uint256 public constant SECONDS_BETWEEN_TICK = 3600; // 1 hour uint256 public constant MAX_PER_MINT = 7; uint256 public constant PRESALE_MAX_MINT = 3; uint256 public constant MAX_NFTS_MINT = 70; uint256 public constant RESERVED_NFTS = 250; address public constant daoAddress = 0xa78AdA29f1c8cBECdb3FAf5f00CEa5b661ab7013; address public constant teamAddress = 0x2ED93945571344675038fBF92C06094E608bB2FC; address public constant founderAddress = 0x46391ED2FC671FF3D76cB3475C742f8691a3c9Cf; address public constant projectAddress = 0xb9f2eB35ed71fA2ee90Fa6b08AB16c2828b4D58D; uint256 private pricePublicSale = PRICE_PUBLIC_SALE; bool private customPrice; uint256 public publicSaleStartDate; uint256 public reservedClaimed; uint256 public numNftsMinted; string public baseTokenURI; bool public publicSaleStarted; bool public presaleStarted; mapping(address => bool) private _presaleEligible; mapping(address => uint256) private _totalClaimed; event BaseURIChanged(string baseURI); event PresaleMint(address minter, uint256 amountOfNfts); event PublicSaleMint(address minter, uint256 amountOfNfts); modifier whenPresaleStarted() { } modifier whenPublicSaleStarted() { } constructor(string memory baseURI) ERC721("Billionaire Coyote Cartel", "BCC") { } function claimReserved(address recipient, uint256 amount) external onlyOwner { require(reservedClaimed != RESERVED_NFTS, "You have already claimed all reserved nfts"); require(<FILL_ME>) require(recipient != address(0), "Cannot add null address"); require(totalSupply() < MAX_NFTS, "All NFTs have been minted"); require(totalSupply() + amount <= MAX_NFTS, "Mint exceeds max supply"); uint256 _nextTokenId = numNftsMinted + 1; for (uint256 i = 0; i < amount; i++) { _safeMint(recipient, _nextTokenId + i); } numNftsMinted += amount; reservedClaimed += amount; } function addToPresale(address[] calldata addresses) external onlyOwner { } function getPublicSalePrice() public view returns(uint256) { } function checkPresaleEligiblity(address addr) external view returns (bool) { } function amountClaimedBy(address owner) external view returns (uint256) { } function mintPresale(uint256 amountOfNfts) external payable whenPresaleStarted { } function updatePrice() private { } function mint(uint256 amountOfNfts) external payable whenPublicSaleStarted { } function togglePresaleStarted() external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function togglePublicSaleStarted() external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function withdrawAll() public onlyOwner { } function _widthdraw(address _address, uint256 _amount) private { } }
reservedClaimed+amount<=RESERVED_NFTS,"Mint exceeds max reserved nfts"
333,165
reservedClaimed+amount<=RESERVED_NFTS