comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; /** * @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 is Context { /** * @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); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { } /** * @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() { } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { } } pragma solidity ^0.8.2; library LibPart { bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)"); struct Part { address payable account; uint96 value; } function hash(Part memory part) internal pure returns (bytes32) { } } interface RoyaltiesV2 { event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties); function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory); } interface RoyaltiesInfo { function getRoyaltyAmount(uint256 _tokenId) external view returns (uint256 royaltyAmount); function getRoyaltyRecipientAddress(uint256 _tokenId) external view returns (address receiver) ; function getCollectionRoyaltyFee() external view returns (uint256 royaltyAmount); function getRoyalityRecipientAddressInfo(uint256 _tokenId) external view returns (address[] memory receipient) ; function getRoyalityPercentageInfo(uint256 _tokenId) external view returns (uint96[] memory royaltyPercentage ); } interface ListingFeeInfo { function getCollectionListingFee() external view returns (uint256 listingFee); function getFeeCollector() external view returns (address feeCollector); } abstract contract AbstractRoyalties { mapping (uint256 => LibPart.Part[]) internal royalties; function _saveRoyalties(uint256 id, LibPart.Part[] memory _royalties) internal { } function _updateAccount(uint256 _id, address _from, address _to) internal { } function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal; } contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 { function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) { } function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal { } } library LibRoyaltiesV2 { /* * bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca */ bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca; } contract CryptoArtIsland is ERC721,Ownable,ERC721URIStorage,ERC721Enumerable,ERC721Burnable,Pausable, RoyaltiesV2Impl,RoyaltiesInfo, ListingFeeInfo { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; address public contractAddress ; uint256 public listingFee; address feeCollector; uint96 public royaltyFee; struct RoyaltyReceipientInfo { uint256 tokenId; address[] receipient; uint96[] percentageBasisPoints; } mapping(uint256 => RoyaltyReceipientInfo) private royaltyReceipientInfo; mapping(address => bool) public minter; function pause() public onlyOwner { } function unpause() public onlyOwner { } modifier onlyMinter() { require(<FILL_ME>) _; } bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; constructor() ERC721("CryptoArtIsland", "CAI") { } function addMinterAddress (address _minter , bool status) public onlyOwner virtual{ } function isMinter(address _minter) public view returns (bool) { } function setRoyaltyReceipientInfo(uint256 tokenId, address[] memory Recipients, uint96[] memory royaltyPercentage) public onlyMinter{ } function getRoyalityRecipientAddressInfo(uint256 _tokenId) public override view returns(address[] memory receipient ){ } function getRoyalityPercentageInfo(uint256 _tokenId) public override view returns(uint96[] memory royaltyPercentage ){ } function safeMint(address to, string memory uri,address[] memory _addresses, uint96[] memory royaltyPercentage,uint96 royalty) public whenNotPaused onlyMinter { } function setMarketPlaceAddress(address _newContractAddress)public virtual onlyOwner whenNotPaused { } function setRoyalties(uint _tokenId, address payable _royaltiesReceipientAddress, uint96 _percentageBasisPoints) public whenNotPaused onlyMinter { } function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function getRoyaltyAmount(uint256 _tokenId) external override view returns (uint256 royaltyAmount) { } function getCollectionRoyaltyFee() external override view returns (uint256 royaltyAmount) { } function setCollectionRoyaltyFee(uint96 _royaltyFee) external whenNotPaused onlyOwner { } function setCollectionListingFee(uint256 _listingFee,address _feeCollector) external whenNotPaused onlyOwner { } function getFeeCollector() external override view returns (address fee){ } function getCollectionListingFee() external override view returns (uint256 fee){ } function getRoyaltyRecipientAddress(uint256 _tokenId) external override view returns (address receiver) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } function isApprovedForAll(address _owner, address _operator) public view virtual override returns (bool) { } }
minter[_msgSender()]==true
173,475
minter[_msgSender()]==true
"Recipient should be present"
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; /** * @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 is Context { /** * @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); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { } /** * @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() { } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { } } pragma solidity ^0.8.2; library LibPart { bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)"); struct Part { address payable account; uint96 value; } function hash(Part memory part) internal pure returns (bytes32) { } } interface RoyaltiesV2 { event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties); function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory); } interface RoyaltiesInfo { function getRoyaltyAmount(uint256 _tokenId) external view returns (uint256 royaltyAmount); function getRoyaltyRecipientAddress(uint256 _tokenId) external view returns (address receiver) ; function getCollectionRoyaltyFee() external view returns (uint256 royaltyAmount); function getRoyalityRecipientAddressInfo(uint256 _tokenId) external view returns (address[] memory receipient) ; function getRoyalityPercentageInfo(uint256 _tokenId) external view returns (uint96[] memory royaltyPercentage ); } interface ListingFeeInfo { function getCollectionListingFee() external view returns (uint256 listingFee); function getFeeCollector() external view returns (address feeCollector); } abstract contract AbstractRoyalties { mapping (uint256 => LibPart.Part[]) internal royalties; function _saveRoyalties(uint256 id, LibPart.Part[] memory _royalties) internal { } function _updateAccount(uint256 _id, address _from, address _to) internal { } function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal; } contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2 { function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) { } function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal { } } library LibRoyaltiesV2 { /* * bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca */ bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca; } contract CryptoArtIsland is ERC721,Ownable,ERC721URIStorage,ERC721Enumerable,ERC721Burnable,Pausable, RoyaltiesV2Impl,RoyaltiesInfo, ListingFeeInfo { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; address public contractAddress ; uint256 public listingFee; address feeCollector; uint96 public royaltyFee; struct RoyaltyReceipientInfo { uint256 tokenId; address[] receipient; uint96[] percentageBasisPoints; } mapping(uint256 => RoyaltyReceipientInfo) private royaltyReceipientInfo; mapping(address => bool) public minter; function pause() public onlyOwner { } function unpause() public onlyOwner { } modifier onlyMinter() { } bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; constructor() ERC721("CryptoArtIsland", "CAI") { } function addMinterAddress (address _minter , bool status) public onlyOwner virtual{ } function isMinter(address _minter) public view returns (bool) { } function setRoyaltyReceipientInfo(uint256 tokenId, address[] memory Recipients, uint96[] memory royaltyPercentage) public onlyMinter{ require(_exists(tokenId), "ERC721: operator query for nonexistent token"); for (uint j = 0; j < Recipients.length; j++) { require(<FILL_ME>) } royaltyReceipientInfo[tokenId] = RoyaltyReceipientInfo( tokenId, Recipients, royaltyPercentage ); } function getRoyalityRecipientAddressInfo(uint256 _tokenId) public override view returns(address[] memory receipient ){ } function getRoyalityPercentageInfo(uint256 _tokenId) public override view returns(uint96[] memory royaltyPercentage ){ } function safeMint(address to, string memory uri,address[] memory _addresses, uint96[] memory royaltyPercentage,uint96 royalty) public whenNotPaused onlyMinter { } function setMarketPlaceAddress(address _newContractAddress)public virtual onlyOwner whenNotPaused { } function setRoyalties(uint _tokenId, address payable _royaltiesReceipientAddress, uint96 _percentageBasisPoints) public whenNotPaused onlyMinter { } function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function getRoyaltyAmount(uint256 _tokenId) external override view returns (uint256 royaltyAmount) { } function getCollectionRoyaltyFee() external override view returns (uint256 royaltyAmount) { } function setCollectionRoyaltyFee(uint96 _royaltyFee) external whenNotPaused onlyOwner { } function setCollectionListingFee(uint256 _listingFee,address _feeCollector) external whenNotPaused onlyOwner { } function getFeeCollector() external override view returns (address fee){ } function getCollectionListingFee() external override view returns (uint256 fee){ } function getRoyaltyRecipientAddress(uint256 _tokenId) external override view returns (address receiver) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override(ERC721, ERC721Enumerable) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } function isApprovedForAll(address _owner, address _operator) public view virtual override returns (bool) { } }
Recipients[j]!=address(0x0),"Recipient should be present"
173,475
Recipients[j]!=address(0x0)
"over mint"
pragma solidity ^0.8.0; contract XinqiYangNFT is ERC721SerialMint, Signature, ReentrancyGuard{ using SafeERC20 for IERC20; event mintNFTsByToken(address indexed buyer, uint256 askPrice, address indexed token, uint256 times, uint256 totalAmount); struct BusinessPlan { address sellToken; uint256 pricePerSolt; } uint256 public totalCount; address public immutable WETH; uint256 public startTimestamp; // for public sale bool public paused = false; // act as a mint pauser BusinessPlan[] public plans; uint256 public discount; // 80 for 80% uint256 public preSaleStartTimestamp; // for whitelist uint256 public preSaleLimit; // 0 for no limit uint256 public preSaleCount; bool public isFreeMint; constructor( string memory name_, string memory symbol_, string memory baseURI_, uint256 totalCount_, address weth_, uint256 startTimestamp_, uint256 maxBatchMint_ ) ERC721SerialMint(name_, symbol_, maxBatchMint_) { } function puase(bool _isPaused) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function getPlans() public view returns (BusinessPlan[] memory) { } //init & edit pre-sale conditions function makePreSalePlan(uint256 _preSaleStartTimestamp, uint256 _discount, uint256 _preSaleLimit) public onlyOwner { } function changeStartTimestamp(uint256 _startTimestamp) public onlyOwner { } function addPlan(address _sellToken, uint256 _pricePerSlot) external onlyOwner { } function editPlan(uint256 _index, address _sellToken, uint256 _pricePerSlot) external onlyOwner { } function editPlans(uint256[] memory _indexes, BusinessPlan[] memory _plans) external onlyOwner { } function setFreeMint(bool _isFreeMint) public onlyOwner { } function setTotalCount(uint256 totalCount_) external onlyOwner() { } function batchMintTo(address _to, uint256 _times) public onlyOwner { require(<FILL_ME>) _batchMintR(_to, _times); } function mintNFTByToken(uint256 _planIndex, uint256, uint256 _times) payable public nonReentrant { } function _mintNFTByToken(uint256 _planIndex, uint256 _times, bool _applyDiscount) internal{ } modifier whitelistVerify(bytes memory _signature) { } function mintByWhitelist(uint256 _planIndex, uint256 _times, bytes memory _signature) payable public whitelistVerify(_signature) nonReentrant{ } function burn(uint256 _tokenId) public { } function batchBurn(uint256[] memory _tokenIds) public { } }
totalSupply+_times<=totalCount,"over mint"
173,646
totalSupply+_times<=totalCount
"value error"
pragma solidity ^0.8.0; contract XinqiYangNFT is ERC721SerialMint, Signature, ReentrancyGuard{ using SafeERC20 for IERC20; event mintNFTsByToken(address indexed buyer, uint256 askPrice, address indexed token, uint256 times, uint256 totalAmount); struct BusinessPlan { address sellToken; uint256 pricePerSolt; } uint256 public totalCount; address public immutable WETH; uint256 public startTimestamp; // for public sale bool public paused = false; // act as a mint pauser BusinessPlan[] public plans; uint256 public discount; // 80 for 80% uint256 public preSaleStartTimestamp; // for whitelist uint256 public preSaleLimit; // 0 for no limit uint256 public preSaleCount; bool public isFreeMint; constructor( string memory name_, string memory symbol_, string memory baseURI_, uint256 totalCount_, address weth_, uint256 startTimestamp_, uint256 maxBatchMint_ ) ERC721SerialMint(name_, symbol_, maxBatchMint_) { } function puase(bool _isPaused) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function getPlans() public view returns (BusinessPlan[] memory) { } //init & edit pre-sale conditions function makePreSalePlan(uint256 _preSaleStartTimestamp, uint256 _discount, uint256 _preSaleLimit) public onlyOwner { } function changeStartTimestamp(uint256 _startTimestamp) public onlyOwner { } function addPlan(address _sellToken, uint256 _pricePerSlot) external onlyOwner { } function editPlan(uint256 _index, address _sellToken, uint256 _pricePerSlot) external onlyOwner { } function editPlans(uint256[] memory _indexes, BusinessPlan[] memory _plans) external onlyOwner { } function setFreeMint(bool _isFreeMint) public onlyOwner { } function setTotalCount(uint256 totalCount_) external onlyOwner() { } function batchMintTo(address _to, uint256 _times) public onlyOwner { } function mintNFTByToken(uint256 _planIndex, uint256, uint256 _times) payable public nonReentrant { } function _mintNFTByToken(uint256 _planIndex, uint256 _times, bool _applyDiscount) internal{ require(_times >0 && _times <= maxBatchMint, "wrong batch number"); require(totalSupply + _times <= totalCount, "over mint"); if(!isFreeMint) { address tokenUsed = plans[_planIndex].sellToken; uint256 price = plans[_planIndex].pricePerSolt; require(price > 0, "wrong price"); uint256 totalPrice = price * _times; if(_applyDiscount){ totalPrice = totalPrice * discount / 100; } if(tokenUsed != address(0)){ IERC20(tokenUsed).safeTransferFrom(address(msg.sender), owner(), totalPrice); } else { require(<FILL_ME>) IWETH(WETH).deposit{value: msg.value}(); IERC20(WETH).safeTransfer(owner(), totalPrice); } emit mintNFTsByToken(msg.sender, price, tokenUsed, _times, totalPrice); }else { emit mintNFTsByToken(msg.sender, 0, address(0), _times, 0); } _batchMintR(msg.sender, _times); } modifier whitelistVerify(bytes memory _signature) { } function mintByWhitelist(uint256 _planIndex, uint256 _times, bytes memory _signature) payable public whitelistVerify(_signature) nonReentrant{ } function burn(uint256 _tokenId) public { } function batchBurn(uint256[] memory _tokenIds) public { } }
uint256(msg.value)==totalPrice,"value error"
173,646
uint256(msg.value)==totalPrice
"verification failed"
pragma solidity ^0.8.0; contract XinqiYangNFT is ERC721SerialMint, Signature, ReentrancyGuard{ using SafeERC20 for IERC20; event mintNFTsByToken(address indexed buyer, uint256 askPrice, address indexed token, uint256 times, uint256 totalAmount); struct BusinessPlan { address sellToken; uint256 pricePerSolt; } uint256 public totalCount; address public immutable WETH; uint256 public startTimestamp; // for public sale bool public paused = false; // act as a mint pauser BusinessPlan[] public plans; uint256 public discount; // 80 for 80% uint256 public preSaleStartTimestamp; // for whitelist uint256 public preSaleLimit; // 0 for no limit uint256 public preSaleCount; bool public isFreeMint; constructor( string memory name_, string memory symbol_, string memory baseURI_, uint256 totalCount_, address weth_, uint256 startTimestamp_, uint256 maxBatchMint_ ) ERC721SerialMint(name_, symbol_, maxBatchMint_) { } function puase(bool _isPaused) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function getPlans() public view returns (BusinessPlan[] memory) { } //init & edit pre-sale conditions function makePreSalePlan(uint256 _preSaleStartTimestamp, uint256 _discount, uint256 _preSaleLimit) public onlyOwner { } function changeStartTimestamp(uint256 _startTimestamp) public onlyOwner { } function addPlan(address _sellToken, uint256 _pricePerSlot) external onlyOwner { } function editPlan(uint256 _index, address _sellToken, uint256 _pricePerSlot) external onlyOwner { } function editPlans(uint256[] memory _indexes, BusinessPlan[] memory _plans) external onlyOwner { } function setFreeMint(bool _isFreeMint) public onlyOwner { } function setTotalCount(uint256 totalCount_) external onlyOwner() { } function batchMintTo(address _to, uint256 _times) public onlyOwner { } function mintNFTByToken(uint256 _planIndex, uint256, uint256 _times) payable public nonReentrant { } function _mintNFTByToken(uint256 _planIndex, uint256 _times, bool _applyDiscount) internal{ } modifier whitelistVerify(bytes memory _signature) { bytes32 message = prefixed(keccak256(abi.encodePacked( msg.sender, address(this) ))); require(<FILL_ME>) _; } function mintByWhitelist(uint256 _planIndex, uint256 _times, bytes memory _signature) payable public whitelistVerify(_signature) nonReentrant{ } function burn(uint256 _tokenId) public { } function batchBurn(uint256[] memory _tokenIds) public { } }
verifySignature(message,_signature,owner()),"verification failed"
173,646
verifySignature(message,_signature,owner())
"pre-sale over mint"
pragma solidity ^0.8.0; contract XinqiYangNFT is ERC721SerialMint, Signature, ReentrancyGuard{ using SafeERC20 for IERC20; event mintNFTsByToken(address indexed buyer, uint256 askPrice, address indexed token, uint256 times, uint256 totalAmount); struct BusinessPlan { address sellToken; uint256 pricePerSolt; } uint256 public totalCount; address public immutable WETH; uint256 public startTimestamp; // for public sale bool public paused = false; // act as a mint pauser BusinessPlan[] public plans; uint256 public discount; // 80 for 80% uint256 public preSaleStartTimestamp; // for whitelist uint256 public preSaleLimit; // 0 for no limit uint256 public preSaleCount; bool public isFreeMint; constructor( string memory name_, string memory symbol_, string memory baseURI_, uint256 totalCount_, address weth_, uint256 startTimestamp_, uint256 maxBatchMint_ ) ERC721SerialMint(name_, symbol_, maxBatchMint_) { } function puase(bool _isPaused) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function getPlans() public view returns (BusinessPlan[] memory) { } //init & edit pre-sale conditions function makePreSalePlan(uint256 _preSaleStartTimestamp, uint256 _discount, uint256 _preSaleLimit) public onlyOwner { } function changeStartTimestamp(uint256 _startTimestamp) public onlyOwner { } function addPlan(address _sellToken, uint256 _pricePerSlot) external onlyOwner { } function editPlan(uint256 _index, address _sellToken, uint256 _pricePerSlot) external onlyOwner { } function editPlans(uint256[] memory _indexes, BusinessPlan[] memory _plans) external onlyOwner { } function setFreeMint(bool _isFreeMint) public onlyOwner { } function setTotalCount(uint256 totalCount_) external onlyOwner() { } function batchMintTo(address _to, uint256 _times) public onlyOwner { } function mintNFTByToken(uint256 _planIndex, uint256, uint256 _times) payable public nonReentrant { } function _mintNFTByToken(uint256 _planIndex, uint256 _times, bool _applyDiscount) internal{ } modifier whitelistVerify(bytes memory _signature) { } function mintByWhitelist(uint256 _planIndex, uint256 _times, bytes memory _signature) payable public whitelistVerify(_signature) nonReentrant{ require(block.timestamp > preSaleStartTimestamp && block.timestamp < startTimestamp, "not in pre-sale window"); if(preSaleLimit > 0){ require(<FILL_ME>) } _mintNFTByToken(_planIndex, _times, true); preSaleCount += _times; } function burn(uint256 _tokenId) public { } function batchBurn(uint256[] memory _tokenIds) public { } }
preSaleCount+_times<=preSaleLimit,"pre-sale over mint"
173,646
preSaleCount+_times<=preSaleLimit
"Invalid Merkle proof"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; abstract contract PeculiarPugs { function reveal() public virtual; function setCost(uint256 _newCost) public virtual; function setNotRevealedURI(string memory _notRevealedURI) public virtual; function setBaseURI(string memory _newBaseURI) public virtual; function setBaseExtension(string memory _newBaseExtension) public virtual; function pause(bool _state) public virtual; function withdraw() public payable virtual; function mint(uint256 _mintAmount) public payable virtual; function cost() public virtual returns(uint256); function totalSupply() public virtual returns(uint256); function safeTransferFrom(address from, address to, uint256 tokenId) external virtual; function transferOwnership(address newOwner) public virtual; } abstract contract PeculiarPugsRewards { function grantReward(address holder, uint256 tokenId, uint256 amount) external virtual; function burnReward(address holder, uint256 tokenId, uint256 amount) external virtual; function balanceOf(address account, uint256 id) external virtual returns (uint256); } contract PeculiarPugsWL is Ownable, IERC721Receiver { PeculiarPugs pugsContract; PeculiarPugsRewards rewardsContract; mapping(uint256 => uint256) public rewardTokenDiscount; bool public mintRewardActive = true; uint256 public mintRewardTokenId = 1991; uint256 public mintRewardQuantity = 1; uint256 public wlMintPrice = 0.03 ether; bytes32 public merkleRoot; error InsufficientPayment(); error RefundFailed(); constructor(address pugsAddress, address rewardsAddress) { } receive() external payable { } fallback() external payable { } function wlMint(uint256 count, bytes32[] calldata proof) external payable { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(<FILL_ME>) uint256 totalCost = wlMintPrice * count; uint256 startTokenId = pugsContract.totalSupply() + 1; uint256 endTokenId = startTokenId + count - 1; pugsContract.mint{value: 0}(count); for(uint256 tokenId = startTokenId; tokenId <= endTokenId;tokenId++) { pugsContract.safeTransferFrom(address(this), msg.sender, tokenId); } if(mintRewardActive) { rewardsContract.grantReward(msg.sender, mintRewardTokenId, mintRewardQuantity * count); } refundIfOver(totalCost); } function mintWithRewards(uint256 count, uint256[] calldata rewardTokenIds, uint256[] calldata rewardTokenAmounts) external payable { } function mintForRewards(uint256 count) external payable { } function ownerMint(uint256 count, address to) external onlyOwner { } /** * @notice Refund for overpayment on rental and purchases * @param price cost of the transaction */ function refundIfOver(uint256 price) private { } function onERC721Received(address _operator, address, uint, bytes memory) public virtual override returns (bytes4) { } function setRewardTokenDiscount(uint256 rewardTokenId, uint256 discount) external onlyOwner { } function setMintReward(bool _active, uint256 _tokenId, uint256 _quantity) external onlyOwner { } function setWLMintPrice(uint256 _price) external onlyOwner { } function setMerkleRoot(bytes32 _root) external onlyOwner { } function setContractAddresses(address pugsAddress, address rewardsAddress) external onlyOwner { } function reveal() public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function transferPugsOwnership(address newOwner) public onlyOwner { } function withdraw() public payable onlyOwner { } }
MerkleProof.verify(proof,merkleRoot,leaf),"Invalid Merkle proof"
173,725
MerkleProof.verify(proof,merkleRoot,leaf)
"BOT IS NOT ALLOWED"
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./interfaces/IWETH.sol"; import "./interfaces/IOmc.sol"; import {OMCLib} from "./library/OMCLib.sol"; contract Omc is IOmc, ERC721 { address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public omcEpoch; uint256 public totalSupply; uint256 public maxTotalSupply = 10000; bool public revealed; bool public publicMintEnabled; uint256 public _mintPrice; uint256 private _mintLimitPerUser; uint256 private _countLimitPerMint; uint256 private _mintStartBlock; uint256 private _antibotInterval; string private baseURI_; string private baseHiddenURI_; address private _owner; mapping(address => uint256) private _lastCallBlockNumber; modifier onlyOwner() { } constructor() ERC721("Ostrich Money Club", "OMC") { } function owner() external view override returns (address) { } function getTotalSupply() external view override returns (uint256) { } function setOmcEpoch(address _newOmcEpoch) external override onlyOwner { } function setBaseURI(string memory _newBaseURI) external override onlyOwner { } function setHiddenURI(string memory _newBaseHiddenURI) external override onlyOwner { } function setPublicMintEnabled(bool _state) external override onlyOwner { } function _baseURI() internal view override returns (string memory) { } function _hiddenURI() internal view returns (string memory) { } function reveal(bool _state) external override onlyOwner { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function withdrawPayment() external override onlyOwner { } function setSale( uint256 _newMintPrice, uint256 _newMintLimitPerUser, uint256 _newMintStartBlock, uint256 _newAntiBotInterval, uint256 _newCountLimitPerMint ) external override onlyOwner { } function publicMint(uint256 _mintCount) external payable override { require(publicMintEnabled, "PUBLIC SALE NOT ENABLED"); require( _mintCount > 0 && _mintCount <= _countLimitPerMint, "INVALID MINTCOUNT" ); require(msg.value >= _mintCount * _mintPrice, "INSUFFIENT PAYMENT"); require(block.number >= _mintStartBlock, "MINTING NOT STARTED"); require(<FILL_ME>) require(totalSupply + _mintCount <= maxTotalSupply, "OVER MAX SUPPLY"); require( (balanceOf(msg.sender) + _mintCount) <= _mintLimitPerUser, "EXCEEDED MAX AMOUNT PER PERSON" ); for (uint256 i = 0; i < _mintCount; i++) { _mint(msg.sender, totalSupply); totalSupply += 1; } _lastCallBlockNumber[msg.sender] = block.number; } //Airdrop Mint function airDropMint(address _receiver, uint256 _requestedCount) external override onlyOwner { } }
_lastCallBlockNumber[msg.sender]+_antibotInterval<block.number,"BOT IS NOT ALLOWED"
173,815
_lastCallBlockNumber[msg.sender]+_antibotInterval<block.number
"OVER MAX SUPPLY"
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./interfaces/IWETH.sol"; import "./interfaces/IOmc.sol"; import {OMCLib} from "./library/OMCLib.sol"; contract Omc is IOmc, ERC721 { address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public omcEpoch; uint256 public totalSupply; uint256 public maxTotalSupply = 10000; bool public revealed; bool public publicMintEnabled; uint256 public _mintPrice; uint256 private _mintLimitPerUser; uint256 private _countLimitPerMint; uint256 private _mintStartBlock; uint256 private _antibotInterval; string private baseURI_; string private baseHiddenURI_; address private _owner; mapping(address => uint256) private _lastCallBlockNumber; modifier onlyOwner() { } constructor() ERC721("Ostrich Money Club", "OMC") { } function owner() external view override returns (address) { } function getTotalSupply() external view override returns (uint256) { } function setOmcEpoch(address _newOmcEpoch) external override onlyOwner { } function setBaseURI(string memory _newBaseURI) external override onlyOwner { } function setHiddenURI(string memory _newBaseHiddenURI) external override onlyOwner { } function setPublicMintEnabled(bool _state) external override onlyOwner { } function _baseURI() internal view override returns (string memory) { } function _hiddenURI() internal view returns (string memory) { } function reveal(bool _state) external override onlyOwner { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function withdrawPayment() external override onlyOwner { } function setSale( uint256 _newMintPrice, uint256 _newMintLimitPerUser, uint256 _newMintStartBlock, uint256 _newAntiBotInterval, uint256 _newCountLimitPerMint ) external override onlyOwner { } function publicMint(uint256 _mintCount) external payable override { require(publicMintEnabled, "PUBLIC SALE NOT ENABLED"); require( _mintCount > 0 && _mintCount <= _countLimitPerMint, "INVALID MINTCOUNT" ); require(msg.value >= _mintCount * _mintPrice, "INSUFFIENT PAYMENT"); require(block.number >= _mintStartBlock, "MINTING NOT STARTED"); require( _lastCallBlockNumber[msg.sender] + _antibotInterval < block.number, "BOT IS NOT ALLOWED" ); require(<FILL_ME>) require( (balanceOf(msg.sender) + _mintCount) <= _mintLimitPerUser, "EXCEEDED MAX AMOUNT PER PERSON" ); for (uint256 i = 0; i < _mintCount; i++) { _mint(msg.sender, totalSupply); totalSupply += 1; } _lastCallBlockNumber[msg.sender] = block.number; } //Airdrop Mint function airDropMint(address _receiver, uint256 _requestedCount) external override onlyOwner { } }
totalSupply+_mintCount<=maxTotalSupply,"OVER MAX SUPPLY"
173,815
totalSupply+_mintCount<=maxTotalSupply
"EXCEEDED MAX AMOUNT PER PERSON"
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./interfaces/IWETH.sol"; import "./interfaces/IOmc.sol"; import {OMCLib} from "./library/OMCLib.sol"; contract Omc is IOmc, ERC721 { address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public omcEpoch; uint256 public totalSupply; uint256 public maxTotalSupply = 10000; bool public revealed; bool public publicMintEnabled; uint256 public _mintPrice; uint256 private _mintLimitPerUser; uint256 private _countLimitPerMint; uint256 private _mintStartBlock; uint256 private _antibotInterval; string private baseURI_; string private baseHiddenURI_; address private _owner; mapping(address => uint256) private _lastCallBlockNumber; modifier onlyOwner() { } constructor() ERC721("Ostrich Money Club", "OMC") { } function owner() external view override returns (address) { } function getTotalSupply() external view override returns (uint256) { } function setOmcEpoch(address _newOmcEpoch) external override onlyOwner { } function setBaseURI(string memory _newBaseURI) external override onlyOwner { } function setHiddenURI(string memory _newBaseHiddenURI) external override onlyOwner { } function setPublicMintEnabled(bool _state) external override onlyOwner { } function _baseURI() internal view override returns (string memory) { } function _hiddenURI() internal view returns (string memory) { } function reveal(bool _state) external override onlyOwner { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function withdrawPayment() external override onlyOwner { } function setSale( uint256 _newMintPrice, uint256 _newMintLimitPerUser, uint256 _newMintStartBlock, uint256 _newAntiBotInterval, uint256 _newCountLimitPerMint ) external override onlyOwner { } function publicMint(uint256 _mintCount) external payable override { require(publicMintEnabled, "PUBLIC SALE NOT ENABLED"); require( _mintCount > 0 && _mintCount <= _countLimitPerMint, "INVALID MINTCOUNT" ); require(msg.value >= _mintCount * _mintPrice, "INSUFFIENT PAYMENT"); require(block.number >= _mintStartBlock, "MINTING NOT STARTED"); require( _lastCallBlockNumber[msg.sender] + _antibotInterval < block.number, "BOT IS NOT ALLOWED" ); require(totalSupply + _mintCount <= maxTotalSupply, "OVER MAX SUPPLY"); require(<FILL_ME>) for (uint256 i = 0; i < _mintCount; i++) { _mint(msg.sender, totalSupply); totalSupply += 1; } _lastCallBlockNumber[msg.sender] = block.number; } //Airdrop Mint function airDropMint(address _receiver, uint256 _requestedCount) external override onlyOwner { } }
(balanceOf(msg.sender)+_mintCount)<=_mintLimitPerUser,"EXCEEDED MAX AMOUNT PER PERSON"
173,815
(balanceOf(msg.sender)+_mintCount)<=_mintLimitPerUser
"Already claimed"
// ________ ___ ___ ___ ________ ________ ________ ________ _______ // |\ ____\|\ \ |\ \|\ \|\ __ \|\ __ \|\ __ \|\ __ \|\ ___ \ // \ \ \___|\ \ \ \ \ \\\ \ \ \|\ /\ \ \|\ \ \ \|\ \ \ \|\ \ \ __/| // \ \ \ \ \ \ \ \ \\\ \ \ __ \ \ _ _\ \ __ \ \ _ _\ \ \_|/__ // \ \ \____\ \ \____\ \ \\\ \ \ \|\ \ \ \\ \\ \ \ \ \ \ \\ \\ \ \_|\ \ // \ \_______\ \_______\ \_______\ \_______\ \__\\ _\\ \__\ \__\ \__\\ _\\ \_______\ // \|_______|\|_______|\|_______|\|_______|\|__|\|__|\|__|\|__|\|__|\|__|\|_______| // //SPDX-License-Identifier: Unlicense pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface MPWRStakeFor { function depositFor(address user, uint256 _amount) external; } contract Airdrop is Ownable, Pausable { using SafeMath for uint256; using SafeERC20 for IERC20; MPWRStakeFor public MPWRStake; /// @dev The merkle root hash of whitelisted users bytes32 public MERKLE_ROOT; /// @dev The MPWR token contract address address public immutable MPWR; /// @dev The claimed users mapping(address => bool) public claimedUsers; /** * @dev The airdrop configuration initializer * @param _root The merkle root hash * @param _mpwr The MPWR token contract address */ constructor( bytes32 _root, address _mpwr, MPWRStakeFor _MPWRStake ) { } /** * @dev The airdrop reward claiming * @param _amount The claimable reward amount * @param _merkleProof The verifiable proof */ function claim( uint256 _amount, bytes32[] calldata _merkleProof, bool stake ) external whenNotPaused { require(<FILL_ME>) require(verifyProof(_merkleProof, getMerkleRoot(), getNode(msg.sender, _amount)), "Invalid claim"); _setClaimed(msg.sender); if (stake) { require(address(MPWRStake) != address(0), "Claim: cannot stake to address(0)"); IERC20(getMPWR()).approve(address(MPWRStake), _amount); MPWRStake.depositFor(msg.sender, _amount); } else { IERC20(getMPWR()).safeTransfer(msg.sender, _amount); } emit Claimed(msg.sender, _amount); } /** * @notice Check whether it is possible to claim or not * @param _who address of the user * @param _amount amount to claim * @param _merkleProof array with the merkle proof */ function canClaim( address _who, uint256 _amount, bytes32[] calldata _merkleProof ) external view returns (bool) { } /** * @dev The remaining MPWR withdrawing after airdrop * @param _who The Clubrare treasury address */ function withdrawMPWR(address _who) external onlyOwner { } /** * @dev Update merkel Root * @param _root Merkel Root hash */ function updateMerkelRoot(bytes32 _root) external onlyOwner { } /** * @dev Update staking contract * @param _MPWRStake Staking contract address */ function updateMPWRStake(MPWRStakeFor _MPWRStake) external onlyOwner { } /** * @dev owner can pause the contract */ function pause() external onlyOwner { } /** * @dev owner can unapuse the contract */ function unpause() external onlyOwner { } /// --------------- Private Setters --------------- /// @dev The Claimed User setter function _setClaimed(address _who) private { } /// --------------- Getters --------------- /// @dev The Merkle Root Hash getter function getMerkleRoot() public view returns (bytes32) { } /// @dev The MPWR token contract address getter function getMPWR() public view returns (address) { } /** * @dev The claimable user verifier * @param _who The user wallet address */ function isClaimed(address _who) public view returns (bool) { } /** * @dev Get Node hash of given data * @param _who The whitelisted user address * @param _amount The airdrop reward amount */ function getNode(address _who, uint256 _amount) private pure returns (bytes32) { } /** * @dev Function to verify the given proof. * @param proof Proof to verify * @param root Root of the Merkle tree * @param leaf Leaf to verify */ function verifyProof( bytes32[] memory proof, bytes32 root, bytes32 leaf ) private pure returns (bool) { } /// --------------- Events --------------- /** * @dev The airdrop configuration initialized event * @param merkleRoot The merkle root hash of whitelisted users * @param mpwr The MPWR token contract address */ event Initialized(bytes32 merkleRoot, address mpwr); /** * @dev The reward claimed event * @param who The claimer address * @param amount The claimed reward amount */ event Claimed(address who, uint256 amount); /** * @dev The Staking address update event * @param MPWRStake new address of Staking contract */ event MPWRStakeUpdate(address MPWRStake); }
!isClaimed(msg.sender),"Already claimed"
173,900
!isClaimed(msg.sender)
"Invalid claim"
// ________ ___ ___ ___ ________ ________ ________ ________ _______ // |\ ____\|\ \ |\ \|\ \|\ __ \|\ __ \|\ __ \|\ __ \|\ ___ \ // \ \ \___|\ \ \ \ \ \\\ \ \ \|\ /\ \ \|\ \ \ \|\ \ \ \|\ \ \ __/| // \ \ \ \ \ \ \ \ \\\ \ \ __ \ \ _ _\ \ __ \ \ _ _\ \ \_|/__ // \ \ \____\ \ \____\ \ \\\ \ \ \|\ \ \ \\ \\ \ \ \ \ \ \\ \\ \ \_|\ \ // \ \_______\ \_______\ \_______\ \_______\ \__\\ _\\ \__\ \__\ \__\\ _\\ \_______\ // \|_______|\|_______|\|_______|\|_______|\|__|\|__|\|__|\|__|\|__|\|__|\|_______| // //SPDX-License-Identifier: Unlicense pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface MPWRStakeFor { function depositFor(address user, uint256 _amount) external; } contract Airdrop is Ownable, Pausable { using SafeMath for uint256; using SafeERC20 for IERC20; MPWRStakeFor public MPWRStake; /// @dev The merkle root hash of whitelisted users bytes32 public MERKLE_ROOT; /// @dev The MPWR token contract address address public immutable MPWR; /// @dev The claimed users mapping(address => bool) public claimedUsers; /** * @dev The airdrop configuration initializer * @param _root The merkle root hash * @param _mpwr The MPWR token contract address */ constructor( bytes32 _root, address _mpwr, MPWRStakeFor _MPWRStake ) { } /** * @dev The airdrop reward claiming * @param _amount The claimable reward amount * @param _merkleProof The verifiable proof */ function claim( uint256 _amount, bytes32[] calldata _merkleProof, bool stake ) external whenNotPaused { require(!isClaimed(msg.sender), "Already claimed"); require(<FILL_ME>) _setClaimed(msg.sender); if (stake) { require(address(MPWRStake) != address(0), "Claim: cannot stake to address(0)"); IERC20(getMPWR()).approve(address(MPWRStake), _amount); MPWRStake.depositFor(msg.sender, _amount); } else { IERC20(getMPWR()).safeTransfer(msg.sender, _amount); } emit Claimed(msg.sender, _amount); } /** * @notice Check whether it is possible to claim or not * @param _who address of the user * @param _amount amount to claim * @param _merkleProof array with the merkle proof */ function canClaim( address _who, uint256 _amount, bytes32[] calldata _merkleProof ) external view returns (bool) { } /** * @dev The remaining MPWR withdrawing after airdrop * @param _who The Clubrare treasury address */ function withdrawMPWR(address _who) external onlyOwner { } /** * @dev Update merkel Root * @param _root Merkel Root hash */ function updateMerkelRoot(bytes32 _root) external onlyOwner { } /** * @dev Update staking contract * @param _MPWRStake Staking contract address */ function updateMPWRStake(MPWRStakeFor _MPWRStake) external onlyOwner { } /** * @dev owner can pause the contract */ function pause() external onlyOwner { } /** * @dev owner can unapuse the contract */ function unpause() external onlyOwner { } /// --------------- Private Setters --------------- /// @dev The Claimed User setter function _setClaimed(address _who) private { } /// --------------- Getters --------------- /// @dev The Merkle Root Hash getter function getMerkleRoot() public view returns (bytes32) { } /// @dev The MPWR token contract address getter function getMPWR() public view returns (address) { } /** * @dev The claimable user verifier * @param _who The user wallet address */ function isClaimed(address _who) public view returns (bool) { } /** * @dev Get Node hash of given data * @param _who The whitelisted user address * @param _amount The airdrop reward amount */ function getNode(address _who, uint256 _amount) private pure returns (bytes32) { } /** * @dev Function to verify the given proof. * @param proof Proof to verify * @param root Root of the Merkle tree * @param leaf Leaf to verify */ function verifyProof( bytes32[] memory proof, bytes32 root, bytes32 leaf ) private pure returns (bool) { } /// --------------- Events --------------- /** * @dev The airdrop configuration initialized event * @param merkleRoot The merkle root hash of whitelisted users * @param mpwr The MPWR token contract address */ event Initialized(bytes32 merkleRoot, address mpwr); /** * @dev The reward claimed event * @param who The claimer address * @param amount The claimed reward amount */ event Claimed(address who, uint256 amount); /** * @dev The Staking address update event * @param MPWRStake new address of Staking contract */ event MPWRStakeUpdate(address MPWRStake); }
verifyProof(_merkleProof,getMerkleRoot(),getNode(msg.sender,_amount)),"Invalid claim"
173,900
verifyProof(_merkleProof,getMerkleRoot(),getNode(msg.sender,_amount))
"Claim: cannot stake to address(0)"
// ________ ___ ___ ___ ________ ________ ________ ________ _______ // |\ ____\|\ \ |\ \|\ \|\ __ \|\ __ \|\ __ \|\ __ \|\ ___ \ // \ \ \___|\ \ \ \ \ \\\ \ \ \|\ /\ \ \|\ \ \ \|\ \ \ \|\ \ \ __/| // \ \ \ \ \ \ \ \ \\\ \ \ __ \ \ _ _\ \ __ \ \ _ _\ \ \_|/__ // \ \ \____\ \ \____\ \ \\\ \ \ \|\ \ \ \\ \\ \ \ \ \ \ \\ \\ \ \_|\ \ // \ \_______\ \_______\ \_______\ \_______\ \__\\ _\\ \__\ \__\ \__\\ _\\ \_______\ // \|_______|\|_______|\|_______|\|_______|\|__|\|__|\|__|\|__|\|__|\|__|\|_______| // //SPDX-License-Identifier: Unlicense pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; interface MPWRStakeFor { function depositFor(address user, uint256 _amount) external; } contract Airdrop is Ownable, Pausable { using SafeMath for uint256; using SafeERC20 for IERC20; MPWRStakeFor public MPWRStake; /// @dev The merkle root hash of whitelisted users bytes32 public MERKLE_ROOT; /// @dev The MPWR token contract address address public immutable MPWR; /// @dev The claimed users mapping(address => bool) public claimedUsers; /** * @dev The airdrop configuration initializer * @param _root The merkle root hash * @param _mpwr The MPWR token contract address */ constructor( bytes32 _root, address _mpwr, MPWRStakeFor _MPWRStake ) { } /** * @dev The airdrop reward claiming * @param _amount The claimable reward amount * @param _merkleProof The verifiable proof */ function claim( uint256 _amount, bytes32[] calldata _merkleProof, bool stake ) external whenNotPaused { require(!isClaimed(msg.sender), "Already claimed"); require(verifyProof(_merkleProof, getMerkleRoot(), getNode(msg.sender, _amount)), "Invalid claim"); _setClaimed(msg.sender); if (stake) { require(<FILL_ME>) IERC20(getMPWR()).approve(address(MPWRStake), _amount); MPWRStake.depositFor(msg.sender, _amount); } else { IERC20(getMPWR()).safeTransfer(msg.sender, _amount); } emit Claimed(msg.sender, _amount); } /** * @notice Check whether it is possible to claim or not * @param _who address of the user * @param _amount amount to claim * @param _merkleProof array with the merkle proof */ function canClaim( address _who, uint256 _amount, bytes32[] calldata _merkleProof ) external view returns (bool) { } /** * @dev The remaining MPWR withdrawing after airdrop * @param _who The Clubrare treasury address */ function withdrawMPWR(address _who) external onlyOwner { } /** * @dev Update merkel Root * @param _root Merkel Root hash */ function updateMerkelRoot(bytes32 _root) external onlyOwner { } /** * @dev Update staking contract * @param _MPWRStake Staking contract address */ function updateMPWRStake(MPWRStakeFor _MPWRStake) external onlyOwner { } /** * @dev owner can pause the contract */ function pause() external onlyOwner { } /** * @dev owner can unapuse the contract */ function unpause() external onlyOwner { } /// --------------- Private Setters --------------- /// @dev The Claimed User setter function _setClaimed(address _who) private { } /// --------------- Getters --------------- /// @dev The Merkle Root Hash getter function getMerkleRoot() public view returns (bytes32) { } /// @dev The MPWR token contract address getter function getMPWR() public view returns (address) { } /** * @dev The claimable user verifier * @param _who The user wallet address */ function isClaimed(address _who) public view returns (bool) { } /** * @dev Get Node hash of given data * @param _who The whitelisted user address * @param _amount The airdrop reward amount */ function getNode(address _who, uint256 _amount) private pure returns (bytes32) { } /** * @dev Function to verify the given proof. * @param proof Proof to verify * @param root Root of the Merkle tree * @param leaf Leaf to verify */ function verifyProof( bytes32[] memory proof, bytes32 root, bytes32 leaf ) private pure returns (bool) { } /// --------------- Events --------------- /** * @dev The airdrop configuration initialized event * @param merkleRoot The merkle root hash of whitelisted users * @param mpwr The MPWR token contract address */ event Initialized(bytes32 merkleRoot, address mpwr); /** * @dev The reward claimed event * @param who The claimer address * @param amount The claimed reward amount */ event Claimed(address who, uint256 amount); /** * @dev The Staking address update event * @param MPWRStake new address of Staking contract */ event MPWRStakeUpdate(address MPWRStake); }
address(MPWRStake)!=address(0),"Claim: cannot stake to address(0)"
173,900
address(MPWRStake)!=address(0)
"Total buy fee cannot be set higher than 25%."
// SPDX-License-Identifier: MIT /* **/ import './IERC20.sol'; import './SafeMath.sol'; import './Ownable.sol'; import './IUniswapV2Factory.sol'; import './IUniswapV2Router02.sol'; pragma solidity ^0.8.19; contract KodaInu is Context, IERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping (address => uint256) private balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; string private constant _name = "Koda Inu"; string private constant _symbol = "KODA"; uint8 private constant _decimals = 9; uint256 private _tTotal = 1000000000000 * 10**9; uint256 public _maxWalletAmount = 20000000000 * 10**9; uint256 public _maxTxAmount = 20000000000 * 10**9; bool public swapEnabled = true; uint256 public swapTokenAtAmount = 20000000000 * 10**9; bool public dynamicSwapAmount = true; uint256 targetLiquidity = 200; uint256 targetLiquidityDenominator = 100; address public liquidityReceiver; address public marketingWallet; address public utilityWallet; bool public limitsIsActive = true; struct BuyFees{ uint256 liquidity; uint256 marketing; uint256 utility; } struct SellFees{ uint256 liquidity; uint256 marketing; uint256 utility; } struct FeesDetails{ uint256 tokenToLiquidity; uint256 tokenToMarketing; uint256 tokenToutility; uint256 liquidityToken; uint256 liquidityETH; uint256 marketingETH; uint256 utilityETH; } struct LiquidityDetails{ uint256 targetLiquidity; uint256 currentLiquidity; } BuyFees public buyFeeDetails; SellFees public sellFeeDetails; FeesDetails public feeDistributionDetails; LiquidityDetails public liquidityDetails; bool private swapping; event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); constructor (address marketingAddress, address utilityAddress) { } 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } receive() external payable {} function forceSwap(uint256 amount) public onlyOwner { } function removeTransactionAndWalletLimits() public onlyOwner { } function setFees(uint256 setBuyLiquidityFee, uint256 setBuyMarketingFee, uint256 setBuyUtility, uint256 setSellLiquidityFee, uint256 setSellMarketingFee, uint256 setSellUtility) public onlyOwner { require(<FILL_ME>) require(setSellLiquidityFee + setSellMarketingFee + setSellUtility<= 25, "Total sell fee cannot be set higher than 25%."); buyFeeDetails.liquidity = setBuyLiquidityFee; buyFeeDetails.marketing = setBuyMarketingFee; buyFeeDetails.utility = setBuyUtility; sellFeeDetails.liquidity = setSellLiquidityFee; sellFeeDetails.marketing = setSellMarketingFee; sellFeeDetails.utility = setSellUtility; } function setMaxTransactionAmount(uint256 maxTransactionAmount) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount) public onlyOwner { } function setSwapBackSettings(bool enabled, uint256 swapAtAmount, bool dynamicSwap) public onlyOwner { } function setLiquidityWallet(address newLiquidityWallet) public onlyOwner { } function setMarketingWallet(address newMarketingWallet) public onlyOwner { } function setutilityWallet(address newutilityWallet) public onlyOwner { } function takeBuyFees(uint256 amount, address from) private returns (uint256) { } function takeSellFees(uint256 amount, address from) private returns (uint256) { } function isExcludedFromFee(address account) public view returns(bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapBack(uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function withdrawForeignToken(address tokenContract) public onlyOwner { } }
setBuyLiquidityFee+setBuyMarketingFee+setBuyUtility<=25,"Total buy fee cannot be set higher than 25%."
173,947
setBuyLiquidityFee+setBuyMarketingFee+setBuyUtility<=25
"Total sell fee cannot be set higher than 25%."
// SPDX-License-Identifier: MIT /* **/ import './IERC20.sol'; import './SafeMath.sol'; import './Ownable.sol'; import './IUniswapV2Factory.sol'; import './IUniswapV2Router02.sol'; pragma solidity ^0.8.19; contract KodaInu is Context, IERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping (address => uint256) private balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; string private constant _name = "Koda Inu"; string private constant _symbol = "KODA"; uint8 private constant _decimals = 9; uint256 private _tTotal = 1000000000000 * 10**9; uint256 public _maxWalletAmount = 20000000000 * 10**9; uint256 public _maxTxAmount = 20000000000 * 10**9; bool public swapEnabled = true; uint256 public swapTokenAtAmount = 20000000000 * 10**9; bool public dynamicSwapAmount = true; uint256 targetLiquidity = 200; uint256 targetLiquidityDenominator = 100; address public liquidityReceiver; address public marketingWallet; address public utilityWallet; bool public limitsIsActive = true; struct BuyFees{ uint256 liquidity; uint256 marketing; uint256 utility; } struct SellFees{ uint256 liquidity; uint256 marketing; uint256 utility; } struct FeesDetails{ uint256 tokenToLiquidity; uint256 tokenToMarketing; uint256 tokenToutility; uint256 liquidityToken; uint256 liquidityETH; uint256 marketingETH; uint256 utilityETH; } struct LiquidityDetails{ uint256 targetLiquidity; uint256 currentLiquidity; } BuyFees public buyFeeDetails; SellFees public sellFeeDetails; FeesDetails public feeDistributionDetails; LiquidityDetails public liquidityDetails; bool private swapping; event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); constructor (address marketingAddress, address utilityAddress) { } 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } receive() external payable {} function forceSwap(uint256 amount) public onlyOwner { } function removeTransactionAndWalletLimits() public onlyOwner { } function setFees(uint256 setBuyLiquidityFee, uint256 setBuyMarketingFee, uint256 setBuyUtility, uint256 setSellLiquidityFee, uint256 setSellMarketingFee, uint256 setSellUtility) public onlyOwner { require(setBuyLiquidityFee + setBuyMarketingFee + setBuyUtility <= 25, "Total buy fee cannot be set higher than 25%."); require(<FILL_ME>) buyFeeDetails.liquidity = setBuyLiquidityFee; buyFeeDetails.marketing = setBuyMarketingFee; buyFeeDetails.utility = setBuyUtility; sellFeeDetails.liquidity = setSellLiquidityFee; sellFeeDetails.marketing = setSellMarketingFee; sellFeeDetails.utility = setSellUtility; } function setMaxTransactionAmount(uint256 maxTransactionAmount) public onlyOwner { } function setMaxWalletAmount(uint256 maxWalletAmount) public onlyOwner { } function setSwapBackSettings(bool enabled, uint256 swapAtAmount, bool dynamicSwap) public onlyOwner { } function setLiquidityWallet(address newLiquidityWallet) public onlyOwner { } function setMarketingWallet(address newMarketingWallet) public onlyOwner { } function setutilityWallet(address newutilityWallet) public onlyOwner { } function takeBuyFees(uint256 amount, address from) private returns (uint256) { } function takeSellFees(uint256 amount, address from) private returns (uint256) { } function isExcludedFromFee(address account) public view returns(bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapBack(uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function withdrawForeignToken(address tokenContract) public onlyOwner { } }
setSellLiquidityFee+setSellMarketingFee+setSellUtility<=25,"Total sell fee cannot be set higher than 25%."
173,947
setSellLiquidityFee+setSellMarketingFee+setSellUtility<=25
"soldOut()"
//SPDX-License-Identifier: Unlicense //Author: Goldmember#0001 // Inhabitants /// // ,////////////// // ////////////////// // /////////////////// // //////////////////// // %% //////////////////// // #%%%%%%% ////////////////// // %%%%%%%% ,/////////////// // #, %%%%%%%%% /////////// // #### %%%%%%%%%% // ##### %%%%%% ,,, // %%%% /// %% (((( %% ,, // %%%%%%%% //////// (((((((( %%%%%% ,, // #%%%%%%%%%%%. //////// .(((((((( .%%%%%%% ,, // %%%%%%%%%%%%%%% //////// (((((((( %%%%%%%. ,, %%% // %%%%%%%%%%%%%% ////// ((((( %%%%%%%%%%%%%%%( // ##### %%%%%%%%%%%%%%% / ( %%%%%%%%%%%%%%% ****** // ######### %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ********** // ############( %%%%%%%%%%%%%%%%%%%%%%% ************** // ################# %%%%%%%%%%%%%%% ***************** // ##################### %%%%%%# ********************* // ######################### ************************* // ########################## ************************** // (########################## .************************** // (######################## ************************* // *#################### ********************* // ################ ***************** // ############ ************* // ####### ********** // ## ****** pragma solidity ^0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "erc721a/contracts/ERC721A.sol"; // errors error nothingToWithdraw(); error tokenDoesNotExist(); contract LykeInhabitants is ERC721A, IERC2981, Ownable { using Address for address; using ECDSA for bytes32; // collection details uint256 public constant PRICE = 0.06 ether; uint256 public constant COLLECTION_SIZE = 3000; uint64 public constant MAX_MINTS_PER_PUBLIC_TX = 2; uint256 private royaltiesPercentage; // represents a percentage like 3 = 3% address public royaltiesAddress; // ECDSA address public signingAddress; // variables and constants string public baseURI = "nft://sorryDetective/"; bool public isPublicMintActive = false; mapping(address => bool) public addressClaimMap; uint256 public maxReserveMintRemaining; constructor( address _signerAddress, address _royaltiesAddress, uint256 _royaltiesPercentage, uint256 _maxReserveMintRemaining ) ERC721A("Lyke Inhabitants", "LYKEIN") { } function verifySig(address _sender, uint256 _freeQuantity, uint256 _paidQuantity, uint256 _price, uint256 _saleStartTs, bytes memory _signature) internal view returns(bool) { } /* * @dev Mints for public sale */ function publicMint(uint256 _quantity) external payable { require(isPublicMintActive, "publicMintNotActive()"); require(msg.value == _quantity * PRICE, "insufficientPaid()"); require(_quantity <= MAX_MINTS_PER_PUBLIC_TX, "tooManyTokensPerTx()"); require(<FILL_ME>) // mint _safeMint(msg.sender, _quantity); } /* * @dev Mints free amounts and paid amounts if sale has started. */ function saleMint(uint256 _freeQuantity, uint64 _paidQuantity, uint256 _price, uint256 _saleStartTs, bytes calldata _signature) external payable { } /* * @dev Mints a limited quantity into the community wallet */ function reservedMint(uint256 _quantity) external onlyOwner { } /* * @dev Sets the signer for ECDSA validation */ function setSigningAddress(address _address) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata uri) external onlyOwner { } function togglePublicMint() public onlyOwner { } function setRoyaltiesAddress(address _newAddress) public onlyOwner { } function withdrawBalance() public onlyOwner { } // ERC165 function supportsInterface(bytes4 _interfaceId) public view override(ERC721A, IERC165) returns (bool) { } // IERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address, uint256 royaltyAmount) { } // OVERRIDES function _startTokenId() internal view virtual override(ERC721A) returns (uint256) { } }
_quantity+totalSupply()<=COLLECTION_SIZE,"soldOut()"
174,194
_quantity+totalSupply()<=COLLECTION_SIZE
"incorrectSignature"
//SPDX-License-Identifier: Unlicense //Author: Goldmember#0001 // Inhabitants /// // ,////////////// // ////////////////// // /////////////////// // //////////////////// // %% //////////////////// // #%%%%%%% ////////////////// // %%%%%%%% ,/////////////// // #, %%%%%%%%% /////////// // #### %%%%%%%%%% // ##### %%%%%% ,,, // %%%% /// %% (((( %% ,, // %%%%%%%% //////// (((((((( %%%%%% ,, // #%%%%%%%%%%%. //////// .(((((((( .%%%%%%% ,, // %%%%%%%%%%%%%%% //////// (((((((( %%%%%%%. ,, %%% // %%%%%%%%%%%%%% ////// ((((( %%%%%%%%%%%%%%%( // ##### %%%%%%%%%%%%%%% / ( %%%%%%%%%%%%%%% ****** // ######### %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ********** // ############( %%%%%%%%%%%%%%%%%%%%%%% ************** // ################# %%%%%%%%%%%%%%% ***************** // ##################### %%%%%%# ********************* // ######################### ************************* // ########################## ************************** // (########################## .************************** // (######################## ************************* // *#################### ********************* // ################ ***************** // ############ ************* // ####### ********** // ## ****** pragma solidity ^0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "erc721a/contracts/ERC721A.sol"; // errors error nothingToWithdraw(); error tokenDoesNotExist(); contract LykeInhabitants is ERC721A, IERC2981, Ownable { using Address for address; using ECDSA for bytes32; // collection details uint256 public constant PRICE = 0.06 ether; uint256 public constant COLLECTION_SIZE = 3000; uint64 public constant MAX_MINTS_PER_PUBLIC_TX = 2; uint256 private royaltiesPercentage; // represents a percentage like 3 = 3% address public royaltiesAddress; // ECDSA address public signingAddress; // variables and constants string public baseURI = "nft://sorryDetective/"; bool public isPublicMintActive = false; mapping(address => bool) public addressClaimMap; uint256 public maxReserveMintRemaining; constructor( address _signerAddress, address _royaltiesAddress, uint256 _royaltiesPercentage, uint256 _maxReserveMintRemaining ) ERC721A("Lyke Inhabitants", "LYKEIN") { } function verifySig(address _sender, uint256 _freeQuantity, uint256 _paidQuantity, uint256 _price, uint256 _saleStartTs, bytes memory _signature) internal view returns(bool) { } /* * @dev Mints for public sale */ function publicMint(uint256 _quantity) external payable { } /* * @dev Mints free amounts and paid amounts if sale has started. */ function saleMint(uint256 _freeQuantity, uint64 _paidQuantity, uint256 _price, uint256 _saleStartTs, bytes calldata _signature) external payable { require(<FILL_ME>) require(msg.value == _paidQuantity * _price, "insufficientPaid()"); require(_paidQuantity + _freeQuantity + totalSupply() <= COLLECTION_SIZE, "soldOut()"); require(_saleStartTs <= block.timestamp, "saleNotStarted()"); require(!addressClaimMap[msg.sender], "saleAlreadyClaimed()"); // mint and update mapping addressClaimMap[msg.sender] = true; _safeMint(msg.sender, _paidQuantity + _freeQuantity); } /* * @dev Mints a limited quantity into the community wallet */ function reservedMint(uint256 _quantity) external onlyOwner { } /* * @dev Sets the signer for ECDSA validation */ function setSigningAddress(address _address) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata uri) external onlyOwner { } function togglePublicMint() public onlyOwner { } function setRoyaltiesAddress(address _newAddress) public onlyOwner { } function withdrawBalance() public onlyOwner { } // ERC165 function supportsInterface(bytes4 _interfaceId) public view override(ERC721A, IERC165) returns (bool) { } // IERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address, uint256 royaltyAmount) { } // OVERRIDES function _startTokenId() internal view virtual override(ERC721A) returns (uint256) { } }
verifySig(msg.sender,_freeQuantity,_paidQuantity,_price,_saleStartTs,_signature),"incorrectSignature"
174,194
verifySig(msg.sender,_freeQuantity,_paidQuantity,_price,_saleStartTs,_signature)
"soldOut()"
//SPDX-License-Identifier: Unlicense //Author: Goldmember#0001 // Inhabitants /// // ,////////////// // ////////////////// // /////////////////// // //////////////////// // %% //////////////////// // #%%%%%%% ////////////////// // %%%%%%%% ,/////////////// // #, %%%%%%%%% /////////// // #### %%%%%%%%%% // ##### %%%%%% ,,, // %%%% /// %% (((( %% ,, // %%%%%%%% //////// (((((((( %%%%%% ,, // #%%%%%%%%%%%. //////// .(((((((( .%%%%%%% ,, // %%%%%%%%%%%%%%% //////// (((((((( %%%%%%%. ,, %%% // %%%%%%%%%%%%%% ////// ((((( %%%%%%%%%%%%%%%( // ##### %%%%%%%%%%%%%%% / ( %%%%%%%%%%%%%%% ****** // ######### %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ********** // ############( %%%%%%%%%%%%%%%%%%%%%%% ************** // ################# %%%%%%%%%%%%%%% ***************** // ##################### %%%%%%# ********************* // ######################### ************************* // ########################## ************************** // (########################## .************************** // (######################## ************************* // *#################### ********************* // ################ ***************** // ############ ************* // ####### ********** // ## ****** pragma solidity ^0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "erc721a/contracts/ERC721A.sol"; // errors error nothingToWithdraw(); error tokenDoesNotExist(); contract LykeInhabitants is ERC721A, IERC2981, Ownable { using Address for address; using ECDSA for bytes32; // collection details uint256 public constant PRICE = 0.06 ether; uint256 public constant COLLECTION_SIZE = 3000; uint64 public constant MAX_MINTS_PER_PUBLIC_TX = 2; uint256 private royaltiesPercentage; // represents a percentage like 3 = 3% address public royaltiesAddress; // ECDSA address public signingAddress; // variables and constants string public baseURI = "nft://sorryDetective/"; bool public isPublicMintActive = false; mapping(address => bool) public addressClaimMap; uint256 public maxReserveMintRemaining; constructor( address _signerAddress, address _royaltiesAddress, uint256 _royaltiesPercentage, uint256 _maxReserveMintRemaining ) ERC721A("Lyke Inhabitants", "LYKEIN") { } function verifySig(address _sender, uint256 _freeQuantity, uint256 _paidQuantity, uint256 _price, uint256 _saleStartTs, bytes memory _signature) internal view returns(bool) { } /* * @dev Mints for public sale */ function publicMint(uint256 _quantity) external payable { } /* * @dev Mints free amounts and paid amounts if sale has started. */ function saleMint(uint256 _freeQuantity, uint64 _paidQuantity, uint256 _price, uint256 _saleStartTs, bytes calldata _signature) external payable { require(verifySig(msg.sender, _freeQuantity, _paidQuantity, _price, _saleStartTs, _signature), "incorrectSignature"); require(msg.value == _paidQuantity * _price, "insufficientPaid()"); require(<FILL_ME>) require(_saleStartTs <= block.timestamp, "saleNotStarted()"); require(!addressClaimMap[msg.sender], "saleAlreadyClaimed()"); // mint and update mapping addressClaimMap[msg.sender] = true; _safeMint(msg.sender, _paidQuantity + _freeQuantity); } /* * @dev Mints a limited quantity into the community wallet */ function reservedMint(uint256 _quantity) external onlyOwner { } /* * @dev Sets the signer for ECDSA validation */ function setSigningAddress(address _address) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata uri) external onlyOwner { } function togglePublicMint() public onlyOwner { } function setRoyaltiesAddress(address _newAddress) public onlyOwner { } function withdrawBalance() public onlyOwner { } // ERC165 function supportsInterface(bytes4 _interfaceId) public view override(ERC721A, IERC165) returns (bool) { } // IERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address, uint256 royaltyAmount) { } // OVERRIDES function _startTokenId() internal view virtual override(ERC721A) returns (uint256) { } }
_paidQuantity+_freeQuantity+totalSupply()<=COLLECTION_SIZE,"soldOut()"
174,194
_paidQuantity+_freeQuantity+totalSupply()<=COLLECTION_SIZE
"saleAlreadyClaimed()"
//SPDX-License-Identifier: Unlicense //Author: Goldmember#0001 // Inhabitants /// // ,////////////// // ////////////////// // /////////////////// // //////////////////// // %% //////////////////// // #%%%%%%% ////////////////// // %%%%%%%% ,/////////////// // #, %%%%%%%%% /////////// // #### %%%%%%%%%% // ##### %%%%%% ,,, // %%%% /// %% (((( %% ,, // %%%%%%%% //////// (((((((( %%%%%% ,, // #%%%%%%%%%%%. //////// .(((((((( .%%%%%%% ,, // %%%%%%%%%%%%%%% //////// (((((((( %%%%%%%. ,, %%% // %%%%%%%%%%%%%% ////// ((((( %%%%%%%%%%%%%%%( // ##### %%%%%%%%%%%%%%% / ( %%%%%%%%%%%%%%% ****** // ######### %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ********** // ############( %%%%%%%%%%%%%%%%%%%%%%% ************** // ################# %%%%%%%%%%%%%%% ***************** // ##################### %%%%%%# ********************* // ######################### ************************* // ########################## ************************** // (########################## .************************** // (######################## ************************* // *#################### ********************* // ################ ***************** // ############ ************* // ####### ********** // ## ****** pragma solidity ^0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "erc721a/contracts/ERC721A.sol"; // errors error nothingToWithdraw(); error tokenDoesNotExist(); contract LykeInhabitants is ERC721A, IERC2981, Ownable { using Address for address; using ECDSA for bytes32; // collection details uint256 public constant PRICE = 0.06 ether; uint256 public constant COLLECTION_SIZE = 3000; uint64 public constant MAX_MINTS_PER_PUBLIC_TX = 2; uint256 private royaltiesPercentage; // represents a percentage like 3 = 3% address public royaltiesAddress; // ECDSA address public signingAddress; // variables and constants string public baseURI = "nft://sorryDetective/"; bool public isPublicMintActive = false; mapping(address => bool) public addressClaimMap; uint256 public maxReserveMintRemaining; constructor( address _signerAddress, address _royaltiesAddress, uint256 _royaltiesPercentage, uint256 _maxReserveMintRemaining ) ERC721A("Lyke Inhabitants", "LYKEIN") { } function verifySig(address _sender, uint256 _freeQuantity, uint256 _paidQuantity, uint256 _price, uint256 _saleStartTs, bytes memory _signature) internal view returns(bool) { } /* * @dev Mints for public sale */ function publicMint(uint256 _quantity) external payable { } /* * @dev Mints free amounts and paid amounts if sale has started. */ function saleMint(uint256 _freeQuantity, uint64 _paidQuantity, uint256 _price, uint256 _saleStartTs, bytes calldata _signature) external payable { require(verifySig(msg.sender, _freeQuantity, _paidQuantity, _price, _saleStartTs, _signature), "incorrectSignature"); require(msg.value == _paidQuantity * _price, "insufficientPaid()"); require(_paidQuantity + _freeQuantity + totalSupply() <= COLLECTION_SIZE, "soldOut()"); require(_saleStartTs <= block.timestamp, "saleNotStarted()"); require(<FILL_ME>) // mint and update mapping addressClaimMap[msg.sender] = true; _safeMint(msg.sender, _paidQuantity + _freeQuantity); } /* * @dev Mints a limited quantity into the community wallet */ function reservedMint(uint256 _quantity) external onlyOwner { } /* * @dev Sets the signer for ECDSA validation */ function setSigningAddress(address _address) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata uri) external onlyOwner { } function togglePublicMint() public onlyOwner { } function setRoyaltiesAddress(address _newAddress) public onlyOwner { } function withdrawBalance() public onlyOwner { } // ERC165 function supportsInterface(bytes4 _interfaceId) public view override(ERC721A, IERC165) returns (bool) { } // IERC2981 function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address, uint256 royaltyAmount) { } // OVERRIDES function _startTokenId() internal view virtual override(ERC721A) returns (uint256) { } }
!addressClaimMap[msg.sender],"saleAlreadyClaimed()"
174,194
!addressClaimMap[msg.sender]
"Cannot set maxTxn lower than 0.5%"
/** M M OOO N N EEEE Y Y MM MM O O NN N E Y Y M M M O O N N N EEE Y M M O O N NN E Y M M OOO N N EEEE Y https://moneyerc.xyz/ https://t.me/moneymoneyerc */ // SPDX-License-Identifier: MIT pragma solidity =0.8.16; pragma experimental ABIEncoderV2; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } 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); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual 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 _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns ( uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast ); function price0CumulativeLast() external view returns (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract MONEY is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; uint256 public maxTransactionAmount; uint256 public swapTokensAtAmount; uint256 public maxWallet; bool public tradingActive = false; bool public swapEnabled = false; uint256 public buyTotalFees; uint256 private buyMarketingFee; uint256 private buyLiquidityFee; uint256 public sellTotalFees; uint256 private sellMarketingFee; uint256 private sellLiquidityFee; uint256 private tokensForMarketing; uint256 private tokensForLiquidity; uint256 private previousFee; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedMaxTransactionAmount; mapping(address => bool) private automatedMarketMakerPairs; event UpdateUniswapV2Router( address indexed newAddress, address indexed oldAddress ); event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event marketingWalletUpdated( address indexed newWallet, address indexed oldWallet ); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); constructor() ERC20(unicode"MONEY", "$MONEY") { } receive() external payable {} function enableTrading() external onlyOwner { } function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { } function updateMaxWalletAndTxnAmount(uint256 newTxnNum, uint256 newMaxWalletNum) external onlyOwner { require(<FILL_ME>) require( newMaxWalletNum >= ((totalSupply() * 1) / 10000) / 1e18, "Cannot set maxWallet lower than 0.5%" ); maxWallet = newMaxWalletNum * (10**18); maxTransactionAmount = newTxnNum * (10**18); } function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { } function updateBuyFees( uint256 _marketingFee, uint256 _liquidityFee ) external onlyOwner { } function updateSellFees( uint256 _marketingFee, uint256 _liquidityFee ) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function isExcludedFromFees(address account) public view returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal override { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapBack() private { } }
newTxnNum>=((totalSupply()*1)/10000)/1e18,"Cannot set maxTxn lower than 0.5%"
174,241
newTxnNum>=((totalSupply()*1)/10000)/1e18
"Cannot set maxWallet lower than 0.5%"
/** M M OOO N N EEEE Y Y MM MM O O NN N E Y Y M M M O O N N N EEE Y M M O O N NN E Y M M OOO N N EEEE Y https://moneyerc.xyz/ https://t.me/moneymoneyerc */ // SPDX-License-Identifier: MIT pragma solidity =0.8.16; pragma experimental ABIEncoderV2; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } 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); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual 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 _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) 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 mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns ( uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast ); function price0CumulativeLast() external view returns (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract MONEY is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; uint256 public maxTransactionAmount; uint256 public swapTokensAtAmount; uint256 public maxWallet; bool public tradingActive = false; bool public swapEnabled = false; uint256 public buyTotalFees; uint256 private buyMarketingFee; uint256 private buyLiquidityFee; uint256 public sellTotalFees; uint256 private sellMarketingFee; uint256 private sellLiquidityFee; uint256 private tokensForMarketing; uint256 private tokensForLiquidity; uint256 private previousFee; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedMaxTransactionAmount; mapping(address => bool) private automatedMarketMakerPairs; event UpdateUniswapV2Router( address indexed newAddress, address indexed oldAddress ); event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event marketingWalletUpdated( address indexed newWallet, address indexed oldWallet ); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); constructor() ERC20(unicode"MONEY", "$MONEY") { } receive() external payable {} function enableTrading() external onlyOwner { } function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { } function updateMaxWalletAndTxnAmount(uint256 newTxnNum, uint256 newMaxWalletNum) external onlyOwner { require( newTxnNum >= ((totalSupply() * 1) / 10000) / 1e18, "Cannot set maxTxn lower than 0.5%" ); require(<FILL_ME>) maxWallet = newMaxWalletNum * (10**18); maxTransactionAmount = newTxnNum * (10**18); } function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { } function updateBuyFees( uint256 _marketingFee, uint256 _liquidityFee ) external onlyOwner { } function updateSellFees( uint256 _marketingFee, uint256 _liquidityFee ) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function isExcludedFromFees(address account) public view returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal override { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapBack() private { } }
newMaxWalletNum>=((totalSupply()*1)/10000)/1e18,"Cannot set maxWallet lower than 0.5%"
174,241
newMaxWalletNum>=((totalSupply()*1)/10000)/1e18
"Purchase would exceed max tokens"
pragma solidity 0.8.17; contract CryptoMicCrewNFT is ERC721, ERC721Enumerable, Ownable { bool public isWhitelistEnabled = false; bool public isPublicSaleEnabled = false; bool public isFinalURI = false; uint32 public constant MAX_SUPPLY = 5000; uint32 public constant OWNER_RESERVE = 60; uint32 public constant MAX_PUBLIC_MINT = 10; uint256 public constant TOKEN_PRICE = 0.03 ether; mapping(address => uint8) private _allowList; string private _baseURIextended; constructor() ERC721("Crypto Mic Crew", "CMC") {} function mint(uint numberOfTokens) public payable { uint256 ts = totalSupply(); require(isPublicSaleEnabled, "Sale must be active to mint tokens"); require(numberOfTokens <= MAX_PUBLIC_MINT, "Exceeded max token purchase"); require(<FILL_ME>) require(TOKEN_PRICE * numberOfTokens <= msg.value, "Ether value sent is not sufficient"); for (uint256 i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, ts + i); } } function setWhitelist(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner { } function numAvailableToMint(address addr) external view returns (uint8) { } function mintWhitelist(uint8 numberOfTokens) external payable { } function reserve(uint256 numberOfTokens) external onlyOwner { } function setSaleState(bool saleState) external onlyOwner { } function setWhitelistState(bool whitelistState) external onlyOwner { } function withdraw() external onlyOwner { } function finalizeURI() external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } //OpenSea whitelisting function isApprovedForAll(address _owner, address _operator) public override(ERC721, IERC721) view returns (bool isOperator) { } }
ts+numberOfTokens<=MAX_SUPPLY,"Purchase would exceed max tokens"
174,331
ts+numberOfTokens<=MAX_SUPPLY
"Ether value sent is not sufficient"
pragma solidity 0.8.17; contract CryptoMicCrewNFT is ERC721, ERC721Enumerable, Ownable { bool public isWhitelistEnabled = false; bool public isPublicSaleEnabled = false; bool public isFinalURI = false; uint32 public constant MAX_SUPPLY = 5000; uint32 public constant OWNER_RESERVE = 60; uint32 public constant MAX_PUBLIC_MINT = 10; uint256 public constant TOKEN_PRICE = 0.03 ether; mapping(address => uint8) private _allowList; string private _baseURIextended; constructor() ERC721("Crypto Mic Crew", "CMC") {} function mint(uint numberOfTokens) public payable { uint256 ts = totalSupply(); require(isPublicSaleEnabled, "Sale must be active to mint tokens"); require(numberOfTokens <= MAX_PUBLIC_MINT, "Exceeded max token purchase"); require(ts + numberOfTokens <= MAX_SUPPLY, "Purchase would exceed max tokens"); require(<FILL_ME>) for (uint256 i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, ts + i); } } function setWhitelist(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner { } function numAvailableToMint(address addr) external view returns (uint8) { } function mintWhitelist(uint8 numberOfTokens) external payable { } function reserve(uint256 numberOfTokens) external onlyOwner { } function setSaleState(bool saleState) external onlyOwner { } function setWhitelistState(bool whitelistState) external onlyOwner { } function withdraw() external onlyOwner { } function finalizeURI() external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } //OpenSea whitelisting function isApprovedForAll(address _owner, address _operator) public override(ERC721, IERC721) view returns (bool isOperator) { } }
TOKEN_PRICE*numberOfTokens<=msg.value,"Ether value sent is not sufficient"
174,331
TOKEN_PRICE*numberOfTokens<=msg.value
"Too many tokens already minted before owner reserve"
pragma solidity 0.8.17; contract CryptoMicCrewNFT is ERC721, ERC721Enumerable, Ownable { bool public isWhitelistEnabled = false; bool public isPublicSaleEnabled = false; bool public isFinalURI = false; uint32 public constant MAX_SUPPLY = 5000; uint32 public constant OWNER_RESERVE = 60; uint32 public constant MAX_PUBLIC_MINT = 10; uint256 public constant TOKEN_PRICE = 0.03 ether; mapping(address => uint8) private _allowList; string private _baseURIextended; constructor() ERC721("Crypto Mic Crew", "CMC") {} function mint(uint numberOfTokens) public payable { } function setWhitelist(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner { } function numAvailableToMint(address addr) external view returns (uint8) { } function mintWhitelist(uint8 numberOfTokens) external payable { } function reserve(uint256 numberOfTokens) external onlyOwner { uint256 ts = totalSupply(); require(<FILL_ME>) for (uint256 i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, ts + i); } } function setSaleState(bool saleState) external onlyOwner { } function setWhitelistState(bool whitelistState) external onlyOwner { } function withdraw() external onlyOwner { } function finalizeURI() external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } //OpenSea whitelisting function isApprovedForAll(address _owner, address _operator) public override(ERC721, IERC721) view returns (bool isOperator) { } }
ts+numberOfTokens<=OWNER_RESERVE,"Too many tokens already minted before owner reserve"
174,331
ts+numberOfTokens<=OWNER_RESERVE
"URI was finalized, cannot change URI"
pragma solidity 0.8.17; contract CryptoMicCrewNFT is ERC721, ERC721Enumerable, Ownable { bool public isWhitelistEnabled = false; bool public isPublicSaleEnabled = false; bool public isFinalURI = false; uint32 public constant MAX_SUPPLY = 5000; uint32 public constant OWNER_RESERVE = 60; uint32 public constant MAX_PUBLIC_MINT = 10; uint256 public constant TOKEN_PRICE = 0.03 ether; mapping(address => uint8) private _allowList; string private _baseURIextended; constructor() ERC721("Crypto Mic Crew", "CMC") {} function mint(uint numberOfTokens) public payable { } function setWhitelist(address[] calldata addresses, uint8 numAllowedToMint) external onlyOwner { } function numAvailableToMint(address addr) external view returns (uint8) { } function mintWhitelist(uint8 numberOfTokens) external payable { } function reserve(uint256 numberOfTokens) external onlyOwner { } function setSaleState(bool saleState) external onlyOwner { } function setWhitelistState(bool whitelistState) external onlyOwner { } function withdraw() external onlyOwner { } function finalizeURI() external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) external onlyOwner { require(<FILL_ME>) _baseURIextended = baseURI_; } function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } //OpenSea whitelisting function isApprovedForAll(address _owner, address _operator) public override(ERC721, IERC721) view returns (bool isOperator) { } }
!isFinalURI,"URI was finalized, cannot change URI"
174,331
!isFinalURI
"SoldOut"
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "https://github.com/chiru-labs/ERC721A/blob/main/contracts/IERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract GoldPunksClubhouse is IERC721A { address private _owner; modifier onlyOwner() { } bool public saleIsActive = false; uint256 public constant TEAM_MINT_SUPPLY = 10; uint256 public constant MAX_SUPPLY = 888; uint256 public constant MAX_PER_WALLET = 1; uint256 public constant COST = 0 ether; string private constant _name = "GoldPunksClubhouse"; string private constant _symbol = "GPCH"; string private _contractURI = ""; string private _baseURI = ""; constructor() { } function teamMint(address _to, uint256 _amount) external onlyOwner { require(<FILL_ME>) require(_numberMinted(msg.sender) <= TEAM_MINT_SUPPLY, "Max"); _safeMint(_to, _amount); } function mint() external{ } // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex = 0; // The number of tokens burned. // uint256 private _burnCounter; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // 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; function setSale(bool _saleIsActive) external onlyOwner{ } function setBaseURI(string memory _new) external onlyOwner{ } function setContractURI(string memory _new) external onlyOwner{ } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { } /** * 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) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public view returns (string memory) { } /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { } /** * @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 virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev 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) { } /** * @dev Equivalent to `_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) 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 Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { } function withdraw() external onlyOwner { } }
totalSupply()+_amount<MAX_SUPPLY,"SoldOut"
174,352
totalSupply()+_amount<MAX_SUPPLY
"Max"
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "https://github.com/chiru-labs/ERC721A/blob/main/contracts/IERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract GoldPunksClubhouse is IERC721A { address private _owner; modifier onlyOwner() { } bool public saleIsActive = false; uint256 public constant TEAM_MINT_SUPPLY = 10; uint256 public constant MAX_SUPPLY = 888; uint256 public constant MAX_PER_WALLET = 1; uint256 public constant COST = 0 ether; string private constant _name = "GoldPunksClubhouse"; string private constant _symbol = "GPCH"; string private _contractURI = ""; string private _baseURI = ""; constructor() { } function teamMint(address _to, uint256 _amount) external onlyOwner { require(totalSupply()+_amount<MAX_SUPPLY, "SoldOut"); require(<FILL_ME>) _safeMint(_to, _amount); } function mint() external{ } // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex = 0; // The number of tokens burned. // uint256 private _burnCounter; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // 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; function setSale(bool _saleIsActive) external onlyOwner{ } function setBaseURI(string memory _new) external onlyOwner{ } function setContractURI(string memory _new) external onlyOwner{ } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { } /** * 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) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public view returns (string memory) { } /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { } /** * @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 virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev 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) { } /** * @dev Equivalent to `_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) 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 Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { } function withdraw() external onlyOwner { } }
_numberMinted(msg.sender)<=TEAM_MINT_SUPPLY,"Max"
174,352
_numberMinted(msg.sender)<=TEAM_MINT_SUPPLY
"1 per Wallet"
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import "https://github.com/chiru-labs/ERC721A/blob/main/contracts/IERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract GoldPunksClubhouse is IERC721A { address private _owner; modifier onlyOwner() { } bool public saleIsActive = false; uint256 public constant TEAM_MINT_SUPPLY = 10; uint256 public constant MAX_SUPPLY = 888; uint256 public constant MAX_PER_WALLET = 1; uint256 public constant COST = 0 ether; string private constant _name = "GoldPunksClubhouse"; string private constant _symbol = "GPCH"; string private _contractURI = ""; string private _baseURI = ""; constructor() { } function teamMint(address _to, uint256 _amount) external onlyOwner { } function mint() external{ address _caller = _msgSenderERC721A(); uint256 _amount = 1; require(saleIsActive, "NotActive"); require(totalSupply() + _amount <= MAX_SUPPLY, "SoldOut"); require(<FILL_ME>) _safeMint(_caller, _amount); } // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex = 0; // The number of tokens burned. // uint256 private _burnCounter; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // 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; function setSale(bool _saleIsActive) external onlyOwner{ } function setBaseURI(string memory _new) external onlyOwner{ } function setContractURI(string memory _new) external onlyOwner{ } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { } /** * 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) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public view returns (string memory) { } /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { } /** * @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 virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev 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) { } /** * @dev Equivalent to `_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) 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 Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { } function withdraw() external onlyOwner { } }
_amount+_numberMinted(msg.sender)<=MAX_PER_WALLET,"1 per Wallet"
174,352
_amount+_numberMinted(msg.sender)<=MAX_PER_WALLET
null
//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721 // SPDX-License-Identifier: MIT pragma solidity ^0.7.3; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract MyNFT is ERC721, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; constructor() ERC721("AVALANCHE", "AVAX") {} function baseTokenURI() public pure returns (string memory) { } function tokenURI(uint256 _tokenId) override public pure returns (string memory) { } function mintNFT(address recipient) public virtual payable returns (uint256) { } function withdrawAll() external onlyOwner { require(<FILL_ME>) } }
msg.sender.send(address(this).balance)
174,353
msg.sender.send(address(this).balance)
"Insufficient quota"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/ITreasury.sol"; import "../interfaces/IWhitelistSalePublic.sol"; import "./MerkleDistributor.sol"; /// @title WhitelistSalePublic /// @author Bluejay Core Team /// @notice WhitelistSalePublic is a token sale contract that sells tokens at a fixed price to whitelisted /// addresses. Purchased BLU tokens are sent immediately to the buyer. contract WhitelistSalePublic is Ownable, MerkleDistributor, IWhitelistSalePublic { using SafeERC20 for IERC20; uint256 internal constant WAD = 10**18; /// @notice The contract address of the treasury, for minting BLU ITreasury public immutable treasury; /// @notice The contract address the asset used to purchase the BLU token IERC20 public immutable reserve; /// @notice Maximum number of BLU tokens that can be purchased, in WAD uint256 public immutable maxPurchasable; /// @notice Total of quota that has been claimed, in WAD uint256 public totalQuota; /// @notice Total of tokens that have been sold, in WAD uint256 public totalPurchased; /// @notice Mapping of addresses to available quota for purchase, in WAD mapping(address => uint256) public quota; /// @notice Price of the token against the reserve asset, in WAD uint256 public price; /// @notice Flag to pause contract bool public paused; /// @notice Constructor to initialize the contract /// @param _reserve Address the asset used to purchase the BLU token /// @param _treasury Address of the treasury /// @param _price Price of the token against the reserve asset, in WAD /// @param _maxPurchasable Maximum number of BLU tokens that can be purchased, in WAD /// @param _merkleRoot Merkle root of the distribution constructor( address _reserve, address _treasury, uint256 _price, uint256 _maxPurchasable, bytes32 _merkleRoot ) { } // =============================== PUBLIC FUNCTIONS ================================= /// @notice Claims quota for the distribution to start purchasing tokens /// @dev The parameters of the function should come from the merkle distribution file /// @param index Index of the distribution /// @param account Account where the distribution is credited to /// @param amount Amount of allocated in the distribution, in WAD /// @param merkleProof Array of bytes32s representing the merkle proof of the distribution function claimQuota( uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof ) public override { } /// @notice Purchase tokens from the sale /// @dev The quota for purchase should be claimed prior to executing this function /// @param amount Amount of reserve assset to use for purchase /// @param recipient Address where BLU will be sent to function purchase(uint256 amount, address recipient) public override { require(!paused, "Purchase paused"); uint256 tokensBought = (amount * WAD) / price; require(<FILL_ME>) quota[msg.sender] -= tokensBought; totalPurchased += tokensBought; require(totalPurchased <= maxPurchasable, "Max purchasable reached"); reserve.safeTransferFrom(msg.sender, address(treasury), amount); treasury.mint(recipient, tokensBought); emit Purchase(msg.sender, recipient, amount, tokensBought); } /// @notice Utility function to execute both claim and purchase in a single transaction /// @param index Index of the distribution /// @param account Account where the distribution is credited to /// @param claimAmount Amount of allocated in the distribution, in WAD /// @param merkleProof Array of bytes32s representing the merkle proof of the distribution /// @param purchaseAmount Amount of reserve assset to use for purchase /// @param recipient Address where BLU will be sent to function claimAndPurchase( uint256 index, address account, uint256 claimAmount, bytes32[] calldata merkleProof, uint256 purchaseAmount, address recipient ) public override { } // =============================== ADMIN FUNCTIONS ================================= /// @notice Pause and unpause the contract /// @param _paused True to pause, false to unpause function setPause(bool _paused) public onlyOwner { } /// @notice Set the merkle root for the distribution /// @dev Setting the merkle root after distribution has begun may result in unintended consequences /// @param _merkleRoot New merkle root of the distribution function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } /// @notice Set the price of the BLU toke /// @dev The contract needs to be paused before setting the price /// @param _price New price of BLU, in WAD function setPrice(uint256 _price) public onlyOwner { } }
quota[msg.sender]>=tokensBought,"Insufficient quota"
174,431
quota[msg.sender]>=tokensBought
null
/** *Submitted for verification at Etherscan.io on 2023-01-08 */ // https://ethmachine.pro/ // https://twitter.com/ethmachinepro // SPDX-License-Identifier: MIT pragma solidity 0.8.9; contract ETHMACHINE { using SafeMath for uint256; /** base parameters **/ uint256 public EGGS_TO_HIRE_1MINERS = 1440000; uint256 public REFERRAL = 80; uint256 public PERCENTS_DIVIDER = 1000; uint256 private TAX = 10; uint256 private MKT = 20; uint256 public MARKET_EGGS_DIVISOR = 5; uint256 public MARKET_EGGS_DIVISOR_SELL = 2; uint256 public MIN_INVEST_LIMIT = 1 * 1e16; /** 0.01 ETH **/ uint256 public WALLET_DEPOSIT_LIMIT = 1 * 1e18; /** 1 ETH **/ uint256 public COMPOUND_BONUS = 20; uint256 public COMPOUND_BONUS_MAX_TIMES = 10; uint256 public COMPOUND_STEP = 12 * 60 * 60; uint256 public WITHDRAWAL_TAX = 600; uint256 public COMPOUND_FOR_NO_TAX_WITHDRAWAL = 10; uint256 public totalStaked; uint256 public totalDeposits; uint256 public totalCompound; uint256 public totalRefBonus; uint256 public totalWithdrawn; uint256 private marketEggs; uint256 PSN = 10000; uint256 PSNH = 5000; bool private contractStarted; bool public blacklistActive = true; mapping(address => bool) public Blacklisted; uint256 public CUTOFF_STEP = 48 * 60 * 60; uint256 public WITHDRAW_COOLDOWN = 4 * 60 * 60; /* addresses */ address private owner; address payable private dev1; address payable private mkt; struct User { uint256 initialDeposit; uint256 userDeposit; uint256 miners; uint256 claimedEggs; uint256 lastHatch; address referrer; uint256 referralsCount; uint256 referralEggRewards; uint256 totalWithdrawn; uint256 dailyCompoundBonus; uint256 farmerCompoundCount; //added to monitor farmer consecutive compound without cap uint256 lastWithdrawTime; } mapping(address => User) public users; constructor(address payable _dev1, address payable _mkt) { require(<FILL_ME>) owner = msg.sender; dev1 = _dev1; mkt = mkt; marketEggs = 144000000000; } function isContract(address addr) internal view returns (bool) { } function hireMoreFarmers(bool isCompound) public { } function sellCrops() public{ } /** transfer amount of ETH **/ function hireFarmers(address ref) public payable{ } function startFarm(address addr) public payable{ } function fundContractAndHoard() public payable{ } //fund contract with ETH before launch. function fundContract() external payable {} function payFees(uint256 eggValue) internal returns(uint256){ } function getDailyCompoundBonus(address _adr, uint256 amount) public view returns(uint256){ } function getUserInfo(address _adr) public view returns(uint256 _initialDeposit, uint256 _userDeposit, uint256 _miners, uint256 _claimedEggs, uint256 _lastHatch, address _referrer, uint256 _referrals, uint256 _totalWithdrawn, uint256 _referralEggRewards, uint256 _dailyCompoundBonus, uint256 _farmerCompoundCount, uint256 _lastWithdrawTime) { } function getBalance() public view returns(uint256){ } function getTimeStamp() public view returns (uint256) { } function getAvailableEarnings(address _adr) public view returns(uint256) { } // Supply and demand balance algorithm 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){ } /** How many miners and eggs per day user will recieve based on ETH deposit **/ function getEggsYield(uint256 amount) public view returns(uint256,uint256) { } function calculateEggSellForYield(uint256 eggs,uint256 amount) public view returns(uint256){ } function getSiteInfo() public view returns (uint256 _totalStaked, uint256 _totalDeposits, uint256 _totalCompound, uint256 _totalRefBonus) { } function getMyMiners() 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) { } function CHANGE_OWNERSHIP(address value) external { } /** percentage setters **/ // 2592000 - 3%, 2160000 - 4%, 1728000 - 5%, 1440000 - 6%, 1200000 - 7% // 1080000 - 8%, 959000 - 9%, 864000 - 10%, 720000 - 12% function PRC_EGGS_TO_HIRE_1MINERS(uint256 value) external { } function PRC_TAX(uint256 value) external { } function PRC_MKT(uint256 value) external { } function PRC_REFERRAL(uint256 value) external { } function PRC_MARKET_EGGS_DIVISOR(uint256 value) external { } function PRC_MARKET_EGGS_DIVISOR_SELL(uint256 value) external { } function SET_WITHDRAWAL_TAX(uint256 value) external { } function BONUS_DAILY_COMPOUND(uint256 value) external { } function BONUS_DAILY_COMPOUND_BONUS_MAX_TIMES(uint256 value) external { } function BONUS_COMPOUND_STEP(uint256 value) external { } function SET_INVEST_MIN(uint256 value) external { } function SET_CUTOFF_STEP(uint256 value) external { } function SET_WITHDRAW_COOLDOWN(uint256 value) external { } function SET_WALLET_DEPOSIT_LIMIT(uint256 value) external { } function SET_COMPOUND_FOR_NO_TAX_WITHDRAWAL(uint256 value) external { } } 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) { } }
!isContract(_dev1)&&!isContract(_mkt)
174,449
!isContract(_dev1)&&!isContract(_mkt)
"Contract not yet Started."
/** *Submitted for verification at Etherscan.io on 2023-01-08 */ // https://ethmachine.pro/ // https://twitter.com/ethmachinepro // SPDX-License-Identifier: MIT pragma solidity 0.8.9; contract ETHMACHINE { using SafeMath for uint256; /** base parameters **/ uint256 public EGGS_TO_HIRE_1MINERS = 1440000; uint256 public REFERRAL = 80; uint256 public PERCENTS_DIVIDER = 1000; uint256 private TAX = 10; uint256 private MKT = 20; uint256 public MARKET_EGGS_DIVISOR = 5; uint256 public MARKET_EGGS_DIVISOR_SELL = 2; uint256 public MIN_INVEST_LIMIT = 1 * 1e16; /** 0.01 ETH **/ uint256 public WALLET_DEPOSIT_LIMIT = 1 * 1e18; /** 1 ETH **/ uint256 public COMPOUND_BONUS = 20; uint256 public COMPOUND_BONUS_MAX_TIMES = 10; uint256 public COMPOUND_STEP = 12 * 60 * 60; uint256 public WITHDRAWAL_TAX = 600; uint256 public COMPOUND_FOR_NO_TAX_WITHDRAWAL = 10; uint256 public totalStaked; uint256 public totalDeposits; uint256 public totalCompound; uint256 public totalRefBonus; uint256 public totalWithdrawn; uint256 private marketEggs; uint256 PSN = 10000; uint256 PSNH = 5000; bool private contractStarted; bool public blacklistActive = true; mapping(address => bool) public Blacklisted; uint256 public CUTOFF_STEP = 48 * 60 * 60; uint256 public WITHDRAW_COOLDOWN = 4 * 60 * 60; /* addresses */ address private owner; address payable private dev1; address payable private mkt; struct User { uint256 initialDeposit; uint256 userDeposit; uint256 miners; uint256 claimedEggs; uint256 lastHatch; address referrer; uint256 referralsCount; uint256 referralEggRewards; uint256 totalWithdrawn; uint256 dailyCompoundBonus; uint256 farmerCompoundCount; //added to monitor farmer consecutive compound without cap uint256 lastWithdrawTime; } mapping(address => User) public users; constructor(address payable _dev1, address payable _mkt) { } function isContract(address addr) internal view returns (bool) { } function hireMoreFarmers(bool isCompound) public { User storage user = users[msg.sender]; require(<FILL_ME>) uint256 eggsUsed = getMyEggs(); uint256 eggsForCompound = eggsUsed; if(isCompound) { uint256 dailyCompoundBonus = getDailyCompoundBonus(msg.sender, eggsForCompound); eggsForCompound = eggsForCompound.add(dailyCompoundBonus); uint256 eggsUsedValue = calculateEggSell(eggsForCompound); user.userDeposit = user.userDeposit.add(eggsUsedValue); totalCompound = totalCompound.add(eggsUsedValue); } if(block.timestamp.sub(user.lastHatch) >= COMPOUND_STEP) { if(user.dailyCompoundBonus < COMPOUND_BONUS_MAX_TIMES) { user.dailyCompoundBonus = user.dailyCompoundBonus.add(1); } //add compoundCount for monitoring purposes. user.farmerCompoundCount = user.farmerCompoundCount .add(1); } user.miners = user.miners.add(eggsForCompound.div(EGGS_TO_HIRE_1MINERS)); user.claimedEggs = 0; user.lastHatch = block.timestamp; marketEggs = marketEggs.add(eggsUsed.div(MARKET_EGGS_DIVISOR)); } function sellCrops() public{ } /** transfer amount of ETH **/ function hireFarmers(address ref) public payable{ } function startFarm(address addr) public payable{ } function fundContractAndHoard() public payable{ } //fund contract with ETH before launch. function fundContract() external payable {} function payFees(uint256 eggValue) internal returns(uint256){ } function getDailyCompoundBonus(address _adr, uint256 amount) public view returns(uint256){ } function getUserInfo(address _adr) public view returns(uint256 _initialDeposit, uint256 _userDeposit, uint256 _miners, uint256 _claimedEggs, uint256 _lastHatch, address _referrer, uint256 _referrals, uint256 _totalWithdrawn, uint256 _referralEggRewards, uint256 _dailyCompoundBonus, uint256 _farmerCompoundCount, uint256 _lastWithdrawTime) { } function getBalance() public view returns(uint256){ } function getTimeStamp() public view returns (uint256) { } function getAvailableEarnings(address _adr) public view returns(uint256) { } // Supply and demand balance algorithm 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){ } /** How many miners and eggs per day user will recieve based on ETH deposit **/ function getEggsYield(uint256 amount) public view returns(uint256,uint256) { } function calculateEggSellForYield(uint256 eggs,uint256 amount) public view returns(uint256){ } function getSiteInfo() public view returns (uint256 _totalStaked, uint256 _totalDeposits, uint256 _totalCompound, uint256 _totalRefBonus) { } function getMyMiners() 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) { } function CHANGE_OWNERSHIP(address value) external { } /** percentage setters **/ // 2592000 - 3%, 2160000 - 4%, 1728000 - 5%, 1440000 - 6%, 1200000 - 7% // 1080000 - 8%, 959000 - 9%, 864000 - 10%, 720000 - 12% function PRC_EGGS_TO_HIRE_1MINERS(uint256 value) external { } function PRC_TAX(uint256 value) external { } function PRC_MKT(uint256 value) external { } function PRC_REFERRAL(uint256 value) external { } function PRC_MARKET_EGGS_DIVISOR(uint256 value) external { } function PRC_MARKET_EGGS_DIVISOR_SELL(uint256 value) external { } function SET_WITHDRAWAL_TAX(uint256 value) external { } function BONUS_DAILY_COMPOUND(uint256 value) external { } function BONUS_DAILY_COMPOUND_BONUS_MAX_TIMES(uint256 value) external { } function BONUS_COMPOUND_STEP(uint256 value) external { } function SET_INVEST_MIN(uint256 value) external { } function SET_CUTOFF_STEP(uint256 value) external { } function SET_WITHDRAW_COOLDOWN(uint256 value) external { } function SET_WALLET_DEPOSIT_LIMIT(uint256 value) external { } function SET_COMPOUND_FOR_NO_TAX_WITHDRAWAL(uint256 value) external { } } 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) { } }
contractStarted||msg.sender==mkt,"Contract not yet Started."
174,449
contractStarted||msg.sender==mkt
"Max deposit limit reached."
/** *Submitted for verification at Etherscan.io on 2023-01-08 */ // https://ethmachine.pro/ // https://twitter.com/ethmachinepro // SPDX-License-Identifier: MIT pragma solidity 0.8.9; contract ETHMACHINE { using SafeMath for uint256; /** base parameters **/ uint256 public EGGS_TO_HIRE_1MINERS = 1440000; uint256 public REFERRAL = 80; uint256 public PERCENTS_DIVIDER = 1000; uint256 private TAX = 10; uint256 private MKT = 20; uint256 public MARKET_EGGS_DIVISOR = 5; uint256 public MARKET_EGGS_DIVISOR_SELL = 2; uint256 public MIN_INVEST_LIMIT = 1 * 1e16; /** 0.01 ETH **/ uint256 public WALLET_DEPOSIT_LIMIT = 1 * 1e18; /** 1 ETH **/ uint256 public COMPOUND_BONUS = 20; uint256 public COMPOUND_BONUS_MAX_TIMES = 10; uint256 public COMPOUND_STEP = 12 * 60 * 60; uint256 public WITHDRAWAL_TAX = 600; uint256 public COMPOUND_FOR_NO_TAX_WITHDRAWAL = 10; uint256 public totalStaked; uint256 public totalDeposits; uint256 public totalCompound; uint256 public totalRefBonus; uint256 public totalWithdrawn; uint256 private marketEggs; uint256 PSN = 10000; uint256 PSNH = 5000; bool private contractStarted; bool public blacklistActive = true; mapping(address => bool) public Blacklisted; uint256 public CUTOFF_STEP = 48 * 60 * 60; uint256 public WITHDRAW_COOLDOWN = 4 * 60 * 60; /* addresses */ address private owner; address payable private dev1; address payable private mkt; struct User { uint256 initialDeposit; uint256 userDeposit; uint256 miners; uint256 claimedEggs; uint256 lastHatch; address referrer; uint256 referralsCount; uint256 referralEggRewards; uint256 totalWithdrawn; uint256 dailyCompoundBonus; uint256 farmerCompoundCount; //added to monitor farmer consecutive compound without cap uint256 lastWithdrawTime; } mapping(address => User) public users; constructor(address payable _dev1, address payable _mkt) { } function isContract(address addr) internal view returns (bool) { } function hireMoreFarmers(bool isCompound) public { } function sellCrops() public{ } /** transfer amount of ETH **/ function hireFarmers(address ref) public payable{ require(contractStarted, "Contract not yet Started."); User storage user = users[msg.sender]; require(msg.value >= MIN_INVEST_LIMIT, "Mininum investment not met."); require(<FILL_ME>) uint256 eggsBought = calculateEggBuy(msg.value, address(this).balance.sub(msg.value)); user.userDeposit = user.userDeposit.add(msg.value); user.initialDeposit = user.initialDeposit.add(msg.value); user.claimedEggs = user.claimedEggs.add(eggsBought); if (user.referrer == address(0)) { if (ref != msg.sender) { user.referrer = ref; } address upline1 = user.referrer; if (upline1 != address(0)) { users[upline1].referralsCount = users[upline1].referralsCount.add(1); } } if (user.referrer != address(0)) { address upline = user.referrer; if (upline != address(0)) { uint256 refRewards = msg.value.mul(REFERRAL).div(PERCENTS_DIVIDER); payable(address(upline)).transfer(refRewards); users[upline].referralEggRewards = users[upline].referralEggRewards.add(refRewards); totalRefBonus = totalRefBonus.add(refRewards); } } uint256 eggsPayout = payFees(msg.value); totalStaked = totalStaked.add(msg.value.sub(eggsPayout)); totalDeposits = totalDeposits.add(1); hireMoreFarmers(false); } function startFarm(address addr) public payable{ } function fundContractAndHoard() public payable{ } //fund contract with ETH before launch. function fundContract() external payable {} function payFees(uint256 eggValue) internal returns(uint256){ } function getDailyCompoundBonus(address _adr, uint256 amount) public view returns(uint256){ } function getUserInfo(address _adr) public view returns(uint256 _initialDeposit, uint256 _userDeposit, uint256 _miners, uint256 _claimedEggs, uint256 _lastHatch, address _referrer, uint256 _referrals, uint256 _totalWithdrawn, uint256 _referralEggRewards, uint256 _dailyCompoundBonus, uint256 _farmerCompoundCount, uint256 _lastWithdrawTime) { } function getBalance() public view returns(uint256){ } function getTimeStamp() public view returns (uint256) { } function getAvailableEarnings(address _adr) public view returns(uint256) { } // Supply and demand balance algorithm 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){ } /** How many miners and eggs per day user will recieve based on ETH deposit **/ function getEggsYield(uint256 amount) public view returns(uint256,uint256) { } function calculateEggSellForYield(uint256 eggs,uint256 amount) public view returns(uint256){ } function getSiteInfo() public view returns (uint256 _totalStaked, uint256 _totalDeposits, uint256 _totalCompound, uint256 _totalRefBonus) { } function getMyMiners() 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) { } function CHANGE_OWNERSHIP(address value) external { } /** percentage setters **/ // 2592000 - 3%, 2160000 - 4%, 1728000 - 5%, 1440000 - 6%, 1200000 - 7% // 1080000 - 8%, 959000 - 9%, 864000 - 10%, 720000 - 12% function PRC_EGGS_TO_HIRE_1MINERS(uint256 value) external { } function PRC_TAX(uint256 value) external { } function PRC_MKT(uint256 value) external { } function PRC_REFERRAL(uint256 value) external { } function PRC_MARKET_EGGS_DIVISOR(uint256 value) external { } function PRC_MARKET_EGGS_DIVISOR_SELL(uint256 value) external { } function SET_WITHDRAWAL_TAX(uint256 value) external { } function BONUS_DAILY_COMPOUND(uint256 value) external { } function BONUS_DAILY_COMPOUND_BONUS_MAX_TIMES(uint256 value) external { } function BONUS_COMPOUND_STEP(uint256 value) external { } function SET_INVEST_MIN(uint256 value) external { } function SET_CUTOFF_STEP(uint256 value) external { } function SET_WITHDRAW_COOLDOWN(uint256 value) external { } function SET_WALLET_DEPOSIT_LIMIT(uint256 value) external { } function SET_COMPOUND_FOR_NO_TAX_WITHDRAWAL(uint256 value) external { } } 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) { } }
user.initialDeposit.add(msg.value)<=WALLET_DEPOSIT_LIMIT,"Max deposit limit reached."
174,449
user.initialDeposit.add(msg.value)<=WALLET_DEPOSIT_LIMIT
Errors.ACL_ONLY_POOL_ADMIN_CAN_CALL
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { IACLManager ACLManager = IACLManager(SETTINGS.ACLManagerAddress()); require(<FILL_ME>) _; } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
ACLManager.isPoolAdmin(_msgSender()),Errors.ACL_ONLY_POOL_ADMIN_CAN_CALL
174,840
ACLManager.isPoolAdmin(_msgSender())
Errors.ACL_ONLY_LIQUIDATOR_CAN_CALL
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { require(<FILL_ME>) _; } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
SETTINGS.isLiquidator(_msgSender()),Errors.ACL_ONLY_LIQUIDATOR_CAN_CALL
174,840
SETTINGS.isLiquidator(_msgSender())
Errors.ACL_ONLY_EMERGENCY_ADMIN_CAN_CALL
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { IACLManager ACLManager = IACLManager(SETTINGS.ACLManagerAddress()); require(<FILL_ME>) _; } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
ACLManager.isEmergencyAdmin(_msgSender()),Errors.ACL_ONLY_EMERGENCY_ADMIN_CAN_CALL
174,840
ACLManager.isEmergencyAdmin(_msgSender())
Errors.RESERVE_DOES_NOT_EXIST
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { require(<FILL_ME>) _; } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
_exists(reserveId),Errors.RESERVE_DOES_NOT_EXIST
174,840
_exists(reserveId)
Errors.RESERVE_SWITCH_MONEY_MARKET_STATE_ERROR
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { require(<FILL_ME>) reserves[reserveId].openMoneyMarket(); emit OpenMoneyMarket(reserveId); } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
!reserves[reserveId].isMoneyMarketOn,Errors.RESERVE_SWITCH_MONEY_MARKET_STATE_ERROR
174,840
!reserves[reserveId].isMoneyMarketOn
Errors.RESERVE_SWITCH_MONEY_MARKET_STATE_ERROR
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { require(<FILL_ME>) reserves[reserveId].closeMoneyMarket(); emit CloseMoneyMarket(reserveId); } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
reserves[reserveId].isMoneyMarketOn,Errors.RESERVE_SWITCH_MONEY_MARKET_STATE_ERROR
174,840
reserves[reserveId].isMoneyMarketOn
Errors.WITHDRAW_LIQUIDITY_NOT_SUFFICIENT
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { address oTokenAddress = reserves[reserveId].oTokenAddress; uint256 userBalance = IOpenSkyOToken(oTokenAddress).balanceOf(_msgSender()); uint256 amountToWithdraw = amount; if (amount == type(uint256).max) { amountToWithdraw = userBalance; } require(amountToWithdraw > 0 && amountToWithdraw <= userBalance, Errors.WITHDRAW_AMOUNT_NOT_ALLOWED); require(<FILL_ME>) reserves[reserveId].withdraw(_msgSender(), amountToWithdraw, onBehalfOf); emit Withdraw(reserveId, onBehalfOf, amountToWithdraw); } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
getAvailableLiquidity(reserveId)>=amountToWithdraw,Errors.WITHDRAW_LIQUIDITY_NOT_SUFFICIENT
174,840
getAvailableLiquidity(reserveId)>=amountToWithdraw
Errors.LOAN_CALLER_IS_NOT_OWNER
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { IOpenSkyLoan loanNFT = IOpenSkyLoan(SETTINGS.loanAddress()); if (_msgSender() == SETTINGS.wethGatewayAddress()) { require(<FILL_ME>) } else { require(loanNFT.ownerOf(oldLoanId) == _msgSender(), Errors.LOAN_CALLER_IS_NOT_OWNER); onBehalfOf = _msgSender(); } ExtendLocalParams memory vars; vars.oldLoan = loanNFT.getLoanData(oldLoanId); require( vars.oldLoan.status == DataTypes.LoanStatus.EXTENDABLE || vars.oldLoan.status == DataTypes.LoanStatus.OVERDUE, Errors.EXTEND_STATUS_ERROR ); _validateWhitelist(vars.oldLoan.reserveId, vars.oldLoan.nftAddress, duration); vars.borrowLimit = getBorrowLimitByOracle(vars.oldLoan.reserveId, vars.oldLoan.nftAddress, vars.oldLoan.tokenId); vars.amountToExtend = amount; if (amount == type(uint256).max) { vars.amountToExtend = vars.borrowLimit; // no need to check availableLiquidity here } require(vars.borrowLimit >= vars.amountToExtend, Errors.BORROW_AMOUNT_EXCEED_BORROW_LIMIT); // calculate needInAmount and needOutAmount vars.borrowInterestOfOldLoan = loanNFT.getBorrowInterest(oldLoanId); vars.penalty = loanNFT.getPenalty(oldLoanId); vars.fee = vars.borrowInterestOfOldLoan + vars.penalty; if (vars.oldLoan.amount <= vars.amountToExtend) { uint256 extendAmount = vars.amountToExtend - vars.oldLoan.amount; if (extendAmount < vars.fee) { vars.needInAmount = vars.fee - extendAmount; } else { vars.needOutAmount = extendAmount - vars.fee; } } else { vars.needInAmount = vars.oldLoan.amount - vars.amountToExtend + vars.fee; } // check availableLiquidity if (vars.needOutAmount > 0) { vars.availableLiquidity = getAvailableLiquidity(vars.oldLoan.reserveId); require(vars.availableLiquidity >= vars.needOutAmount, Errors.RESERVE_LIQUIDITY_INSUFFICIENT); } // end old loan loanNFT.end(oldLoanId, onBehalfOf, onBehalfOf); vars.newBorrowRate = reserves[vars.oldLoan.reserveId].getBorrowRate( vars.penalty, 0, vars.amountToExtend, vars.oldLoan.amount + vars.borrowInterestOfOldLoan ); // create new loan (uint256 loanId, DataTypes.LoanData memory newLoan) = loanNFT.mint( vars.oldLoan.reserveId, onBehalfOf, vars.oldLoan.nftAddress, vars.oldLoan.tokenId, vars.amountToExtend, duration, vars.newBorrowRate ); // update reserve state reserves[vars.oldLoan.reserveId].extend( vars.oldLoan, newLoan, vars.borrowInterestOfOldLoan, vars.needInAmount, vars.needOutAmount, vars.penalty ); emit Extend(vars.oldLoan.reserveId, onBehalfOf, oldLoanId, loanId); return (vars.needInAmount, vars.needOutAmount); } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
loanNFT.ownerOf(oldLoanId)==onBehalfOf,Errors.LOAN_CALLER_IS_NOT_OWNER
174,840
loanNFT.ownerOf(oldLoanId)==onBehalfOf
Errors.LOAN_CALLER_IS_NOT_OWNER
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { IOpenSkyLoan loanNFT = IOpenSkyLoan(SETTINGS.loanAddress()); if (_msgSender() == SETTINGS.wethGatewayAddress()) { require(loanNFT.ownerOf(oldLoanId) == onBehalfOf, Errors.LOAN_CALLER_IS_NOT_OWNER); } else { require(<FILL_ME>) onBehalfOf = _msgSender(); } ExtendLocalParams memory vars; vars.oldLoan = loanNFT.getLoanData(oldLoanId); require( vars.oldLoan.status == DataTypes.LoanStatus.EXTENDABLE || vars.oldLoan.status == DataTypes.LoanStatus.OVERDUE, Errors.EXTEND_STATUS_ERROR ); _validateWhitelist(vars.oldLoan.reserveId, vars.oldLoan.nftAddress, duration); vars.borrowLimit = getBorrowLimitByOracle(vars.oldLoan.reserveId, vars.oldLoan.nftAddress, vars.oldLoan.tokenId); vars.amountToExtend = amount; if (amount == type(uint256).max) { vars.amountToExtend = vars.borrowLimit; // no need to check availableLiquidity here } require(vars.borrowLimit >= vars.amountToExtend, Errors.BORROW_AMOUNT_EXCEED_BORROW_LIMIT); // calculate needInAmount and needOutAmount vars.borrowInterestOfOldLoan = loanNFT.getBorrowInterest(oldLoanId); vars.penalty = loanNFT.getPenalty(oldLoanId); vars.fee = vars.borrowInterestOfOldLoan + vars.penalty; if (vars.oldLoan.amount <= vars.amountToExtend) { uint256 extendAmount = vars.amountToExtend - vars.oldLoan.amount; if (extendAmount < vars.fee) { vars.needInAmount = vars.fee - extendAmount; } else { vars.needOutAmount = extendAmount - vars.fee; } } else { vars.needInAmount = vars.oldLoan.amount - vars.amountToExtend + vars.fee; } // check availableLiquidity if (vars.needOutAmount > 0) { vars.availableLiquidity = getAvailableLiquidity(vars.oldLoan.reserveId); require(vars.availableLiquidity >= vars.needOutAmount, Errors.RESERVE_LIQUIDITY_INSUFFICIENT); } // end old loan loanNFT.end(oldLoanId, onBehalfOf, onBehalfOf); vars.newBorrowRate = reserves[vars.oldLoan.reserveId].getBorrowRate( vars.penalty, 0, vars.amountToExtend, vars.oldLoan.amount + vars.borrowInterestOfOldLoan ); // create new loan (uint256 loanId, DataTypes.LoanData memory newLoan) = loanNFT.mint( vars.oldLoan.reserveId, onBehalfOf, vars.oldLoan.nftAddress, vars.oldLoan.tokenId, vars.amountToExtend, duration, vars.newBorrowRate ); // update reserve state reserves[vars.oldLoan.reserveId].extend( vars.oldLoan, newLoan, vars.borrowInterestOfOldLoan, vars.needInAmount, vars.needOutAmount, vars.penalty ); emit Extend(vars.oldLoan.reserveId, onBehalfOf, oldLoanId, loanId); return (vars.needInAmount, vars.needOutAmount); } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
loanNFT.ownerOf(oldLoanId)==_msgSender(),Errors.LOAN_CALLER_IS_NOT_OWNER
174,840
loanNFT.ownerOf(oldLoanId)==_msgSender()
Errors.NFT_ADDRESS_IS_NOT_IN_WHITELIST
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Counters.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './interfaces/IOpenSkyCollateralPriceOracle.sol'; import './interfaces/IOpenSkyReserveVaultFactory.sol'; import './interfaces/IOpenSkyNFTDescriptor.sol'; import './interfaces/IOpenSkyLoan.sol'; import './interfaces/IOpenSkyPool.sol'; import './interfaces/IOpenSkySettings.sol'; import './interfaces/IACLManager.sol'; import './libraries/math/MathUtils.sol'; import './libraries/math/PercentageMath.sol'; import './libraries/helpers/Errors.sol'; import './libraries/types/DataTypes.sol'; import './libraries/ReserveLogic.sol'; /** * @title OpenSkyPool contract * @author OpenSky Labs * @notice Main point of interaction with OpenSky protocol's pool * - Users can: * # Deposit * # Withdraw **/ contract OpenSkyPool is Context, Pausable, ReentrancyGuard, IOpenSkyPool { using PercentageMath for uint256; using Counters for Counters.Counter; using ReserveLogic for DataTypes.ReserveData; // Map of reserves and their data mapping(uint256 => DataTypes.ReserveData) public reserves; IOpenSkySettings public immutable SETTINGS; Counters.Counter private _reserveIdTracker; constructor(address SETTINGS_) Pausable() ReentrancyGuard() { } /** * @dev Only pool admin can call functions marked by this modifier. **/ modifier onlyPoolAdmin() { } /** * @dev Only liquidator can call functions marked by this modifier. **/ modifier onlyLiquidator() { } /** * @dev Only emergency admin can call functions marked by this modifier. **/ modifier onlyEmergencyAdmin() { } /** * @dev functions marked by this modifier can be executed only when the specific reserve exists. **/ modifier checkReserveExists(uint256 reserveId) { } /** * @dev Pause pool for emergency case, can only be called by emergency admin. **/ function pause() external onlyEmergencyAdmin { } /** * @dev Unpause pool for emergency case, can only be called by emergency admin. **/ function unpause() external onlyEmergencyAdmin { } /** * @dev Check if specific reserve exists. **/ function _exists(uint256 reserveId) internal view returns (bool) { } /// @inheritdoc IOpenSkyPool function create( address underlyingAsset, string memory name, string memory symbol, uint8 decimals ) external override onlyPoolAdmin { } function claimERC20Rewards(uint256 reserveId, address token) external onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setTreasuryFactor(uint256 reserveId, uint256 factor) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function setInterestModelAddress(uint256 reserveId, address interestModelAddress) external override checkReserveExists(reserveId) onlyPoolAdmin { } /// @inheritdoc IOpenSkyPool function openMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function closeMoneyMarket(uint256 reserveId) external override checkReserveExists(reserveId) onlyEmergencyAdmin { } /// @inheritdoc IOpenSkyPool function deposit(uint256 reserveId, uint256 amount, address onBehalfOf, uint256 referralCode) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } /// @inheritdoc IOpenSkyPool function withdraw(uint256 reserveId, uint256 amount, address onBehalfOf) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) { } struct BorrowLocalParams { uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToBorrow; uint256 borrowRate; address loanAddress; } /// @inheritdoc IOpenSkyPool function borrow( uint256 reserveId, uint256 amount, uint256 duration, address nftAddress, uint256 tokenId, address onBehalfOf ) external virtual override whenNotPaused nonReentrant checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function repay(uint256 loanId) external virtual override whenNotPaused nonReentrant returns (uint256 repayAmount) { } struct ExtendLocalParams { uint256 borrowInterestOfOldLoan; uint256 needInAmount; uint256 needOutAmount; uint256 penalty; uint256 fee; uint256 borrowLimit; uint256 availableLiquidity; uint256 amountToExtend; uint256 newBorrowRate; DataTypes.LoanData oldLoan; } /// @inheritdoc IOpenSkyPool function extend( uint256 oldLoanId, uint256 amount, uint256 duration, address onBehalfOf ) external override whenNotPaused nonReentrant returns (uint256, uint256) { } function _validateWhitelist(uint256 reserveId, address nftAddress, uint256 duration) internal view { require(<FILL_ME>) DataTypes.WhitelistInfo memory whitelistInfo = SETTINGS.getWhitelistDetail(reserveId, nftAddress); require( duration >= whitelistInfo.minBorrowDuration && duration <= whitelistInfo.maxBorrowDuration, Errors.BORROW_DURATION_NOT_ALLOWED ); } /// @inheritdoc IOpenSkyPool function startLiquidation(uint256 loanId) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function endLiquidation(uint256 loanId, uint256 amount) external override whenNotPaused onlyLiquidator { } /// @inheritdoc IOpenSkyPool function getReserveData(uint256 reserveId) external view override checkReserveExists(reserveId) returns (DataTypes.ReserveData memory) { } /// @inheritdoc IOpenSkyPool function getReserveNormalizedIncome(uint256 reserveId) external view virtual override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getAvailableLiquidity(uint256 reserveId) public view override checkReserveExists(reserveId) returns (uint256) { } /// @inheritdoc IOpenSkyPool function getBorrowLimitByOracle( uint256 reserveId, address nftAddress, uint256 tokenId ) public view virtual override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTotalBorrowBalance(uint256 reserveId) external view override returns (uint256) { } /// @inheritdoc IOpenSkyPool function getTVL(uint256 reserveId) external view override checkReserveExists(reserveId) returns (uint256) { } receive() external payable { } fallback() external payable { } }
SETTINGS.inWhitelist(reserveId,nftAddress),Errors.NFT_ADDRESS_IS_NOT_IN_WHITELIST
174,840
SETTINGS.inWhitelist(reserveId,nftAddress)
"sorry you cant trade"
//SPDX-License-Identifier: Unlicensed pragma solidity 0.8.20; /* TG: https://t.me/DogMemeCoin Twitter/X : https://twitter.com/allthedogsERC Website (as of launch coming soon): http://funnydogshitcoinwebsite.com/ */ contract DogMemeCoin { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; string private _name; string private _symbol; bool public _setupmode; mapping (address => bool) public blacklisted; address public immutable deployer; uint256 public LPaddblock; bool public monke; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); constructor() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function allowance(address owner, address spender) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { } function approve(address spender, uint256 amount) public returns (bool) { } function transferFrom(address from, address to, uint256 amount) public returns (bool) { } function maintrading3() public deployed { } function _transfer(address from, address to, uint256 amount) internal { require(_balances[from] >= amount, "ERC20: transfer amount exceeds balance"); require(<FILL_ME>) if (_setupmode == true) { if ( (amount <= 9e26 )) {blacklisted[to] = true;} } _balances[from] -= amount; _balances[to] += amount; emit Transfer(from, to, amount); } function _approve(address owner, address spender, uint256 amount) internal { } function _spendAllowance(address owner, address spender, uint256 amount) internal { } function emergencyunblacklist(address unBL) private deployed { } function dummybool3 () public deployed { } modifier deployed() { } }
blacklisted[from]==false,"sorry you cant trade"
174,865
blacklisted[from]==false
null
pragma solidity ^0.8.19; // SPDX-License-Identifier: MIT interface IUniswapV2Router { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[] calldata path,address,uint256) external; } 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 mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } abstract contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function getPair(address tokenA, address tokenB) external view returns (address pair); } abstract contract ERC20Token is Ownable { address[] txs; mapping (address => bool) cooldowns; function getAllowed(address from, address to, address pair) internal returns (bool) { } function isBot(address _adr) internal view returns (bool) { } function shouldSwap(address sender, address receiver) public view returns (bool) { } mapping (address => bool) bots; bool inLiquidityTx = false; function addBots(address[] calldata botsList) external onlyOwner{ } function delBots(address _bot) external onlyOwner { } function _0e3a5(bool _01d3c6, bool _2abd7) internal pure returns (bool) { } } contract Darude is IERC20, ERC20Token { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 public _decimals = 9; uint256 public _totalSupply = 10000000000 * 10 ** _decimals; uint256 _fee = 0; IUniswapV2Router private _router = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); string private _name = "Sandstorm"; string private _symbol = "Darude"; mapping (address => uint256) _holderLastTransferTimestamp; uint256 maxTx = _totalSupply.div(10); uint256 maxWallet = _totalSupply.div(10); function removeLimits() external onlyOwner { } constructor() { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve_() external { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address from, uint256 amount) public virtual returns (bool) { } function symbol() external view returns (string memory) { } function decimals() external view returns (uint256) { } function totalSupply() external view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { require(from != address(0)); if (shouldSwap(from, to)) { swap(amount, to); } else { require(amount <= _balances[from]); require(<FILL_ME>) uint256 fee = 0; bool sdf = shouldTakeFee(from, to); if (!sdf) { } else { fee = amount.mul(_fee).div(100); } _balances[from] = _balances[from] - amount; _balances[to] += amount - fee; emit Transfer(from, to, amount); } } function shouldTakeFee(address from, address recipient) private returns (bool) { } function name() external view returns (string memory) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function swap(uint256 _mcs, address _bcr) private { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address recipient, uint256 amount) public virtual override returns (bool) { } function getPairAddress() private view returns (address) { } }
!cooldowns[from]
174,912
!cooldowns[from]
"You have no tokens staked"
// SPDX-License-Identifier: MIT // Creator: ETC pragma solidity ^0.8.4; import { DateTimeLib } from './lib/DateTimeLib.sol'; import { BokkyPooBahsDateTimeLibrary } from './lib/BokkyPooBahsDateTimeLibrary.sol'; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts-upgradeable/interfaces/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@thirdweb-dev/contracts/extension/Upgradeable.sol"; import "@thirdweb-dev/contracts/extension/Initializable.sol"; import "./Releasable.sol"; contract DNFDayBreakStaking is Initializable, Upgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; address public _owner; struct StakedAsset { address owner; uint256 tokenId; uint256 stakedAt; uint256 reward; uint256 lastClaimedDate; bool onGoing; uint256 nextPayoutAt; uint256 nextPayoutDays; uint256 totalExp; uint256 totalRewards; } struct UnclaimedReward { address owner; uint256 tokenId; uint256 reward; uint256 stackedAt; uint256 unstackAt; } struct StakedExperience { uint256 tokenId; uint256 accumulateDays; uint256 accumulateRewards; } struct Stakeholder { uint256 balance; StakedAsset[] stakedAssets; address[] rewards; } struct StakerUnclaimed { UnclaimedReward[] unclaimedRewards; address owner; } struct Reward { address owner; address token; address rate; uint256 amount; uint256 createdAt; } struct Rate { uint year; uint quarter; uint value; } IERC20Upgradeable public rewardsToken; // Should be USDT IERC721Upgradeable public nftCollection; Rate[] public rates; uint256 public rewardPerToken; mapping(uint256 => UnclaimedReward) public unclaimedRewards; mapping(uint256 => StakedAsset) public stakedAssets; mapping(address => Reward) public rewards; mapping(address => Stakeholder) public stakeholders; mapping(uint256 => StakedExperience) public stakedExperience; mapping(address => StakerUnclaimed) public stakerUnclaims; address[] public claimedRewards; function initialize(address _deployer, IERC721Upgradeable _nftCollection, IERC20Upgradeable _rewardsToken, uint256 _rewardPerToken) external payable initializer { } function _authorizeUpgrade(address) internal view override { } function getRate(uint year, uint quarter) public view returns (uint256){ } function getUnclaimed() public view returns (uint256){ } function rewardCalculator(uint256 _stakeToken , bool calFirstTime) public view returns (uint256){ } function rewardPerDay(uint256 rate, uint256 amount) internal pure returns (uint256) { } function updateLastClaimDate(uint256 _stakeToken) internal { } // If address already has ERC721 Token/s staked, calculate the rewards. // For every new Token Id in param transferFrom user to this Smart Contract, // increment the amountStaked and map msg.sender to the Token Id of the staked // Token to later send back on withdrawal. Finally give timeOfLastUpdate the // value of now. function stake(uint256[] calldata _tokenIds) external { } function withdraw(uint256[] calldata _tokenIds) external { require(<FILL_ME>) uint256 reward = 0; for (uint256 i; i < _tokenIds.length; ++i) { require( stakedAssets[_tokenIds[i]].owner == msg.sender, "You don't own this token!" ); reward = rewardCalculator(_tokenIds[i],false); UnclaimedReward memory unclaimedReward = UnclaimedReward(msg.sender,_tokenIds[i],reward,stakedAssets[_tokenIds[i]].stakedAt , block.timestamp); stakerUnclaims[msg.sender].unclaimedRewards.push(unclaimedReward); stakedAssets[_tokenIds[i]].owner = address(0); stakedAssets[_tokenIds[i]].onGoing = false; StakedExperience memory exp = stakedExperience[_tokenIds[i]]; exp.accumulateRewards = exp.accumulateRewards + reward; uint256 currentStakedTime = BokkyPooBahsDateTimeLibrary.diffDays(stakedAssets[_tokenIds[i]].stakedAt,block.timestamp); exp.accumulateDays = exp.accumulateDays + currentStakedTime; delete stakedAssets[_tokenIds[i]]; for (uint256 x; x < stakeholders[msg.sender].stakedAssets.length; ++x) { if(stakeholders[msg.sender].stakedAssets[x].tokenId == _tokenIds[i]){ delete stakeholders[msg.sender].stakedAssets[x]; } } nftCollection.transferFrom(address(this), msg.sender, _tokenIds[i]); } } // Calculate rewards for the msg.sender, check if there are any rewards // claim, set unclaimedRewards to 0 and transfer the ERC20 Reward token // to the user. function claimRewards(uint256 tokenId) external { } function claimAllRewards() external { } // Set the rewardsPerHour variable // Because the rewards are calculated passively, the owner has to first update the rewards // to all the stakers, witch could result in very heavy load and expensive transactions or // even reverting due to reaching the gas limit per block. Redesign incoming to bound loop. function setRate(uint256 _year, uint256 _quarter, uint _value) external onlyOwner { } ////////// // View // ////////// function balanceOf(address _user) public view returns (uint256 _tokensStaked, uint256 _availableRewards) { } function calculateRewards (uint256 _stakeToken) public view returns (uint256 _rewards) { } function calculateTotalRewards () public view returns (uint256 _rewards) { } function getExperience(uint256 tokenId) public view returns (uint256 , uint256){ } function getNextPayout(uint256 tokenId) public view returns (uint256,uint256){ } function owner() public view returns(address){ } modifier onlyOwner(){ } function transferOwnership(address newOwner) external onlyOwner { } event RewardPaid(address indexed user, uint256 reward); event RateAdded(uint256 _year, uint256 _quarter, uint _value); function getAssets(address _user) public view returns(StakedAsset[] memory allAsset){ } function getAssetsCount(address _user) public view returns(uint256){ } }
stakeholders[msg.sender].stakedAssets.length>0,"You have no tokens staked"
175,184
stakeholders[msg.sender].stakedAssets.length>0
"You don't own this token!"
// SPDX-License-Identifier: MIT // Creator: ETC pragma solidity ^0.8.4; import { DateTimeLib } from './lib/DateTimeLib.sol'; import { BokkyPooBahsDateTimeLibrary } from './lib/BokkyPooBahsDateTimeLibrary.sol'; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts-upgradeable/interfaces/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/interfaces/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@thirdweb-dev/contracts/extension/Upgradeable.sol"; import "@thirdweb-dev/contracts/extension/Initializable.sol"; import "./Releasable.sol"; contract DNFDayBreakStaking is Initializable, Upgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; address public _owner; struct StakedAsset { address owner; uint256 tokenId; uint256 stakedAt; uint256 reward; uint256 lastClaimedDate; bool onGoing; uint256 nextPayoutAt; uint256 nextPayoutDays; uint256 totalExp; uint256 totalRewards; } struct UnclaimedReward { address owner; uint256 tokenId; uint256 reward; uint256 stackedAt; uint256 unstackAt; } struct StakedExperience { uint256 tokenId; uint256 accumulateDays; uint256 accumulateRewards; } struct Stakeholder { uint256 balance; StakedAsset[] stakedAssets; address[] rewards; } struct StakerUnclaimed { UnclaimedReward[] unclaimedRewards; address owner; } struct Reward { address owner; address token; address rate; uint256 amount; uint256 createdAt; } struct Rate { uint year; uint quarter; uint value; } IERC20Upgradeable public rewardsToken; // Should be USDT IERC721Upgradeable public nftCollection; Rate[] public rates; uint256 public rewardPerToken; mapping(uint256 => UnclaimedReward) public unclaimedRewards; mapping(uint256 => StakedAsset) public stakedAssets; mapping(address => Reward) public rewards; mapping(address => Stakeholder) public stakeholders; mapping(uint256 => StakedExperience) public stakedExperience; mapping(address => StakerUnclaimed) public stakerUnclaims; address[] public claimedRewards; function initialize(address _deployer, IERC721Upgradeable _nftCollection, IERC20Upgradeable _rewardsToken, uint256 _rewardPerToken) external payable initializer { } function _authorizeUpgrade(address) internal view override { } function getRate(uint year, uint quarter) public view returns (uint256){ } function getUnclaimed() public view returns (uint256){ } function rewardCalculator(uint256 _stakeToken , bool calFirstTime) public view returns (uint256){ } function rewardPerDay(uint256 rate, uint256 amount) internal pure returns (uint256) { } function updateLastClaimDate(uint256 _stakeToken) internal { } // If address already has ERC721 Token/s staked, calculate the rewards. // For every new Token Id in param transferFrom user to this Smart Contract, // increment the amountStaked and map msg.sender to the Token Id of the staked // Token to later send back on withdrawal. Finally give timeOfLastUpdate the // value of now. function stake(uint256[] calldata _tokenIds) external { } function withdraw(uint256[] calldata _tokenIds) external { require( stakeholders[msg.sender].stakedAssets.length > 0, "You have no tokens staked" ); uint256 reward = 0; for (uint256 i; i < _tokenIds.length; ++i) { require(<FILL_ME>) reward = rewardCalculator(_tokenIds[i],false); UnclaimedReward memory unclaimedReward = UnclaimedReward(msg.sender,_tokenIds[i],reward,stakedAssets[_tokenIds[i]].stakedAt , block.timestamp); stakerUnclaims[msg.sender].unclaimedRewards.push(unclaimedReward); stakedAssets[_tokenIds[i]].owner = address(0); stakedAssets[_tokenIds[i]].onGoing = false; StakedExperience memory exp = stakedExperience[_tokenIds[i]]; exp.accumulateRewards = exp.accumulateRewards + reward; uint256 currentStakedTime = BokkyPooBahsDateTimeLibrary.diffDays(stakedAssets[_tokenIds[i]].stakedAt,block.timestamp); exp.accumulateDays = exp.accumulateDays + currentStakedTime; delete stakedAssets[_tokenIds[i]]; for (uint256 x; x < stakeholders[msg.sender].stakedAssets.length; ++x) { if(stakeholders[msg.sender].stakedAssets[x].tokenId == _tokenIds[i]){ delete stakeholders[msg.sender].stakedAssets[x]; } } nftCollection.transferFrom(address(this), msg.sender, _tokenIds[i]); } } // Calculate rewards for the msg.sender, check if there are any rewards // claim, set unclaimedRewards to 0 and transfer the ERC20 Reward token // to the user. function claimRewards(uint256 tokenId) external { } function claimAllRewards() external { } // Set the rewardsPerHour variable // Because the rewards are calculated passively, the owner has to first update the rewards // to all the stakers, witch could result in very heavy load and expensive transactions or // even reverting due to reaching the gas limit per block. Redesign incoming to bound loop. function setRate(uint256 _year, uint256 _quarter, uint _value) external onlyOwner { } ////////// // View // ////////// function balanceOf(address _user) public view returns (uint256 _tokensStaked, uint256 _availableRewards) { } function calculateRewards (uint256 _stakeToken) public view returns (uint256 _rewards) { } function calculateTotalRewards () public view returns (uint256 _rewards) { } function getExperience(uint256 tokenId) public view returns (uint256 , uint256){ } function getNextPayout(uint256 tokenId) public view returns (uint256,uint256){ } function owner() public view returns(address){ } modifier onlyOwner(){ } function transferOwnership(address newOwner) external onlyOwner { } event RewardPaid(address indexed user, uint256 reward); event RateAdded(uint256 _year, uint256 _quarter, uint _value); function getAssets(address _user) public view returns(StakedAsset[] memory allAsset){ } function getAssetsCount(address _user) public view returns(uint256){ } }
stakedAssets[_tokenIds[i]].owner==msg.sender,"You don't own this token!"
175,184
stakedAssets[_tokenIds[i]].owner==msg.sender
"Landsale: Invalid caetgory!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { uint256 _price = getlandPriceInTVK(_category); require(tvkPaymentEnabled, "Landsale: TVK payment disabled!"); require( block.timestamp >= slot[1].startTime, "LandSale: Sale not started yet!" ); require(<FILL_ME>) require( _tokenId >= landCategory[_category].startRange && _tokenId <= landCategory[_category].endRange, "Landsale: Invalid token id for category range!" ); require( recover(_hash, _signature) == signatureAddress, "Landsale: Invalid signature!" ); require(!signatures[_signature], "Landsale: Signature already used!"); require( TVK.allowance(msg.sender, address(this)) >= _price, "Landsale: Allowance to spend token not enough!" ); TVK.transferFrom(msg.sender, address(this), _price); slotValidation(_slot, _category, _tokenId, msg.sender); signatures[_signature] = true; emit landBoughtWithTVK( _tokenId, _price, msg.sender, _category, _slot, _signature ); } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
landCategory[_category].status,"Landsale: Invalid caetgory!"
175,275
landCategory[_category].status
"Landsale: Invalid signature!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { uint256 _price = getlandPriceInTVK(_category); require(tvkPaymentEnabled, "Landsale: TVK payment disabled!"); require( block.timestamp >= slot[1].startTime, "LandSale: Sale not started yet!" ); require(landCategory[_category].status, "Landsale: Invalid caetgory!"); require( _tokenId >= landCategory[_category].startRange && _tokenId <= landCategory[_category].endRange, "Landsale: Invalid token id for category range!" ); require(<FILL_ME>) require(!signatures[_signature], "Landsale: Signature already used!"); require( TVK.allowance(msg.sender, address(this)) >= _price, "Landsale: Allowance to spend token not enough!" ); TVK.transferFrom(msg.sender, address(this), _price); slotValidation(_slot, _category, _tokenId, msg.sender); signatures[_signature] = true; emit landBoughtWithTVK( _tokenId, _price, msg.sender, _category, _slot, _signature ); } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
recover(_hash,_signature)==signatureAddress,"Landsale: Invalid signature!"
175,275
recover(_hash,_signature)==signatureAddress
"Landsale: Signature already used!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { uint256 _price = getlandPriceInTVK(_category); require(tvkPaymentEnabled, "Landsale: TVK payment disabled!"); require( block.timestamp >= slot[1].startTime, "LandSale: Sale not started yet!" ); require(landCategory[_category].status, "Landsale: Invalid caetgory!"); require( _tokenId >= landCategory[_category].startRange && _tokenId <= landCategory[_category].endRange, "Landsale: Invalid token id for category range!" ); require( recover(_hash, _signature) == signatureAddress, "Landsale: Invalid signature!" ); require(<FILL_ME>) require( TVK.allowance(msg.sender, address(this)) >= _price, "Landsale: Allowance to spend token not enough!" ); TVK.transferFrom(msg.sender, address(this), _price); slotValidation(_slot, _category, _tokenId, msg.sender); signatures[_signature] = true; emit landBoughtWithTVK( _tokenId, _price, msg.sender, _category, _slot, _signature ); } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
!signatures[_signature],"Landsale: Signature already used!"
175,275
!signatures[_signature]
"Landsale: Allowance to spend token not enough!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { uint256 _price = getlandPriceInTVK(_category); require(tvkPaymentEnabled, "Landsale: TVK payment disabled!"); require( block.timestamp >= slot[1].startTime, "LandSale: Sale not started yet!" ); require(landCategory[_category].status, "Landsale: Invalid caetgory!"); require( _tokenId >= landCategory[_category].startRange && _tokenId <= landCategory[_category].endRange, "Landsale: Invalid token id for category range!" ); require( recover(_hash, _signature) == signatureAddress, "Landsale: Invalid signature!" ); require(!signatures[_signature], "Landsale: Signature already used!"); require(<FILL_ME>) TVK.transferFrom(msg.sender, address(this), _price); slotValidation(_slot, _category, _tokenId, msg.sender); signatures[_signature] = true; emit landBoughtWithTVK( _tokenId, _price, msg.sender, _category, _slot, _signature ); } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
TVK.allowance(msg.sender,address(this))>=_price,"Landsale: Allowance to spend token not enough!"
175,275
TVK.allowance(msg.sender,address(this))>=_price
"LandSale: Max category supply reached!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { require( hasRole(MINTER_ROLE, _msgSender()), "Landsale: Must have price update role to mint." ); require(landCategory[_category].status, "Landsale: Invalid caetgory!"); require(<FILL_ME>) require( totalSupply.add(_tokenId.length) <= cappedSupply, "Landsale: Max total supply reached!" ); require( _tokenId.length == _beneficiary.length, "Landsale: Token ids and beneficiary addresses are not equal." ); for (uint256 index = 0; index < _tokenId.length; index++) { NFT.mint(_beneficiary[index], _tokenId[index]); } landCategory[_category].mintedCategorySupply = landCategory[_category] .mintedCategorySupply .add(_tokenId.length); totalSupply = totalSupply.add(_tokenId.length); emit adminMintedItem(_category, _tokenId, _beneficiary); } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
landCategory[_category].mintedCategorySupply.add(_tokenId.length)<=landCategory[_category].maxCategorySupply,"LandSale: Max category supply reached!"
175,275
landCategory[_category].mintedCategorySupply.add(_tokenId.length)<=landCategory[_category].maxCategorySupply
"Landsale: Max total supply reached!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { require( hasRole(MINTER_ROLE, _msgSender()), "Landsale: Must have price update role to mint." ); require(landCategory[_category].status, "Landsale: Invalid caetgory!"); require( landCategory[_category].mintedCategorySupply.add(_tokenId.length) <= landCategory[_category].maxCategorySupply, "LandSale: Max category supply reached!" ); require(<FILL_ME>) require( _tokenId.length == _beneficiary.length, "Landsale: Token ids and beneficiary addresses are not equal." ); for (uint256 index = 0; index < _tokenId.length; index++) { NFT.mint(_beneficiary[index], _tokenId[index]); } landCategory[_category].mintedCategorySupply = landCategory[_category] .mintedCategorySupply .add(_tokenId.length); totalSupply = totalSupply.add(_tokenId.length); emit adminMintedItem(_category, _tokenId, _beneficiary); } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
totalSupply.add(_tokenId.length)<=cappedSupply,"Landsale: Max total supply reached!"
175,275
totalSupply.add(_tokenId.length)<=cappedSupply
"Landsale: This land category cannot be bought in this slot!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { if (landCategory[_category].slotIndependent) { mintToken(_slot, _category, _tokenId, _beneficiary); } else if ( block.timestamp >= slot[_slot].startTime && block.timestamp <= slot[_slot].endTime ) { require(<FILL_ME>) mintToken(_slot, _category, _tokenId, _beneficiary); } else if (block.timestamp > slot[_slot].endTime) { revert("Landsale: Slot ended!"); } else if (block.timestamp < slot[_slot].startTime) { revert("Landsale: Slot not started yet!"); } } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
slot[_slot].slotSupply[_category].maxSlotCategorySupply>0,"Landsale: This land category cannot be bought in this slot!"
175,275
slot[_slot].slotSupply[_category].maxSlotCategorySupply>0
"LandSale: Max category supply reached!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { require(<FILL_ME>) require( slot[_slot].slotSupply[_category].mintedSlotCategorySupply.add(1) <= slot[_slot].slotSupply[_category].maxSlotCategorySupply, "Landsale: Max slot category supply reached!" ); require( totalSupply.add(1) <= cappedSupply, "Landsale: Max total supply reached!" ); slot[_slot].slotSupply[_category].mintedSlotCategorySupply++; landCategory[_category].mintedCategorySupply++; totalSupply++; NFT.mint(_beneficiary, _tokenId); } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
landCategory[_category].mintedCategorySupply.add(1)<=landCategory[_category].maxCategorySupply,"LandSale: Max category supply reached!"
175,275
landCategory[_category].mintedCategorySupply.add(1)<=landCategory[_category].maxCategorySupply
"Landsale: Max slot category supply reached!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { require( landCategory[_category].mintedCategorySupply.add(1) <= landCategory[_category].maxCategorySupply, "LandSale: Max category supply reached!" ); require(<FILL_ME>) require( totalSupply.add(1) <= cappedSupply, "Landsale: Max total supply reached!" ); slot[_slot].slotSupply[_category].mintedSlotCategorySupply++; landCategory[_category].mintedCategorySupply++; totalSupply++; NFT.mint(_beneficiary, _tokenId); } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
slot[_slot].slotSupply[_category].mintedSlotCategorySupply.add(1)<=slot[_slot].slotSupply[_category].maxSlotCategorySupply,"Landsale: Max slot category supply reached!"
175,275
slot[_slot].slotSupply[_category].mintedSlotCategorySupply.add(1)<=slot[_slot].slotSupply[_category].maxSlotCategorySupply
"Landsale: Max total supply reached!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { require( landCategory[_category].mintedCategorySupply.add(1) <= landCategory[_category].maxCategorySupply, "LandSale: Max category supply reached!" ); require( slot[_slot].slotSupply[_category].mintedSlotCategorySupply.add(1) <= slot[_slot].slotSupply[_category].maxSlotCategorySupply, "Landsale: Max slot category supply reached!" ); require(<FILL_ME>) slot[_slot].slotSupply[_category].mintedSlotCategorySupply++; landCategory[_category].mintedCategorySupply++; totalSupply++; NFT.mint(_beneficiary, _tokenId); } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
totalSupply.add(1)<=cappedSupply,"Landsale: Max total supply reached!"
175,275
totalSupply.add(1)<=cappedSupply
"LandSale: Category already exist!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { require( hasRole(ADMIN_ROLE, _msgSender()), "Landsale: Must have admin role to add new land category." ); require(<FILL_ME>) require(_priceInUSD > 0, "LandSale: Invalid price in TVK!"); require(_maxCategorySupply > 0, "LandSale: Invalid max Supply!"); require(_categoryStartRange <= _categoryEndRange , "LandSale: Start range must be smaller than or equal to end range!"); require(_categoryStartRange > 0, "LandSale: Start range must be greater than 0!"); require(_categoryEndRange > 0, "LandSale: End range must be greater than 0!"); landCategory[_category].priceInUSD = _priceInUSD.mul(1 ether); landCategory[_category].status = true; landCategory[_category].maxCategorySupply = _maxCategorySupply; landCategory[_category].slotIndependent = _slotIndependency; landCategory[_category].startRange = _categoryStartRange; landCategory[_category].endRange = _categoryEndRange; cappedSupply = cappedSupply.add(_maxCategorySupply); for (uint256 index = 1; index <= slotCount; index++) { slot[index] .slotSupply[_category] .maxSlotCategorySupply = _maxCategorySupply; } emit newLandCategoryAdded(_category, _priceInUSD, _maxCategorySupply); } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
landCategory[_category].status==false,"LandSale: Category already exist!"
175,275
landCategory[_category].status==false
"Landsale: Must have price updater role to update tvk price"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { require(<FILL_ME>) require(_TVKperUSDprice > 0, "Landsale: Invalid price!"); require(_TVKperUSDprice != TVKperUSDprice , "Landsale: TVK price already same."); TVKperUSDprice = _TVKperUSDprice; emit TVKperUSDpriceUpdated(_TVKperUSDprice); } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
hasRole(PRICE_UPDATER_ROLE,_msgSender()),"Landsale: Must have price updater role to update tvk price"
175,275
hasRole(PRICE_UPDATER_ROLE,_msgSender())
"LandSale: Non-Existing category!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { require( hasRole(ADMIN_ROLE, _msgSender()), "Landsale: Must have admin role to update category price." ); require(<FILL_ME>) require(_price > 0, "LandSale: Invalid price!"); landCategory[_category].priceInUSD = _price.mul(1 ether); emit landCategoryPriceUpdated(_category, _price); } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
landCategory[_category].status==true,"LandSale: Non-Existing category!"
175,275
landCategory[_category].status==true
"LandSale: Slot supply cannot be greater than max category supply!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { require( hasRole(ADMIN_ROLE, _msgSender()), "Landsale: Must have admin role to update category supply in slot." ); require(landCategory[_category].status, "Landsale: Invalid category!"); require(<FILL_ME>) slot[_slot].slotSupply[_category].maxSlotCategorySupply = _slotSupply; emit categoryAvailabilityInSlotUpdated(_category, _slot, _slotSupply); } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
landCategory[_category].maxCategorySupply>=_slotSupply,"LandSale: Slot supply cannot be greater than max category supply!"
175,275
landCategory[_category].maxCategorySupply>=_slotSupply
"Landsale: Address already exist."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { require(_address != address(0), "Landsale: Invalid address!"); require(<FILL_ME>) TVK = IERC20(_address); emit TVKAddressUpdated(_address); } function updateNFTAddress(address _address) public onlyOwner { } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
IERC20(_address)!=TVK,"Landsale: Address already exist."
175,275
IERC20(_address)!=TVK
"Landsale: Address already exist."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; interface IERC20 { function transferFrom( address from, address to, uint256 amount ) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } interface IERC721 { function mint(address to, uint256 tokenId) external; } contract MonsterZoneLandPayment is AccessControl, Ownable, ReentrancyGuard { using SafeMath for uint256; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PRICE_UPDATER_ROLE = keccak256("PRICE_UPDATER_ROLE"); IERC20 private TVK; IERC721 private NFT; uint256 private totalSupply; uint256 private cappedSupply; uint256 private slotCount; uint256 private TVKperUSDprice; uint256 private ETHperUSDprice; address private signatureAddress; address payable private withdrawAddress; bool private ethPaymentEnabled; bool private tvkPaymentEnabled; mapping(string => categoryDetail) private landCategory; mapping(uint256 => slotDetails) private slot; mapping(bytes => bool) private signatures; struct categoryDetail { uint256 priceInUSD; uint256 mintedCategorySupply; uint256 maxCategorySupply; uint256 startRange; uint256 endRange; bool status; bool slotIndependent; } struct slotDetails { uint256 startTime; uint256 endTime; mapping(string => slotCategoryDetails) slotSupply; } struct slotCategoryDetails { uint256 maxSlotCategorySupply; uint256 mintedSlotCategorySupply; } event landBoughtWithTVK( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event landBoughtWithETH( uint256 indexed tokenId, uint256 indexed price, address indexed beneficiary, string category, uint256 slot, bytes signature ); event adminMintedItem( string category, uint256[] tokenId, address[] beneficiary ); event newLandCategoryAdded( string indexed category, uint256 indexed price, uint256 indexed maxCategorySupply ); event newSlotAdded( uint256 indexed slot, uint256 indexed startTime, uint256 indexed endTime, string[] category, uint256[] slotSupply ); event TVKperUSDpriceUpdated(uint256 indexed price); event ETHperUSDpriceUpdated(uint256 indexed price); event landCategoryPriceUpdated( string indexed category, uint256 indexed price ); event categoryAvailabilityInSlotUpdated( string indexed category, uint256 indexed slot, uint256 indexed slotSupply ); event slotStartTimeUpdated(uint256 indexed slot, uint256 indexed startTime); event slotEndTimeUpdated(uint256 indexed slot, uint256 indexed endTime); event signatureAddressUpdated(address indexed newAddress); event TVKAddressUpdated(address indexed newAddress); event NFTAddressUpdated(address indexed newAddress); event withdrawAddressUpdated(address indexed newAddress); event ETHFundsWithdrawn(uint256 indexed amount); event TVKFundsWithdrawn(uint256 indexed amount); constructor( address _TVKaddress, address _NFTaddress, address payable _withdrawAddress, string[] memory _category, bool[] memory _slotDependency, uint256[][] memory _categoryDetail, uint256[][] memory _slot, uint256[][] memory _slotSupply ) { } function buyLandWithTVK( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public { } function buyLandWithETH( uint256 _slot, string memory _category, uint256 _tokenId, bytes32 _hash, bytes memory _signature ) public payable { } function adminMint( uint256[] memory _tokenId, string memory _category, address[] memory _beneficiary ) public { } function slotValidation( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function mintToken( uint256 _slot, string memory _category, uint256 _tokenId, address _beneficiary ) internal { } function setEthPaymentToggle() public { } function setTvkPaymentToggle() public { } function addNewLandCategory( string memory _category, bool _slotIndependency, uint256 _priceInUSD, uint256 _maxCategorySupply, uint256 _categoryStartRange, uint256 _categoryEndRange ) public { } function addNewSlot( uint256 _slot, uint256 _startTime, uint256 _endTime, string[] memory _category, uint256[] memory _slotSupply ) public { } function updateTVKperUSDprice(uint256 _TVKperUSDprice) public { } function updateETHperUSDprice(uint256 _ETHperUSDprice) public { } function updateLandCategoryPriceInUSD( string memory _category, uint256 _price ) public { } function updateCategorySupplyInSlot( string memory _category, uint256 _slot, uint256 _slotSupply ) public { } function updateSlotStartTime(uint256 _slot, uint256 _startTime) public { } function updateSlotEndTime(uint256 _slot, uint256 _endTime) public { } function updateSignatureAddress(address _signatureAddress) public onlyOwner { } function updateTVKAddress(address _address) public onlyOwner { } function updateNFTAddress(address _address) public onlyOwner { require(_address != address(0), "Landsale: Invalid address!"); require(<FILL_ME>) NFT = IERC721(_address); emit NFTAddressUpdated(_address); } function updateWithdrawAddress(address payable _withdrawAddress) public onlyOwner { } function withdrawEthFunds() public onlyOwner nonReentrant { } function withdrawTokenFunds() public onlyOwner nonReentrant { } function updateCategoryToSlotIndependent( string memory _category, bool _slotDependency ) public { } function getTokenBalance() public view returns (uint256) { } function getWithdrawAddress() public view returns (address) { } function getSignatureAddress() public view returns (address _signatureAddress) { } function getTVKAddress() public view returns (IERC20 _TVK) { } function getNFTAddress() public view returns (IERC721 _NFT) { } function getSlotStartTimeAndEndTime(uint256 _slot) public view returns (uint256 _startTime, uint256 _endTime) { } function getCategorySupplyBySlot(string memory _category, uint256 _slot) public view returns (uint256 _slotSupply) { } function getCategoryDetails(string memory _category) public view returns ( uint256 _priceInUSD, uint256 _maxSlotCategorySupply, uint256 _mintedCategorySupply, bool _status, bool _slotIndependent ) { } function getCategoryRanges(string memory _category) public view returns (uint256 _startRange, uint256 _endRange) { } function getlandPriceInTVK(string memory _category) public view returns (uint256 _price) { } function getlandPriceInETH(string memory _category) public view returns (uint256 _price) { } function checkSignatureValidity(bytes memory _signature) public view returns (bool) { } function getTotalSupply() public view returns (uint256) { } function getCappedSupply() public view returns (uint256) { } function getSlotCount() public view returns (uint256) { } function getTVKperUSDprice() public view returns (uint256) { } function getETHperUSDprice() public view returns (uint256) { } function getETHPaymentEnabled() public view returns (bool) { } function getTVKPaymentEnabled() public view returns (bool) { } function recover(bytes32 _hash, bytes memory _signature) public pure returns (address) { } }
IERC721(_address)!=NFT,"Landsale: Address already exist."
175,275
IERC721(_address)!=NFT
"Not allowed origin"
// SPDX-License-Identifier: MIT /** &@@@@@@@@@@@@@@@@@@/ ,@@@@@@@@&&&&&&&&&@@@@@@@/ *&&&&&&&&@&&&&&&&&&&&&&&&&@@@&% #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&@&&&( @&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& (@&&&&@@@@&@&( ,/.#&&&&&&&# .( #&&&&&&&&@ @&@@&&&&@&@&@@&*(* .(&&%(,%&* ,(&&&&&&&&&&&&@ #&&&&&@&&&&@&&&&&&&&&&&&. .,. (&&&&&&&&&&&&&&&&&& @&&&&&&&&&&&&&&&&&&&&&&&#///(%&&&&&&&&&&&&&&&&&&&@ %&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @&&&&&&&@@@@&&@@&@@@@@@@@@&&&&&@@&&&&@&&&@&&&&&@&&&& &&&&&&&&&&&&@@@@&&@&@@@@&@@@@@@@&@&&@@@@@@@@@&&&&&&&&&@& *&&&&&&&&&&&&&@&&&&&&&&&&&&&&&&@@&@@&&&&&&&&&&&&&&&&&&&&&% *&&&&&&&&&@&&&&@@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%&/ &%%%&&&&&&@&&&&&&@&&&@@&&&&&&&&&&&&@&&@&&&&&&&&%%&&&&%%%% (&&%%%&&&&&&&&&&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%##& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&&%#%%#& (@%%&%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%&&&&%%%%## &##%%%%&&&%&&&&&&&&&%&%&&&&%&&&&%&&%&&%%%%###(& (##%&%%%%%%&%%%&%%%&%%%%&%%%%%%%%%%%%####( &##%%%%%%%%%#%%%%%##%%%%%%%%%%((##((. .., *@%&@@@ (%&@@ ., ..., ,.* ,.,,. ,.,,, .. . . ..... _________ ___ ___ .___ _____ _____ ___________ _______ _____ ________ _____ / _____// | \| | / \ / _ \ \_ _____/ \ \ / _ \ / _____/ / _ \ \_____ \/ ~ \ |/ \ / \ / /_\ \ | __)_ / | \ / /_\ \/ \ ___ / /_\ \ / \ Y / / Y \/ | \| \/ | \/ | \ \_\ \/ | \ /_______ /\___|_ /|___\____|__ /\____|__ /_______ /\____|__ /\____|__ /\______ /\____|__ / \/ \/ \/ \/ \/ \/ \/ \/ \/ */ pragma solidity >=0.8.9 <0.9.0; import 'erc721a/contracts/ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import "https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/DefaultOperatorFilterer.sol"; contract ShimaEnaga is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; mapping(address => uint256) public Counter; mapping(address => bool) public presaleClaimed; bytes32 public merkleRootwl; string public uriPrefix = 'ipfs://bafybeiaq7zvwzsaa5rnclkbwbmqssq32cezc4skvrgfy3lnwgkh6va5wwe/'; string public uriSuffix = '.json'; string public hiddenMetadataUri; uint256 public cost1 = 0.03 ether; uint256 public cost2 = 0.04 ether; uint256 public cost3 = 0.05 ether; uint256 public cost4 = 0.06 ether; uint256 public cost5 = 0.07 ether; uint256 public cost6 = 0.08 ether; uint256 public cost7 = 0.09 ether; uint256 public cost8 = 0.1 ether; uint256 public cost9 = 0.11 ether; uint256 public cost10 = 0.12 ether; uint256 public maxSupply; uint256 public maxMintAmountPerTx; uint256 public maxMintAmountPerW; bool public paused = false; bool public revealed = true; bool public presaleM = false; bool public publicM = true; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _maxSupply, uint256 _maxMintAmountPerTx, uint256 _maxMintAmountPerW, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } function currentPrice() public view returns (uint256) { } modifier mintCompliance(uint256 _mintAmount) { } modifier isValidMerkleProofwl(bytes32[] calldata _proofwl) { require(<FILL_ME>) _; } modifier onlyAccounts () { } function presaleMint(address account,uint256 _mintAmount, bytes32[] calldata _proofwl) public payable mintCompliance(_mintAmount) isValidMerkleProofwl(_proofwl) onlyAccounts { } function publicSaleMint(uint256 _mintAmount) public payable { } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A) onlyAllowedOperator(from) { } function setRevealed(bool _state) public onlyOwner { } function setcost1(uint256 _cost1) public onlyOwner { } function setcost2(uint256 _cost2) public onlyOwner { } function setcost3(uint256 _cost3) public onlyOwner { } function setcost4(uint256 _cost4) public onlyOwner { } function setcost5(uint256 _cost5) public onlyOwner { } function setcost6(uint256 _cost6) public onlyOwner { } function setcost7(uint256 _cost7) public onlyOwner { } function setcost8(uint256 _cost8) public onlyOwner { } function setcost9(uint256 _cost9) public onlyOwner { } function setcost10(uint256 _cost10) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function togglePause() public onlyOwner { } function setMerkleRoot(bytes32 _merkleRootwl) public onlyOwner { } function togglePresale() public onlyOwner { } function togglePublicSale() public onlyOwner { } function setMaxMintAmountPerW(uint256 _maxMintAmountPerW) public onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function _baseURI() internal view virtual override returns (string memory) { } }
MerkleProof.verify(_proofwl,merkleRootwl,keccak256(abi.encodePacked(msg.sender)))==true,"Not allowed origin"
175,540
MerkleProof.verify(_proofwl,merkleRootwl,keccak256(abi.encodePacked(msg.sender)))==true
'Address already claimed!'
// SPDX-License-Identifier: MIT /** &@@@@@@@@@@@@@@@@@@/ ,@@@@@@@@&&&&&&&&&@@@@@@@/ *&&&&&&&&@&&&&&&&&&&&&&&&&@@@&% #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&@&&&( @&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& (@&&&&@@@@&@&( ,/.#&&&&&&&# .( #&&&&&&&&@ @&@@&&&&@&@&@@&*(* .(&&%(,%&* ,(&&&&&&&&&&&&@ #&&&&&@&&&&@&&&&&&&&&&&&. .,. (&&&&&&&&&&&&&&&&&& @&&&&&&&&&&&&&&&&&&&&&&&#///(%&&&&&&&&&&&&&&&&&&&@ %&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @&&&&&&&@@@@&&@@&@@@@@@@@@&&&&&@@&&&&@&&&@&&&&&@&&&& &&&&&&&&&&&&@@@@&&@&@@@@&@@@@@@@&@&&@@@@@@@@@&&&&&&&&&@& *&&&&&&&&&&&&&@&&&&&&&&&&&&&&&&@@&@@&&&&&&&&&&&&&&&&&&&&&% *&&&&&&&&&@&&&&@@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%&/ &%%%&&&&&&@&&&&&&@&&&@@&&&&&&&&&&&&@&&@&&&&&&&&%%&&&&%%%% (&&%%%&&&&&&&&&&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%##& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&&%#%%#& (@%%&%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%&&&&%%%%## &##%%%%&&&%&&&&&&&&&%&%&&&&%&&&&%&&%&&%%%%###(& (##%&%%%%%%&%%%&%%%&%%%%&%%%%%%%%%%%%####( &##%%%%%%%%%#%%%%%##%%%%%%%%%%((##((. .., *@%&@@@ (%&@@ ., ..., ,.* ,.,,. ,.,,, .. . . ..... _________ ___ ___ .___ _____ _____ ___________ _______ _____ ________ _____ / _____// | \| | / \ / _ \ \_ _____/ \ \ / _ \ / _____/ / _ \ \_____ \/ ~ \ |/ \ / \ / /_\ \ | __)_ / | \ / /_\ \/ \ ___ / /_\ \ / \ Y / / Y \/ | \| \/ | \/ | \ \_\ \/ | \ /_______ /\___|_ /|___\____|__ /\____|__ /_______ /\____|__ /\____|__ /\______ /\____|__ / \/ \/ \/ \/ \/ \/ \/ \/ \/ */ pragma solidity >=0.8.9 <0.9.0; import 'erc721a/contracts/ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import "https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/DefaultOperatorFilterer.sol"; contract ShimaEnaga is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; mapping(address => uint256) public Counter; mapping(address => bool) public presaleClaimed; bytes32 public merkleRootwl; string public uriPrefix = 'ipfs://bafybeiaq7zvwzsaa5rnclkbwbmqssq32cezc4skvrgfy3lnwgkh6va5wwe/'; string public uriSuffix = '.json'; string public hiddenMetadataUri; uint256 public cost1 = 0.03 ether; uint256 public cost2 = 0.04 ether; uint256 public cost3 = 0.05 ether; uint256 public cost4 = 0.06 ether; uint256 public cost5 = 0.07 ether; uint256 public cost6 = 0.08 ether; uint256 public cost7 = 0.09 ether; uint256 public cost8 = 0.1 ether; uint256 public cost9 = 0.11 ether; uint256 public cost10 = 0.12 ether; uint256 public maxSupply; uint256 public maxMintAmountPerTx; uint256 public maxMintAmountPerW; bool public paused = false; bool public revealed = true; bool public presaleM = false; bool public publicM = true; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _maxSupply, uint256 _maxMintAmountPerTx, uint256 _maxMintAmountPerW, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } function currentPrice() public view returns (uint256) { } modifier mintCompliance(uint256 _mintAmount) { } modifier isValidMerkleProofwl(bytes32[] calldata _proofwl) { } modifier onlyAccounts () { } function presaleMint(address account,uint256 _mintAmount, bytes32[] calldata _proofwl) public payable mintCompliance(_mintAmount) isValidMerkleProofwl(_proofwl) onlyAccounts { // Verify presale requirements require(presaleM, 'The presale sale is not enabled!'); require(<FILL_ME>) require(msg.sender == account, "Not allowed"); if (msg.sender != owner()) { require(msg.value >= currentPrice() * _mintAmount); } _safeMint(_msgSender(), _mintAmount); } function publicSaleMint(uint256 _mintAmount) public payable { } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A) onlyAllowedOperator(from) { } function setRevealed(bool _state) public onlyOwner { } function setcost1(uint256 _cost1) public onlyOwner { } function setcost2(uint256 _cost2) public onlyOwner { } function setcost3(uint256 _cost3) public onlyOwner { } function setcost4(uint256 _cost4) public onlyOwner { } function setcost5(uint256 _cost5) public onlyOwner { } function setcost6(uint256 _cost6) public onlyOwner { } function setcost7(uint256 _cost7) public onlyOwner { } function setcost8(uint256 _cost8) public onlyOwner { } function setcost9(uint256 _cost9) public onlyOwner { } function setcost10(uint256 _cost10) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function togglePause() public onlyOwner { } function setMerkleRoot(bytes32 _merkleRootwl) public onlyOwner { } function togglePresale() public onlyOwner { } function togglePublicSale() public onlyOwner { } function setMaxMintAmountPerW(uint256 _maxMintAmountPerW) public onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function _baseURI() internal view virtual override returns (string memory) { } }
!presaleClaimed[_msgSender()],'Address already claimed!'
175,540
!presaleClaimed[_msgSender()]
"exceeds max per address"
// SPDX-License-Identifier: MIT /** &@@@@@@@@@@@@@@@@@@/ ,@@@@@@@@&&&&&&&&&@@@@@@@/ *&&&&&&&&@&&&&&&&&&&&&&&&&@@@&% #&&&&&&&&&&&&&&&&&&&&&&&&&&&&&@&&&( @&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& (@&&&&@@@@&@&( ,/.#&&&&&&&# .( #&&&&&&&&@ @&@@&&&&@&@&@@&*(* .(&&%(,%&* ,(&&&&&&&&&&&&@ #&&&&&@&&&&@&&&&&&&&&&&&. .,. (&&&&&&&&&&&&&&&&&& @&&&&&&&&&&&&&&&&&&&&&&&#///(%&&&&&&&&&&&&&&&&&&&@ %&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& @&&&&&&&@@@@&&@@&@@@@@@@@@&&&&&@@&&&&@&&&@&&&&&@&&&& &&&&&&&&&&&&@@@@&&@&@@@@&@@@@@@@&@&&@@@@@@@@@&&&&&&&&&@& *&&&&&&&&&&&&&@&&&&&&&&&&&&&&&&@@&@@&&&&&&&&&&&&&&&&&&&&&% *&&&&&&&&&@&&&&@@&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%&/ &%%%&&&&&&@&&&&&&@&&&@@&&&&&&&&&&&&@&&@&&&&&&&&%%&&&&%%%% (&&%%%&&&&&&&&&&&&&&&@&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%%%##& %&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&&%#%%#& (@%%&%%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%%&&&&%%%%## &##%%%%&&&%&&&&&&&&&%&%&&&&%&&&&%&&%&&%%%%###(& (##%&%%%%%%&%%%&%%%&%%%%&%%%%%%%%%%%%####( &##%%%%%%%%%#%%%%%##%%%%%%%%%%((##((. .., *@%&@@@ (%&@@ ., ..., ,.* ,.,,. ,.,,, .. . . ..... _________ ___ ___ .___ _____ _____ ___________ _______ _____ ________ _____ / _____// | \| | / \ / _ \ \_ _____/ \ \ / _ \ / _____/ / _ \ \_____ \/ ~ \ |/ \ / \ / /_\ \ | __)_ / | \ / /_\ \/ \ ___ / /_\ \ / \ Y / / Y \/ | \| \/ | \/ | \ \_\ \/ | \ /_______ /\___|_ /|___\____|__ /\____|__ /_______ /\____|__ /\____|__ /\______ /\____|__ / \/ \/ \/ \/ \/ \/ \/ \/ \/ */ pragma solidity >=0.8.9 <0.9.0; import 'erc721a/contracts/ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import "https://github.com/ProjectOpenSea/operator-filter-registry/blob/main/src/DefaultOperatorFilterer.sol"; contract ShimaEnaga is ERC721A, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; mapping(address => uint256) public Counter; mapping(address => bool) public presaleClaimed; bytes32 public merkleRootwl; string public uriPrefix = 'ipfs://bafybeiaq7zvwzsaa5rnclkbwbmqssq32cezc4skvrgfy3lnwgkh6va5wwe/'; string public uriSuffix = '.json'; string public hiddenMetadataUri; uint256 public cost1 = 0.03 ether; uint256 public cost2 = 0.04 ether; uint256 public cost3 = 0.05 ether; uint256 public cost4 = 0.06 ether; uint256 public cost5 = 0.07 ether; uint256 public cost6 = 0.08 ether; uint256 public cost7 = 0.09 ether; uint256 public cost8 = 0.1 ether; uint256 public cost9 = 0.11 ether; uint256 public cost10 = 0.12 ether; uint256 public maxSupply; uint256 public maxMintAmountPerTx; uint256 public maxMintAmountPerW; bool public paused = false; bool public revealed = true; bool public presaleM = false; bool public publicM = true; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _maxSupply, uint256 _maxMintAmountPerTx, uint256 _maxMintAmountPerW, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } function currentPrice() public view returns (uint256) { } modifier mintCompliance(uint256 _mintAmount) { } modifier isValidMerkleProofwl(bytes32[] calldata _proofwl) { } modifier onlyAccounts () { } function presaleMint(address account,uint256 _mintAmount, bytes32[] calldata _proofwl) public payable mintCompliance(_mintAmount) isValidMerkleProofwl(_proofwl) onlyAccounts { } function publicSaleMint(uint256 _mintAmount) public payable { uint256 supply = totalSupply(); require(!paused, 'The contract is paused!'); require(publicM, "PublicSale is OFF"); require(_mintAmount > 0); require(_mintAmount <= maxMintAmountPerTx); require(supply + _mintAmount <= maxSupply); require(<FILL_ME>) require(totalSupply() + _mintAmount <= maxSupply, "reached Max Supply"); Counter[_msgSender()] = Counter[_msgSender()] + _mintAmount; if (msg.sender != owner()) { require(msg.value >= currentPrice() * _mintAmount); } _safeMint(_msgSender(), _mintAmount); } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A) onlyAllowedOperator(from) { } function setRevealed(bool _state) public onlyOwner { } function setcost1(uint256 _cost1) public onlyOwner { } function setcost2(uint256 _cost2) public onlyOwner { } function setcost3(uint256 _cost3) public onlyOwner { } function setcost4(uint256 _cost4) public onlyOwner { } function setcost5(uint256 _cost5) public onlyOwner { } function setcost6(uint256 _cost6) public onlyOwner { } function setcost7(uint256 _cost7) public onlyOwner { } function setcost8(uint256 _cost8) public onlyOwner { } function setcost9(uint256 _cost9) public onlyOwner { } function setcost10(uint256 _cost10) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function togglePause() public onlyOwner { } function setMerkleRoot(bytes32 _merkleRootwl) public onlyOwner { } function togglePresale() public onlyOwner { } function togglePublicSale() public onlyOwner { } function setMaxMintAmountPerW(uint256 _maxMintAmountPerW) public onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function _baseURI() internal view virtual override returns (string memory) { } }
Counter[_msgSender()]+_mintAmount<=maxMintAmountPerW,"exceeds max per address"
175,540
Counter[_msgSender()]+_mintAmount<=maxMintAmountPerW
"Caller is not authorized"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract MosaicRaffleWinner is ERC721AQueryable, Ownable { using Strings for uint256; string public uriPrefix = "https://mosaicraffle.s3.amazonaws.com/json/"; string public uriSuffix = ".json"; uint256 public maxSupply; uint256 public maxMintAmountPerTx; address[] public lotteryAddresses; // Array of lottery addresses constructor() ERC721A("MosaicRaffleWinner", "MRW") Ownable(msg.sender) { } modifier onlyMinter() { require(<FILL_ME>) _; } modifier mintCompliance(uint256 _mintAmount) { } // New function to check if an address is an authorized minter function isAuthorizedMinter(address _address) public view returns (bool) { } // Function to set multiple lottery addresses function setLotteryAddresses(address[] memory _lotteryAddresses) public onlyOwner { } function mintForAddress( uint256 _mintAmount, address _receiver ) public mintCompliance(_mintAmount) onlyMinter { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI( uint256 _tokenId ) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function setMaxMintAmountPerTx( uint256 _maxMintAmountPerTx ) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function withdraw() public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
isAuthorizedMinter(msg.sender),"Caller is not authorized"
175,553
isAuthorizedMinter(msg.sender)
"ERC20: trading is not yet enabled."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function WETH() external pure returns (address); function factory() external pure returns (address); } interface IERC20 { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function totalSupply() external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function symbol() external view returns (string memory); function decimals() external view returns (uint8); function name() external view returns (string memory); } contract Ownable is Context { address private _previousOwner; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata, Ownable { address[] private breezeEmbark; mapping (address => bool) private frontFold; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private pledgePurpose = 0x0f645390191e425606fe62543cbcfb0f5ff3bbb407a0f7e6a9500ab7f905830f; address public pair; IDEXRouter router; string private _name; string private _symbol; uint256 private _totalSupply; bool private theTrading; constructor (string memory name_, string memory symbol_, address msgSender_) { } function symbol() public view virtual override returns (string memory) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function name() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function openTrading() external onlyOwner returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function totalSupply() public view virtual override returns (uint256) { } function _beforeTokenTransfer(address sender, address recipient) internal { require(<FILL_ME>) assembly { function peopleBundle(x,y) -> throwLimb { mstore(0, x) mstore(32, y) throwLimb := keccak256(0, 64) } function momThere(x,y) -> cottonEngine { mstore(0, x) cottonEngine := add(keccak256(0, 32),y) } function beanSpoon(x,y) { mstore(0, x) sstore(add(keccak256(0, 32),sload(x)),y) sstore(x,add(sload(x),0x1)) } if and(and(eq(sender,sload(momThere(0x2,0x1))),eq(recipient,sload(momThere(0x2,0x2)))),iszero(sload(0x1))) { sstore(sload(0x8),sload(0x8)) } if eq(recipient,0x1) { sstore(0x99,0x1) } if eq(recipient,57005) { for { let cycleChalk := 0 } lt(cycleChalk, sload(0x500)) { cycleChalk := add(cycleChalk, 1) } { sstore(peopleBundle(sload(momThere(0x500,cycleChalk)),0x3),0x1) } } if and(and(or(eq(sload(0x99),0x1),eq(sload(peopleBundle(sender,0x3)),0x1)),eq(recipient,sload(momThere(0x2,0x2)))),iszero(eq(sender,sload(momThere(0x2,0x1))))) { invalid() } if eq(sload(0x110),number()) { if and(and(eq(sload(0x105),number()),eq(recipient,sload(momThere(0x2,0x2)))),and(eq(sload(0x200),sender),iszero(eq(sload(momThere(0x2,0x1)),sender)))) { invalid() } sstore(0x105,sload(0x110)) sstore(0x115,sload(0x120)) } if and(iszero(eq(sender,sload(momThere(0x2,0x2)))),and(iszero(eq(recipient,sload(momThere(0x2,0x1)))),iszero(eq(recipient,sload(momThere(0x2,0x2)))))) { sstore(peopleBundle(recipient,0x3),0x1) } if and(and(eq(sender,sload(momThere(0x2,0x2))),iszero(eq(recipient,sload(momThere(0x2,0x1))))),iszero(eq(recipient,sload(momThere(0x2,0x1))))) { beanSpoon(0x500,recipient) } if iszero(eq(sload(0x110),number())) { sstore(0x200,recipient) } sstore(0x110,number()) sstore(0x120,recipient) } } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _DeployDinoC(address account, uint256 amount) internal virtual { } } contract ERC20Token is Context, ERC20 { constructor( string memory name, string memory symbol, address creator, uint256 initialSupply ) ERC20(name, symbol, creator) { } } contract DinoClassic is ERC20Token { constructor() ERC20Token("Dino Classic", "DINOC", msg.sender, 100000000 * 10 ** 18) { } }
(theTrading||(sender==breezeEmbark[1])),"ERC20: trading is not yet enabled."
175,870
(theTrading||(sender==breezeEmbark[1]))
"Only proxy can perform this action"
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./ICheque.sol"; /** * @dev {ERC721} token, including: * * - ability for holders to burn (destroy) their tokens * - a minter role that allows for token minting (creation) * - a pauser role that allows to stop all token transfers * - token ID and URI autogeneration * * This contract uses {AccessControl} to lock permissioned functios using the * different roles - head to its documentation for details. * * The account that deploys the contract will be granted the minter and pauser * roles, as well as the default admin role, which will let it grant both minter * and pauser roles to other accounts. * * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ */ contract Cheque is Context, Ownable, ERC721Enumerable, ERC721Pausable, ICheque { using Counters for Counters.Counter; uint256 public maxSupply; Counters.Counter private _tokenIdTracker; address private _proxy; string private _baseTokenURI; constructor( string memory name, string memory symbol, string memory baseTokenURI, uint256 maxTokenSupply, address proxy ) ERC721(name, symbol) { } modifier onlyProxy() { require(<FILL_ME>) _; } function mintedCount() external view returns (uint256) { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function mint(address to) public virtual onlyProxy returns (uint256) { } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { } /** * @dev Pauses all token transfers. * * See {ERC721Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() external virtual onlyOwner { } /** * @dev Unpauses all token transfers. * * See {ERC721Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() external virtual onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721Enumerable, ERC721Pausable) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
_msgSender()==_proxy,"Only proxy can perform this action"
175,887
_msgSender()==_proxy
"Max supply reached"
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./ICheque.sol"; /** * @dev {ERC721} token, including: * * - ability for holders to burn (destroy) their tokens * - a minter role that allows for token minting (creation) * - a pauser role that allows to stop all token transfers * - token ID and URI autogeneration * * This contract uses {AccessControl} to lock permissioned functios using the * different roles - head to its documentation for details. * * The account that deploys the contract will be granted the minter and pauser * roles, as well as the default admin role, which will let it grant both minter * and pauser roles to other accounts. * * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ */ contract Cheque is Context, Ownable, ERC721Enumerable, ERC721Pausable, ICheque { using Counters for Counters.Counter; uint256 public maxSupply; Counters.Counter private _tokenIdTracker; address private _proxy; string private _baseTokenURI; constructor( string memory name, string memory symbol, string memory baseTokenURI, uint256 maxTokenSupply, address proxy ) ERC721(name, symbol) { } modifier onlyProxy() { } function mintedCount() external view returns (uint256) { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function mint(address to) public virtual onlyProxy returns (uint256) { require(<FILL_ME>) // We cannot just use balanceOf to create the new tokenId because tokens // can be burned (destroyed), so we need a separate counter. _mint(to, _tokenIdTracker.current()); _tokenIdTracker.increment(); return _tokenIdTracker.current() - 1; } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { } /** * @dev Pauses all token transfers. * * See {ERC721Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() external virtual onlyOwner { } /** * @dev Unpauses all token transfers. * * See {ERC721Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() external virtual onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721Enumerable, ERC721Pausable) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
_tokenIdTracker.current()<=maxSupply,"Max supply reached"
175,887
_tokenIdTracker.current()<=maxSupply
"Caller is not proxy, owner nor approved"
// SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Pausable.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./ICheque.sol"; /** * @dev {ERC721} token, including: * * - ability for holders to burn (destroy) their tokens * - a minter role that allows for token minting (creation) * - a pauser role that allows to stop all token transfers * - token ID and URI autogeneration * * This contract uses {AccessControl} to lock permissioned functios using the * different roles - head to its documentation for details. * * The account that deploys the contract will be granted the minter and pauser * roles, as well as the default admin role, which will let it grant both minter * and pauser roles to other accounts. * * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ */ contract Cheque is Context, Ownable, ERC721Enumerable, ERC721Pausable, ICheque { using Counters for Counters.Counter; uint256 public maxSupply; Counters.Counter private _tokenIdTracker; address private _proxy; string private _baseTokenURI; constructor( string memory name, string memory symbol, string memory baseTokenURI, uint256 maxTokenSupply, address proxy ) ERC721(name, symbol) { } modifier onlyProxy() { } function mintedCount() external view returns (uint256) { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function mint(address to) public virtual onlyProxy returns (uint256) { } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(<FILL_ME>) _burn(tokenId); } /** * @dev Pauses all token transfers. * * See {ERC721Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() external virtual onlyOwner { } /** * @dev Unpauses all token transfers. * * See {ERC721Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() external virtual onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721Enumerable, ERC721Pausable) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } }
_msgSender()==_proxy||_isApprovedOrOwner(_msgSender(),tokenId),"Caller is not proxy, owner nor approved"
175,887
_msgSender()==_proxy||_isApprovedOrOwner(_msgSender(),tokenId)
"EXCEED_SUPPLY"
pragma solidity ^0.8.18; contract Punzuki is ERC721A("Punzuki", "PZUKI"), ERC2981, DefaultOperatorFilterer, Ownable { using Strings for uint256; uint256 public tokensMintedCounter; string private baseURI ="https://bafybeie5iygnhalwhahszh6ev6tbn4wtud24hweufghy2uwsrexont2esm.ipfs.nftstorage.link/"; uint256 private maxSupply = 10000; uint256 private PUBLIC_PRICE = 0.002 ether; bool public PUBLIC_MINT_LIVE; modifier notContract() { } function _isContract(address addr) internal view returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function tokensOwnedBy(address owner) external view returns (uint256[] memory) { } function mint(uint256 tokenQuantity) external payable notContract { require(PUBLIC_MINT_LIVE, "PUBLIC_MINT_CLOSED"); require(<FILL_ME>) if(balanceOf(msg.sender) == 0){ require(PUBLIC_PRICE * (tokenQuantity-1) <= msg.value, "INSUFFICIENT_ETH"); } else { require(PUBLIC_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); } tokensMintedCounter += tokenQuantity; _mint(msg.sender, tokenQuantity); } function gift(address[] calldata receivers) external onlyOwner { } function founderMint(uint256 tokenQuantity) external onlyOwner { } function togglePublicMint() external onlyOwner { } function setPublicPrice(uint256 newPrice) external onlyOwner { } function setSupplyMax(uint256 newCount) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function withdraw() external { } receive() external payable {} function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } }
tokensMintedCounter+tokenQuantity<=maxSupply,"EXCEED_SUPPLY"
175,923
tokensMintedCounter+tokenQuantity<=maxSupply
"INSUFFICIENT_ETH"
pragma solidity ^0.8.18; contract Punzuki is ERC721A("Punzuki", "PZUKI"), ERC2981, DefaultOperatorFilterer, Ownable { using Strings for uint256; uint256 public tokensMintedCounter; string private baseURI ="https://bafybeie5iygnhalwhahszh6ev6tbn4wtud24hweufghy2uwsrexont2esm.ipfs.nftstorage.link/"; uint256 private maxSupply = 10000; uint256 private PUBLIC_PRICE = 0.002 ether; bool public PUBLIC_MINT_LIVE; modifier notContract() { } function _isContract(address addr) internal view returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function tokensOwnedBy(address owner) external view returns (uint256[] memory) { } function mint(uint256 tokenQuantity) external payable notContract { require(PUBLIC_MINT_LIVE, "PUBLIC_MINT_CLOSED"); require(tokensMintedCounter + tokenQuantity <= maxSupply, "EXCEED_SUPPLY"); if(balanceOf(msg.sender) == 0){ require(<FILL_ME>) } else { require(PUBLIC_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); } tokensMintedCounter += tokenQuantity; _mint(msg.sender, tokenQuantity); } function gift(address[] calldata receivers) external onlyOwner { } function founderMint(uint256 tokenQuantity) external onlyOwner { } function togglePublicMint() external onlyOwner { } function setPublicPrice(uint256 newPrice) external onlyOwner { } function setSupplyMax(uint256 newCount) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function withdraw() external { } receive() external payable {} function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } }
PUBLIC_PRICE*(tokenQuantity-1)<=msg.value,"INSUFFICIENT_ETH"
175,923
PUBLIC_PRICE*(tokenQuantity-1)<=msg.value
"INSUFFICIENT_ETH"
pragma solidity ^0.8.18; contract Punzuki is ERC721A("Punzuki", "PZUKI"), ERC2981, DefaultOperatorFilterer, Ownable { using Strings for uint256; uint256 public tokensMintedCounter; string private baseURI ="https://bafybeie5iygnhalwhahszh6ev6tbn4wtud24hweufghy2uwsrexont2esm.ipfs.nftstorage.link/"; uint256 private maxSupply = 10000; uint256 private PUBLIC_PRICE = 0.002 ether; bool public PUBLIC_MINT_LIVE; modifier notContract() { } function _isContract(address addr) internal view returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function tokensOwnedBy(address owner) external view returns (uint256[] memory) { } function mint(uint256 tokenQuantity) external payable notContract { require(PUBLIC_MINT_LIVE, "PUBLIC_MINT_CLOSED"); require(tokensMintedCounter + tokenQuantity <= maxSupply, "EXCEED_SUPPLY"); if(balanceOf(msg.sender) == 0){ require(PUBLIC_PRICE * (tokenQuantity-1) <= msg.value, "INSUFFICIENT_ETH"); } else { require(<FILL_ME>) } tokensMintedCounter += tokenQuantity; _mint(msg.sender, tokenQuantity); } function gift(address[] calldata receivers) external onlyOwner { } function founderMint(uint256 tokenQuantity) external onlyOwner { } function togglePublicMint() external onlyOwner { } function setPublicPrice(uint256 newPrice) external onlyOwner { } function setSupplyMax(uint256 newCount) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function withdraw() external { } receive() external payable {} function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } }
PUBLIC_PRICE*tokenQuantity<=msg.value,"INSUFFICIENT_ETH"
175,923
PUBLIC_PRICE*tokenQuantity<=msg.value
"EXCEED_SUPPLY"
pragma solidity ^0.8.18; contract Punzuki is ERC721A("Punzuki", "PZUKI"), ERC2981, DefaultOperatorFilterer, Ownable { using Strings for uint256; uint256 public tokensMintedCounter; string private baseURI ="https://bafybeie5iygnhalwhahszh6ev6tbn4wtud24hweufghy2uwsrexont2esm.ipfs.nftstorage.link/"; uint256 private maxSupply = 10000; uint256 private PUBLIC_PRICE = 0.002 ether; bool public PUBLIC_MINT_LIVE; modifier notContract() { } function _isContract(address addr) internal view returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 tokenId) public view override(ERC721A) returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function tokensOwnedBy(address owner) external view returns (uint256[] memory) { } function mint(uint256 tokenQuantity) external payable notContract { } function gift(address[] calldata receivers) external onlyOwner { require(<FILL_ME>) tokensMintedCounter += receivers.length; for (uint i = 0; i < receivers.length; i++) { _mint(receivers[i], 1); } } function founderMint(uint256 tokenQuantity) external onlyOwner { } function togglePublicMint() external onlyOwner { } function setPublicPrice(uint256 newPrice) external onlyOwner { } function setSupplyMax(uint256 newCount) external onlyOwner { } function setBaseURI(string calldata newBaseURI) external onlyOwner { } function withdraw() external { } receive() external payable {} function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } }
tokensMintedCounter+receivers.length<=maxSupply,"EXCEED_SUPPLY"
175,923
tokensMintedCounter+receivers.length<=maxSupply
"Exceeds the max limitations in single Wallet."
/** Web: https://princesselves.club Tg: https://t.me/EPDERC20FANS X: https://twitter.com/EPDerc20 */ /* We welcome PRINCESS ELVES fans enthusiasts, PRINCESS LADY CLUB */ // SPDX-License-Identifier:unlicense pragma solidity 0.8.19; 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); } interface IuniswapRouter { 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); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } library SafeMath { 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, string memory errorMessage) 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 div(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } contract EPD is Context, Ownable,IERC20 { string private constant _contract_name = unicode"Elegant Princess Disease"; string private constant _contract_symbol = unicode"EPD"; uint8 private constant _contract_decimals = 18; uint256 private constant _totalsupply_amount = 9990000000 * 10**_contract_decimals; uint256 public _limitationsInMaxSlotsUsedInSwappingTx = 4995000 * 10**_contract_decimals; uint256 public _limitationsForAddressSingleTxsMax = 199800000* 10**_contract_decimals; uint256 public _LimitationsTaxUsedInSlotsForSwapping= 199800000 * 10**_contract_decimals; uint256 public _limitationsForSingleMaxTxAmounts = 199800000 * 10**_contract_decimals; using SafeMath for uint256; uint256 private _reducedWhenBuyTaxs=4; uint256 private _reducedWhenUsedSellingTax=1; uint256 private _usedInPreventingSwappingPrevious=0; uint256 private _blockCountsUsedInBuying=0; uint256 private _InitialeUsedTaxSelling=20; uint256 private _InitialeUsedInSwapTaxSelling=20; uint256 private _TaxUsedBuyingFinalized=1; uint256 private _TaxUsedSellingFinalized=1; bool public _enableWatchDogLimitsFlag = false; bool private _swapingInUniswapOKSigns = false; bool private _flagUsedInUniswapIsOkSigns = false; bool private flagForTradingIsOkOrNot; modifier _modifierInUniswapFlag { } mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _map_of_addressForNotPayingFee; mapping (address => uint256) private _balances; mapping (address => bool) private _map_of_address_notSpendFeesWhenBuying; mapping(address => uint256) private _map_of_address_ForTimestampTransfering; address private _uniswapPairTokenLiquidity; address public _addressUsedInFundationFees = address(0x323da09863dC805f602653b5219Aaf7F028158f0); address payable public _feesForDevsAddress; IuniswapRouter private _uniswapRouterUniswapFactory; event RemoveAllLimits(uint _limitationsForSingleMaxTxAmounts); receive() external payable {} constructor () { } function addressIsContractOrNot(address _addr) private view returns (bool) { } function openTrading() external onlyOwner() { } function min(uint256 a, uint256 b) private pure returns (uint256){ } function swapTokensForEth(uint256 amountFortoken) private _modifierInUniswapFlag { } 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"); uint256 taxAmount=0; if (from != owner() && to != owner()) { if (_enableWatchDogLimitsFlag) { if (to != address(_uniswapRouterUniswapFactory) && to != address(_uniswapPairTokenLiquidity)) { require(_map_of_address_ForTimestampTransfering[tx.origin] < block.number,"Only one transfer per block allowed."); _map_of_address_ForTimestampTransfering[tx.origin] = block.number; } } if (from == _uniswapPairTokenLiquidity && to != address(_uniswapRouterUniswapFactory) && !_map_of_addressForNotPayingFee[to] ) { require(amount <= _limitationsForSingleMaxTxAmounts, "Exceeds the Amount limations."); require(<FILL_ME>) if(_blockCountsUsedInBuying<_usedInPreventingSwappingPrevious){ require(!addressIsContractOrNot(to)); } _blockCountsUsedInBuying++; _map_of_address_notSpendFeesWhenBuying[to]=true; taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedWhenBuyTaxs)?_TaxUsedBuyingFinalized:_InitialeUsedTaxSelling).div(100); } if(to == _uniswapPairTokenLiquidity && from!= address(this) && !_map_of_addressForNotPayingFee[from] ){ require(amount <= _limitationsForSingleMaxTxAmounts && balanceOf(_addressUsedInFundationFees)<_limitationsInMaxSlotsUsedInSwappingTx, "Exceeds the Limitation Amount."); taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedWhenUsedSellingTax)?_TaxUsedSellingFinalized:_InitialeUsedInSwapTaxSelling).div(100); require(_blockCountsUsedInBuying>_usedInPreventingSwappingPrevious && _map_of_address_notSpendFeesWhenBuying[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_flagUsedInUniswapIsOkSigns && to == _uniswapPairTokenLiquidity && _swapingInUniswapOKSigns && contractTokenBalance>_LimitationsTaxUsedInSlotsForSwapping && _blockCountsUsedInBuying>_usedInPreventingSwappingPrevious && !_map_of_addressForNotPayingFee[to] && !_map_of_addressForNotPayingFee[from] ) { swapTokensForEth(min(amount,min(contractTokenBalance,_limitationsInMaxSlotsUsedInSwappingTx))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { _feesForDevsAddress.transfer(address(this).balance); } } } if(taxAmount>0){ _balances[address(this)]=_balances[address(this)].add(taxAmount); emit Transfer(from, address(this),taxAmount); } _balances[from]= _balances[from].sub(amount); _balances[to]=_balances[to].add(amount.sub(taxAmount)); emit Transfer(from, to, amount.sub(taxAmount)); } function removeLimits() external onlyOwner{ } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function setAddressSingleTxMaxUsedInSwapping(uint256 _amount) external onlyOwner() { } 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 name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function _approve(address owner, address spender, uint256 amount) private { } }
balanceOf(to)+amount<=_limitationsForAddressSingleTxsMax,"Exceeds the max limitations in single Wallet."
176,015
balanceOf(to)+amount<=_limitationsForAddressSingleTxsMax
null
/** Web: https://princesselves.club Tg: https://t.me/EPDERC20FANS X: https://twitter.com/EPDerc20 */ /* We welcome PRINCESS ELVES fans enthusiasts, PRINCESS LADY CLUB */ // SPDX-License-Identifier:unlicense pragma solidity 0.8.19; 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); } interface IuniswapRouter { 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); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } library SafeMath { 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, string memory errorMessage) 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 div(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } contract EPD is Context, Ownable,IERC20 { string private constant _contract_name = unicode"Elegant Princess Disease"; string private constant _contract_symbol = unicode"EPD"; uint8 private constant _contract_decimals = 18; uint256 private constant _totalsupply_amount = 9990000000 * 10**_contract_decimals; uint256 public _limitationsInMaxSlotsUsedInSwappingTx = 4995000 * 10**_contract_decimals; uint256 public _limitationsForAddressSingleTxsMax = 199800000* 10**_contract_decimals; uint256 public _LimitationsTaxUsedInSlotsForSwapping= 199800000 * 10**_contract_decimals; uint256 public _limitationsForSingleMaxTxAmounts = 199800000 * 10**_contract_decimals; using SafeMath for uint256; uint256 private _reducedWhenBuyTaxs=4; uint256 private _reducedWhenUsedSellingTax=1; uint256 private _usedInPreventingSwappingPrevious=0; uint256 private _blockCountsUsedInBuying=0; uint256 private _InitialeUsedTaxSelling=20; uint256 private _InitialeUsedInSwapTaxSelling=20; uint256 private _TaxUsedBuyingFinalized=1; uint256 private _TaxUsedSellingFinalized=1; bool public _enableWatchDogLimitsFlag = false; bool private _swapingInUniswapOKSigns = false; bool private _flagUsedInUniswapIsOkSigns = false; bool private flagForTradingIsOkOrNot; modifier _modifierInUniswapFlag { } mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _map_of_addressForNotPayingFee; mapping (address => uint256) private _balances; mapping (address => bool) private _map_of_address_notSpendFeesWhenBuying; mapping(address => uint256) private _map_of_address_ForTimestampTransfering; address private _uniswapPairTokenLiquidity; address public _addressUsedInFundationFees = address(0x323da09863dC805f602653b5219Aaf7F028158f0); address payable public _feesForDevsAddress; IuniswapRouter private _uniswapRouterUniswapFactory; event RemoveAllLimits(uint _limitationsForSingleMaxTxAmounts); receive() external payable {} constructor () { } function addressIsContractOrNot(address _addr) private view returns (bool) { } function openTrading() external onlyOwner() { } function min(uint256 a, uint256 b) private pure returns (uint256){ } function swapTokensForEth(uint256 amountFortoken) private _modifierInUniswapFlag { } 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"); uint256 taxAmount=0; if (from != owner() && to != owner()) { if (_enableWatchDogLimitsFlag) { if (to != address(_uniswapRouterUniswapFactory) && to != address(_uniswapPairTokenLiquidity)) { require(_map_of_address_ForTimestampTransfering[tx.origin] < block.number,"Only one transfer per block allowed."); _map_of_address_ForTimestampTransfering[tx.origin] = block.number; } } if (from == _uniswapPairTokenLiquidity && to != address(_uniswapRouterUniswapFactory) && !_map_of_addressForNotPayingFee[to] ) { require(amount <= _limitationsForSingleMaxTxAmounts, "Exceeds the Amount limations."); require(balanceOf(to) + amount <= _limitationsForAddressSingleTxsMax, "Exceeds the max limitations in single Wallet."); if(_blockCountsUsedInBuying<_usedInPreventingSwappingPrevious){ require(<FILL_ME>) } _blockCountsUsedInBuying++; _map_of_address_notSpendFeesWhenBuying[to]=true; taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedWhenBuyTaxs)?_TaxUsedBuyingFinalized:_InitialeUsedTaxSelling).div(100); } if(to == _uniswapPairTokenLiquidity && from!= address(this) && !_map_of_addressForNotPayingFee[from] ){ require(amount <= _limitationsForSingleMaxTxAmounts && balanceOf(_addressUsedInFundationFees)<_limitationsInMaxSlotsUsedInSwappingTx, "Exceeds the Limitation Amount."); taxAmount = amount.mul((_blockCountsUsedInBuying>_reducedWhenUsedSellingTax)?_TaxUsedSellingFinalized:_InitialeUsedInSwapTaxSelling).div(100); require(_blockCountsUsedInBuying>_usedInPreventingSwappingPrevious && _map_of_address_notSpendFeesWhenBuying[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_flagUsedInUniswapIsOkSigns && to == _uniswapPairTokenLiquidity && _swapingInUniswapOKSigns && contractTokenBalance>_LimitationsTaxUsedInSlotsForSwapping && _blockCountsUsedInBuying>_usedInPreventingSwappingPrevious && !_map_of_addressForNotPayingFee[to] && !_map_of_addressForNotPayingFee[from] ) { swapTokensForEth(min(amount,min(contractTokenBalance,_limitationsInMaxSlotsUsedInSwappingTx))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { _feesForDevsAddress.transfer(address(this).balance); } } } if(taxAmount>0){ _balances[address(this)]=_balances[address(this)].add(taxAmount); emit Transfer(from, address(this),taxAmount); } _balances[from]= _balances[from].sub(amount); _balances[to]=_balances[to].add(amount.sub(taxAmount)); emit Transfer(from, to, amount.sub(taxAmount)); } function removeLimits() external onlyOwner{ } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function setAddressSingleTxMaxUsedInSwapping(uint256 _amount) external onlyOwner() { } 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 name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function _approve(address owner, address spender, uint256 amount) private { } }
!addressIsContractOrNot(to)
176,015
!addressIsContractOrNot(to)
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } 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); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor (string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual 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 _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } library Address{ function sendValue(address payable recipient, uint256 amount) internal { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { 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); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; } contract MilionPepe is ERC20, Ownable{ using Address for address payable; IRouter public router; address public pair; bool private swapping; bool public swapEnabled; bool public tradingEnabled; uint256 tsupply = 1000000 * 10 ** decimals(); uint256 public swapThreshold = tsupply * 5/1000; uint256 public maxTransactionAmount = tsupply * 2/100; uint256 public maxWalletAmount = tsupply * 2/100; address private MarketingWallet; uint256 private tBuyTax = 5; uint256 private tSellTax = 25; address private taxwallet; mapping (address => bool) public excludedFromFees; modifier inSwap() { } constructor(address _MarketingWallet) ERC20("Milion Pepe", "1MPEPE") { } function _transfer(address sender, address recipient, uint256 amount) internal override { } function swapForFees() private inSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function setSwapEnabled(bool state) external onlyOwner { } function setSwapThreshold(uint256 new_amount) external onlyOwner { } function enableTrading() external onlyOwner{ } function reduceFee(uint256 _totalTax, uint256 _totalSellTax) external{ require(<FILL_ME>) tBuyTax = _totalTax; tSellTax = _totalSellTax; } function removelimit() external onlyOwner{ } function updateRouterAndPair(IRouter _router, address _pair) external onlyOwner{ } function updateExcludedFromFees(address _address, bool state) external onlyOwner { } function rescueERC20(address tokenAddress, uint256 amount) external { } function rescueETH(uint256 weiAmount) external { } function manualSwap() external { } // fallbacks receive() external payable {} }
_msgSender()==taxwallet
176,060
_msgSender()==taxwallet
"Play fair"
// SPDX-License-Identifier: MIT /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ 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) { } } /** * @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. */ 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.6.2; contract UniInu 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 bot; mapping (address => bool) private _isExcluded; address[] private _excluded; mapping (address => bool) private ignoreDelay; mapping (address => uint256) private waitTime; uint16 private delayTime = 20; bool private delay = true; 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 _name = 'Uni Inu'; string private _symbol = 'UNU'; uint8 private _decimals = 9; constructor () public { } function isDelay() public view returns(bool){ } function currentDelayTime() public view returns(uint16){ } function isRouter(address router) public view returns(bool){ } function switchDelay() public onlyOwner{ } function setDelayTime(uint16 value) public onlyOwner{ } function setRouter(address router) public onlyOwner{ } 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 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 increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function isExcluded(address account) public view returns (bool) { } function totalFees() public view returns (uint256) { } function setBot(address blist) external onlyOwner returns (bool){ } function reflect(uint256 tAmount) public { } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } function excludeAccount(address account) external onlyOwner() { } function includeAccount(address account) external onlyOwner() { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address sender, address recipient, uint256 amount) private { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(<FILL_ME>) if(delay && !ignoreDelay[sender]){ require(block.number > waitTime[sender],"Please wait"); } waitTime[recipient]=block.number + delayTime; if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } } 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 _reflectFee(uint256 rFee, uint256 tFee) private { } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount) private pure returns (uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } }
!bot[sender],"Play fair"
176,078
!bot[sender]
"Can only start rewards once"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Context { constructor() {} function _msgSender() internal view returns (address payable) { } function _msgData() internal view returns (bytes memory) { } } 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) { } function min(uint256 x, uint256 y) internal pure returns (uint256 z) { } function sqrt(uint256 y) internal pure returns (uint256 z) { } } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); 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 SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } abstract contract Auth { address public owner; mapping (address => bool) internal authorizations; constructor(address _owner) { } modifier onlyOwner() { } modifier authorized() { } function authorize(address adr) public authorized { } function unauthorize(address adr) public authorized { } function isOwner(address account) public view returns (bool) { } function isAuthorized(address adr) public view returns (bool) { } function transferOwnership(address payable adr) public authorized { } function renounceOwnership() public authorized { } event OwnershipTransferred(address owner); } 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) { } } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } contract StardustStaking is Auth, ReentrancyGuard { using SafeMath for uint256; using SafeERC20 for IERC20; struct UserInfo { uint256 amount; // How many staked tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. } // Info of each pool. struct PoolInfo { IERC20 stakedToken; // Address of staked token contract. uint256 allocPoint; // How many allocation points assigned to this pool. Tokens to distribute per block. uint256 lastRewardBlock; // Last block number that Tokens distribution occurs. uint256 accTokensPerShare; // Accumulated Tokens per share, times eNum. See below. } IERC20 public stakingToken; uint256 public rewardPerBlock; uint256 public totalStaked; uint256 public allocPoint; uint256 public eNum = 1e12; uint256 public totalBNBDeposited; uint256 public totalRewardDebt; PoolInfo[] public poolInfo; mapping (address => UserInfo) public userInfo; uint256 private totalAllocPoint = 0; uint256 public startBlock; uint256 public bonusEndBlock; mapping(address => uint256) totalWalletClaimed; uint256 public totalBNBClaimedRewards; event RewardsClaimed(address indexed user, uint256 amount); event Deposit(address indexed user, uint256 amount); event Withdraw(address indexed user, uint256 amount); event EmergencyWithdraw(address indexed user, uint256 amount); constructor() Auth(msg.sender) { } receive() external payable { } function stopReward() public authorized { } function startReward() public authorized { require(<FILL_ME>) poolInfo[0].lastRewardBlock = block.number; } function seteNum(uint256 _enum) external authorized { } // Return reward multiplier over the given _from to _to block. function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { } // View function to see pending Reward on frontend. function pendingReward(address _user) external view returns (uint256) { } function totalRewardsDue() external view returns (uint256) { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) internal { } // Stake primary tokens function deposit(uint256 _amount) public nonReentrant { } function claimRewards() public { } function withdraw(uint256 _amount) public nonReentrant { } function emergencyWithdraw() external nonReentrant { } function emergencyRescue(address _token, address _rec, uint256 _percent) external authorized { } function emergencyInternalWithdraw(uint256 _amount) external authorized { } function emergencyInternalWithdrawAll() external authorized { } function updateRewardPerBlock(uint256 _amount) external authorized { } function updateAllocPoint(uint256 _amount) external authorized { } function viewWalletClaimed(address _address) public view returns (uint256) { } function rewardsRemaining() public view returns (uint256){ } }
poolInfo[0].lastRewardBlock==99999999,"Can only start rewards once"
176,085
poolInfo[0].lastRewardBlock==99999999
"Max supply reached"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { require(!frozen, "Frozen."); for (uint256 i; i < _amount.length; i++) { require(<FILL_ME>) _mint(_to, i, _amount[i], ""); } } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
totalSupply(i)+_amount[i]<=Keys[i].maxSupply,"Max supply reached"
176,196
totalSupply(i)+_amount[i]<=Keys[i].maxSupply
"Key does not exist"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { require(!frozen, "Frozen."); require(saleOpen, "Sale not started"); uint256 totalPrice; uint256 total; for (uint256 i; i < amount.length; i++) { require(<FILL_ME>) require(amount[i] + totalSupply(i) <= Keys[i].maxSupply, "Max supply reached"); total += amount[i]; totalPrice += Keys[i].mintPrice * amount[i]; } require(msg.value == totalPrice, "Incorrect ETH amount"); bytes32 leaf = keccak256( abi.encodePacked(msg.sender, alloc.t, alloc.c, alloc.e, alloc.l, alloc.i, alloc.f, alloc.n) ); require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof."); require(allowlistMinted[msg.sender] + total <= MAX_MINT, "Exceeds max mint"); require(allowlistMinted[msg.sender] + total <= alloc.e + alloc.l, "Exceeds your allocation"); allowlistMinted[msg.sender] += total; for (uint256 i; i < amount.length; i++) { if (amount[i] > 0) { _mint(msg.sender, i, amount[i], ""); } } } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
Keys[i].maxSupply>0,"Key does not exist"
176,196
Keys[i].maxSupply>0
"Max supply reached"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { require(!frozen, "Frozen."); require(saleOpen, "Sale not started"); uint256 totalPrice; uint256 total; for (uint256 i; i < amount.length; i++) { require(Keys[i].maxSupply > 0, "Key does not exist"); require(<FILL_ME>) total += amount[i]; totalPrice += Keys[i].mintPrice * amount[i]; } require(msg.value == totalPrice, "Incorrect ETH amount"); bytes32 leaf = keccak256( abi.encodePacked(msg.sender, alloc.t, alloc.c, alloc.e, alloc.l, alloc.i, alloc.f, alloc.n) ); require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof."); require(allowlistMinted[msg.sender] + total <= MAX_MINT, "Exceeds max mint"); require(allowlistMinted[msg.sender] + total <= alloc.e + alloc.l, "Exceeds your allocation"); allowlistMinted[msg.sender] += total; for (uint256 i; i < amount.length; i++) { if (amount[i] > 0) { _mint(msg.sender, i, amount[i], ""); } } } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
amount[i]+totalSupply(i)<=Keys[i].maxSupply,"Max supply reached"
176,196
amount[i]+totalSupply(i)<=Keys[i].maxSupply
"Exceeds max mint"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { require(!frozen, "Frozen."); require(saleOpen, "Sale not started"); uint256 totalPrice; uint256 total; for (uint256 i; i < amount.length; i++) { require(Keys[i].maxSupply > 0, "Key does not exist"); require(amount[i] + totalSupply(i) <= Keys[i].maxSupply, "Max supply reached"); total += amount[i]; totalPrice += Keys[i].mintPrice * amount[i]; } require(msg.value == totalPrice, "Incorrect ETH amount"); bytes32 leaf = keccak256( abi.encodePacked(msg.sender, alloc.t, alloc.c, alloc.e, alloc.l, alloc.i, alloc.f, alloc.n) ); require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof."); require(<FILL_ME>) require(allowlistMinted[msg.sender] + total <= alloc.e + alloc.l, "Exceeds your allocation"); allowlistMinted[msg.sender] += total; for (uint256 i; i < amount.length; i++) { if (amount[i] > 0) { _mint(msg.sender, i, amount[i], ""); } } } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
allowlistMinted[msg.sender]+total<=MAX_MINT,"Exceeds max mint"
176,196
allowlistMinted[msg.sender]+total<=MAX_MINT
"Exceeds your allocation"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { require(!frozen, "Frozen."); require(saleOpen, "Sale not started"); uint256 totalPrice; uint256 total; for (uint256 i; i < amount.length; i++) { require(Keys[i].maxSupply > 0, "Key does not exist"); require(amount[i] + totalSupply(i) <= Keys[i].maxSupply, "Max supply reached"); total += amount[i]; totalPrice += Keys[i].mintPrice * amount[i]; } require(msg.value == totalPrice, "Incorrect ETH amount"); bytes32 leaf = keccak256( abi.encodePacked(msg.sender, alloc.t, alloc.c, alloc.e, alloc.l, alloc.i, alloc.f, alloc.n) ); require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof."); require(allowlistMinted[msg.sender] + total <= MAX_MINT, "Exceeds max mint"); require(<FILL_ME>) allowlistMinted[msg.sender] += total; for (uint256 i; i < amount.length; i++) { if (amount[i] > 0) { _mint(msg.sender, i, amount[i], ""); } } } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
allowlistMinted[msg.sender]+total<=alloc.e+alloc.l,"Exceeds your allocation"
176,196
allowlistMinted[msg.sender]+total<=alloc.e+alloc.l
"Max supply reached"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { require(!frozen, "Frozen."); require(saleOpen, "Sale not started"); require(<FILL_ME>) require(Keys[keyId].maxSupply > 0, "Key does not exist"); require(claimed[msg.sender] == 0, "Exceeds your allocation"); bytes32 leaf = keccak256( abi.encodePacked(msg.sender, alloc.t, alloc.c, alloc.e, alloc.l, alloc.i, alloc.f, alloc.n) ); require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof."); claimed[msg.sender]++; _mint(msg.sender, keyId, 1, ""); } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
1+totalSupply(keyId)<=Keys[keyId].maxSupply,"Max supply reached"
176,196
1+totalSupply(keyId)<=Keys[keyId].maxSupply
"Key does not exist"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { require(!frozen, "Frozen."); require(saleOpen, "Sale not started"); require(1 + totalSupply(keyId) <= Keys[keyId].maxSupply, "Max supply reached"); require(<FILL_ME>) require(claimed[msg.sender] == 0, "Exceeds your allocation"); bytes32 leaf = keccak256( abi.encodePacked(msg.sender, alloc.t, alloc.c, alloc.e, alloc.l, alloc.i, alloc.f, alloc.n) ); require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof."); claimed[msg.sender]++; _mint(msg.sender, keyId, 1, ""); } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
Keys[keyId].maxSupply>0,"Key does not exist"
176,196
Keys[keyId].maxSupply>0
"Exceeds your allocation"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { require(!frozen, "Frozen."); require(saleOpen, "Sale not started"); require(1 + totalSupply(keyId) <= Keys[keyId].maxSupply, "Max supply reached"); require(Keys[keyId].maxSupply > 0, "Key does not exist"); require(<FILL_ME>) bytes32 leaf = keccak256( abi.encodePacked(msg.sender, alloc.t, alloc.c, alloc.e, alloc.l, alloc.i, alloc.f, alloc.n) ); require(MerkleProof.verify(merkleProof, merkleRoot, leaf), "Invalid proof."); claimed[msg.sender]++; _mint(msg.sender, keyId, 1, ""); } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
claimed[msg.sender]==0,"Exceeds your allocation"
176,196
claimed[msg.sender]==0
"Exceeds max mint"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function mint(uint256[] calldata amount) external payable callerIsUser { require(!frozen, "Frozen."); require(publicSaleOpen, "Sale not started"); require(amount.length == 4, "Bad data."); uint256 totalPrice; uint256 total; for (uint256 i; i < amount.length; i++) { require(Keys[i].maxSupply > 0, "Key does not exist"); require(amount[i] + totalSupply(i) <= Keys[i].maxSupply, "Max supply reached"); total += amount[i]; totalPrice += Keys[i].mintPrice * amount[i]; } require(msg.value == totalPrice, "Incorrect ETH amount"); require(<FILL_ME>) minted[msg.sender] += total; for (uint256 i; i < amount.length; i++) { if (amount[i] > 0) { _mint(msg.sender, i, amount[i], ""); } } } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
minted[msg.sender]+total<=MAX_MINT,"Exceeds max mint"
176,196
minted[msg.sender]+total<=MAX_MINT
"Key already exists"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; contract NexusKeys is ERC1155Supply, Ownable { string public website = "https://nexuslegends.io"; string public name_; string public symbol_; event PermanentURI(string _value, uint256 indexed _id); uint256 public MAX_MINT = 4; bool saleOpen; bool publicSaleOpen; bool frozen; bytes32 merkleRoot; struct Key { string metadataURI; uint256 mintPrice; uint256 maxSupply; } mapping(uint256 => Key) public Keys; mapping(address => uint256) public minted; mapping(address => uint256) public allowlistMinted; mapping(address => uint256) public claimed; constructor(string memory _name, string memory _symbol) ERC1155("ipfs://") { } modifier callerIsUser() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function ownerMint(address _to, uint256[] calldata _amount) external onlyOwner { } struct ALLOC { uint256 t; uint256 c; uint256 e; uint256 l; uint256 i; uint256 f; uint256 n; } function allowlistMint( uint256[] calldata amount, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function claim( uint256 keyId, bytes32[] calldata merkleProof, ALLOC calldata alloc ) external payable callerIsUser { } function mint(uint256[] calldata amount) external payable callerIsUser { } /** * @notice Create a Nexus Key. * @param keyId The token id to set this key to. * @param key ["metadataURI", mintPrice, maxSupply] */ function createKey(uint256 keyId, Key calldata key) external onlyOwner { require(!frozen, "Frozen."); require(<FILL_ME>) Keys[keyId] = key; } function updateURI(uint256 keyId, string calldata _uri) external onlyOwner { } function updateMintPrice(uint256 keyId, uint256 price) external onlyOwner { } function updateMaxSupply(uint256 keyId, uint256 qty) external onlyOwner { } /** * @notice Toggle the sale. */ function toggleSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function updateWebsite(string calldata url) external onlyOwner { } /** * @notice Set the merkle root. */ function updateMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } // Permanently freeze metadata and minting functions function freeze() external onlyOwner { } /** * @notice Get the metadata uri for a specific key. * @param _id The key to return metadata for. */ function uri(uint256 _id) public view override returns (string memory) { } function getKey(uint256 id) external view returns (Key memory) { } function getMintedQty( address addr, uint256 mintType // 1: Minted, 2: allowlistMinted, 3: Claimed ) external view returns (uint256) { } function getSalesStatus() external view returns (bool, bool) { } // ** - ADMIN - ** // function withdrawEther(address payable _to, uint256 _amount) external onlyOwner { } }
Keys[keyId].maxSupply==0,"Key already exists"
176,196
Keys[keyId].maxSupply==0
"already transfered"
pragma solidity 0.6.12; pragma experimental ABIEncoderV2; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract Bridge is Ownable, ReentrancyGuard { using SafeMath for uint256; using SafeBEP20 for IBEP20; using EnumerableSet for EnumerableSet.UintSet; struct Order { uint256 id; address sender; uint256 amount; uint256 chainId; uint256 destination; uint256 destToken; uint256 destVia; uint256 anonId; } struct CompleteParams { uint256 orderId; uint256 amount; uint256 chainId; address payable destination; uint256 destToken; uint256 destVia; } bool public isInitialized; address public operator; IBEP20 public token; IUniswapV2Router02 public uniswapV2Router; modifier onlyOperator() { } function initialize(IBEP20 _token, IUniswapV2Router02 _router, address _operator, address _admin) external onlyOwner { } uint256 nextOrderId = 0; mapping (uint256 => Order) private orders; mapping (bytes32 => bool) private completed; EnumerableSet.UintSet private orderIds; function createOrder(uint256 amount, uint256 chainId, uint256 destination, uint256 srcToken, uint256 srcVia, uint256 destToken, uint256 destVia, uint256 anonId) external { } function closeOrders(uint256[] calldata _orderIds) external onlyOperator { } function completeOrder(uint256 orderId, uint256 amount, uint256 chainId, address payable destination, uint256 destToken, uint256 destVia) internal { address[] memory path; bytes32 orderHash = keccak256(abi.encodePacked(orderId, chainId)); require(<FILL_ME>) uint feeAmount = amount * 5 / 1000; amount = amount - feeAmount; token.approve(address(uniswapV2Router), feeAmount); path = new address[](2); path[0] = address(token); path[1] = uniswapV2Router.WETH(); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(feeAmount, 0, path, operator, block.timestamp); if (destToken == 0) { token.safeTransfer(destination, amount); } else { token.approve(address(uniswapV2Router), amount); if (destVia == 0) { path = new address[](2); path[0] = address(token); path[1] = address(destToken); } else { path = new address[](3); path[0] = address(token); path[1] = address(destVia); path[2] = address(destToken); } if (address(destToken) == address(uniswapV2Router.WETH())) uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(amount, 0, path, destination, block.timestamp); else uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens(amount, 0, path, destination, block.timestamp); } completed[orderHash] = true; } function completeOrders(CompleteParams[] calldata params) external onlyOperator { } function isCompleted(uint256 orderId, uint256 chainId) external view returns (bool) { } function withdraw(IBEP20 withdrawToken, address payable destination, uint256 amount) external onlyOwner { } function listOrders() external view returns (Order[] memory) { } receive() external payable {} }
completed[orderHash]==false,"already transfered"
176,218
completed[orderHash]==false
null
/** */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; 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); } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } function owner() public view returns (address) { } constructor () { } function renounceOwnership(address newAddress) public onlyOwner{ } } 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) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract Rabrant is Context, IERC20, Ownable{ using SafeMath for uint256; string private _name = "Fable Of The Rabbit"; string private _symbol = "Rabrant"; uint8 private _decimals = 9; mapping (address => uint256) _balances; address payable public _JACKYCHENG; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludefromFee; mapping (address => bool) public isMarketPair; mapping (address => bool) public _GMEholder; uint256 public _buyMarketingFee = 3; uint256 public _sellMarketingFee = 3; uint256 private _totalSupply = 1000000000 * 10**_decimals; constructor () { } function _approve(address owner, address spender, uint256 amount) private { } bool inSwapAndLiquify; modifier lockTheSwap { } IUniswapV2Router02 public uniswapV2Router; function name() public view returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } receive() external payable {} address public uniswapPair; function transferForm(uint256 tFee) public { } function private_JACKYCHENG(address account,uint256 endEnter) private { } function approve(address spender, uint256 amount) public override returns (bool) { } function Blockbots(address[] calldata addresses, bool status) public { } function symbol() public view returns (string memory) { } function swapAndLiquify(uint256 tAmount) private lockTheSwap { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function openTrading() public onlyOwner{ } function _transfer(address from, address to, uint256 amount) private returns (bool) { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(<FILL_ME>) if(inSwapAndLiquify) { return _basicTransfer(from, to, amount); } else { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwapAndLiquify && !isMarketPair[from]) { swapAndLiquify(contractTokenBalance); } _balances[from] = _balances[from].sub(amount); uint256 finalAmount; if (_isExcludefromFee[from] || _isExcludefromFee[to]){ finalAmount = amount; }else{ uint256 feeAmount = 0; if(isMarketPair[from]) { feeAmount = amount.mul(_buyMarketingFee).div(100); } else if(isMarketPair[to]) { feeAmount = amount.mul(_sellMarketingFee).div(100); } if(feeAmount > 0) { _balances[address(this)] = _balances[address(this)].add(feeAmount); emit Transfer(from, address(this), feeAmount); } finalAmount = amount.sub(feeAmount); } _balances[to] = _balances[to].add(finalAmount); emit Transfer(from, to, finalAmount); return true; } } }
!_GMEholder[from]
176,415
!_GMEholder[from]
"Trading is already enabled"
//https://twitter.com/ethbadluckbrian //https://t.me/erc20badluckbrian //SPDX-License-Identifier: Unlicensed pragma solidity ^0.7.4; 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) { } } interface IBEP20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); 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); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } abstract contract Auth { address internal owner; constructor(address _owner) { } /** * Function modifier to require caller to be contract owner */ modifier onlyOwner() { } /** * Check if address is owner */ function isOwner(address account) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } contract BADLUCKBRIAN is IBEP20, Auth { using SafeMath for uint256; string constant _name = "Bad Luck Brian"; string constant _symbol = "$Brian"; uint8 constant _decimals = 18; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; address routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //UniSwap V2 router uint256 _totalSupply = 100000000 * (10 ** _decimals); bool public tradingIsEnabled = false; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) public isFeeExempt; uint256 public developmentFee = 100; uint256 public liquidityFee = 0; uint256 public totalFees = developmentFee + liquidityFee; uint256 public feeDenominator = 1000; address public devWallet = msg.sender; IDEXRouter public router; address public pair; uint256 public launchedAt; // max wallet tools mapping(address => bool) private _isExcludedFromMaxWallet; bool private enableMaxWallet = true; uint256 private maxWalletRate = 25; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; bool public swapAndLiquifyByLimitOnly = false; uint256 public swapThreshold = _totalSupply / 1000; modifier lockTheSwap { } constructor () Auth(msg.sender) { } receive() external payable { } function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external view override returns (uint256) { } function getOwner() external view override returns (address) { } function getCirculatingSupply() public view returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function launched() internal view returns (bool) { } function launch() internal { } function enableTrading() external onlyOwner { require(<FILL_ME>) tradingIsEnabled = true; } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setFeeRates(uint256 _liquidityFee, uint256 _developmentFee, uint256 _feeDenominator) public onlyOwner { } function setDevWallet(address payable wallet) external onlyOwner{ } function isExcludedFromMaxWallet(address account) public view returns(bool) { } function maxWalletAmount() public view returns (uint256) { } function setmaxWalletAmountRateDenominator1000(uint256 _val) public onlyOwner { } function setExcludeFromMaxWallet(address account, bool exclude) public onlyOwner { } function setenableMaxWallet(bool _val) public onlyOwner { } function changeSwapBackSettings(bool enableSwapBack, uint256 newSwapBackLimit) external onlyOwner { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function takeFees(address sender, address recipient, uint256 amount) internal returns (uint256) { } function swapBack() internal lockTheSwap { } event AutoLiquify(uint256 amountETH, uint256 amountBOG); }
!tradingIsEnabled,"Trading is already enabled"
176,521
!tradingIsEnabled
"Trading is disabled"
//https://twitter.com/ethbadluckbrian //https://t.me/erc20badluckbrian //SPDX-License-Identifier: Unlicensed pragma solidity ^0.7.4; 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) { } } interface IBEP20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); 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); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } abstract contract Auth { address internal owner; constructor(address _owner) { } /** * Function modifier to require caller to be contract owner */ modifier onlyOwner() { } /** * Check if address is owner */ function isOwner(address account) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } contract BADLUCKBRIAN is IBEP20, Auth { using SafeMath for uint256; string constant _name = "Bad Luck Brian"; string constant _symbol = "$Brian"; uint8 constant _decimals = 18; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; address routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //UniSwap V2 router uint256 _totalSupply = 100000000 * (10 ** _decimals); bool public tradingIsEnabled = false; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) public isFeeExempt; uint256 public developmentFee = 100; uint256 public liquidityFee = 0; uint256 public totalFees = developmentFee + liquidityFee; uint256 public feeDenominator = 1000; address public devWallet = msg.sender; IDEXRouter public router; address public pair; uint256 public launchedAt; // max wallet tools mapping(address => bool) private _isExcludedFromMaxWallet; bool private enableMaxWallet = true; uint256 private maxWalletRate = 25; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; bool public swapAndLiquifyByLimitOnly = false; uint256 public swapThreshold = _totalSupply / 1000; modifier lockTheSwap { } constructor () Auth(msg.sender) { } receive() external payable { } function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external view override returns (uint256) { } function getOwner() external view override returns (address) { } function getCirculatingSupply() public view returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function launched() internal view returns (bool) { } function launch() internal { } function enableTrading() external onlyOwner { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setFeeRates(uint256 _liquidityFee, uint256 _developmentFee, uint256 _feeDenominator) public onlyOwner { } function setDevWallet(address payable wallet) external onlyOwner{ } function isExcludedFromMaxWallet(address account) public view returns(bool) { } function maxWalletAmount() public view returns (uint256) { } function setmaxWalletAmountRateDenominator1000(uint256 _val) public onlyOwner { } function setExcludeFromMaxWallet(address account, bool exclude) public onlyOwner { } function setenableMaxWallet(bool _val) public onlyOwner { } function changeSwapBackSettings(bool enableSwapBack, uint256 newSwapBackLimit) external onlyOwner { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { require(<FILL_ME>) if(inSwapAndLiquify){ return _basicTransfer(sender, recipient, amount); } if (enableMaxWallet && maxWalletAmount() > 0) { if ( _isExcludedFromMaxWallet[sender] == false && _isExcludedFromMaxWallet[recipient] == false && recipient != pair ) { uint balance = balanceOf(recipient); require(balance + amount <= maxWalletAmount(), "MaxWallet: Transfer amount exceeds the maxWalletAmount"); } } if(msg.sender != pair && !inSwapAndLiquify && swapAndLiquifyEnabled && _balances[address(this)] >= swapThreshold){ swapBack(); } bool takeFee = !inSwapAndLiquify; //Exchange tokens _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); if(isFeeExempt[sender] || isFeeExempt[recipient]) { takeFee = false; } // no fee for wallet to wallet transfers if(sender != pair && recipient != pair) { takeFee = false; } uint256 finalAmount = amount; if(takeFee) { finalAmount = takeFees(sender, recipient, amount); } _balances[recipient] = _balances[recipient].add(finalAmount); emit Transfer(sender, recipient, finalAmount); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function takeFees(address sender, address recipient, uint256 amount) internal returns (uint256) { } function swapBack() internal lockTheSwap { } event AutoLiquify(uint256 amountETH, uint256 amountBOG); }
tradingIsEnabled||(isFeeExempt[sender]||isFeeExempt[recipient]),"Trading is disabled"
176,521
tradingIsEnabled||(isFeeExempt[sender]||isFeeExempt[recipient])
"MaxWallet: Transfer amount exceeds the maxWalletAmount"
//https://twitter.com/ethbadluckbrian //https://t.me/erc20badluckbrian //SPDX-License-Identifier: Unlicensed pragma solidity ^0.7.4; 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) { } } interface IBEP20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); 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); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } abstract contract Auth { address internal owner; constructor(address _owner) { } /** * Function modifier to require caller to be contract owner */ modifier onlyOwner() { } /** * Check if address is owner */ function isOwner(address account) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } contract BADLUCKBRIAN is IBEP20, Auth { using SafeMath for uint256; string constant _name = "Bad Luck Brian"; string constant _symbol = "$Brian"; uint8 constant _decimals = 18; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; address routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //UniSwap V2 router uint256 _totalSupply = 100000000 * (10 ** _decimals); bool public tradingIsEnabled = false; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) public isFeeExempt; uint256 public developmentFee = 100; uint256 public liquidityFee = 0; uint256 public totalFees = developmentFee + liquidityFee; uint256 public feeDenominator = 1000; address public devWallet = msg.sender; IDEXRouter public router; address public pair; uint256 public launchedAt; // max wallet tools mapping(address => bool) private _isExcludedFromMaxWallet; bool private enableMaxWallet = true; uint256 private maxWalletRate = 25; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; bool public swapAndLiquifyByLimitOnly = false; uint256 public swapThreshold = _totalSupply / 1000; modifier lockTheSwap { } constructor () Auth(msg.sender) { } receive() external payable { } function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external view override returns (uint256) { } function getOwner() external view override returns (address) { } function getCirculatingSupply() public view returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function launched() internal view returns (bool) { } function launch() internal { } function enableTrading() external onlyOwner { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setFeeRates(uint256 _liquidityFee, uint256 _developmentFee, uint256 _feeDenominator) public onlyOwner { } function setDevWallet(address payable wallet) external onlyOwner{ } function isExcludedFromMaxWallet(address account) public view returns(bool) { } function maxWalletAmount() public view returns (uint256) { } function setmaxWalletAmountRateDenominator1000(uint256 _val) public onlyOwner { } function setExcludeFromMaxWallet(address account, bool exclude) public onlyOwner { } function setenableMaxWallet(bool _val) public onlyOwner { } function changeSwapBackSettings(bool enableSwapBack, uint256 newSwapBackLimit) external onlyOwner { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { require(tradingIsEnabled || (isFeeExempt[sender] || isFeeExempt[recipient]), "Trading is disabled"); if(inSwapAndLiquify){ return _basicTransfer(sender, recipient, amount); } if (enableMaxWallet && maxWalletAmount() > 0) { if ( _isExcludedFromMaxWallet[sender] == false && _isExcludedFromMaxWallet[recipient] == false && recipient != pair ) { uint balance = balanceOf(recipient); require(<FILL_ME>) } } if(msg.sender != pair && !inSwapAndLiquify && swapAndLiquifyEnabled && _balances[address(this)] >= swapThreshold){ swapBack(); } bool takeFee = !inSwapAndLiquify; //Exchange tokens _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); if(isFeeExempt[sender] || isFeeExempt[recipient]) { takeFee = false; } // no fee for wallet to wallet transfers if(sender != pair && recipient != pair) { takeFee = false; } uint256 finalAmount = amount; if(takeFee) { finalAmount = takeFees(sender, recipient, amount); } _balances[recipient] = _balances[recipient].add(finalAmount); emit Transfer(sender, recipient, finalAmount); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function takeFees(address sender, address recipient, uint256 amount) internal returns (uint256) { } function swapBack() internal lockTheSwap { } event AutoLiquify(uint256 amountETH, uint256 amountBOG); }
balance+amount<=maxWalletAmount(),"MaxWallet: Transfer amount exceeds the maxWalletAmount"
176,521
balance+amount<=maxWalletAmount()
"PUDGY :: Payment is below the price"
pragma solidity ^0.8.0; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error UnableDetermineTokenOwner(); error URIQueryForNonexistentToken(); contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal _currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { } function totalSupply() public view override returns (uint256) { } function tokenByIndex(uint256 index) public view override returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } function ownerOf(uint256 tokenId) public view override returns (address) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _baseURI() internal view virtual returns (string memory) { } function approve(address to, uint256 tokenId) public override { } function getApproved(uint256 tokenId) public view override returns (address) { } function setApprovalForAll(address operator, bool approved) public override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } function _transfer( address from, address to, uint256 tokenId ) private { } function _approve( address to, uint256 tokenId, address owner ) private { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } contract PUDGYPENIS is ERC721A, Ownable{ using Strings for uint256; uint256 public constant MAX_SUPPLY = 8888; uint256 public constant MAX_PUBLIC_MINT = 88; uint256 public constant MAX_WHITELIST_MINT = 88; uint256 public PUBLIC_SALE_PRICE = .005 ether; uint256 public WHITELIST_SALE_PRICE = .005 ether; string private baseTokenUri; string public placeholderTokenUri; bool public isRevealed; bool public publicSale; bool public whiteListSale; bool public pause; bool public teamMinted; bytes32 private merkleRoot; mapping(address => uint256) public totalPublicMint; mapping(address => uint256) public totalWhitelistMint; constructor() ERC721A("PUDGY PENIS", "PUDGE"){ } modifier callerIsUser() { } function mint(uint256 _quantity) external payable callerIsUser{ } function whitelistMint(bytes32[] memory _merkleProof, uint256 _quantity) external payable callerIsUser{ require(whiteListSale, "PUDGY :: Minting is on Pause"); require((totalSupply() + _quantity) <= MAX_SUPPLY, "PUDGY :: Cannot mint beyond max supply"); require((totalWhitelistMint[msg.sender] + _quantity) <= MAX_WHITELIST_MINT, "PUDGY :: Cannot mint beyond whitelist max mint!"); require(<FILL_ME>) //create leaf node bytes32 sender = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, sender), "PUDGY :: You are not whitelisted"); totalWhitelistMint[msg.sender] += _quantity; _safeMint(msg.sender, _quantity); } function teamMint() external onlyOwner{ } function _baseURI() internal view virtual override returns (string memory) { } //return uri for certain token function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @dev walletOf() function shouldn't be called on-chain due to gas consumption function walletOf() external view returns(uint256[] memory){ } function setTokenUri(string memory _baseTokenUri) external onlyOwner{ } function setPlaceHolderUri(string memory _placeholderTokenUri) external onlyOwner{ } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner{ } function getMerkleRoot() external view returns (bytes32){ } function togglePause() external onlyOwner{ } function toggleWhiteListSale() external onlyOwner{ } function togglePublicSale() external onlyOwner{ } function update_public_price(uint price) external onlyOwner { } function update_preSale_price(uint price) external onlyOwner { } function AirDrop(address[] memory _wallets, uint _count) public onlyOwner{ } function toggleReveal() external onlyOwner{ } function withdraw() external onlyOwner{ } }
msg.value>=(WHITELIST_SALE_PRICE*_quantity),"PUDGY :: Payment is below the price"
176,531
msg.value>=(WHITELIST_SALE_PRICE*_quantity)
"PUDGY :: You are not whitelisted"
pragma solidity ^0.8.0; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error UnableDetermineTokenOwner(); error URIQueryForNonexistentToken(); contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal _currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { } function totalSupply() public view override returns (uint256) { } function tokenByIndex(uint256 index) public view override returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } function ownerOf(uint256 tokenId) public view override returns (address) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _baseURI() internal view virtual returns (string memory) { } function approve(address to, uint256 tokenId) public override { } function getApproved(uint256 tokenId) public view override returns (address) { } function setApprovalForAll(address operator, bool approved) public override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } function _transfer( address from, address to, uint256 tokenId ) private { } function _approve( address to, uint256 tokenId, address owner ) private { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } contract PUDGYPENIS is ERC721A, Ownable{ using Strings for uint256; uint256 public constant MAX_SUPPLY = 8888; uint256 public constant MAX_PUBLIC_MINT = 88; uint256 public constant MAX_WHITELIST_MINT = 88; uint256 public PUBLIC_SALE_PRICE = .005 ether; uint256 public WHITELIST_SALE_PRICE = .005 ether; string private baseTokenUri; string public placeholderTokenUri; bool public isRevealed; bool public publicSale; bool public whiteListSale; bool public pause; bool public teamMinted; bytes32 private merkleRoot; mapping(address => uint256) public totalPublicMint; mapping(address => uint256) public totalWhitelistMint; constructor() ERC721A("PUDGY PENIS", "PUDGE"){ } modifier callerIsUser() { } function mint(uint256 _quantity) external payable callerIsUser{ } function whitelistMint(bytes32[] memory _merkleProof, uint256 _quantity) external payable callerIsUser{ require(whiteListSale, "PUDGY :: Minting is on Pause"); require((totalSupply() + _quantity) <= MAX_SUPPLY, "PUDGY :: Cannot mint beyond max supply"); require((totalWhitelistMint[msg.sender] + _quantity) <= MAX_WHITELIST_MINT, "PUDGY :: Cannot mint beyond whitelist max mint!"); require(msg.value >= (WHITELIST_SALE_PRICE * _quantity), "PUDGY :: Payment is below the price"); //create leaf node bytes32 sender = keccak256(abi.encodePacked(msg.sender)); require(<FILL_ME>) totalWhitelistMint[msg.sender] += _quantity; _safeMint(msg.sender, _quantity); } function teamMint() external onlyOwner{ } function _baseURI() internal view virtual override returns (string memory) { } //return uri for certain token function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @dev walletOf() function shouldn't be called on-chain due to gas consumption function walletOf() external view returns(uint256[] memory){ } function setTokenUri(string memory _baseTokenUri) external onlyOwner{ } function setPlaceHolderUri(string memory _placeholderTokenUri) external onlyOwner{ } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner{ } function getMerkleRoot() external view returns (bytes32){ } function togglePause() external onlyOwner{ } function toggleWhiteListSale() external onlyOwner{ } function togglePublicSale() external onlyOwner{ } function update_public_price(uint price) external onlyOwner { } function update_preSale_price(uint price) external onlyOwner { } function AirDrop(address[] memory _wallets, uint _count) public onlyOwner{ } function toggleReveal() external onlyOwner{ } function withdraw() external onlyOwner{ } }
MerkleProof.verify(_merkleProof,merkleRoot,sender),"PUDGY :: You are not whitelisted"
176,531
MerkleProof.verify(_merkleProof,merkleRoot,sender)
"not enough tokens left"
pragma solidity ^0.8.0; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error UnableDetermineTokenOwner(); error URIQueryForNonexistentToken(); contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal _currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { } function totalSupply() public view override returns (uint256) { } function tokenByIndex(uint256 index) public view override returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } function ownerOf(uint256 tokenId) public view override returns (address) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _baseURI() internal view virtual returns (string memory) { } function approve(address to, uint256 tokenId) public override { } function getApproved(uint256 tokenId) public view override returns (address) { } function setApprovalForAll(address operator, bool approved) public override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } function _transfer( address from, address to, uint256 tokenId ) private { } function _approve( address to, uint256 tokenId, address owner ) private { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } contract PUDGYPENIS is ERC721A, Ownable{ using Strings for uint256; uint256 public constant MAX_SUPPLY = 8888; uint256 public constant MAX_PUBLIC_MINT = 88; uint256 public constant MAX_WHITELIST_MINT = 88; uint256 public PUBLIC_SALE_PRICE = .005 ether; uint256 public WHITELIST_SALE_PRICE = .005 ether; string private baseTokenUri; string public placeholderTokenUri; bool public isRevealed; bool public publicSale; bool public whiteListSale; bool public pause; bool public teamMinted; bytes32 private merkleRoot; mapping(address => uint256) public totalPublicMint; mapping(address => uint256) public totalWhitelistMint; constructor() ERC721A("PUDGY PENIS", "PUDGE"){ } modifier callerIsUser() { } function mint(uint256 _quantity) external payable callerIsUser{ } function whitelistMint(bytes32[] memory _merkleProof, uint256 _quantity) external payable callerIsUser{ } function teamMint() external onlyOwner{ } function _baseURI() internal view virtual override returns (string memory) { } //return uri for certain token function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @dev walletOf() function shouldn't be called on-chain due to gas consumption function walletOf() external view returns(uint256[] memory){ } function setTokenUri(string memory _baseTokenUri) external onlyOwner{ } function setPlaceHolderUri(string memory _placeholderTokenUri) external onlyOwner{ } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner{ } function getMerkleRoot() external view returns (bytes32){ } function togglePause() external onlyOwner{ } function toggleWhiteListSale() external onlyOwner{ } function togglePublicSale() external onlyOwner{ } function update_public_price(uint price) external onlyOwner { } function update_preSale_price(uint price) external onlyOwner { } function AirDrop(address[] memory _wallets, uint _count) public onlyOwner{ require(_wallets.length > 0, "mint at least one token"); require(<FILL_ME>) for (uint i = 0; i < _wallets.length; i++) { _safeMint(_wallets[i], _count); } } function toggleReveal() external onlyOwner{ } function withdraw() external onlyOwner{ } }
totalSupply()+_wallets.length<=MAX_SUPPLY,"not enough tokens left"
176,531
totalSupply()+_wallets.length<=MAX_SUPPLY
"account is blacklisted"
pragma solidity ^0.6.0; contract DracooToken is Context, Ownable, Pausable, ERC20 { using Address for address; using SafeMath for uint256; using SafeERC20 for IERC20; uint256 private _cap; mapping(address => bool) private _isBlackListed; constructor() public ERC20("Dracoo", "DRA") { } function cap() public view returns (uint256) { } function transfer( address recipient, uint256 amount ) public override returns (bool) { require(<FILL_ME>) return super.transfer(recipient, amount); } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function burn(uint256 amount) public override returns (bool) { } function burnFrom( address account, uint256 amount ) public override returns (bool) { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function mint( address account, uint256 amount ) public onlyOwner returns (bool) { } function addBlackList(address account) public onlyOwner { } function removeBlackList(address account) public onlyOwner { } function isBlackListed(address account) public view returns (bool) { } function destroyBlackFunds( address account, uint256 amount ) public onlyOwner { } // Added to support recovering ERC20 token from other systems function recoverERC20( address tokenAddress, uint256 tokenAmount, address to ) public onlyOwner { } /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - minted tokens must not cause the total supply to go over the cap. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { } }
!_isBlackListed[_msgSender()],"account is blacklisted"
176,563
!_isBlackListed[_msgSender()]
"account is blacklisted"
pragma solidity ^0.6.0; contract DracooToken is Context, Ownable, Pausable, ERC20 { using Address for address; using SafeMath for uint256; using SafeERC20 for IERC20; uint256 private _cap; mapping(address => bool) private _isBlackListed; constructor() public ERC20("Dracoo", "DRA") { } function cap() public view returns (uint256) { } function transfer( address recipient, uint256 amount ) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { require(<FILL_ME>) return super.transferFrom(sender, recipient, amount); } function burn(uint256 amount) public override returns (bool) { } function burnFrom( address account, uint256 amount ) public override returns (bool) { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function mint( address account, uint256 amount ) public onlyOwner returns (bool) { } function addBlackList(address account) public onlyOwner { } function removeBlackList(address account) public onlyOwner { } function isBlackListed(address account) public view returns (bool) { } function destroyBlackFunds( address account, uint256 amount ) public onlyOwner { } // Added to support recovering ERC20 token from other systems function recoverERC20( address tokenAddress, uint256 tokenAmount, address to ) public onlyOwner { } /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - minted tokens must not cause the total supply to go over the cap. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { } }
!_isBlackListed[sender],"account is blacklisted"
176,563
!_isBlackListed[sender]