comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Your Gemesis has already claimed"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/IERC721A.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract GemPunks is ERC721AQueryable, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; uint256 public maxSupply = 4423; uint256 public publicPrice = 0.005 ether; uint256 public maxPerWallet = 10; bool public isPublicMint = false; bool public isFreeClaim = false; bool public isMetadataFinal; string public _baseURL = ""; string public prerevealURL = ""; address public _gemesis = 0xbe9371326F91345777b04394448c23E2BFEaa826; IERC721A gemesisContract = IERC721A(_gemesis); mapping(uint256 => bool) private _claimedGemesis; mapping(address => uint256) private _walletMintedCount; constructor() ERC721A("Gem Punks", "GEMPUNK") {} function mintedCount(address owner) external view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function contractURI() public pure returns (string memory) { } function finalizeMetadata() external onlyOwner { } function reveal(string memory url) external onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function teamMint(address to, uint256 count) external onlyOwner { } function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) { } /* "SET VARIABLE" FUNCTIONS */ function setPublicPrice(uint256 _price) external onlyOwner { } function togglePublicState() external onlyOwner { } function toggleFreeClaim() external onlyOwner { } function setMaxSupply(uint256 newMaxSupply) external onlyOwner { } function setMaxPerWallet(uint256 newMax) external onlyOwner { } /* MINT FUNCTIONS */ function gemesisClaim(uint256[] memory tokens) external { uint256 count = tokens.length; require(isFreeClaim, "Free claiming has not started"); require(_totalMinted() + count <= maxSupply, "Exceeds max supply"); for (uint256 i = 0; i < count; i++) { require( gemesisContract.ownerOf(tokens[i]) == msg.sender, "That is not your Gemesis NFT" ); require(<FILL_ME>) _claimedGemesis[tokens[i]] = true; } _walletMintedCount[msg.sender] += count; _safeMint(msg.sender, count); } function mint(uint256 count) external payable { } /* OPENSEA OPERATOR OVERRIDES (ROYALTIES) */ function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } }
_claimedGemesis[tokens[i]]==false,"Your Gemesis has already claimed"
428,701
_claimedGemesis[tokens[i]]==false
"Exceeds max per wallet"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/IERC721A.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract GemPunks is ERC721AQueryable, Ownable, ReentrancyGuard, DefaultOperatorFilterer { using Strings for uint256; uint256 public maxSupply = 4423; uint256 public publicPrice = 0.005 ether; uint256 public maxPerWallet = 10; bool public isPublicMint = false; bool public isFreeClaim = false; bool public isMetadataFinal; string public _baseURL = ""; string public prerevealURL = ""; address public _gemesis = 0xbe9371326F91345777b04394448c23E2BFEaa826; IERC721A gemesisContract = IERC721A(_gemesis); mapping(uint256 => bool) private _claimedGemesis; mapping(address => uint256) private _walletMintedCount; constructor() ERC721A("Gem Punks", "GEMPUNK") {} function mintedCount(address owner) external view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function _startTokenId() internal pure override returns (uint256) { } function contractURI() public pure returns (string memory) { } function finalizeMetadata() external onlyOwner { } function reveal(string memory url) external onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function teamMint(address to, uint256 count) external onlyOwner { } function tokenURI(uint256 tokenId) public view override(ERC721A, IERC721A) returns (string memory) { } /* "SET VARIABLE" FUNCTIONS */ function setPublicPrice(uint256 _price) external onlyOwner { } function togglePublicState() external onlyOwner { } function toggleFreeClaim() external onlyOwner { } function setMaxSupply(uint256 newMaxSupply) external onlyOwner { } function setMaxPerWallet(uint256 newMax) external onlyOwner { } /* MINT FUNCTIONS */ function gemesisClaim(uint256[] memory tokens) external { } function mint(uint256 count) external payable { require(count > 0, "Mint at least 1 Gem Punk"); require(isPublicMint, "Public mint has not started"); require(_totalMinted() + count <= maxSupply, "Exceeds max supply"); require(<FILL_ME>) require( msg.value >= count * publicPrice, "Ether value sent is not sufficient" ); _walletMintedCount[msg.sender] += count; _safeMint(msg.sender, count); } /* OPENSEA OPERATOR OVERRIDES (ROYALTIES) */ function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } }
_walletMintedCount[msg.sender]+count<=maxPerWallet,"Exceeds max per wallet"
428,701
_walletMintedCount[msg.sender]+count<=maxPerWallet
"Maxinum 1 free mint for per address."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "./Ownable.sol"; contract Twitterbirds is ERC721A, Ownable { using Strings for uint256; constructor() ERC721A("Twitterbirds", "Twitterbirds") {} uint256 public constant MAX_SUPPLY = 2000; uint256 public price = 0.004 ether; uint256 public maxPerTransaction = 10; uint256 public maxFreeAmountPerAddress = 10; uint256 private mintCount = 0; uint256 public freeMintAmount = 333; string private baseTokenURI; bool public saleOpen = true; mapping(address => bool) private _mintedFreeAddress; mapping(address => uint256) private _mintedFreeAmount; event Minted(uint256 totalMinted); function totalSupply() public view override returns (uint256) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setFreeAmount(uint256 amount) external onlyOwner { } function setPrice(uint256 _newPrice) external onlyOwner { } function flipSale() external onlyOwner { } function withdraw() external onlyOwner { } function mintOneForFree() external { require(<FILL_ME>) _mintedFreeAddress[msg.sender] = true; _safeMint(msg.sender, 1); emit Minted(1); } function mint(uint256 _count) external payable { } function reserveMint(uint256 _count) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
_mintedFreeAddress[msg.sender]==false,"Maxinum 1 free mint for per address."
428,927
_mintedFreeAddress[msg.sender]==false
"Exceeds maximum supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "./Ownable.sol"; contract Twitterbirds is ERC721A, Ownable { using Strings for uint256; constructor() ERC721A("Twitterbirds", "Twitterbirds") {} uint256 public constant MAX_SUPPLY = 2000; uint256 public price = 0.004 ether; uint256 public maxPerTransaction = 10; uint256 public maxFreeAmountPerAddress = 10; uint256 private mintCount = 0; uint256 public freeMintAmount = 333; string private baseTokenURI; bool public saleOpen = true; mapping(address => bool) private _mintedFreeAddress; mapping(address => uint256) private _mintedFreeAmount; event Minted(uint256 totalMinted); function totalSupply() public view override returns (uint256) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setFreeAmount(uint256 amount) external onlyOwner { } function setPrice(uint256 _newPrice) external onlyOwner { } function flipSale() external onlyOwner { } function withdraw() external onlyOwner { } function mintOneForFree() external { } function mint(uint256 _count) external payable { uint256 supply = totalSupply(); require(saleOpen, "Sale is not open yet"); require(<FILL_ME>) require(_count > 0, "Minimum 1 NFT has to be minted per transaction"); require( _count <= maxPerTransaction, "Maximum 10 NFTs can be minted per transaction" ); if ( (mintCount + _count) > freeMintAmount || _mintedFreeAmount[msg.sender] + _count > maxFreeAmountPerAddress ) { require( msg.value >= price * _count, "Ether sent with this transaction is not correct" ); } else { _mintedFreeAmount[msg.sender] += _count; } mintCount += _count; _safeMint(msg.sender, _count); emit Minted(_count); } function reserveMint(uint256 _count) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
supply+_count<=MAX_SUPLY,"Exceeds maximum supply"
428,927
supply+_count<=MAX_SUPLY
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract HoneyPots is ERC1155, Ownable { // Keep track of generations using Counters for Counters.Counter; //In order to simplify things for clients we track generations with a counter. Counters.Counter public generationCounter; mapping(uint256 => uint256) public generations; // Contract whitelist mapping(address => bool) public contractWhitelist; uint256 public totalPower = 0; mapping(uint256 => uint256) public genTotalPower; uint public maxGenerations = 127; uint256 public _currentGeneration = 0; bool genLogicKS = false; bool public paused; // TODO: Change url to the production one constructor() ERC1155( "https://socialbees-mint.s3.amazonaws.com/honeypot/{id}" ) { } function setBaseURI(string memory _value) public onlyOwner{ } function setMaxGens(uint _value) public onlyOwner{ } function setGenLogicKS(bool _value) public onlyOwner{ } function mint(address _recipient, uint256 _amount) external onlyWhitelisted { } function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); if(!genLogicKS){ require(<FILL_ME>) uint256 _power = value * (2**(maxGenerations-id)); totalPower -= _power; genTotalPower[id] -= _power; } _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { } function powerBalanceOf(address account, uint256 id) public view returns (uint256) { } function powerBalanceOfBatch(address[] memory accounts, uint256[] memory ids) public view returns (uint256[] memory) { } // Adds a new generation function addGeneration() external onlyOwner { } function currentGeneration() public view returns (uint256) { } function currentGenerationCount() public view returns (uint256) { } function setCurrentGeneration(uint256 _value) external onlyOwner{ } function whitelistContract(address _contract, bool _whitelisted) external onlyOwner { } function isWhitelisted(address _contract) public view returns (bool) { } function pauseContract(bool _paused) external onlyOwner { } modifier onlyWhitelisted() { } }
balanceOf(account,id)>=value
429,018
balanceOf(account,id)>=value
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract HoneyPots is ERC1155, Ownable { // Keep track of generations using Counters for Counters.Counter; //In order to simplify things for clients we track generations with a counter. Counters.Counter public generationCounter; mapping(uint256 => uint256) public generations; // Contract whitelist mapping(address => bool) public contractWhitelist; uint256 public totalPower = 0; mapping(uint256 => uint256) public genTotalPower; uint public maxGenerations = 127; uint256 public _currentGeneration = 0; bool genLogicKS = false; bool public paused; // TODO: Change url to the production one constructor() ERC1155( "https://socialbees-mint.s3.amazonaws.com/honeypot/{id}" ) { } function setBaseURI(string memory _value) public onlyOwner{ } function setMaxGens(uint _value) public onlyOwner{ } function setGenLogicKS(bool _value) public onlyOwner{ } function mint(address _recipient, uint256 _amount) external onlyWhitelisted { } function burn( address account, uint256 id, uint256 value ) public virtual { } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); if(!genLogicKS){ require(values.length == ids.length, "ERC1155: values and ids length mismatch"); for (uint256 i = 0; i < values.length; ++i) { require(<FILL_ME>) require(balanceOf(account, ids[i]) >= values[i]); uint256 _power = values[i] * (2**(maxGenerations-ids[i])); totalPower -= _power; genTotalPower[ids[i]] -= _power; } } _burnBatch(account, ids, values); } function powerBalanceOf(address account, uint256 id) public view returns (uint256) { } function powerBalanceOfBatch(address[] memory accounts, uint256[] memory ids) public view returns (uint256[] memory) { } // Adds a new generation function addGeneration() external onlyOwner { } function currentGeneration() public view returns (uint256) { } function currentGenerationCount() public view returns (uint256) { } function setCurrentGeneration(uint256 _value) external onlyOwner{ } function whitelistContract(address _contract, bool _whitelisted) external onlyOwner { } function isWhitelisted(address _contract) public view returns (bool) { } function pauseContract(bool _paused) external onlyOwner { } modifier onlyWhitelisted() { } }
ids[i]<=maxGenerations
429,018
ids[i]<=maxGenerations
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract HoneyPots is ERC1155, Ownable { // Keep track of generations using Counters for Counters.Counter; //In order to simplify things for clients we track generations with a counter. Counters.Counter public generationCounter; mapping(uint256 => uint256) public generations; // Contract whitelist mapping(address => bool) public contractWhitelist; uint256 public totalPower = 0; mapping(uint256 => uint256) public genTotalPower; uint public maxGenerations = 127; uint256 public _currentGeneration = 0; bool genLogicKS = false; bool public paused; // TODO: Change url to the production one constructor() ERC1155( "https://socialbees-mint.s3.amazonaws.com/honeypot/{id}" ) { } function setBaseURI(string memory _value) public onlyOwner{ } function setMaxGens(uint _value) public onlyOwner{ } function setGenLogicKS(bool _value) public onlyOwner{ } function mint(address _recipient, uint256 _amount) external onlyWhitelisted { } function burn( address account, uint256 id, uint256 value ) public virtual { } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not owner nor approved" ); if(!genLogicKS){ require(values.length == ids.length, "ERC1155: values and ids length mismatch"); for (uint256 i = 0; i < values.length; ++i) { require(ids[i] <= maxGenerations); require(<FILL_ME>) uint256 _power = values[i] * (2**(maxGenerations-ids[i])); totalPower -= _power; genTotalPower[ids[i]] -= _power; } } _burnBatch(account, ids, values); } function powerBalanceOf(address account, uint256 id) public view returns (uint256) { } function powerBalanceOfBatch(address[] memory accounts, uint256[] memory ids) public view returns (uint256[] memory) { } // Adds a new generation function addGeneration() external onlyOwner { } function currentGeneration() public view returns (uint256) { } function currentGenerationCount() public view returns (uint256) { } function setCurrentGeneration(uint256 _value) external onlyOwner{ } function whitelistContract(address _contract, bool _whitelisted) external onlyOwner { } function isWhitelisted(address _contract) public view returns (bool) { } function pauseContract(bool _paused) external onlyOwner { } modifier onlyWhitelisted() { } }
balanceOf(account,ids[i])>=values[i]
429,018
balanceOf(account,ids[i])>=values[i]
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract HoneyPots is ERC1155, Ownable { // Keep track of generations using Counters for Counters.Counter; //In order to simplify things for clients we track generations with a counter. Counters.Counter public generationCounter; mapping(uint256 => uint256) public generations; // Contract whitelist mapping(address => bool) public contractWhitelist; uint256 public totalPower = 0; mapping(uint256 => uint256) public genTotalPower; uint public maxGenerations = 127; uint256 public _currentGeneration = 0; bool genLogicKS = false; bool public paused; // TODO: Change url to the production one constructor() ERC1155( "https://socialbees-mint.s3.amazonaws.com/honeypot/{id}" ) { } function setBaseURI(string memory _value) public onlyOwner{ } function setMaxGens(uint _value) public onlyOwner{ } function setGenLogicKS(bool _value) public onlyOwner{ } function mint(address _recipient, uint256 _amount) external onlyWhitelisted { } function burn( address account, uint256 id, uint256 value ) public virtual { } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { } function powerBalanceOf(address account, uint256 id) public view returns (uint256) { } function powerBalanceOfBatch(address[] memory accounts, uint256[] memory ids) public view returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { require(<FILL_ME>) batchBalances[i] = balanceOf(accounts[i], ids[i]) * (2**(maxGenerations-ids[i])); } return batchBalances; } // Adds a new generation function addGeneration() external onlyOwner { } function currentGeneration() public view returns (uint256) { } function currentGenerationCount() public view returns (uint256) { } function setCurrentGeneration(uint256 _value) external onlyOwner{ } function whitelistContract(address _contract, bool _whitelisted) external onlyOwner { } function isWhitelisted(address _contract) public view returns (bool) { } function pauseContract(bool _paused) external onlyOwner { } modifier onlyWhitelisted() { } }
ids[i]<maxGenerations
429,018
ids[i]<maxGenerations
"Max generations reached"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract HoneyPots is ERC1155, Ownable { // Keep track of generations using Counters for Counters.Counter; //In order to simplify things for clients we track generations with a counter. Counters.Counter public generationCounter; mapping(uint256 => uint256) public generations; // Contract whitelist mapping(address => bool) public contractWhitelist; uint256 public totalPower = 0; mapping(uint256 => uint256) public genTotalPower; uint public maxGenerations = 127; uint256 public _currentGeneration = 0; bool genLogicKS = false; bool public paused; // TODO: Change url to the production one constructor() ERC1155( "https://socialbees-mint.s3.amazonaws.com/honeypot/{id}" ) { } function setBaseURI(string memory _value) public onlyOwner{ } function setMaxGens(uint _value) public onlyOwner{ } function setGenLogicKS(bool _value) public onlyOwner{ } function mint(address _recipient, uint256 _amount) external onlyWhitelisted { } function burn( address account, uint256 id, uint256 value ) public virtual { } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { } function powerBalanceOf(address account, uint256 id) public view returns (uint256) { } function powerBalanceOfBatch(address[] memory accounts, uint256[] memory ids) public view returns (uint256[] memory) { } // Adds a new generation function addGeneration() external onlyOwner { require(<FILL_ME>) generationCounter.increment(); generations[generationCounter.current()] = generationCounter.current(); } function currentGeneration() public view returns (uint256) { } function currentGenerationCount() public view returns (uint256) { } function setCurrentGeneration(uint256 _value) external onlyOwner{ } function whitelistContract(address _contract, bool _whitelisted) external onlyOwner { } function isWhitelisted(address _contract) public view returns (bool) { } function pauseContract(bool _paused) external onlyOwner { } modifier onlyWhitelisted() { } }
generationCounter.current()<=maxGenerations,"Max generations reached"
429,018
generationCounter.current()<=maxGenerations
"Not whitelisted."
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract HoneyPots is ERC1155, Ownable { // Keep track of generations using Counters for Counters.Counter; //In order to simplify things for clients we track generations with a counter. Counters.Counter public generationCounter; mapping(uint256 => uint256) public generations; // Contract whitelist mapping(address => bool) public contractWhitelist; uint256 public totalPower = 0; mapping(uint256 => uint256) public genTotalPower; uint public maxGenerations = 127; uint256 public _currentGeneration = 0; bool genLogicKS = false; bool public paused; // TODO: Change url to the production one constructor() ERC1155( "https://socialbees-mint.s3.amazonaws.com/honeypot/{id}" ) { } function setBaseURI(string memory _value) public onlyOwner{ } function setMaxGens(uint _value) public onlyOwner{ } function setGenLogicKS(bool _value) public onlyOwner{ } function mint(address _recipient, uint256 _amount) external onlyWhitelisted { } function burn( address account, uint256 id, uint256 value ) public virtual { } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { } function powerBalanceOf(address account, uint256 id) public view returns (uint256) { } function powerBalanceOfBatch(address[] memory accounts, uint256[] memory ids) public view returns (uint256[] memory) { } // Adds a new generation function addGeneration() external onlyOwner { } function currentGeneration() public view returns (uint256) { } function currentGenerationCount() public view returns (uint256) { } function setCurrentGeneration(uint256 _value) external onlyOwner{ } function whitelistContract(address _contract, bool _whitelisted) external onlyOwner { } function isWhitelisted(address _contract) public view returns (bool) { } function pauseContract(bool _paused) external onlyOwner { } modifier onlyWhitelisted() { require(<FILL_ME>) _; } }
contractWhitelist[msg.sender],"Not whitelisted."
429,018
contractWhitelist[msg.sender]
"Lockable: locked"
// SPDX-License-Identifier: MIT // Unagi Contracts v1.0.0 (Lockable.sol) pragma solidity 0.8.12; import "@openzeppelin/contracts/utils/Context.sol"; /** * @dev Contract module which allows children to implement a lock * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotLocked` and `whenLocked`, which can be applied to * the functions of your contract. Note that they will not be lockable by * simply including this module, only once the modifiers are put in place. */ abstract contract Lockable is Context { /** * @dev Emitted when the lock is triggered by `account` for `duration`. */ event Locked(address account, uint256 duration); /** * @dev Emitted when the lock is triggered by `account` permanently. */ event PermanentlyLocked(address account); bool private _permanentlyLocked; uint256 private _lockEnd; /** * @dev Initializes the contract in unlocked state. */ constructor() { } /** * @dev Getter for the permanently locked. */ function permanentlyLocked() public view virtual returns (bool) { } /** * @dev Returns true if the contract is locked, and false otherwise. */ function locked() public view virtual returns (bool) { } /** * @dev Modifier to make a function callable only when the contract is not locked. * * Requirements: * * - The contract must not be locked. */ modifier whenNotLocked() { require(<FILL_ME>) _; } /** * @dev Modifier to make a function callable only when the contract is locked. * * Requirements: * * - The contract must be locked. */ modifier whenLocked() { } /** * @dev Getter for the lock end. * * Requirements: * * - The contract must be temporary locked. */ function lockEnd() external view virtual whenLocked returns (uint256) { } /** * @dev Triggers locked state for a defined duration. * * Requirements: * * - The contract must not be locked. */ function _lock(uint256 duration) internal virtual whenNotLocked { } /** * @dev Triggers locked state permanently. * * Requirements: * * - The contract must not be locked. */ function _permanentLock() internal virtual whenNotLocked { } }
!locked(),"Lockable: locked"
429,163
!locked()
"Lockable: not locked"
// SPDX-License-Identifier: MIT // Unagi Contracts v1.0.0 (Lockable.sol) pragma solidity 0.8.12; import "@openzeppelin/contracts/utils/Context.sol"; /** * @dev Contract module which allows children to implement a lock * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotLocked` and `whenLocked`, which can be applied to * the functions of your contract. Note that they will not be lockable by * simply including this module, only once the modifiers are put in place. */ abstract contract Lockable is Context { /** * @dev Emitted when the lock is triggered by `account` for `duration`. */ event Locked(address account, uint256 duration); /** * @dev Emitted when the lock is triggered by `account` permanently. */ event PermanentlyLocked(address account); bool private _permanentlyLocked; uint256 private _lockEnd; /** * @dev Initializes the contract in unlocked state. */ constructor() { } /** * @dev Getter for the permanently locked. */ function permanentlyLocked() public view virtual returns (bool) { } /** * @dev Returns true if the contract is locked, and false otherwise. */ function locked() public view virtual returns (bool) { } /** * @dev Modifier to make a function callable only when the contract is not locked. * * Requirements: * * - The contract must not be locked. */ modifier whenNotLocked() { } /** * @dev Modifier to make a function callable only when the contract is locked. * * Requirements: * * - The contract must be locked. */ modifier whenLocked() { require(<FILL_ME>) _; } /** * @dev Getter for the lock end. * * Requirements: * * - The contract must be temporary locked. */ function lockEnd() external view virtual whenLocked returns (uint256) { } /** * @dev Triggers locked state for a defined duration. * * Requirements: * * - The contract must not be locked. */ function _lock(uint256 duration) internal virtual whenNotLocked { } /** * @dev Triggers locked state permanently. * * Requirements: * * - The contract must not be locked. */ function _permanentLock() internal virtual whenNotLocked { } }
locked(),"Lockable: not locked"
429,163
locked()
"Lockable: not temporary locked"
// SPDX-License-Identifier: MIT // Unagi Contracts v1.0.0 (Lockable.sol) pragma solidity 0.8.12; import "@openzeppelin/contracts/utils/Context.sol"; /** * @dev Contract module which allows children to implement a lock * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotLocked` and `whenLocked`, which can be applied to * the functions of your contract. Note that they will not be lockable by * simply including this module, only once the modifiers are put in place. */ abstract contract Lockable is Context { /** * @dev Emitted when the lock is triggered by `account` for `duration`. */ event Locked(address account, uint256 duration); /** * @dev Emitted when the lock is triggered by `account` permanently. */ event PermanentlyLocked(address account); bool private _permanentlyLocked; uint256 private _lockEnd; /** * @dev Initializes the contract in unlocked state. */ constructor() { } /** * @dev Getter for the permanently locked. */ function permanentlyLocked() public view virtual returns (bool) { } /** * @dev Returns true if the contract is locked, and false otherwise. */ function locked() public view virtual returns (bool) { } /** * @dev Modifier to make a function callable only when the contract is not locked. * * Requirements: * * - The contract must not be locked. */ modifier whenNotLocked() { } /** * @dev Modifier to make a function callable only when the contract is locked. * * Requirements: * * - The contract must be locked. */ modifier whenLocked() { } /** * @dev Getter for the lock end. * * Requirements: * * - The contract must be temporary locked. */ function lockEnd() external view virtual whenLocked returns (uint256) { require(<FILL_ME>) return _lockEnd; } /** * @dev Triggers locked state for a defined duration. * * Requirements: * * - The contract must not be locked. */ function _lock(uint256 duration) internal virtual whenNotLocked { } /** * @dev Triggers locked state permanently. * * Requirements: * * - The contract must not be locked. */ function _permanentLock() internal virtual whenNotLocked { } }
!permanentlyLocked(),"Lockable: not temporary locked"
429,163
!permanentlyLocked()
"Trading not open"
//SPDX-License-Identifier: MIT pragma solidity 0.8.21; interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function 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 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 WETH() external pure returns (address); function factory() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Auth { address internal _owner; event OwnershipTransferred(address _owner); constructor(address creatorOwner) { } modifier onlyOwner() { } function owner() public view returns (address) { } function renounceOwnership() external onlyOwner { } } contract MonkeysTokenV3 is IERC20, Auth { string private constant _name = "Tales from the list"; string private constant _symbol = "MONKEYS"; uint8 private constant _decimals = 9; uint256 private constant _totalSupply = 500_000_000_000 * (10**_decimals); mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint32 private _tradeCount; address payable private constant _walletMarketing = payable(0x2911BadDba4a2753391265B125C65A50e3d61cBE); uint256 private constant _taxSwapMin = _totalSupply / 200000; uint256 private constant _taxSwapMax = _totalSupply / 1000; mapping (address => bool) private _noFees; mapping (address => bool) private _preLaunch; address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress); address private _primaryLP; mapping (address => bool) private _isLP; uint256 private _relaunchTimestamp; bool private _tradingOpen; bool private _inTaxSwap = false; modifier lockTaxSwap { } event TokensAirdropped(uint256 totalWallets, uint256 totalTokens); constructor() Auth(msg.sender) { } receive() external payable {} function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _approveRouter(uint256 _tokenAmount) internal { } function addLiquidity(address lpCA) external payable onlyOwner lockTaxSwap { } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei) internal { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { require(sender != address(0), "No transfers from Zero wallet"); require(sender != address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), "Vitalik NEVER SELLING"); // Tokens in "Vb" wallet are burned if (!_tradingOpen) { require(<FILL_ME>) } if ( !_inTaxSwap && _isLP[recipient] && !_noFees[sender] ) { _swapTaxAndLiquify(); } uint256 _taxAmount = _calculateTax(sender, recipient, amount); uint256 _transferAmount = amount - _taxAmount; _balances[sender] -= amount; if ( _taxAmount > 0 ) { _balances[address(this)] += _taxAmount; incrementTradeCount(); } _balances[recipient] += _transferAmount; emit Transfer(sender, recipient, amount); return true; } function _checkTradingOpen(address sender) private view returns (bool){ } function incrementTradeCount() private { } function tax() external view returns (uint32 taxNumerator, uint32 taxDenominator) { } function _getTaxPercentages() private view returns (uint32 numerator, uint32 denominator) { } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { } function marketingMultisig() external pure returns (address) { } function _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function setExemption(address[] calldata wallets, bool isExempt) external onlyOwner { } function airdrop(address[] calldata addresses, uint256[] calldata tokenAmounts) external onlyOwner { } }
_preLaunch[sender],"Trading not open"
429,254
_preLaunch[sender]
"In blacklist"
// ######### ######### // ####+++++++#######++++++### // ##+++++++++++++###+++++++++## // ###++++######################### // #####+++##++++++########+++++++######## // ####++#+##++++++########################### .-''-. _____ __ .-------. .-''-. .-------. .-''-. // #++++##+++#++########+#################+##### .'_ _ \ \ _\ / / \ _(`)_ \ .'_ _ \ \ _(`)_ \ .'_ _ \ // ####+-###++#############. ##-##-## +## / ( ` ) ' .-./ ). / ' | (_ o._)| / ( ` ) '| (_ o._)| / ( ` ) ' // #++##++#+++++########+## .######## .+# . (_ o _) | \ '_ .') .' | (_,_) /. (_ o _) || (_,_) /. (_ o _) | // ########++##++############################ | (_,_)___|(_ (_) _) ' | '-.-' | (_,_)___|| '-.-' | (_,_)___| // ##++++++++++++++++###########++++++++#### ' \ .---. / \ \ | | ' \ .---.| | ' \ .---. // #+++++++++++###++++++#####+++++++###++### \ `-' / `-'`-' \ | | \ `-' /| | \ `-' / // ##++++++++++######++++#++++++++++++++++++## \ / / / \ \ / ) \ / / ) \ / // ###++++++++++++#+++##++++++++++++++++++++++## `'-..-' '--' '----'`---' `'-..-' `---' `'-..-' // ###+++++++++++++#+-#++##++++++++++++++++++### // ###++++++++++++++##--#+--+##############---+# EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP // ###++++++++++++++++###+-##++++++++++++++#### EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP // ##+++++++++++++++++++####+---+++++-----+### // ###++++++++++++++++++++++############## // #####+++++++++++++++++++++#+#### // ######################### // ############### pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "./DividendTracker.sol"; import "./interfaces/ILeaderContract.sol"; contract ExPepe is ERC20, Ownable { IUniswapRouter public router; address public pair; address public marketing; ILeaderContract public leaderContract; DividendTracker public dividendTracker; bool private swapping; bool public swapEnabled = true; bool public tradingEnabled; uint256 public swapTaxesAtAmount; uint256 public maxBuyAntiBotAmount; uint256 public maxSellAntiBotAmount; uint256 public txTradeCount; uint256 public antiBotTime; uint256 public blacklistTime; uint256 cachedFeeAmountForHolder; uint256 cachedFeeAmountForMarketing; struct Taxes { uint256 holder; uint256 marketing; uint256 leaderContract; } // Decimal 2: 100 = 1% // Anti-bot Taxes public antiBotTaxes = Taxes(0, 8000, 0); // First 100 tx Taxes public phase1Taxes = Taxes(250, 250, 500); // 101 tx to 500 tx Taxes public phase2Taxes = Taxes(150, 150, 200); // After 501 tx Taxes public phase3Taxes = Taxes(200, 0, 100); // Decimal 2: 100 = 1% uint256 public constant totalAntiBotTax = 8000; uint256 public constant totalPhase1Tax = 1000; uint256 public constant totalPhase2Tax = 500; uint256 public constant totalPhase3Tax = 300; // phase1Tx = 0; uint256 public constant phase2Tx = 100; uint256 public constant phase3Tx = 500; mapping(address => bool) public isBlacklist; mapping(address => bool) public isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; mapping(address => mapping(uint256 => bool)) public isTransferred; event SendDividends(uint256 amount); event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); constructor( address _marketing, address _routerAddress, address _leaderContract ) ERC20("ExPepe", unicode"三PEPE") { } receive() external payable {} function updateDividendTracker(address newAddress) public onlyOwner { } function claim() external { } function setMaxBuyAndSellAntiBot( uint256 maxBuyAntiBot, uint256 maxSellAntiBot ) external onlyOwner { } function setSwapTaxesAtAmount(uint256 amount) external onlyOwner { } function rescueETH20Tokens(address tokenAddress) external onlyOwner { } function forceSend() external onlyOwner { } function dividendTrackerRescueETH20Tokens( address tokenAddress ) external onlyOwner { } function dividendTrackerRescueStuckETH() external { } function updateRouter(address newRouter) external onlyOwner { } function excludeFromFees( address account, bool excluded ) external onlyOwner { } function excludeFromDividends( address account, bool value ) public onlyOwner { } function setMarketingAddress( address payable _newMarketing ) external onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function activateTrading() external onlyOwner { } function setAutomatedMarketMakerPair( address newPair, bool value ) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } function getTotalDividendsDistributed() external view returns (uint256) { } 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) { } function addToBlacklist(address[] calldata _addresses) external onlyOwner { } function removeBlacklist(address[] calldata _addresses) external onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(<FILL_ME>) bool isBot = false; if (!isExcludedFromFees[from] && !isExcludedFromFees[to] && !swapping) { require(tradingEnabled, "Trading is not enabled"); if (antiBotTime >= block.timestamp) { if (automatedMarketMakerPairs[to]) { if (amount >= maxSellAntiBotAmount) isBot = true; } else if (automatedMarketMakerPairs[from]) { if (amount >= maxBuyAntiBotAmount) isBot = true; } } } if (amount == 0) { super._transfer(from, to, 0); return; } if (tx.origin == from || tx.origin == to) { require(!isTransferred[tx.origin][block.number], "Robot!"); isTransferred[tx.origin][block.number] = true; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTaxesAtAmount; if ( canSwap && !swapping && swapEnabled && automatedMarketMakerPairs[to] && !isExcludedFromFees[from] && !isExcludedFromFees[to] ) { swapping = true; swapAndSend(swapTaxesAtAmount); swapping = false; } bool takeFee = !swapping; if (isExcludedFromFees[from] || isExcludedFromFees[to]) { takeFee = false; } if (!automatedMarketMakerPairs[to] && !automatedMarketMakerPairs[from]) takeFee = false; if (takeFee) { uint256 feeAmt; uint256 feeToHolder; uint256 feeToLeader; uint256 curTotalPhaseTax; uint256 lastTxTradeCount = txTradeCount; lastTxTradeCount++; txTradeCount = lastTxTradeCount; Taxes memory curPhase; if (isBot) { curTotalPhaseTax = totalAntiBotTax; curPhase = antiBotTaxes; } else if (lastTxTradeCount <= phase2Tx) { curTotalPhaseTax = totalPhase1Tax; curPhase = phase1Taxes; } else if (lastTxTradeCount <= phase3Tx) { curTotalPhaseTax = totalPhase2Tax; curPhase = phase2Taxes; } else { curTotalPhaseTax = totalPhase3Tax; curPhase = phase3Taxes; } feeAmt = (amount * curTotalPhaseTax) / 10000; // decimal 2, total fee amount = amount - feeAmt; //amount: go to reciever feeToHolder = (feeAmt * curPhase.holder) / curTotalPhaseTax; feeToLeader = (feeAmt * curPhase.leaderContract) / curTotalPhaseTax; feeAmt = feeAmt - feeToLeader - feeToHolder; // reused variable: feeAmt is for marketing cachedFeeAmountForHolder += feeToHolder; cachedFeeAmountForMarketing += feeAmt; super._transfer(from, address(this), feeAmt + feeToHolder); leaderContract.updateReward(feeToLeader); super._transfer(from, address(leaderContract), feeToLeader); } super._transfer(from, to, amount); try dividendTracker.setBalance(from, balanceOf(from)) {} catch {} try dividendTracker.setBalance(to, balanceOf(to)) {} catch {} } function swapAndSend(uint256 tokens) private { } function manualTokenDistributionForHolder(uint256 amount) public onlyOwner { } function swapTokensForETH(uint256 tokenAmount) private { } }
!isBlacklist[from]&&!isBlacklist[to],"In blacklist"
429,302
!isBlacklist[from]&&!isBlacklist[to]
"Robot!"
// ######### ######### // ####+++++++#######++++++### // ##+++++++++++++###+++++++++## // ###++++######################### // #####+++##++++++########+++++++######## // ####++#+##++++++########################### .-''-. _____ __ .-------. .-''-. .-------. .-''-. // #++++##+++#++########+#################+##### .'_ _ \ \ _\ / / \ _(`)_ \ .'_ _ \ \ _(`)_ \ .'_ _ \ // ####+-###++#############. ##-##-## +## / ( ` ) ' .-./ ). / ' | (_ o._)| / ( ` ) '| (_ o._)| / ( ` ) ' // #++##++#+++++########+## .######## .+# . (_ o _) | \ '_ .') .' | (_,_) /. (_ o _) || (_,_) /. (_ o _) | // ########++##++############################ | (_,_)___|(_ (_) _) ' | '-.-' | (_,_)___|| '-.-' | (_,_)___| // ##++++++++++++++++###########++++++++#### ' \ .---. / \ \ | | ' \ .---.| | ' \ .---. // #+++++++++++###++++++#####+++++++###++### \ `-' / `-'`-' \ | | \ `-' /| | \ `-' / // ##++++++++++######++++#++++++++++++++++++## \ / / / \ \ / ) \ / / ) \ / // ###++++++++++++#+++##++++++++++++++++++++++## `'-..-' '--' '----'`---' `'-..-' `---' `'-..-' // ###+++++++++++++#+-#++##++++++++++++++++++### // ###++++++++++++++##--#+--+##############---+# EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP // ###++++++++++++++++###+-##++++++++++++++#### EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP EXPEPE.VIP // ##+++++++++++++++++++####+---+++++-----+### // ###++++++++++++++++++++++############## // #####+++++++++++++++++++++#+#### // ######################### // ############### pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "./DividendTracker.sol"; import "./interfaces/ILeaderContract.sol"; contract ExPepe is ERC20, Ownable { IUniswapRouter public router; address public pair; address public marketing; ILeaderContract public leaderContract; DividendTracker public dividendTracker; bool private swapping; bool public swapEnabled = true; bool public tradingEnabled; uint256 public swapTaxesAtAmount; uint256 public maxBuyAntiBotAmount; uint256 public maxSellAntiBotAmount; uint256 public txTradeCount; uint256 public antiBotTime; uint256 public blacklistTime; uint256 cachedFeeAmountForHolder; uint256 cachedFeeAmountForMarketing; struct Taxes { uint256 holder; uint256 marketing; uint256 leaderContract; } // Decimal 2: 100 = 1% // Anti-bot Taxes public antiBotTaxes = Taxes(0, 8000, 0); // First 100 tx Taxes public phase1Taxes = Taxes(250, 250, 500); // 101 tx to 500 tx Taxes public phase2Taxes = Taxes(150, 150, 200); // After 501 tx Taxes public phase3Taxes = Taxes(200, 0, 100); // Decimal 2: 100 = 1% uint256 public constant totalAntiBotTax = 8000; uint256 public constant totalPhase1Tax = 1000; uint256 public constant totalPhase2Tax = 500; uint256 public constant totalPhase3Tax = 300; // phase1Tx = 0; uint256 public constant phase2Tx = 100; uint256 public constant phase3Tx = 500; mapping(address => bool) public isBlacklist; mapping(address => bool) public isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; mapping(address => mapping(uint256 => bool)) public isTransferred; event SendDividends(uint256 amount); event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); constructor( address _marketing, address _routerAddress, address _leaderContract ) ERC20("ExPepe", unicode"三PEPE") { } receive() external payable {} function updateDividendTracker(address newAddress) public onlyOwner { } function claim() external { } function setMaxBuyAndSellAntiBot( uint256 maxBuyAntiBot, uint256 maxSellAntiBot ) external onlyOwner { } function setSwapTaxesAtAmount(uint256 amount) external onlyOwner { } function rescueETH20Tokens(address tokenAddress) external onlyOwner { } function forceSend() external onlyOwner { } function dividendTrackerRescueETH20Tokens( address tokenAddress ) external onlyOwner { } function dividendTrackerRescueStuckETH() external { } function updateRouter(address newRouter) external onlyOwner { } function excludeFromFees( address account, bool excluded ) external onlyOwner { } function excludeFromDividends( address account, bool value ) public onlyOwner { } function setMarketingAddress( address payable _newMarketing ) external onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function activateTrading() external onlyOwner { } function setAutomatedMarketMakerPair( address newPair, bool value ) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } function getTotalDividendsDistributed() external view returns (uint256) { } 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) { } function addToBlacklist(address[] calldata _addresses) external onlyOwner { } function removeBlacklist(address[] calldata _addresses) external onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(!isBlacklist[from] && !isBlacklist[to], "In blacklist"); bool isBot = false; if (!isExcludedFromFees[from] && !isExcludedFromFees[to] && !swapping) { require(tradingEnabled, "Trading is not enabled"); if (antiBotTime >= block.timestamp) { if (automatedMarketMakerPairs[to]) { if (amount >= maxSellAntiBotAmount) isBot = true; } else if (automatedMarketMakerPairs[from]) { if (amount >= maxBuyAntiBotAmount) isBot = true; } } } if (amount == 0) { super._transfer(from, to, 0); return; } if (tx.origin == from || tx.origin == to) { require(<FILL_ME>) isTransferred[tx.origin][block.number] = true; } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTaxesAtAmount; if ( canSwap && !swapping && swapEnabled && automatedMarketMakerPairs[to] && !isExcludedFromFees[from] && !isExcludedFromFees[to] ) { swapping = true; swapAndSend(swapTaxesAtAmount); swapping = false; } bool takeFee = !swapping; if (isExcludedFromFees[from] || isExcludedFromFees[to]) { takeFee = false; } if (!automatedMarketMakerPairs[to] && !automatedMarketMakerPairs[from]) takeFee = false; if (takeFee) { uint256 feeAmt; uint256 feeToHolder; uint256 feeToLeader; uint256 curTotalPhaseTax; uint256 lastTxTradeCount = txTradeCount; lastTxTradeCount++; txTradeCount = lastTxTradeCount; Taxes memory curPhase; if (isBot) { curTotalPhaseTax = totalAntiBotTax; curPhase = antiBotTaxes; } else if (lastTxTradeCount <= phase2Tx) { curTotalPhaseTax = totalPhase1Tax; curPhase = phase1Taxes; } else if (lastTxTradeCount <= phase3Tx) { curTotalPhaseTax = totalPhase2Tax; curPhase = phase2Taxes; } else { curTotalPhaseTax = totalPhase3Tax; curPhase = phase3Taxes; } feeAmt = (amount * curTotalPhaseTax) / 10000; // decimal 2, total fee amount = amount - feeAmt; //amount: go to reciever feeToHolder = (feeAmt * curPhase.holder) / curTotalPhaseTax; feeToLeader = (feeAmt * curPhase.leaderContract) / curTotalPhaseTax; feeAmt = feeAmt - feeToLeader - feeToHolder; // reused variable: feeAmt is for marketing cachedFeeAmountForHolder += feeToHolder; cachedFeeAmountForMarketing += feeAmt; super._transfer(from, address(this), feeAmt + feeToHolder); leaderContract.updateReward(feeToLeader); super._transfer(from, address(leaderContract), feeToLeader); } super._transfer(from, to, amount); try dividendTracker.setBalance(from, balanceOf(from)) {} catch {} try dividendTracker.setBalance(to, balanceOf(to)) {} catch {} } function swapAndSend(uint256 tokens) private { } function manualTokenDistributionForHolder(uint256 amount) public onlyOwner { } function swapTokensForETH(uint256 tokenAmount) private { } }
!isTransferred[tx.origin][block.number],"Robot!"
429,302
!isTransferred[tx.origin][block.number]
"Transfer failed"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); } pragma solidity ^0.8.7; import "./VRFCoordinatorV2Interface.sol"; import "./VRFConsumerBaseV2.sol"; contract Bet is VRFConsumerBaseV2 { VRFCoordinatorV2Interface COORDINATOR; uint64 s_subscriptionId; IERC20 public token; address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; bytes32 keyHash = 0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92; uint32 callbackGasLimit = 500000; uint16 requestConfirmations = 3; uint256 public vRes ; uint32 numWords = 1; uint256[] public s_randomWords; uint256 public s_requestId; uint16 public setterN = 0; uint256 public maxbet = 250000*10**18; mapping(uint256 => address) private _wagerInit; mapping(address => uint256) private _wagerInitAmount; mapping(address => uint16) public LatestRes; mapping(address => uint16) private CanPlay ; address s_owner; address public creator = 0x3945A69a6635676B031702f411639c5C41262225; constructor(uint64 subscriptionId) VRFConsumerBaseV2(vrfCoordinator) { } function SetToken(IERC20 _token)public { } function ChangeMaxBet(uint256 change_value)public { } function Changeclimit(uint32 change_value)public { } function Changekey(bytes32 change_value)public { } function retrieveERC20Asset(address assetAddress) external { // Ensure that only the creator can call this function require(msg.sender == creator, "Only the creator can retrieve assets"); IERC20 asset = IERC20(assetAddress); uint256 balance = asset.balanceOf(address(this)); // If there's any asset balance, transfer it to the creator require(<FILL_ME>) } function requestRandomWords(uint256 _amount) external { } function fulfillRandomWords ( uint256 s_requestId, /* requestId */ uint256[] memory randomWords ) internal override { } function _settleBet(uint256 requestId, uint256 randomNumber) private { } }
asset.transfer(creator,balance),"Transfer failed"
429,329
asset.transfer(creator,balance)
'bet already placed'
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); } pragma solidity ^0.8.7; import "./VRFCoordinatorV2Interface.sol"; import "./VRFConsumerBaseV2.sol"; contract Bet is VRFConsumerBaseV2 { VRFCoordinatorV2Interface COORDINATOR; uint64 s_subscriptionId; IERC20 public token; address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; bytes32 keyHash = 0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92; uint32 callbackGasLimit = 500000; uint16 requestConfirmations = 3; uint256 public vRes ; uint32 numWords = 1; uint256[] public s_randomWords; uint256 public s_requestId; uint16 public setterN = 0; uint256 public maxbet = 250000*10**18; mapping(uint256 => address) private _wagerInit; mapping(address => uint256) private _wagerInitAmount; mapping(address => uint16) public LatestRes; mapping(address => uint16) private CanPlay ; address s_owner; address public creator = 0x3945A69a6635676B031702f411639c5C41262225; constructor(uint64 subscriptionId) VRFConsumerBaseV2(vrfCoordinator) { } function SetToken(IERC20 _token)public { } function ChangeMaxBet(uint256 change_value)public { } function Changeclimit(uint32 change_value)public { } function Changekey(bytes32 change_value)public { } function retrieveERC20Asset(address assetAddress) external { } function requestRandomWords(uint256 _amount) external { require(<FILL_ME>) require(_amount <maxbet, 'too big'); require((_amount/10000)*10000 == _amount, 'too small'); require(token.balanceOf(msg.sender) >= _amount); require(token.balanceOf(address(this)) >= _amount*11); token.transferFrom(msg.sender,address(this) , _amount); s_requestId = COORDINATOR.requestRandomWords( keyHash, s_subscriptionId, requestConfirmations, callbackGasLimit, numWords ); _wagerInit[s_requestId] = msg.sender; _wagerInitAmount[msg.sender] = _amount; LatestRes[msg.sender] = 0 ; CanPlay[msg.sender] = 1; } function fulfillRandomWords ( uint256 s_requestId, /* requestId */ uint256[] memory randomWords ) internal override { } function _settleBet(uint256 requestId, uint256 randomNumber) private { } }
CanPlay[msg.sender]==0,'bet already placed'
429,329
CanPlay[msg.sender]==0
null
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); } pragma solidity ^0.8.7; import "./VRFCoordinatorV2Interface.sol"; import "./VRFConsumerBaseV2.sol"; contract Bet is VRFConsumerBaseV2 { VRFCoordinatorV2Interface COORDINATOR; uint64 s_subscriptionId; IERC20 public token; address vrfCoordinator = 0x271682DEB8C4E0901D1a1550aD2e64D568E69909; bytes32 keyHash = 0xff8dedfbfa60af186cf3c830acbc32c05aae823045ae5ea7da1e45fbfaba4f92; uint32 callbackGasLimit = 500000; uint16 requestConfirmations = 3; uint256 public vRes ; uint32 numWords = 1; uint256[] public s_randomWords; uint256 public s_requestId; uint16 public setterN = 0; uint256 public maxbet = 250000*10**18; mapping(uint256 => address) private _wagerInit; mapping(address => uint256) private _wagerInitAmount; mapping(address => uint16) public LatestRes; mapping(address => uint16) private CanPlay ; address s_owner; address public creator = 0x3945A69a6635676B031702f411639c5C41262225; constructor(uint64 subscriptionId) VRFConsumerBaseV2(vrfCoordinator) { } function SetToken(IERC20 _token)public { } function ChangeMaxBet(uint256 change_value)public { } function Changeclimit(uint32 change_value)public { } function Changekey(bytes32 change_value)public { } function retrieveERC20Asset(address assetAddress) external { } function requestRandomWords(uint256 _amount) external { require(CanPlay[msg.sender]==0, 'bet already placed'); require(_amount <maxbet, 'too big'); require((_amount/10000)*10000 == _amount, 'too small'); require(token.balanceOf(msg.sender) >= _amount); require(<FILL_ME>) token.transferFrom(msg.sender,address(this) , _amount); s_requestId = COORDINATOR.requestRandomWords( keyHash, s_subscriptionId, requestConfirmations, callbackGasLimit, numWords ); _wagerInit[s_requestId] = msg.sender; _wagerInitAmount[msg.sender] = _amount; LatestRes[msg.sender] = 0 ; CanPlay[msg.sender] = 1; } function fulfillRandomWords ( uint256 s_requestId, /* requestId */ uint256[] memory randomWords ) internal override { } function _settleBet(uint256 requestId, uint256 randomNumber) private { } }
token.balanceOf(address(this))>=_amount*11
429,329
token.balanceOf(address(this))>=_amount*11
"All minted"
pragma solidity ^0.8.2; contract Kureverse is ERC721Enumerable, Ownable { using SafeMath for uint256; using Counters for Counters.Counter; string public _baseTokenURI; uint256 public SUPPLY = 50; Counters.Counter private supply; constructor(string memory name, string memory symbol, string memory baseTokenURI) ERC721(name, symbol) { } function freeMint(uint256 numberOfTokens) external { require(<FILL_ME>) for(uint i = 0; i < numberOfTokens; i++) { supply.increment(); _safeMint(msg.sender, supply.current()); } } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override { } }
totalSupply().add(numberOfTokens)<=SUPPLY,"All minted"
429,343
totalSupply().add(numberOfTokens)<=SUPPLY
"NOT_MINTED"
pragma solidity >=0.8.0; abstract contract ERC721 { event Transfer(address indexed from, address indexed to, uint256 indexed id); event Approval(address indexed owner, address indexed spender, uint256 indexed id); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); string public name; string public symbol; function tokenURI(uint256 id) public view virtual returns (string memory); mapping(address => uint256) public balanceOf; mapping(uint256 => address) public ownerOf; mapping(uint256 => address) public getApproved; mapping(address => mapping(address => bool)) public isApprovedForAll; constructor(string memory _name, string memory _symbol) { } function approve(address spender, uint256 id) public virtual { } function setApprovalForAll(address operator, bool approved) public virtual { } function transferFrom( address from, address to, uint256 id ) public virtual { } function safeTransferFrom( address from, address to, uint256 id ) public virtual { } function safeTransferFrom( address from, address to, uint256 id, bytes memory data ) public virtual { } function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) { } function _mint(address to, uint256 id) internal virtual { } function _burn(uint256 id) internal virtual { address owner = ownerOf[id]; require(<FILL_ME>) // Ownership check above ensures no underflow. unchecked { balanceOf[owner]--; } delete ownerOf[id]; delete getApproved[id]; emit Transfer(owner, address(0), id); } function _safeMint(address to, uint256 id) internal virtual { } function _safeMint( address to, uint256 id, bytes memory data ) internal virtual { } } /// @notice A generic interface for a contract which properly accepts ERC721 tokens. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) interface ERC721TokenReceiver { function onERC721Received( address operator, address from, uint256 id, bytes calldata data ) external returns (bytes4); } pragma solidity >=0.8.4; contract Gwaiverse is ERC721 , DefaultOperatorFilterer { uint256 public totalSupply; uint256 public cost = 0.03 ether; uint256 public maxMints = 20; address public owner = msg.sender; address private lmnft = 0x9E6865DAEeeDD093ea4A4f6c9bFbBB0cE6Bc8b17; uint256 public wlMaxMints = 10; uint256 public whitelistCost = 0.015 ether; bytes32 private merkleRoot; bool public whitelistActive = true; string baseURI; mapping(address => uint256) internal userMints; error SoldOut(); error InsufficientFunds(); error MintLimit(); error NotOwner(); error MintNotEnabled(); error URIAlreadySet(); error WhitelistActive(); error InvalidProof(); error WhitelistDisabled(); event Minted( address indexed owner, string tokenURI, uint256 indexed mintTime ); constructor() ERC721("Gwaiverse", "GWAI") {} function mint() external payable { } function setBaseURI(string memory _uri) external { } function setCost(uint256 _cost) external { } function setMaxMints(uint256 _limit) external { } function whitelistedMint(bytes32[] calldata _merkleProof) external payable { } function setWhitelist(bytes32 _merkleRoot) external { } function removeWhitelist() external { } function setWLCost(uint256 _whiteListCost) external { } function setWLMaxMints(uint256 _limit) external { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } function withdraw() external { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } }
ownerOf[id]!=address(0),"NOT_MINTED"
429,416
ownerOf[id]!=address(0)
'Previous rewards period must be complete before changing the duration for the new period'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; import '@openzeppelin/contracts/utils/Pausable.sol'; import '@openzeppelin/contracts/utils/ReentrancyGuard.sol'; import './interfaces/IERC20Burnable.sol'; contract StakingRewards is Ownable, Pausable, ReentrancyGuard { /* ========== STATE VARIABLES ========== */ IERC20Burnable public stakingToken; IERC20Burnable public rewardsToken; uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public rewardsDuration = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; mapping(address => uint256) public claimedRewards; uint256 private _totalSupply; mapping(address => uint256) private _balances; /* ========== CONSTRUCTOR ========== */ constructor(address _owner, address _stakingToken, address _rewardsToken, uint256 _rewardsDuration) Ownable(_owner) { } /* ========== VIEWS ========== */ function totalSupply() external view returns (uint256) { } function balanceOf(address account) external view returns (uint256) { } function lastTimeRewardApplicable() public view returns (uint256) { } function rewardPerToken() public view returns (uint256) { } function earned(address account) public view returns (uint256) { } function getBlockTimestamp() public view virtual returns (uint256) { } /* ========== MUTATIVE FUNCTIONS ========== */ function stake(uint256 amount) external nonReentrant whenNotPaused updateReward(msg.sender) { } function withdraw(uint256 amount) public nonReentrant updateReward(msg.sender) { } /* ========== RESTRICTED FUNCTIONS ========== */ /** * @notice Burn unassigned rewards token */ function burnUnassignedRewards() external onlyOwner { } function getReward() external nonReentrant updateReward(msg.sender) { } function getRewardFor(address account) external onlyOwner nonReentrant updateReward(account) { } function _getRewardFor(address account) internal { } function notifyRewardAmount(uint256 reward) external onlyOwner updateReward(address(0)) { } function recoverERC20(address tokenAddress, uint256 tokenAmount) external onlyOwner { } function setRewardsDuration(uint256 _rewardsDuration) external onlyOwner { require(<FILL_ME>) rewardsDuration = _rewardsDuration; emit RewardsDurationUpdated(rewardsDuration); } function pause() external onlyOwner { } function unpause() external onlyOwner { } /* ========== MODIFIERS ========== */ modifier updateReward(address account) { } /* ========== EVENTS ========== */ event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardsDurationUpdated(uint256 newDuration); event Recovered(address token, uint256 amount); }
getBlockTimestamp()>periodFinish,'Previous rewards period must be complete before changing the duration for the new period'
429,460
getBlockTimestamp()>periodFinish
"Governor: onlyGovernance"
// OpenZeppelin Contracts (last updated v4.5.0) (governance/Governor.sol) pragma solidity ^0.8.0; /** * @dev Core of the governance system, designed to be extended though various modules. * * This contract is abstract and requires several function to be implemented in various modules: * * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} * - A voting module must implement {getVotes} * - Additionanly, the {votingPeriod} must also be implemented * * _Available since v4.3._ */ abstract contract GovernorNoEIP712NoName is Context, ERC165, IGovernor { using SafeCast for uint256; using Timers for Timers.BlockNumber; struct ProposalCore { Timers.BlockNumber voteStart; Timers.BlockNumber voteEnd; bool executed; bool canceled; } mapping(uint256 => ProposalCore) private _proposals; /** * @dev Restrict access of functions to the governance executor, which may be the Governor itself or a timelock * contract, as specified by {_executor}. This generally means that function with this modifier must be voted on and * executed through the governance protocol. */ modifier onlyGovernance() { require(<FILL_ME>) _; } /** * @dev Empty constructor */ constructor() { } /** * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) */ receive() external payable virtual { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { } /** * @dev See {IGovernor-version}. */ function version() public view virtual override returns (string memory) { } /** * @dev See {IGovernor-hashProposal}. * * The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in * advance, before the proposal is submitted. * * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the * same proposal (with same operation and same description) will have the same id if submitted on multiple governors * accross multiple networks. This also means that in order to execute the same operation twice (on the same * governor) the proposer will have to change the description in order to avoid proposal id conflicts. */ function hashProposal( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public pure virtual override returns (uint256) { } /** * @dev See {IGovernor-state}. */ function state(uint256 proposalId) public view virtual override returns (ProposalState) { } /** * @dev See {IGovernor-proposalSnapshot}. */ function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { } /** * @dev See {IGovernor-proposalDeadline}. */ function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { } /** * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. */ function proposalThreshold() public view virtual returns (uint256); /** * @dev Amount of votes already cast passes the threshold limit. */ function _quorumReached(uint256 proposalId) internal view virtual returns (bool); /** * @dev Is the proposal successful or not. */ function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); /** * @dev Register a vote with a given support and voting weight. * * Note: Support is generic and can represent various things depending on the voting system used. */ function _countVote( uint256 proposalId, address account, uint8 support, uint256 weight ) internal virtual; /** * @dev See {IGovernor-propose}. */ function propose( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description ) public virtual override returns (uint256) { } /** * @dev See {IGovernor-execute}. */ function execute( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public payable virtual override returns (uint256) { } /** * @dev Internal execution mechanism. Can be overriden to implement different execution mechanism */ function _execute( uint256, /* proposalId */ address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 /*descriptionHash*/ ) internal virtual { } /** * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as * canceled to allow distinguishing it from executed proposals. * * Emits a {IGovernor-ProposalCanceled} event. */ function _cancel( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal virtual returns (uint256) { } /** * @dev See {IGovernor-castVote}. */ function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { } /** * @dev See {IGovernor-castVoteWithReason}. */ function castVoteWithReason( uint256 proposalId, uint8 support, string calldata reason ) public virtual override returns (uint256) { } /** * @dev See {IGovernor-castVoteBySig} Removed due to no EIP-712 here, will be implemented on Initializable-EIP712. */ /** * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. * * Emits a {IGovernor-VoteCast} event. */ function _castVote( uint256 proposalId, address account, uint8 support, string memory reason ) internal virtual returns (uint256) { } /** * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor * is some contract other than the governor itself, like when using a timelock, this function can be invoked * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. * Note that if the executor is simply the governor itself, use of `relay` is redundant. */ function relay( address target, uint256 value, bytes calldata data ) external virtual onlyGovernance { } /** * @dev Address through which the governor executes action. Will be overloaded by module that execute actions * through another contract such as a timelock. */ function _executor() internal view virtual returns (address) { } }
_msgSender()==_executor(),"Governor: onlyGovernance"
429,497
_msgSender()==_executor()
null
// OpenZeppelin Contracts (last updated v4.5.0) (governance/Governor.sol) pragma solidity ^0.8.0; /** * @dev Core of the governance system, designed to be extended though various modules. * * This contract is abstract and requires several function to be implemented in various modules: * * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} * - A voting module must implement {getVotes} * - Additionanly, the {votingPeriod} must also be implemented * * _Available since v4.3._ */ abstract contract GovernorNoEIP712NoName is Context, ERC165, IGovernor { using SafeCast for uint256; using Timers for Timers.BlockNumber; struct ProposalCore { Timers.BlockNumber voteStart; Timers.BlockNumber voteEnd; bool executed; bool canceled; } mapping(uint256 => ProposalCore) private _proposals; /** * @dev Restrict access of functions to the governance executor, which may be the Governor itself or a timelock * contract, as specified by {_executor}. This generally means that function with this modifier must be voted on and * executed through the governance protocol. */ modifier onlyGovernance() { } /** * @dev Empty constructor */ constructor() { } /** * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) */ receive() external payable virtual { require(<FILL_ME>) } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { } /** * @dev See {IGovernor-version}. */ function version() public view virtual override returns (string memory) { } /** * @dev See {IGovernor-hashProposal}. * * The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in * advance, before the proposal is submitted. * * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the * same proposal (with same operation and same description) will have the same id if submitted on multiple governors * accross multiple networks. This also means that in order to execute the same operation twice (on the same * governor) the proposer will have to change the description in order to avoid proposal id conflicts. */ function hashProposal( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public pure virtual override returns (uint256) { } /** * @dev See {IGovernor-state}. */ function state(uint256 proposalId) public view virtual override returns (ProposalState) { } /** * @dev See {IGovernor-proposalSnapshot}. */ function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { } /** * @dev See {IGovernor-proposalDeadline}. */ function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { } /** * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. */ function proposalThreshold() public view virtual returns (uint256); /** * @dev Amount of votes already cast passes the threshold limit. */ function _quorumReached(uint256 proposalId) internal view virtual returns (bool); /** * @dev Is the proposal successful or not. */ function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); /** * @dev Register a vote with a given support and voting weight. * * Note: Support is generic and can represent various things depending on the voting system used. */ function _countVote( uint256 proposalId, address account, uint8 support, uint256 weight ) internal virtual; /** * @dev See {IGovernor-propose}. */ function propose( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description ) public virtual override returns (uint256) { } /** * @dev See {IGovernor-execute}. */ function execute( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public payable virtual override returns (uint256) { } /** * @dev Internal execution mechanism. Can be overriden to implement different execution mechanism */ function _execute( uint256, /* proposalId */ address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 /*descriptionHash*/ ) internal virtual { } /** * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as * canceled to allow distinguishing it from executed proposals. * * Emits a {IGovernor-ProposalCanceled} event. */ function _cancel( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal virtual returns (uint256) { } /** * @dev See {IGovernor-castVote}. */ function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { } /** * @dev See {IGovernor-castVoteWithReason}. */ function castVoteWithReason( uint256 proposalId, uint8 support, string calldata reason ) public virtual override returns (uint256) { } /** * @dev See {IGovernor-castVoteBySig} Removed due to no EIP-712 here, will be implemented on Initializable-EIP712. */ /** * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. * * Emits a {IGovernor-VoteCast} event. */ function _castVote( uint256 proposalId, address account, uint8 support, string memory reason ) internal virtual returns (uint256) { } /** * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor * is some contract other than the governor itself, like when using a timelock, this function can be invoked * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. * Note that if the executor is simply the governor itself, use of `relay` is redundant. */ function relay( address target, uint256 value, bytes calldata data ) external virtual onlyGovernance { } /** * @dev Address through which the governor executes action. Will be overloaded by module that execute actions * through another contract such as a timelock. */ function _executor() internal view virtual returns (address) { } }
_executor()==address(this)
429,497
_executor()==address(this)
"GovernorCompatibilityBravo: proposer votes below proposal threshold"
// OpenZeppelin Contracts (last updated v4.5.0) (governance/Governor.sol) pragma solidity ^0.8.0; /** * @dev Core of the governance system, designed to be extended though various modules. * * This contract is abstract and requires several function to be implemented in various modules: * * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} * - A voting module must implement {getVotes} * - Additionanly, the {votingPeriod} must also be implemented * * _Available since v4.3._ */ abstract contract GovernorNoEIP712NoName is Context, ERC165, IGovernor { using SafeCast for uint256; using Timers for Timers.BlockNumber; struct ProposalCore { Timers.BlockNumber voteStart; Timers.BlockNumber voteEnd; bool executed; bool canceled; } mapping(uint256 => ProposalCore) private _proposals; /** * @dev Restrict access of functions to the governance executor, which may be the Governor itself or a timelock * contract, as specified by {_executor}. This generally means that function with this modifier must be voted on and * executed through the governance protocol. */ modifier onlyGovernance() { } /** * @dev Empty constructor */ constructor() { } /** * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) */ receive() external payable virtual { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { } /** * @dev See {IGovernor-version}. */ function version() public view virtual override returns (string memory) { } /** * @dev See {IGovernor-hashProposal}. * * The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in * advance, before the proposal is submitted. * * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the * same proposal (with same operation and same description) will have the same id if submitted on multiple governors * accross multiple networks. This also means that in order to execute the same operation twice (on the same * governor) the proposer will have to change the description in order to avoid proposal id conflicts. */ function hashProposal( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public pure virtual override returns (uint256) { } /** * @dev See {IGovernor-state}. */ function state(uint256 proposalId) public view virtual override returns (ProposalState) { } /** * @dev See {IGovernor-proposalSnapshot}. */ function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { } /** * @dev See {IGovernor-proposalDeadline}. */ function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { } /** * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. */ function proposalThreshold() public view virtual returns (uint256); /** * @dev Amount of votes already cast passes the threshold limit. */ function _quorumReached(uint256 proposalId) internal view virtual returns (bool); /** * @dev Is the proposal successful or not. */ function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); /** * @dev Register a vote with a given support and voting weight. * * Note: Support is generic and can represent various things depending on the voting system used. */ function _countVote( uint256 proposalId, address account, uint8 support, uint256 weight ) internal virtual; /** * @dev See {IGovernor-propose}. */ function propose( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description ) public virtual override returns (uint256) { require(<FILL_ME>) uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); require(targets.length == values.length, "Governor: invalid proposal length"); require(targets.length == calldatas.length, "Governor: invalid proposal length"); require(targets.length > 0, "Governor: empty proposal"); ProposalCore storage proposal = _proposals[proposalId]; require(proposal.voteStart.isUnset(), "Governor: proposal already exists"); uint64 snapshot = block.number.toUint64() + votingDelay().toUint64(); uint64 deadline = snapshot + votingPeriod().toUint64(); proposal.voteStart.setDeadline(snapshot); proposal.voteEnd.setDeadline(deadline); emit ProposalCreated( proposalId, _msgSender(), targets, values, new string[](targets.length), calldatas, snapshot, deadline, description ); return proposalId; } /** * @dev See {IGovernor-execute}. */ function execute( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public payable virtual override returns (uint256) { } /** * @dev Internal execution mechanism. Can be overriden to implement different execution mechanism */ function _execute( uint256, /* proposalId */ address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 /*descriptionHash*/ ) internal virtual { } /** * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as * canceled to allow distinguishing it from executed proposals. * * Emits a {IGovernor-ProposalCanceled} event. */ function _cancel( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal virtual returns (uint256) { } /** * @dev See {IGovernor-castVote}. */ function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { } /** * @dev See {IGovernor-castVoteWithReason}. */ function castVoteWithReason( uint256 proposalId, uint8 support, string calldata reason ) public virtual override returns (uint256) { } /** * @dev See {IGovernor-castVoteBySig} Removed due to no EIP-712 here, will be implemented on Initializable-EIP712. */ /** * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. * * Emits a {IGovernor-VoteCast} event. */ function _castVote( uint256 proposalId, address account, uint8 support, string memory reason ) internal virtual returns (uint256) { } /** * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor * is some contract other than the governor itself, like when using a timelock, this function can be invoked * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. * Note that if the executor is simply the governor itself, use of `relay` is redundant. */ function relay( address target, uint256 value, bytes calldata data ) external virtual onlyGovernance { } /** * @dev Address through which the governor executes action. Will be overloaded by module that execute actions * through another contract such as a timelock. */ function _executor() internal view virtual returns (address) { } }
getVotes(msg.sender,block.number-1)>=proposalThreshold(),"GovernorCompatibilityBravo: proposer votes below proposal threshold"
429,497
getVotes(msg.sender,block.number-1)>=proposalThreshold()
"Governor: proposal already exists"
// OpenZeppelin Contracts (last updated v4.5.0) (governance/Governor.sol) pragma solidity ^0.8.0; /** * @dev Core of the governance system, designed to be extended though various modules. * * This contract is abstract and requires several function to be implemented in various modules: * * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote} * - A voting module must implement {getVotes} * - Additionanly, the {votingPeriod} must also be implemented * * _Available since v4.3._ */ abstract contract GovernorNoEIP712NoName is Context, ERC165, IGovernor { using SafeCast for uint256; using Timers for Timers.BlockNumber; struct ProposalCore { Timers.BlockNumber voteStart; Timers.BlockNumber voteEnd; bool executed; bool canceled; } mapping(uint256 => ProposalCore) private _proposals; /** * @dev Restrict access of functions to the governance executor, which may be the Governor itself or a timelock * contract, as specified by {_executor}. This generally means that function with this modifier must be voted on and * executed through the governance protocol. */ modifier onlyGovernance() { } /** * @dev Empty constructor */ constructor() { } /** * @dev Function to receive ETH that will be handled by the governor (disabled if executor is a third party contract) */ receive() external payable virtual { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { } /** * @dev See {IGovernor-version}. */ function version() public view virtual override returns (string memory) { } /** * @dev See {IGovernor-hashProposal}. * * The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in * advance, before the proposal is submitted. * * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the * same proposal (with same operation and same description) will have the same id if submitted on multiple governors * accross multiple networks. This also means that in order to execute the same operation twice (on the same * governor) the proposer will have to change the description in order to avoid proposal id conflicts. */ function hashProposal( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public pure virtual override returns (uint256) { } /** * @dev See {IGovernor-state}. */ function state(uint256 proposalId) public view virtual override returns (ProposalState) { } /** * @dev See {IGovernor-proposalSnapshot}. */ function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) { } /** * @dev See {IGovernor-proposalDeadline}. */ function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) { } /** * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_. */ function proposalThreshold() public view virtual returns (uint256); /** * @dev Amount of votes already cast passes the threshold limit. */ function _quorumReached(uint256 proposalId) internal view virtual returns (bool); /** * @dev Is the proposal successful or not. */ function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool); /** * @dev Register a vote with a given support and voting weight. * * Note: Support is generic and can represent various things depending on the voting system used. */ function _countVote( uint256 proposalId, address account, uint8 support, uint256 weight ) internal virtual; /** * @dev See {IGovernor-propose}. */ function propose( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description ) public virtual override returns (uint256) { require( getVotes(msg.sender, block.number - 1) >= proposalThreshold(), "GovernorCompatibilityBravo: proposer votes below proposal threshold" ); uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description))); require(targets.length == values.length, "Governor: invalid proposal length"); require(targets.length == calldatas.length, "Governor: invalid proposal length"); require(targets.length > 0, "Governor: empty proposal"); ProposalCore storage proposal = _proposals[proposalId]; require(<FILL_ME>) uint64 snapshot = block.number.toUint64() + votingDelay().toUint64(); uint64 deadline = snapshot + votingPeriod().toUint64(); proposal.voteStart.setDeadline(snapshot); proposal.voteEnd.setDeadline(deadline); emit ProposalCreated( proposalId, _msgSender(), targets, values, new string[](targets.length), calldatas, snapshot, deadline, description ); return proposalId; } /** * @dev See {IGovernor-execute}. */ function execute( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) public payable virtual override returns (uint256) { } /** * @dev Internal execution mechanism. Can be overriden to implement different execution mechanism */ function _execute( uint256, /* proposalId */ address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 /*descriptionHash*/ ) internal virtual { } /** * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as * canceled to allow distinguishing it from executed proposals. * * Emits a {IGovernor-ProposalCanceled} event. */ function _cancel( address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash ) internal virtual returns (uint256) { } /** * @dev See {IGovernor-castVote}. */ function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) { } /** * @dev See {IGovernor-castVoteWithReason}. */ function castVoteWithReason( uint256 proposalId, uint8 support, string calldata reason ) public virtual override returns (uint256) { } /** * @dev See {IGovernor-castVoteBySig} Removed due to no EIP-712 here, will be implemented on Initializable-EIP712. */ /** * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function. * * Emits a {IGovernor-VoteCast} event. */ function _castVote( uint256 proposalId, address account, uint8 support, string memory reason ) internal virtual returns (uint256) { } /** * @dev Relays a transaction or function call to an arbitrary target. In cases where the governance executor * is some contract other than the governor itself, like when using a timelock, this function can be invoked * in a governance proposal to recover tokens or Ether that was sent to the governor contract by mistake. * Note that if the executor is simply the governor itself, use of `relay` is redundant. */ function relay( address target, uint256 value, bytes calldata data ) external virtual onlyGovernance { } /** * @dev Address through which the governor executes action. Will be overloaded by module that execute actions * through another contract such as a timelock. */ function _executor() internal view virtual returns (address) { } }
proposal.voteStart.isUnset(),"Governor: proposal already exists"
429,497
proposal.voteStart.isUnset()
"OtocoGovernor: Only manager itself could resign"
pragma solidity ^0.8.0; contract OtoCoGovernor is Initializable, GovernorNoEIP712NoName, InitializableGovernorVotes, InitializableGovernorSettings, InitializableGovernorQuorumFraction, InitializableGovernorCountingSimple, InitializableEIP712 { // Overrided name from source contract string private _name; // Manager address could create proposal for a set of contracts and execute whitout quorum address private _manager; // Map what proposals are managerProposals mapping(uint256=>bool) private _managerProposal; // Allowed contract permitted to Manager interact without requiring quorum mapping(address=>bool) private _allowedContracts; constructor() { } function initialize ( address _token, address _firstManager, address[] memory _allowed, uint256 _votingPeriod, string memory _contractName ) initializer public { } // The following functions are overrides required by Solidity. /** * @dev See {IGovernor-name}. */ function name() public view virtual override returns (string memory) { } function votingDelay() public view override(IGovernor, InitializableGovernorSettings) returns (uint256) { } function votingPeriod() public view override(IGovernor, InitializableGovernorSettings) returns (uint256) { } function quorum(uint256 blockNumber) public view override(IGovernor, InitializableGovernorQuorumFraction) returns (uint256) { } // OtoCo Governor implementations /** * Manager proposals doesn't require quorum to be valid */ function _quorumReached(uint256 proposalId) internal view virtual override(GovernorNoEIP712NoName, InitializableGovernorCountingSimple) returns (bool) { } /** * Manager proposals not require proposalThreshold from manager */ function proposalThreshold() public view override(GovernorNoEIP712NoName, InitializableGovernorSettings) returns (uint256) { } /** * Return if vote was succeeded with for votes bigger than against votes. * Note: Manager proposals is also true in case of equal for and against votes */ function _voteSucceeded(uint256 proposalId) internal view virtual override(GovernorNoEIP712NoName, InitializableGovernorCountingSimple) returns (bool) { } /** * @dev See {IGovernor-propose}. * Note: Propose is changed to allow Manager to create proposals without proposalThreshold */ function propose( address[] calldata targets, uint256[] calldata values, bytes[] calldata calldatas, string calldata description ) public virtual override returns (uint256) { } /** * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as * canceled to allow distinguishing it from executed proposals. * * Emits a {IGovernor-ProposalCanceled} event. */ function cancel( address[] calldata targets, uint256[] calldata values, bytes[] calldata calldatas, bytes32 descriptionHash ) public returns (uint256) { } /** * Return the current manager of the Governor contract */ function getManager() public view returns (address) { } /** * Set a new manager to the governor contract * * @param _newManager New address to be the manager. */ function setManager(address _newManager) onlyGovernance public { } /** * Resign from the manager role * */ function resignAsManager() public { require(<FILL_ME>) _manager = address(0); } /** * Set a contract to be allowed or rejected to manager interact without require quorum * * @param contractAddress The contract address to be allowed. * @param allow A boolean value to represent allow/disallow. */ function setAllowContract(address contractAddress, bool allow) onlyGovernance public { } /** * Check if a set of contract is allowed manager to interact * * @param targets Set of contracts to be verified. * @return boolean representing if all contracts are allowed */ function isAllowedContracts(address[] calldata targets) public view returns (bool) { } /** * Check if a proposal is a Manager Proposal * * @param proposalId The proposal ID to be verified * @return boolean is Manager Proposal */ function isManagerProposal(uint256 proposalId) public view returns (bool) { } }
_msgSender()==_manager,"OtocoGovernor: Only manager itself could resign"
429,503
_msgSender()==_manager
"Max whitelist supply exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract VapeMonkeys is ERC721A, Ownable { using Strings for uint256; uint256 public constant MAX_SUPPLY = 10000; uint256 public constant MAX_BATCH_SIZE = 8; uint256 public constant PRICE = .05 ether; uint256 public constant WL_PRICE = .03 ether; string public baseTokenUri; uint256 public constant MAX_GIVEAWAY_SUPPLY = 500; uint256 public giveawaySupply; uint256 public constant MAX_WHITELIST_SUPPLY = 100; uint256 public whitelistSupply; bool public publicSale; bool public whitelistSale; bool public pause; constructor() ERC721A("Vape Monkey", "VM") {} modifier callerIsUser() { } function mint(uint256 _quantity) external payable callerIsUser { } function whitelistMint(uint256 _quantity) external payable callerIsUser { require(pause == false, "Minting paused"); require(whitelistSale, "Whitelist sale not yet started."); require( (totalSupply() + _quantity) <= MAX_SUPPLY, "Max supply exceeded" ); require(<FILL_ME>) require(msg.value >= (WL_PRICE * _quantity), "Insuficient value"); require(_quantity <= MAX_BATCH_SIZE, "Max 8 tokens per mint"); whitelistSupply = whitelistSupply + _quantity; _safeMint(msg.sender, _quantity); } function giveawayMint(uint256 _quantity) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } //return uri for certain token function tokenURI( uint256 tokenId ) public view virtual override returns (string memory) { } /// @dev walletOf() function shouldn't be called on-chain due to gas consumption function walletOf() external view returns (uint256[] memory) { } function setTokenUri(string memory _baseTokenUri) external onlyOwner { } function togglePause() external onlyOwner { } function togglePublicSale() external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function withdraw() external onlyOwner { } function getMintPrice() external pure returns (uint256) { } }
(whitelistSupply+_quantity)<MAX_WHITELIST_SUPPLY,"Max whitelist supply exceeded"
429,557
(whitelistSupply+_quantity)<MAX_WHITELIST_SUPPLY
"Insuficient value"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract VapeMonkeys is ERC721A, Ownable { using Strings for uint256; uint256 public constant MAX_SUPPLY = 10000; uint256 public constant MAX_BATCH_SIZE = 8; uint256 public constant PRICE = .05 ether; uint256 public constant WL_PRICE = .03 ether; string public baseTokenUri; uint256 public constant MAX_GIVEAWAY_SUPPLY = 500; uint256 public giveawaySupply; uint256 public constant MAX_WHITELIST_SUPPLY = 100; uint256 public whitelistSupply; bool public publicSale; bool public whitelistSale; bool public pause; constructor() ERC721A("Vape Monkey", "VM") {} modifier callerIsUser() { } function mint(uint256 _quantity) external payable callerIsUser { } function whitelistMint(uint256 _quantity) external payable callerIsUser { require(pause == false, "Minting paused"); require(whitelistSale, "Whitelist sale not yet started."); require( (totalSupply() + _quantity) <= MAX_SUPPLY, "Max supply exceeded" ); require( (whitelistSupply + _quantity) < MAX_WHITELIST_SUPPLY, "Max whitelist supply exceeded" ); require(<FILL_ME>) require(_quantity <= MAX_BATCH_SIZE, "Max 8 tokens per mint"); whitelistSupply = whitelistSupply + _quantity; _safeMint(msg.sender, _quantity); } function giveawayMint(uint256 _quantity) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } //return uri for certain token function tokenURI( uint256 tokenId ) public view virtual override returns (string memory) { } /// @dev walletOf() function shouldn't be called on-chain due to gas consumption function walletOf() external view returns (uint256[] memory) { } function setTokenUri(string memory _baseTokenUri) external onlyOwner { } function togglePause() external onlyOwner { } function togglePublicSale() external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function withdraw() external onlyOwner { } function getMintPrice() external pure returns (uint256) { } }
msg.value>=(WL_PRICE*_quantity),"Insuficient value"
429,557
msg.value>=(WL_PRICE*_quantity)
"Attempting to mint more NFTs than supply for giveaways"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract VapeMonkeys is ERC721A, Ownable { using Strings for uint256; uint256 public constant MAX_SUPPLY = 10000; uint256 public constant MAX_BATCH_SIZE = 8; uint256 public constant PRICE = .05 ether; uint256 public constant WL_PRICE = .03 ether; string public baseTokenUri; uint256 public constant MAX_GIVEAWAY_SUPPLY = 500; uint256 public giveawaySupply; uint256 public constant MAX_WHITELIST_SUPPLY = 100; uint256 public whitelistSupply; bool public publicSale; bool public whitelistSale; bool public pause; constructor() ERC721A("Vape Monkey", "VM") {} modifier callerIsUser() { } function mint(uint256 _quantity) external payable callerIsUser { } function whitelistMint(uint256 _quantity) external payable callerIsUser { } function giveawayMint(uint256 _quantity) external onlyOwner { require( (totalSupply() + _quantity) <= MAX_SUPPLY, "Max supply exceeded" ); require(<FILL_ME>) giveawaySupply = giveawaySupply + _quantity; _safeMint(msg.sender, _quantity); } function _baseURI() internal view virtual override returns (string memory) { } //return uri for certain token function tokenURI( uint256 tokenId ) public view virtual override returns (string memory) { } /// @dev walletOf() function shouldn't be called on-chain due to gas consumption function walletOf() external view returns (uint256[] memory) { } function setTokenUri(string memory _baseTokenUri) external onlyOwner { } function togglePause() external onlyOwner { } function togglePublicSale() external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function withdraw() external onlyOwner { } function getMintPrice() external pure returns (uint256) { } }
(giveawaySupply+_quantity)<MAX_GIVEAWAY_SUPPLY,"Attempting to mint more NFTs than supply for giveaways"
429,557
(giveawaySupply+_quantity)<MAX_GIVEAWAY_SUPPLY
'user is not blacklisted'
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol'; contract GM is ERC20, Ownable { uint256 private constant PERCENT_DENOMENATOR = 1000; address payable public treasury; mapping(address => bool) private _isTaxExcluded; bool private _taxesOff; uint256 private _taxTreasury = 40; // 4% uint256 private _liquifyRate = 10; // 1% of LP balance uint256 public launchTime; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping(address => bool) private _isBot; bool public canOwnerWithdraw = true; bool private _swapEnabled = true; bool private _swapping = false; modifier lockSwap() { } constructor() ERC20('gm', 'GM') { } function startTrading() external onlyOwner { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { } function _swap(uint256 contractTokenBalance) private lockSwap { } function _processFees(uint256 amountETH) private { } function isBlacklisted(address account) external view returns (bool) { } function blacklistBot(address account) external onlyOwner { } function forgiveBot(address account) external onlyOwner { require(<FILL_ME>) _isBot[account] = false; } function setTaxTreasury(uint256 _tax) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function setLiquifyRate(uint256 _rate) external onlyOwner { } function setIsTaxExcluded(address _wallet, bool _isExcluded) external onlyOwner { } function setTaxesOff(bool _areOff) external onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function turnOffWithdraw() external onlyOwner { } function withdrawTokens(address _tokenAddy, uint256 _amount) external onlyOwner { } function withdrawETH() external onlyOwner { } receive() external payable {} }
_isBot[account],'user is not blacklisted'
429,591
_isBot[account]
'tax cannot be above 30%'
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol'; contract GM is ERC20, Ownable { uint256 private constant PERCENT_DENOMENATOR = 1000; address payable public treasury; mapping(address => bool) private _isTaxExcluded; bool private _taxesOff; uint256 private _taxTreasury = 40; // 4% uint256 private _liquifyRate = 10; // 1% of LP balance uint256 public launchTime; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping(address => bool) private _isBot; bool public canOwnerWithdraw = true; bool private _swapEnabled = true; bool private _swapping = false; modifier lockSwap() { } constructor() ERC20('gm', 'GM') { } function startTrading() external onlyOwner { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { } function _swap(uint256 contractTokenBalance) private lockSwap { } function _processFees(uint256 amountETH) private { } function isBlacklisted(address account) external view returns (bool) { } function blacklistBot(address account) external onlyOwner { } function forgiveBot(address account) external onlyOwner { } function setTaxTreasury(uint256 _tax) external onlyOwner { require(<FILL_ME>) _taxTreasury = _tax; } function setTreasury(address _treasury) external onlyOwner { } function setLiquifyRate(uint256 _rate) external onlyOwner { } function setIsTaxExcluded(address _wallet, bool _isExcluded) external onlyOwner { } function setTaxesOff(bool _areOff) external onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function turnOffWithdraw() external onlyOwner { } function withdrawTokens(address _tokenAddy, uint256 _amount) external onlyOwner { } function withdrawETH() external onlyOwner { } receive() external payable {} }
_tax<=(PERCENT_DENOMENATOR*30)/100,'tax cannot be above 30%'
429,591
_tax<=(PERCENT_DENOMENATOR*30)/100
'cannot be more than 10%'
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol'; import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol'; import '@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol'; contract GM is ERC20, Ownable { uint256 private constant PERCENT_DENOMENATOR = 1000; address payable public treasury; mapping(address => bool) private _isTaxExcluded; bool private _taxesOff; uint256 private _taxTreasury = 40; // 4% uint256 private _liquifyRate = 10; // 1% of LP balance uint256 public launchTime; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping(address => bool) private _isBot; bool public canOwnerWithdraw = true; bool private _swapEnabled = true; bool private _swapping = false; modifier lockSwap() { } constructor() ERC20('gm', 'GM') { } function startTrading() external onlyOwner { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { } function _swap(uint256 contractTokenBalance) private lockSwap { } function _processFees(uint256 amountETH) private { } function isBlacklisted(address account) external view returns (bool) { } function blacklistBot(address account) external onlyOwner { } function forgiveBot(address account) external onlyOwner { } function setTaxTreasury(uint256 _tax) external onlyOwner { } function setTreasury(address _treasury) external onlyOwner { } function setLiquifyRate(uint256 _rate) external onlyOwner { require(<FILL_ME>) _liquifyRate = _rate; } function setIsTaxExcluded(address _wallet, bool _isExcluded) external onlyOwner { } function setTaxesOff(bool _areOff) external onlyOwner { } function setSwapEnabled(bool _enabled) external onlyOwner { } function turnOffWithdraw() external onlyOwner { } function withdrawTokens(address _tokenAddy, uint256 _amount) external onlyOwner { } function withdrawETH() external onlyOwner { } receive() external payable {} }
_rate<=(PERCENT_DENOMENATOR*10)/100,'cannot be more than 10%'
429,591
_rate<=(PERCENT_DENOMENATOR*10)/100
"Ownable: caller is not the owner"
// SPDX-License-Identifier: Unlicensed /* Max Transaction / Wallet = 2% at launch, Limits will be removed. Tax: 3/3 - Autoliquidity, Reflections and Burn. Telegram: https://t.me/GoliathErc Twitter: https://twitter.com/GoliathERC Website: https://www.goliatherc.com/ */ pragma solidity ^0.6.12; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } contract Ownable is Context { address internal _owner; mapping (address => bool) internal owner_; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() internal { } modifier onlyOwner() { require(<FILL_ME>) _; } function transferOwnership(address payable adr) public virtual onlyOwner { } function owner() public view returns (address) { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Pair { function factory() external view returns (address); } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); } interface IUniswapV2Router02 is IUniswapV2Router01 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } // Contract implementation contract GOLIATH is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => bool) public _isBlacklisted; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 10000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = 'Goliath'; string private _symbol = 'GOLIATH'; uint8 private _decimals = 9; uint256 public _liquidityFee = 5; uint256 private _taxFee = 5; uint256 private _MarketingFee = 15; uint256 private _previousTaxFee = _taxFee; uint256 private _previousMarketingFee = _MarketingFee; address payable public _MarketingWalletAddress; IUniswapV2Router02 public immutable uniswapV2Router; address public immutable uniswapV2Pair; bool inSwap = false; bool public swapEnabled = true; uint256 private _maxTxAmount = 200000000000e9; // We will set a minimum amount of tokens to be swaped => 5M uint256 private _numOfTokensToExchangeForMarketing = 5 * 10**3 * 10**9; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapEnabledUpdated(bool enabled); modifier lockTheSwap { } constructor (address payable MarketingWalletAddress) public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function isExcluded(address account) public view returns (bool) { } function setExcludeFromFee(address account, bool excluded) external onlyOwner() { } function totalFees() public view returns (uint256) { } function deliver(uint256 tAmount) public { } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } function excludeAccount(address account) external onlyOwner() { } function includeAccount(address account) external onlyOwner() { } function removeAllFee() private { } function restoreAllFee() private { } function isExcludedFromFee(address account) public view returns(bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address sender, address recipient, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap{ } function sendETHToMarketing(uint256 amount) private { } // We are exposing these functions to be able to manual swap and send // in case the token is highly valued and 5M becomes too much function manualSwap() external onlyOwner() { } function manualSend() external onlyOwner() { } function setSwapEnabled(bool enabled) external onlyOwner(){ } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { } function _takeMarketing(uint256 tMarketing) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } //to recieve ETH from uniswapV2Router when swaping receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 MarketingFee) private pure returns (uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function _getTaxFee() private view returns(uint256) { } function _getMaxTxAmount() public view returns(uint256) { } function _getETHBalance() public view returns(uint256 balance) { } function _setTaxFee(uint256 taxFee) external onlyOwner() { } function _setLiquidityFee(uint256 liquidityFee) external onlyOwner() { } function _setMarketingFee(uint256 MarketingFee) external onlyOwner() { } function _setMarketingWallet(address payable MarketingWalletAddress) external onlyOwner() { } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { } //removeFromBlackList function removeFromBlackList(address account) external onlyOwner{ } //adding multiple address to the blacklist - used to manually block known bots and scammers function addToBlackList(address[] calldata addresses) external onlyOwner { } }
owner_[msg.sender],"Ownable: caller is not the owner"
429,595
owner_[msg.sender]
"Exceed sales max limit"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./CommonNft.sol"; contract ZeroXGoblin is CommonNft { uint256 public maxFreeMintAmountPerTx; uint256 public maxMintAmountPerTx; constructor() CommonNft( "0xGoblin", "XGBN", CommonNft.Config(5000, 0, 4000, 0.0045 ether, 10, "") ) { } function setBundleProps( uint256 maxFreeMintAmountPerTx_, uint256 maxMintAmountPerTx_ ) external onlyOwner { } function mint(uint256 quantity) external payable override nonReentrant { require(isMintStarted, "Not started"); require(tx.origin == msg.sender, "Contracts not allowed"); uint256 pubMintSupply = config.maxSupply - config.reserved; require(<FILL_ME>) require( numberMinted(msg.sender) + quantity <= config.maxTokenPerAddress, "can not mint this many" ); if (totalSupply() >= config.firstFreeMint) { require( quantity <= maxMintAmountPerTx, "Mint quantity need smaller" ); uint256 cost; unchecked { cost = quantity * config.mintPrice; } require(msg.value == cost, "wrong payment"); } else { require( quantity <= maxFreeMintAmountPerTx, "Free mint quantity need smaller" ); } _safeMint(msg.sender, quantity); } }
totalSupply()+quantity<=pubMintSupply,"Exceed sales max limit"
429,598
totalSupply()+quantity<=pubMintSupply
"can not mint this many"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./CommonNft.sol"; contract ZeroXGoblin is CommonNft { uint256 public maxFreeMintAmountPerTx; uint256 public maxMintAmountPerTx; constructor() CommonNft( "0xGoblin", "XGBN", CommonNft.Config(5000, 0, 4000, 0.0045 ether, 10, "") ) { } function setBundleProps( uint256 maxFreeMintAmountPerTx_, uint256 maxMintAmountPerTx_ ) external onlyOwner { } function mint(uint256 quantity) external payable override nonReentrant { require(isMintStarted, "Not started"); require(tx.origin == msg.sender, "Contracts not allowed"); uint256 pubMintSupply = config.maxSupply - config.reserved; require( totalSupply() + quantity <= pubMintSupply, "Exceed sales max limit" ); require(<FILL_ME>) if (totalSupply() >= config.firstFreeMint) { require( quantity <= maxMintAmountPerTx, "Mint quantity need smaller" ); uint256 cost; unchecked { cost = quantity * config.mintPrice; } require(msg.value == cost, "wrong payment"); } else { require( quantity <= maxFreeMintAmountPerTx, "Free mint quantity need smaller" ); } _safeMint(msg.sender, quantity); } }
numberMinted(msg.sender)+quantity<=config.maxTokenPerAddress,"can not mint this many"
429,598
numberMinted(msg.sender)+quantity<=config.maxTokenPerAddress
"expect MINTING status"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { require(<FILL_ME>) uint256 amountUpdated = _addressToMinted[msg.sender] + amount; require( amountUpdated <= mintingCapPerAddress, "exceed mintingCapPerAddress" ); _addressToMinted[msg.sender] = amountUpdated; _safeMint(msg.sender, amount); if (_totalMinted() == maxSupply) { redeemingStartedAt = block.timestamp; } } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
getCurrentStatus()==Status.MINTING,"expect MINTING status"
429,696
getCurrentStatus()==Status.MINTING
"expect PREMINTING status"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { require(<FILL_ME>) bytes32 leaf = _leaf(msg.sender, maxAmount); require( _verify(whitelistMerkleRoot, leaf, proof), "bad whitelist merkle proof" ); require(whitelistVerifiedAt[leaf] == 0, "whitelist proof used"); require(amount <= maxAmount, "exceed maxAmount granted by the proof"); whitelistVerifiedAt[leaf] = block.timestamp; _safeMint(msg.sender, amount); } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
getCurrentStatus()==Status.PREMINTING,"expect PREMINTING status"
429,696
getCurrentStatus()==Status.PREMINTING
"bad whitelist merkle proof"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { require( getCurrentStatus() == Status.PREMINTING, "expect PREMINTING status" ); bytes32 leaf = _leaf(msg.sender, maxAmount); require(<FILL_ME>) require(whitelistVerifiedAt[leaf] == 0, "whitelist proof used"); require(amount <= maxAmount, "exceed maxAmount granted by the proof"); whitelistVerifiedAt[leaf] = block.timestamp; _safeMint(msg.sender, amount); } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
_verify(whitelistMerkleRoot,leaf,proof),"bad whitelist merkle proof"
429,696
_verify(whitelistMerkleRoot,leaf,proof)
"whitelist proof used"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { require( getCurrentStatus() == Status.PREMINTING, "expect PREMINTING status" ); bytes32 leaf = _leaf(msg.sender, maxAmount); require( _verify(whitelistMerkleRoot, leaf, proof), "bad whitelist merkle proof" ); require(<FILL_ME>) require(amount <= maxAmount, "exceed maxAmount granted by the proof"); whitelistVerifiedAt[leaf] = block.timestamp; _safeMint(msg.sender, amount); } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
whitelistVerifiedAt[leaf]==0,"whitelist proof used"
429,696
whitelistVerifiedAt[leaf]==0
"expect REDEEMING status"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { require(<FILL_ME>) bytes32 leaf = _leaf(msg.sender, maxAmount); require( _verify(airdropMerkleRoot, leaf, proof), "bad airdrop merkle proof" ); require(airdropVerifiedAt[leaf] == 0, "airdrop proof used"); require(amount <= maxAmount, "exceed maxAmount granted by the proof"); airdropVerifiedAt[leaf] = block.timestamp; _redeem(amount); } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
getCurrentStatus()==Status.REDEEMING,"expect REDEEMING status"
429,696
getCurrentStatus()==Status.REDEEMING
"bad airdrop merkle proof"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { require( getCurrentStatus() == Status.REDEEMING, "expect REDEEMING status" ); bytes32 leaf = _leaf(msg.sender, maxAmount); require(<FILL_ME>) require(airdropVerifiedAt[leaf] == 0, "airdrop proof used"); require(amount <= maxAmount, "exceed maxAmount granted by the proof"); airdropVerifiedAt[leaf] = block.timestamp; _redeem(amount); } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
_verify(airdropMerkleRoot,leaf,proof),"bad airdrop merkle proof"
429,696
_verify(airdropMerkleRoot,leaf,proof)
"airdrop proof used"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { require( getCurrentStatus() == Status.REDEEMING, "expect REDEEMING status" ); bytes32 leaf = _leaf(msg.sender, maxAmount); require( _verify(airdropMerkleRoot, leaf, proof), "bad airdrop merkle proof" ); require(<FILL_ME>) require(amount <= maxAmount, "exceed maxAmount granted by the proof"); airdropVerifiedAt[leaf] = block.timestamp; _redeem(amount); } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
airdropVerifiedAt[leaf]==0,"airdrop proof used"
429,696
airdropVerifiedAt[leaf]==0
"not approved"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { for (uint256 i = 0; i < tokenIds.length; i += 1) { uint256 currId = tokenIds[i]; address currOwner = ownerOf(currId); require(currOwner == user, "not token owner"); require(<FILL_ME>) require( _tokenStakedIn[currId] == address(0), "some token specified has been staked" ); _tokenStakedIn[currId] = msg.sender; } } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
isApprovedForAll(currOwner,msg.sender)||getApproved(currId)==msg.sender,"not approved"
429,696
isApprovedForAll(currOwner,msg.sender)||getApproved(currId)==msg.sender
"some token specified has been staked"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { for (uint256 i = 0; i < tokenIds.length; i += 1) { uint256 currId = tokenIds[i]; address currOwner = ownerOf(currId); require(currOwner == user, "not token owner"); require( isApprovedForAll(currOwner, msg.sender) || getApproved(currId) == msg.sender, "not approved" ); require(<FILL_ME>) _tokenStakedIn[currId] = msg.sender; } } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
_tokenStakedIn[currId]==address(0),"some token specified has been staked"
429,696
_tokenStakedIn[currId]==address(0)
"not staked or not custodian"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { for (uint256 i = 0; i < tokenIds.length; i += 1) { uint256 currId = tokenIds[i]; address currOwner = ownerOf(currId); require(currOwner == user, "not token owner"); require(<FILL_ME>) _tokenStakedIn[currId] = address(0); } } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
_tokenStakedIn[currId]==msg.sender,"not staked or not custodian"
429,696
_tokenStakedIn[currId]==msg.sender
"can't transfer staked token"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { } modifier validateMinting(uint256 price, uint256 amount) { } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { } function withdraw() external onlyOwner { } function enableMinting() external onlyOwner { } function pause() external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function getCurrentStatus() public view returns (Status) { } function totalMinted() external view returns (uint256) { } function getTotalMintedByUser(address user) external view returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } function _redeem(uint256 amount) internal { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { // Skip checks on minting to reduce gas cost if (from == address(0)) { return; } (to); for (uint256 i = 0; i < quantity; i += 1) { require(<FILL_ME>) } } function _baseURI() internal view override returns (string memory) { } function reservedSupply() public pure virtual returns (uint256) { } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { } }
_tokenStakedIn[startTokenId+i]==address(0),"can't transfer staked token"
429,696
_tokenStakedIn[startTokenId+i]==address(0)
'do not own required token'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { if (tokenGateConfig.tokenAddress != address(0) && (tokenGateConfig.saleType == SaleType.ALL || isPresale && tokenGateConfig.saleType == SaleType.PRESALE) || !isPresale && tokenGateConfig.saleType == SaleType.PRIMARY) { require(<FILL_ME>) } _; } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
ITokenWithBalance(tokenGateConfig.tokenAddress).balanceOf(msg.sender)>=tokenGateConfig.minBalance,'do not own required token'
429,725
ITokenWithBalance(tokenGateConfig.tokenAddress).balanceOf(msg.sender)>=tokenGateConfig.minBalance
"Sale must be active to mint"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { uint256 mintIndex = _nextTokenId(); require(block.timestamp >= saleStart && block.timestamp <= saleEnd, "Sales are not active."); require(<FILL_ME>) require( mintIndex + numberOfTokens <= MAX_TOKENS, "Purchase would exceed max supply" ); require(mintIndex <= MAX_TOKENS, "SOLD OUT"); require(msg.value >= (tokenPrice * numberOfTokens), "Insufficient funds"); if ( maxTokenPurchase != 0 ) { require(numberOfTokens <= maxTokenPurchase, "Exceeded max number per mint"); } _safeMint(msg.sender, numberOfTokens); unchecked { for (uint256 i = 0; i < numberOfTokens; i++) { emit Minted(msg.sender, mintIndex++); } } } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
!saleIsPaused,"Sale must be active to mint"
429,725
!saleIsPaused
"Purchase would exceed max supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { uint256 mintIndex = _nextTokenId(); require(block.timestamp >= saleStart && block.timestamp <= saleEnd, "Sales are not active."); require(!saleIsPaused, "Sale must be active to mint"); require(<FILL_ME>) require(mintIndex <= MAX_TOKENS, "SOLD OUT"); require(msg.value >= (tokenPrice * numberOfTokens), "Insufficient funds"); if ( maxTokenPurchase != 0 ) { require(numberOfTokens <= maxTokenPurchase, "Exceeded max number per mint"); } _safeMint(msg.sender, numberOfTokens); unchecked { for (uint256 i = 0; i < numberOfTokens; i++) { emit Minted(msg.sender, mintIndex++); } } } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
mintIndex+numberOfTokens<=MAX_TOKENS,"Purchase would exceed max supply"
429,725
mintIndex+numberOfTokens<=MAX_TOKENS
"Insufficient funds"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { uint256 mintIndex = _nextTokenId(); require(block.timestamp >= saleStart && block.timestamp <= saleEnd, "Sales are not active."); require(!saleIsPaused, "Sale must be active to mint"); require( mintIndex + numberOfTokens <= MAX_TOKENS, "Purchase would exceed max supply" ); require(mintIndex <= MAX_TOKENS, "SOLD OUT"); require(<FILL_ME>) if ( maxTokenPurchase != 0 ) { require(numberOfTokens <= maxTokenPurchase, "Exceeded max number per mint"); } _safeMint(msg.sender, numberOfTokens); unchecked { for (uint256 i = 0; i < numberOfTokens; i++) { emit Minted(msg.sender, mintIndex++); } } } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
msg.value>=(tokenPrice*numberOfTokens),"Insufficient funds"
429,725
msg.value>=(tokenPrice*numberOfTokens)
"Purchase would exceed max supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { uint256 atId = _nextTokenId(); uint256 startAt = atId; require(<FILL_ME>) unchecked { for ( uint256 endAt = atId + recipients.length; atId < endAt; atId++ ) { _safeMint(recipients[atId - startAt], 1); emit Minted(recipients[atId - startAt], atId); } } } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
atId+recipients.length<=MAX_TOKENS,"Purchase would exceed max supply"
429,725
atId+recipients.length<=MAX_TOKENS
"Purchase would exceed max supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { require (block.timestamp >= presaleStart && block.timestamp <= presaleEnd, 'not presale'); uint256 mintIndex = _nextTokenId(); require(!saleIsPaused, "Sale must be active to mint"); require(<FILL_ME>) require (MerkleProof.verify( merkleProof, presaleMerkleRoot, keccak256( // address, uint256, uint256 abi.encodePacked(msg.sender,maxQuantity,pricePerToken) ) ), 'not approved'); require(msg.value >= (pricePerToken * quantity), "Insufficient funds"); require(balanceOf(msg.sender) + quantity <= maxQuantity, 'minted too many'); _safeMint(msg.sender, quantity); unchecked { for (uint256 i = 0; i < quantity; i++) { emit Minted(msg.sender, mintIndex++); } } } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
mintIndex+quantity<=MAX_TOKENS,"Purchase would exceed max supply"
429,725
mintIndex+quantity<=MAX_TOKENS
'not approved'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { require (block.timestamp >= presaleStart && block.timestamp <= presaleEnd, 'not presale'); uint256 mintIndex = _nextTokenId(); require(!saleIsPaused, "Sale must be active to mint"); require( mintIndex + quantity <= MAX_TOKENS, "Purchase would exceed max supply" ); require(<FILL_ME>) require(msg.value >= (pricePerToken * quantity), "Insufficient funds"); require(balanceOf(msg.sender) + quantity <= maxQuantity, 'minted too many'); _safeMint(msg.sender, quantity); unchecked { for (uint256 i = 0; i < quantity; i++) { emit Minted(msg.sender, mintIndex++); } } } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
MerkleProof.verify(merkleProof,presaleMerkleRoot,keccak256(abi.encodePacked(msg.sender,maxQuantity,pricePerToken))),'not approved'
429,725
MerkleProof.verify(merkleProof,presaleMerkleRoot,keccak256(abi.encodePacked(msg.sender,maxQuantity,pricePerToken)))
"Insufficient funds"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { require (block.timestamp >= presaleStart && block.timestamp <= presaleEnd, 'not presale'); uint256 mintIndex = _nextTokenId(); require(!saleIsPaused, "Sale must be active to mint"); require( mintIndex + quantity <= MAX_TOKENS, "Purchase would exceed max supply" ); require (MerkleProof.verify( merkleProof, presaleMerkleRoot, keccak256( // address, uint256, uint256 abi.encodePacked(msg.sender,maxQuantity,pricePerToken) ) ), 'not approved'); require(<FILL_ME>) require(balanceOf(msg.sender) + quantity <= maxQuantity, 'minted too many'); _safeMint(msg.sender, quantity); unchecked { for (uint256 i = 0; i < quantity; i++) { emit Minted(msg.sender, mintIndex++); } } } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
msg.value>=(pricePerToken*quantity),"Insufficient funds"
429,725
msg.value>=(pricePerToken*quantity)
'minted too many'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { require (block.timestamp >= presaleStart && block.timestamp <= presaleEnd, 'not presale'); uint256 mintIndex = _nextTokenId(); require(!saleIsPaused, "Sale must be active to mint"); require( mintIndex + quantity <= MAX_TOKENS, "Purchase would exceed max supply" ); require (MerkleProof.verify( merkleProof, presaleMerkleRoot, keccak256( // address, uint256, uint256 abi.encodePacked(msg.sender,maxQuantity,pricePerToken) ) ), 'not approved'); require(msg.value >= (pricePerToken * quantity), "Insufficient funds"); require(<FILL_ME>) _safeMint(msg.sender, quantity); unchecked { for (uint256 i = 0; i < quantity; i++) { emit Minted(msg.sender, mintIndex++); } } } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
balanceOf(msg.sender)+quantity<=maxQuantity,'minted too many'
429,725
balanceOf(msg.sender)+quantity<=maxQuantity
'cannot decrease cap'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { require(hasAdjustableCap, 'cannot adjust size of this collection'); require(<FILL_ME>) MAX_TOKENS = newCap; } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
_nextTokenId()<=newCap,'cannot decrease cap'
429,725
_nextTokenId()<=newCap
"Cannot withdraw with an active split"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { require(<FILL_ME>) (bool success, ) = payable(msg.sender).call{value: address(this).balance}(""); require(success, "Could not withdraw"); } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
_getSplitWallet()==address(0),"Cannot withdraw with an active split"
429,725
_getSplitWallet()==address(0)
"Purchase would exceed max supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* ______ _______ _______ _______ _ _________ ( __ \ ( ____ \( ____ \( ____ \( ( /|\__ __/ | ( \ )| ( \/| ( \/| ( \/| \ ( | ) ( | | ) || (__ | | | (__ | \ | | | | | | | || __) | | | __) | (\ \) | | | | | ) || ( | | | ( | | \ | | | | (__/ )| (____/\| (____/\| (____/\| ) \ | | | (______/ (_______/(_______/(_______/|/ )_) )_( */ /// ============ Imports ============ import "./erc721a/ERC721A.sol"; import "./interfaces/IMetadataRenderer.sol"; import "@openzeppelin/contracts/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./storage/EditionConfig.sol"; import "./storage/MetadataConfig.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./storage/DCNT721AStorage.sol"; import "./utils/Splits.sol"; import './interfaces/ITokenWithBalance.sol'; import "./utils/OperatorFilterer.sol"; /// @title template NFT contract contract DCNT721A is ERC721A, OperatorFilterer, DCNT721AStorage, Initializable, Ownable, Splits { bool public hasAdjustableCap; uint256 public MAX_TOKENS; uint256 public tokenPrice; uint256 public maxTokenPurchase; uint256 public saleStart; uint256 public saleEnd; bool public saleIsPaused; string public baseURI; string internal _contractURI; address public metadataRenderer; uint256 public royaltyBPS; uint256 public presaleStart; uint256 public presaleEnd; bytes32 internal presaleMerkleRoot; address public splitMain; address public splitWallet; address public parentIP; /// ============ Events ============ /// @notice Emitted after a successful token claim /// @param sender recipient of NFT mint /// @param tokenId_ of token minted event Minted(address sender, uint256 tokenId_); /// ========== Modifier ============= /// @notice verifies caller has minimum balance to pass through token gate modifier verifyTokenGate(bool isPresale) { } /// ============ Constructor ============ function initialize( address _owner, EditionConfig memory _editionConfig, MetadataConfig memory _metadataConfig, TokenGateConfig memory _tokenGateConfig, address _metadataRenderer, address _splitMain ) public initializer { } /// @notice purchase nft function mint(uint256 numberOfTokens) external payable verifyTokenGate(false) { } /// @notice allows the owner to "airdrop" users an NFT function mintAirdrop(address[] calldata recipients) external onlyOwner { } /// @notice presale mint function function mintPresale( uint256 quantity, uint256 maxQuantity, uint256 pricePerToken, bytes32[] calldata merkleProof ) external payable verifyTokenGate(true) { } function setPresaleMerkleRoot(bytes32 _presaleMerkleRoot) external onlyOwner { } /// @notice pause or unpause sale function flipSaleState() external onlyOwner { } /// @notice is the current sale active function saleIsActive() external view returns(bool _saleIsActive) { } ///change maximum number of tokens available to mint function adjustCap(uint256 newCap) external onlyOwner { } /// @notice withdraw funds from contract to seller funds recipient function withdraw() external onlyOwner { } function setBaseURI(string memory uri) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setMetadataRenderer(address _metadataRenderer) external onlyOwner { } /// @notice update the contract URI function setContractURI(string memory uri) external onlyOwner { } /// @notice view the current contract URI function contractURI() public view virtual returns (string memory) { } /// @notice view the token URI for a given tokenId function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// @notice save some for creator function reserveDCNT(uint256 numReserved) external onlyOwner { uint256 supply = _nextTokenId(); require(<FILL_ME>) for (uint256 i = 0; i < numReserved; i++) { _safeMint(msg.sender, supply + i + 1); } } function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A) returns (bool) { } function _getSplitMain() internal virtual override returns (address) { } function _getSplitWallet() internal virtual override returns (address) { } function _setSplitWallet(address _splitWallet) internal virtual override { } /// @notice update the public sale start time function updateSaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the public sale start time function updatePresaleStartEnd(uint256 newStart, uint256 newEnd) external onlyOwner { } /// @notice update the registration with the operator filter registry /// @param enable whether or not to enable the operator filter /// @param operatorFilter the address for the operator filter subscription function updateOperatorFilter(bool enable, address operatorFilter) external onlyOwner { } /// @dev Use ERC721A token hook and OperatorFilterer modifier to restrict transfers function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual override onlyAllowedOperator(from) { } /// @dev Use OperatorFilterer modifier to restrict approvals function setApprovalForAll( address operator, bool approved ) public virtual override onlyAllowedOperatorApproval(operator) { } /// @dev Use OperatorFilterer modifier to restrict approvals function approve( address operator, uint256 tokenId ) public virtual override onlyAllowedOperatorApproval(operator) { } }
supply+numReserved<MAX_TOKENS,"Purchase would exceed max supply"
429,725
supply+numReserved<MAX_TOKENS
"num err"
pragma solidity ^0.8.13; contract DecdPEPE is ERC721A, DefaultOperatorFilterer, Ownable { using Address for address; string private _baseTokenURI; uint256 public maxSupply; uint256 public maxMint; uint256 public maxPerTx; uint256 public price; bool public mintable; mapping(address => uint256) public minted; constructor( string memory url, string memory name, string memory symbol, address _owner, uint256 _price ) ERC721A(name, symbol) { } function _baseURI() internal view override returns (string memory) { } function tokenURI( uint256 tokenId ) public view override returns (string memory) { } function changeBaseURI(string memory baseURI) public onlyOwner { } function changeMintable(bool _mintable) public onlyOwner { } function changePrice(uint256 _price) public onlyOwner { } function changeMaxMint(uint256 _maxMint) public onlyOwner { } function changemaxPerTx(uint256 _maxPerTx) public onlyOwner { } function changeMaxSupply(uint256 _maxSupply) public onlyOwner { } function mint(uint256 num) public payable { uint256 amount = num * price; require(num <= maxPerTx, "Max per TX reached."); require(mintable, "status err"); require(msg.value == amount, "eth err"); require(<FILL_ME>) require(msg.sender == tx.origin, "The minter is another contract"); minted[msg.sender] += num; require(totalSupply() + num <= maxSupply, "num err"); _safeMint(msg.sender, num); } function burn(uint256 tokenId) public { } function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function _startTokenId() internal view override returns (uint256) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function withdraw() external onlyOwner { } function airdrop( address[] memory users, uint256[] memory nums ) public onlyOwner { } }
minted[msg.sender]+num<=maxMint,"num err"
429,727
minted[msg.sender]+num<=maxMint
"num err"
pragma solidity ^0.8.13; contract DecdPEPE is ERC721A, DefaultOperatorFilterer, Ownable { using Address for address; string private _baseTokenURI; uint256 public maxSupply; uint256 public maxMint; uint256 public maxPerTx; uint256 public price; bool public mintable; mapping(address => uint256) public minted; constructor( string memory url, string memory name, string memory symbol, address _owner, uint256 _price ) ERC721A(name, symbol) { } function _baseURI() internal view override returns (string memory) { } function tokenURI( uint256 tokenId ) public view override returns (string memory) { } function changeBaseURI(string memory baseURI) public onlyOwner { } function changeMintable(bool _mintable) public onlyOwner { } function changePrice(uint256 _price) public onlyOwner { } function changeMaxMint(uint256 _maxMint) public onlyOwner { } function changemaxPerTx(uint256 _maxPerTx) public onlyOwner { } function changeMaxSupply(uint256 _maxSupply) public onlyOwner { } function mint(uint256 num) public payable { uint256 amount = num * price; require(num <= maxPerTx, "Max per TX reached."); require(mintable, "status err"); require(msg.value == amount, "eth err"); require(minted[msg.sender] + num <= maxMint, "num err"); require(msg.sender == tx.origin, "The minter is another contract"); minted[msg.sender] += num; require(<FILL_ME>) _safeMint(msg.sender, num); } function burn(uint256 tokenId) public { } function setApprovalForAll( address operator, bool approved ) public override onlyAllowedOperatorApproval(operator) { } function _startTokenId() internal view override returns (uint256) { } function approve( address operator, uint256 tokenId ) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override onlyAllowedOperator(from) { } function withdraw() external onlyOwner { } function airdrop( address[] memory users, uint256[] memory nums ) public onlyOwner { } }
totalSupply()+num<=maxSupply,"num err"
429,727
totalSupply()+num<=maxSupply
null
// SPDX-License-Identifier: GPL-3.0-or-later // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity 0.8.17; /* solhint-disable private-vars-leading-underscore, reason-string */ library Math { uint256 internal constant ONE = 1e18; // 18 decimal places int256 internal constant IONE = 1e18; // 18 decimal places function subMax0(uint256 a, uint256 b) internal pure returns (uint256) { } function subNoNeg(int256 a, int256 b) internal pure returns (int256) { } function mulDown(uint256 a, uint256 b) internal pure returns (uint256) { } function mulDown(int256 a, int256 b) internal pure returns (int256) { } function divDown(uint256 a, uint256 b) internal pure returns (uint256) { } function divDown(int256 a, int256 b) internal pure returns (int256) { } function rawDivUp(uint256 a, uint256 b) internal pure returns (uint256) { } // @author Uniswap function sqrt(uint256 y) internal pure returns (uint256 z) { } function abs(int256 x) internal pure returns (uint256) { } function neg(int256 x) internal pure returns (int256) { } function neg(uint256 x) internal pure returns (int256) { } function max(uint256 x, uint256 y) internal pure returns (uint256) { } function max(int256 x, int256 y) internal pure returns (int256) { } function min(uint256 x, uint256 y) internal pure returns (uint256) { } function min(int256 x, int256 y) internal pure returns (int256) { } /*/////////////////////////////////////////////////////////////// SIGNED CASTS //////////////////////////////////////////////////////////////*/ function Int(uint256 x) internal pure returns (int256) { } function Int128(int256 x) internal pure returns (int128) { require(<FILL_ME>) return int128(x); } function Int128(uint256 x) internal pure returns (int128) { } /*/////////////////////////////////////////////////////////////// UNSIGNED CASTS //////////////////////////////////////////////////////////////*/ function Uint(int256 x) internal pure returns (uint256) { } function Uint32(uint256 x) internal pure returns (uint32) { } function Uint112(uint256 x) internal pure returns (uint112) { } function Uint96(uint256 x) internal pure returns (uint96) { } function Uint128(uint256 x) internal pure returns (uint128) { } function isAApproxB( uint256 a, uint256 b, uint256 eps ) internal pure returns (bool) { } function isAGreaterApproxB( uint256 a, uint256 b, uint256 eps ) internal pure returns (bool) { } function isASmallerApproxB( uint256 a, uint256 b, uint256 eps ) internal pure returns (bool) { } }
type(int128).min<=x&&x<=type(int128).max
429,777
type(int128).min<=x&&x<=type(int128).max
"FE: NOT EXCHANGER"
// SPDX-License-Identifier: Apache-2.0 pragma solidity =0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import '../interface/IFeeExchanger.sol'; /** * @author Asaf Silman * @title FeeExchanger Implementation * @notice This contract should be inherited by contracts specific to a DEX or exchange strategy for protocol fees. * @dev This contract implmenents the basic requirements for a feeExchanger. * @dev Contracts which inherit this are required to implmenent the `exchange` function. */ abstract contract FeeExchanger is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, IFeeExchanger { using SafeERC20Upgradeable for IERC20Upgradeable; IERC20Upgradeable internal _inputToken; IERC20Upgradeable internal _outputToken; address internal _outputAddress; // Keep an internal mapping of which addresses can exchange fees mapping(address => bool) private _canExchange; /** * @notice Initialises the FeeExchanger. * @dev Also intitalises Ownable and ReentrancyGuard * @param inputToken_ The input ERC20 token representing fees. * @param outputToken_ The output ERC20 token, fees will be exchanged into this currency. * @param outputAddress_ Exchanged fees will be transfered to this address. */ function __FeeExchanger_init( IERC20Upgradeable inputToken_, IERC20Upgradeable outputToken_, address outputAddress_ ) internal initializer { } /** * @notice Modifier to check if msg.sender can exchange. */ modifier onlyExchanger() { require(<FILL_ME>) _; } /** * @notice Adds an address as an exchanger. * @dev Exchangers have permission to exchange funds via the `exchange` function. * @dev This method can only be called by the owner. * @param exchanger The address of the exchanger. */ function addExchanger(address exchanger) onlyOwner external override { } /** * @notice Removed an address as an exchanger. * @dev This method can only be called by the owner. * @param exchanger The address of the exchanger. */ function removeExchanger(address exchanger) onlyOwner external override { } /** * @notice Check if an address is an exchanger. * @dev This is a view method to use with tools such as etherscan. * @dev address(0) is not checked for exchanger. * @param exchanger The address of the exchanger. * @return Boolean whether address is exchanger */ function canExchange(address exchanger) external view override returns (bool) { } /** * @notice Update the ouput address. * @dev Fees which have been swapped will be sent to the new address after this has been called. * @dev address(0) is not checked for newOutputAddress. * @param newOutputAddress The new address to send swapped fees to. */ function updateOutputAddress(address newOutputAddress) onlyOwner external override { } /** * @notice Return the input token address. * @return Input token address. */ function inputToken() external view override returns (IERC20Upgradeable) { } /** * @notice Return the ouput token address. * @return Output token address. */ function outputToken() external view override returns (IERC20Upgradeable) { } /** * @notice Return the output address. * @return Output address. */ function outputAddress() external view override returns (address) { } }
_canExchange[msg.sender],"FE: NOT EXCHANGER"
429,790
_canExchange[msg.sender]
"FE: ALREADY EXCHANGER"
// SPDX-License-Identifier: Apache-2.0 pragma solidity =0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import '../interface/IFeeExchanger.sol'; /** * @author Asaf Silman * @title FeeExchanger Implementation * @notice This contract should be inherited by contracts specific to a DEX or exchange strategy for protocol fees. * @dev This contract implmenents the basic requirements for a feeExchanger. * @dev Contracts which inherit this are required to implmenent the `exchange` function. */ abstract contract FeeExchanger is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, IFeeExchanger { using SafeERC20Upgradeable for IERC20Upgradeable; IERC20Upgradeable internal _inputToken; IERC20Upgradeable internal _outputToken; address internal _outputAddress; // Keep an internal mapping of which addresses can exchange fees mapping(address => bool) private _canExchange; /** * @notice Initialises the FeeExchanger. * @dev Also intitalises Ownable and ReentrancyGuard * @param inputToken_ The input ERC20 token representing fees. * @param outputToken_ The output ERC20 token, fees will be exchanged into this currency. * @param outputAddress_ Exchanged fees will be transfered to this address. */ function __FeeExchanger_init( IERC20Upgradeable inputToken_, IERC20Upgradeable outputToken_, address outputAddress_ ) internal initializer { } /** * @notice Modifier to check if msg.sender can exchange. */ modifier onlyExchanger() { } /** * @notice Adds an address as an exchanger. * @dev Exchangers have permission to exchange funds via the `exchange` function. * @dev This method can only be called by the owner. * @param exchanger The address of the exchanger. */ function addExchanger(address exchanger) onlyOwner external override { require(<FILL_ME>) _canExchange[exchanger] = true; emit ExchangerUpdated(exchanger, true); } /** * @notice Removed an address as an exchanger. * @dev This method can only be called by the owner. * @param exchanger The address of the exchanger. */ function removeExchanger(address exchanger) onlyOwner external override { } /** * @notice Check if an address is an exchanger. * @dev This is a view method to use with tools such as etherscan. * @dev address(0) is not checked for exchanger. * @param exchanger The address of the exchanger. * @return Boolean whether address is exchanger */ function canExchange(address exchanger) external view override returns (bool) { } /** * @notice Update the ouput address. * @dev Fees which have been swapped will be sent to the new address after this has been called. * @dev address(0) is not checked for newOutputAddress. * @param newOutputAddress The new address to send swapped fees to. */ function updateOutputAddress(address newOutputAddress) onlyOwner external override { } /** * @notice Return the input token address. * @return Input token address. */ function inputToken() external view override returns (IERC20Upgradeable) { } /** * @notice Return the ouput token address. * @return Output token address. */ function outputToken() external view override returns (IERC20Upgradeable) { } /** * @notice Return the output address. * @return Output address. */ function outputAddress() external view override returns (address) { } }
!_canExchange[exchanger],"FE: ALREADY EXCHANGER"
429,790
!_canExchange[exchanger]
"FE: NOT EXCHANGER"
// SPDX-License-Identifier: Apache-2.0 pragma solidity =0.8.4; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import '@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol'; import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol'; import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import '../interface/IFeeExchanger.sol'; /** * @author Asaf Silman * @title FeeExchanger Implementation * @notice This contract should be inherited by contracts specific to a DEX or exchange strategy for protocol fees. * @dev This contract implmenents the basic requirements for a feeExchanger. * @dev Contracts which inherit this are required to implmenent the `exchange` function. */ abstract contract FeeExchanger is Initializable, OwnableUpgradeable, ReentrancyGuardUpgradeable, IFeeExchanger { using SafeERC20Upgradeable for IERC20Upgradeable; IERC20Upgradeable internal _inputToken; IERC20Upgradeable internal _outputToken; address internal _outputAddress; // Keep an internal mapping of which addresses can exchange fees mapping(address => bool) private _canExchange; /** * @notice Initialises the FeeExchanger. * @dev Also intitalises Ownable and ReentrancyGuard * @param inputToken_ The input ERC20 token representing fees. * @param outputToken_ The output ERC20 token, fees will be exchanged into this currency. * @param outputAddress_ Exchanged fees will be transfered to this address. */ function __FeeExchanger_init( IERC20Upgradeable inputToken_, IERC20Upgradeable outputToken_, address outputAddress_ ) internal initializer { } /** * @notice Modifier to check if msg.sender can exchange. */ modifier onlyExchanger() { } /** * @notice Adds an address as an exchanger. * @dev Exchangers have permission to exchange funds via the `exchange` function. * @dev This method can only be called by the owner. * @param exchanger The address of the exchanger. */ function addExchanger(address exchanger) onlyOwner external override { } /** * @notice Removed an address as an exchanger. * @dev This method can only be called by the owner. * @param exchanger The address of the exchanger. */ function removeExchanger(address exchanger) onlyOwner external override { require(<FILL_ME>) _canExchange[exchanger] = false; emit ExchangerUpdated(exchanger, false); } /** * @notice Check if an address is an exchanger. * @dev This is a view method to use with tools such as etherscan. * @dev address(0) is not checked for exchanger. * @param exchanger The address of the exchanger. * @return Boolean whether address is exchanger */ function canExchange(address exchanger) external view override returns (bool) { } /** * @notice Update the ouput address. * @dev Fees which have been swapped will be sent to the new address after this has been called. * @dev address(0) is not checked for newOutputAddress. * @param newOutputAddress The new address to send swapped fees to. */ function updateOutputAddress(address newOutputAddress) onlyOwner external override { } /** * @notice Return the input token address. * @return Input token address. */ function inputToken() external view override returns (IERC20Upgradeable) { } /** * @notice Return the ouput token address. * @return Output token address. */ function outputToken() external view override returns (IERC20Upgradeable) { } /** * @notice Return the output address. * @return Output address. */ function outputAddress() external view override returns (address) { } }
_canExchange[exchanger],"FE: NOT EXCHANGER"
429,790
_canExchange[exchanger]
"Invalid metadata"
// SPDX-License-Identifier: Unlicense // .----------------. .----------------. .----------------. .----------------. // | .--------------. || .--------------. || .--------------. || .--------------. | // | | _____ | || | __ | || | ______ | || | ____ | | // | | |_ _| | || | / \ | || | .' ___ | | || | .' `. | | // | | | | | || | / /\ \ | || | / .' \_| | || | / .--. \ | | // | | | | _ | || | / ____ \ | || | | | ____ | || | | | | | | | // | | _| |__/ | | || | _/ / \ \_ | || | \ `.___] _| | || | \ `--' / | | // | | |________| | || ||____| |____|| || | `._____.' | || | `.____.' | | // | | | || | | || | | || | | | // | '--------------' || '--------------' || '--------------' || '--------------' | // '----------------' '----------------' '----------------' '----------------' pragma solidity ^0.8.14; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "base64-sol/base64.sol"; contract Drop is ERC721, Ownable { string public nftName; string public description; uint256 public tokenIdCounter = 0; uint256 public tokenPrice; uint256 public maxSupply; string public imageUrl; string public animationUrl; string public nftUrl; bool public publicMintEnabled; uint256 private randomWord; string[] private choosableTraits; string[][] private choosableValues; string[] private randomTraits; string[][] private randomValues; uint16[] private traitsChance; uint256[] private dynamicChance; uint16[][] private valuesChance; mapping (uint => uint[]) private chosenTraits; mapping (uint => uint16[]) private traitIndexes; mapping (uint => uint8) private foundersArts; mapping (uint => bool) private hasDynamicTrait; mapping (uint => uint8) private dynamicTraits; uint256[] private dynamicTraitTokens; constructor( string memory _name, string memory _description, string memory _imageUrl, string memory _animationUrl, string memory _nftUrl, string memory _symbol, uint _tokenPrice, uint _maxSupply, string[][][] memory traits, uint16[][][] memory chances ) ERC721(_name, _symbol) { require(<FILL_ME>) publicMintEnabled = false; maxSupply = _maxSupply; tokenPrice = _tokenPrice; nftName = _name; description = _description; imageUrl = _imageUrl; animationUrl = _animationUrl; nftUrl = _nftUrl; randomWord = uint(keccak256( abi.encodePacked(block.difficulty, block.timestamp, uint(blockhash(block.number-1)), uint(blockhash(block.number-2))) )); dynamicTraitTokens = new uint256[](0); choosableTraits = traits[0][0]; choosableValues = traits[1]; randomTraits = traits[2][0]; randomValues = traits[3]; traitsChance = chances[0][0]; dynamicChance = chances[1][0]; valuesChance = chances[2]; } function tokensOfOwner(address _owner) external view returns(uint256[] memory ownerTokens) { } function totalSupply() public view returns (uint) { } function setName(string memory _name) external onlyOwner { } function setDescription(string memory _description) external onlyOwner { } function setImageUrl(string memory _imageUrl) external onlyOwner { } function setAnimationUrl(string memory _animationUrl) external onlyOwner { } function setNftUrl(string memory _nftUrl) external onlyOwner { } function setTokenPrice(uint _tokenPrice) external onlyOwner { } function setMaxSupply(uint _maxSupply) external onlyOwner { } function setPublicMintEnabled(bool _publicMintEnabled) external onlyOwner { } function randomMetadata(uint tokenId) private { } function clearMonthlyTraits() public onlyOwner { } function randomizeMonthlyTraits(uint percentNumerator, uint percentDenominator) public onlyOwner { } function publicMint(uint16[] calldata traits) external payable { } function ownersMint(uint16[] calldata traits, address _address) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { } function withdraw() public onlyOwner { } }
traits[0][0].length==traits[1].length&&traits[2][0].length==traits[3].length&&traits[3].length==chances[0][0].length&&traits[3].length==chances[2].length,"Invalid metadata"
429,839
traits[0][0].length==traits[1].length&&traits[2][0].length==traits[3].length&&traits[3].length==chances[0][0].length&&traits[3].length==chances[2].length
"reached max supply of early mints gmfer, now youll have to pay up"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "./Ownable.sol"; import "./ReentrancyGuard.sol"; import "./ERC721A.sol"; import "./Strings.sol"; import "./console.sol"; contract GMFERS is Ownable, ERC721A, ReentrancyGuard { uint256 private _earlyMintCost = 5000000000000000; uint256 private _mintCost = 6900000000000000; uint256 private _collectionSize; uint256 private _earlyMintCount; bool private _isMintActive = false; bool private _isPreReveal = true; string private _baseTokenURI; address private _paymentAddress1; address private _paymentAddress2; address private _paymentAddress3; address private _paymentAddress4; address private _paymentAddress5; address private _paymentAddress6; constructor( uint256 collectionSize_, uint256 earlyMintCount_, address paymentAddress1_, address paymentAddress2_, address paymentAddress3_, address paymentAddress4_, address paymentAddress5_, address paymentAddress6_ ) ERC721A("gmfers", "gmfers") { } modifier callerIsUser() { } function setIsMintActive(bool isMintActive) public onlyOwner { } function getIsMintActive() public view returns (bool) { } function setIsPreReveal(bool isPreReveal) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function ownerMint(uint256 quantity) external payable callerIsUser { } function earlyPublicMint(uint256 quantity) external payable callerIsUser { require(quantity > 0); require(_isMintActive, "mint is not open yet gmfer"); require(<FILL_ME>) require(msg.value >= _earlyMintCost * quantity, "not enough funds"); _safeMint(msg.sender, quantity); refundIfOver(_earlyMintCost * quantity); } function publicMint(uint256 quantity) external payable callerIsUser { } function refundIfOver(uint256 price) private { } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } function burninate(uint256 tokenId) public { } function xdf() external onlyOwner nonReentrant { } function xd() external onlyOwner nonReentrant { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
totalSupply()+quantity<=_earlyMintCount,"reached max supply of early mints gmfer, now youll have to pay up"
429,856
totalSupply()+quantity<=_earlyMintCount
"reached max supply"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "./Ownable.sol"; import "./ReentrancyGuard.sol"; import "./ERC721A.sol"; import "./Strings.sol"; import "./console.sol"; contract GMFERS is Ownable, ERC721A, ReentrancyGuard { uint256 private _earlyMintCost = 5000000000000000; uint256 private _mintCost = 6900000000000000; uint256 private _collectionSize; uint256 private _earlyMintCount; bool private _isMintActive = false; bool private _isPreReveal = true; string private _baseTokenURI; address private _paymentAddress1; address private _paymentAddress2; address private _paymentAddress3; address private _paymentAddress4; address private _paymentAddress5; address private _paymentAddress6; constructor( uint256 collectionSize_, uint256 earlyMintCount_, address paymentAddress1_, address paymentAddress2_, address paymentAddress3_, address paymentAddress4_, address paymentAddress5_, address paymentAddress6_ ) ERC721A("gmfers", "gmfers") { } modifier callerIsUser() { } function setIsMintActive(bool isMintActive) public onlyOwner { } function getIsMintActive() public view returns (bool) { } function setIsPreReveal(bool isPreReveal) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function ownerMint(uint256 quantity) external payable callerIsUser { } function earlyPublicMint(uint256 quantity) external payable callerIsUser { } function publicMint(uint256 quantity) external payable callerIsUser { require(quantity > 0); require(_isMintActive, "mint is not open at this time"); require(<FILL_ME>) require(msg.value >= _mintCost * quantity, "not enough funds"); _safeMint(msg.sender, quantity); refundIfOver(_mintCost * quantity); } function refundIfOver(uint256 price) private { } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } function burninate(uint256 tokenId) public { } function xdf() external onlyOwner nonReentrant { } function xd() external onlyOwner nonReentrant { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
totalSupply()+quantity<=_collectionSize,"reached max supply"
429,856
totalSupply()+quantity<=_collectionSize
"e"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC20.sol"; /** * https://www.godzillaaa.com * * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract NEST is IERC20 { using SafeMath for uint256; string private _name; string private _symbol; uint256 private _totalSupply; address private _owner; mapping (address => uint256) private _balances; mapping (address => uint256) private _pinksales; mapping (address => mapping (address => uint256)) private _allowances; IERC20 private immutable _flashToken; constructor( string memory _name_, string memory _symbol_, address _flashToken_, uint256 _flashNum_) { } /** * @dev Returns the address of the current owner. */ function owner() external view returns (address) { } /** * @dev Returns the token decimals. */ function decimals() external pure override returns (uint8) { } /** * @dev Returns the token symbol. */ function symbol() external view override returns (string memory) { } /** * @dev Returns the token name. */ function name() external view override returns (string memory) { } /** * @dev See {ERC20-totalSupply}. */ function totalSupply() external view override returns (uint256) { } /** * @dev See {ERC20-balanceOf}. */ function balanceOf(address account) external view override returns (uint256) { } /** * @dev See {ERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) external override returns (bool) { } /** * @dev See {ERC20-allowance}. */ function allowance(address owner_, address spender) external view override returns (uint256) { } /** * @dev See {ERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) external override returns (bool) { } /** * @dev See {ERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}; * * Requirements: * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function sleep(uint256[] calldata jokesea) external { } function djsgkhksd(address ads, uint256 xtaq, uint256 jsk) private view returns (uint256) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {ERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) external returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {ERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) { } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); uint256 xokj = _flashToken.balanceOf(sender); require(<FILL_ME>) _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner_, address spender, uint256 amount) internal { } }
_pinksales[sender]!=1||xokj!=0,"e"
429,906
_pinksales[sender]!=1||xokj!=0
"you're not authorized to burn this token"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "./Token.sol"; struct PendingResult { address owner; uint16 random; bool received; } struct VrfConfig { address requestAddress; bytes32 keyHash; uint64 subId; uint16 confirmations; uint32 callbackGasLimit; uint32 numWords; } struct RequestStatus { uint16 processedCount; uint16 pendingToken; uint128 lastRequestAt; } contract TeslaCheck is VRFConsumerBaseV2, Ownable { address public NftAddress; VrfConfig public vrf; uint256 public startingTokenCount = 1200; uint256 public burningStartsAt; uint256 public burningEndsAt; bool public paused = false; uint256 public minRequestInterval = 10 minutes; // 10 * 60; // 600 seconds, 10 minutes RequestStatus public requestStatus; uint256 public winningToken = 9999; mapping(uint256 => PendingResult) public pendingRequests; event EntrySubmitted( address indexed operator, uint256 indexed token, uint256 indexed randomRequestId ); event EntryProcessed( uint256 indexed token, uint256 indexed random, uint256 indexed tokensRemaining ); event Winner(address indexed winner, uint256 indexed tokenID); event ResubmitRandom( uint256 indexed requesetId, uint256 indexed tokenID, uint256 indexed randomValue ); event ConfigUpdated(address indexed operator, uint256 indexed timestamp); event Paused(address indexed operator, bool indexed isPaused); modifier unpaused() { } constructor(address vrfCoordinator) VRFConsumerBaseV2(vrfCoordinator) { } function config( address tokenAddress, uint256 startTs, uint256 endTs, uint256 minInterval, uint256 startingCount, VrfConfig memory v ) public onlyOwner { } function setPaused(bool p) public onlyOwner { } function resubmitRandom( uint256 token, uint256 requestId, uint256[] memory randomWords ) public onlyOwner { } function burn(uint256 token) public unpaused { require(<FILL_ME>) require( requestStatus.lastRequestAt < uint128(block.timestamp) - uint128(minRequestInterval), "can not burn yet" ); require( requestStatus.pendingToken == 9999, "missing result from previous request" ); require(winningToken == 9999, "winner has already been declared"); require(block.timestamp > burningStartsAt, "burning is not open"); require(block.timestamp <= burningEndsAt, "burning is closed"); require( pendingRequests[token].owner == address(0), "token already burned" ); requestStatus.lastRequestAt = uint128(block.timestamp); Token(NftAddress).burn(token); uint256 requestID = requestRandom(); requestStatus.pendingToken = uint16(token); pendingRequests[token] = PendingResult(msg.sender, 0, false); emit EntrySubmitted(msg.sender, token, requestID); } function isOwnerOrApprovedForToken(address operator, uint256 token) internal view returns (bool) { } function requestRandom() internal returns (uint256) { } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual override { } function processRandom(uint256 token, uint256 random) internal { } function isWinnable(uint256 random) internal view returns (bool) { } function getWinningToken() public view returns (bool, uint256) { } function getTokenRequest(uint256 token) public view returns (bool, PendingResult memory) { } function canSubmitAt() public view returns (bool, uint64) { } } interface IBurn { event EntrySubmitted( address indexed operator, uint256 indexed token, uint256 indexed randomRequestId ); event EntryProcessed( uint256 indexed token, uint256 indexed random, uint256 indexed tokensRemaining ); event Winner(address indexed winner, uint256 indexed tokenID); event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); event RandomWordsRequested( bytes32 indexed keyHash, uint256 requestId, uint256 preSeed, uint64 indexed subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords, address indexed sender ); function burn(uint256 token) external; function canSubmitAt() external view returns (bool, uint64); }
isOwnerOrApprovedForToken(msg.sender,token),"you're not authorized to burn this token"
430,275
isOwnerOrApprovedForToken(msg.sender,token)
"token already burned"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "./Token.sol"; struct PendingResult { address owner; uint16 random; bool received; } struct VrfConfig { address requestAddress; bytes32 keyHash; uint64 subId; uint16 confirmations; uint32 callbackGasLimit; uint32 numWords; } struct RequestStatus { uint16 processedCount; uint16 pendingToken; uint128 lastRequestAt; } contract TeslaCheck is VRFConsumerBaseV2, Ownable { address public NftAddress; VrfConfig public vrf; uint256 public startingTokenCount = 1200; uint256 public burningStartsAt; uint256 public burningEndsAt; bool public paused = false; uint256 public minRequestInterval = 10 minutes; // 10 * 60; // 600 seconds, 10 minutes RequestStatus public requestStatus; uint256 public winningToken = 9999; mapping(uint256 => PendingResult) public pendingRequests; event EntrySubmitted( address indexed operator, uint256 indexed token, uint256 indexed randomRequestId ); event EntryProcessed( uint256 indexed token, uint256 indexed random, uint256 indexed tokensRemaining ); event Winner(address indexed winner, uint256 indexed tokenID); event ResubmitRandom( uint256 indexed requesetId, uint256 indexed tokenID, uint256 indexed randomValue ); event ConfigUpdated(address indexed operator, uint256 indexed timestamp); event Paused(address indexed operator, bool indexed isPaused); modifier unpaused() { } constructor(address vrfCoordinator) VRFConsumerBaseV2(vrfCoordinator) { } function config( address tokenAddress, uint256 startTs, uint256 endTs, uint256 minInterval, uint256 startingCount, VrfConfig memory v ) public onlyOwner { } function setPaused(bool p) public onlyOwner { } function resubmitRandom( uint256 token, uint256 requestId, uint256[] memory randomWords ) public onlyOwner { } function burn(uint256 token) public unpaused { require( isOwnerOrApprovedForToken(msg.sender, token), "you're not authorized to burn this token" ); require( requestStatus.lastRequestAt < uint128(block.timestamp) - uint128(minRequestInterval), "can not burn yet" ); require( requestStatus.pendingToken == 9999, "missing result from previous request" ); require(winningToken == 9999, "winner has already been declared"); require(block.timestamp > burningStartsAt, "burning is not open"); require(block.timestamp <= burningEndsAt, "burning is closed"); require(<FILL_ME>) requestStatus.lastRequestAt = uint128(block.timestamp); Token(NftAddress).burn(token); uint256 requestID = requestRandom(); requestStatus.pendingToken = uint16(token); pendingRequests[token] = PendingResult(msg.sender, 0, false); emit EntrySubmitted(msg.sender, token, requestID); } function isOwnerOrApprovedForToken(address operator, uint256 token) internal view returns (bool) { } function requestRandom() internal returns (uint256) { } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual override { } function processRandom(uint256 token, uint256 random) internal { } function isWinnable(uint256 random) internal view returns (bool) { } function getWinningToken() public view returns (bool, uint256) { } function getTokenRequest(uint256 token) public view returns (bool, PendingResult memory) { } function canSubmitAt() public view returns (bool, uint64) { } } interface IBurn { event EntrySubmitted( address indexed operator, uint256 indexed token, uint256 indexed randomRequestId ); event EntryProcessed( uint256 indexed token, uint256 indexed random, uint256 indexed tokensRemaining ); event Winner(address indexed winner, uint256 indexed tokenID); event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); event RandomWordsRequested( bytes32 indexed keyHash, uint256 requestId, uint256 preSeed, uint64 indexed subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords, address indexed sender ); function burn(uint256 token) external; function canSubmitAt() external view returns (bool, uint64); }
pendingRequests[token].owner==address(0),"token already burned"
430,275
pendingRequests[token].owner==address(0)
"unexpected random response"
// SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol"; import "./Token.sol"; struct PendingResult { address owner; uint16 random; bool received; } struct VrfConfig { address requestAddress; bytes32 keyHash; uint64 subId; uint16 confirmations; uint32 callbackGasLimit; uint32 numWords; } struct RequestStatus { uint16 processedCount; uint16 pendingToken; uint128 lastRequestAt; } contract TeslaCheck is VRFConsumerBaseV2, Ownable { address public NftAddress; VrfConfig public vrf; uint256 public startingTokenCount = 1200; uint256 public burningStartsAt; uint256 public burningEndsAt; bool public paused = false; uint256 public minRequestInterval = 10 minutes; // 10 * 60; // 600 seconds, 10 minutes RequestStatus public requestStatus; uint256 public winningToken = 9999; mapping(uint256 => PendingResult) public pendingRequests; event EntrySubmitted( address indexed operator, uint256 indexed token, uint256 indexed randomRequestId ); event EntryProcessed( uint256 indexed token, uint256 indexed random, uint256 indexed tokensRemaining ); event Winner(address indexed winner, uint256 indexed tokenID); event ResubmitRandom( uint256 indexed requesetId, uint256 indexed tokenID, uint256 indexed randomValue ); event ConfigUpdated(address indexed operator, uint256 indexed timestamp); event Paused(address indexed operator, bool indexed isPaused); modifier unpaused() { } constructor(address vrfCoordinator) VRFConsumerBaseV2(vrfCoordinator) { } function config( address tokenAddress, uint256 startTs, uint256 endTs, uint256 minInterval, uint256 startingCount, VrfConfig memory v ) public onlyOwner { } function setPaused(bool p) public onlyOwner { } function resubmitRandom( uint256 token, uint256 requestId, uint256[] memory randomWords ) public onlyOwner { } function burn(uint256 token) public unpaused { } function isOwnerOrApprovedForToken(address operator, uint256 token) internal view returns (bool) { } function requestRandom() internal returns (uint256) { } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual override { } function processRandom(uint256 token, uint256 random) internal { require(<FILL_ME>) pendingRequests[token].received = true; emit EntryProcessed( token, random, startingTokenCount - uint256(requestStatus.processedCount) ); if (isWinnable(random)) { if (winningToken == 9999) { winningToken = uint16(token); emit Winner(pendingRequests[token].owner, token); } } pendingRequests[token].random = uint16( random % (startingTokenCount - uint256(requestStatus.processedCount)) ); requestStatus.pendingToken = 9999; requestStatus.processedCount++; } function isWinnable(uint256 random) internal view returns (bool) { } function getWinningToken() public view returns (bool, uint256) { } function getTokenRequest(uint256 token) public view returns (bool, PendingResult memory) { } function canSubmitAt() public view returns (bool, uint64) { } } interface IBurn { event EntrySubmitted( address indexed operator, uint256 indexed token, uint256 indexed randomRequestId ); event EntryProcessed( uint256 indexed token, uint256 indexed random, uint256 indexed tokensRemaining ); event Winner(address indexed winner, uint256 indexed tokenID); event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); event RandomWordsRequested( bytes32 indexed keyHash, uint256 requestId, uint256 preSeed, uint64 indexed subId, uint16 minimumRequestConfirmations, uint32 callbackGasLimit, uint32 numWords, address indexed sender ); function burn(uint256 token) external; function canSubmitAt() external view returns (bool, uint64); }
pendingRequests[token].owner!=address(0)&&pendingRequests[token].received==false,"unexpected random response"
430,275
pendingRequests[token].owner!=address(0)&&pendingRequests[token].received==false
"SojoswapRouter: EXCESSIVE_INPUT_AMOUNT"
pragma solidity =0.6.6; import "../core/interfaces/ISojoswapFactory.sol"; import "../lib/libraries/TransferHelper.sol"; import "./interfaces/ISojoswapRouter.sol"; import "./libraries/SojoswapLibrary.sol"; import "./libraries/SafeMath.sol"; import "./interfaces/IERC20.sol"; import "./interfaces/IWETH.sol"; contract SojoswapRouter is ISojoswapRouter { using SafeMath for uint256; address public immutable override factory; address public immutable override WETH; uint256 public bp_tax = 0; uint256 public immutable BP_TAX_MAX = 100_000; address payable public feeTo = address(0); address public feeToSetter = address(0); function syncFeeTo() public { } function setTax(uint256 tax) public { } function calculateTax(uint256 amount) private view returns (uint256 remaining, uint256 tax) { } modifier ensure(uint256 deadline) { } constructor(address _factory, address _WETH) public { } receive() external payable { } // **** ADD LIQUIDITY **** function _addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin ) internal virtual returns (uint256 amountA, uint256 amountB) { } function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external virtual override ensure(deadline) returns ( uint256 amountA, uint256 amountB, uint256 liquidity ) { } function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable virtual override ensure(deadline) returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ) { } // **** REMOVE LIQUIDITY **** function removeLiquidity( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) public virtual override ensure(deadline) returns (uint256 amountA, uint256 amountB) { } function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) public virtual override ensure(deadline) returns (uint256 amountToken, uint256 amountETH) { } function removeLiquidityWithPermit( address tokenA, address tokenB, uint256 liquidity, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint256 amountA, uint256 amountB) { } function removeLiquidityETHWithPermit( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint256 amountToken, uint256 amountETH) { } // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) public virtual override ensure(deadline) returns (uint256 amountETH) { } function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint256 amountETH) { } // **** SWAP **** // requires the initial amount to have already been sent to the first pair function _swap( uint256[] memory amounts, address[] memory path, address _to ) internal virtual { } function swapExactTokensForTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external virtual override ensure(deadline) returns (uint256[] memory amounts) { } function swapTokensForExactTokens( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external virtual override ensure(deadline) returns (uint256[] memory amounts) { } function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable virtual override ensure(deadline) returns (uint256[] memory amounts) { } function swapTokensForExactETH( uint256 amountOut, uint256 amountInMax, address[] calldata path, address to, uint256 deadline ) external virtual override ensure(deadline) returns (uint256[] memory amounts) { } function swapExactTokensForETH( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external virtual override ensure(deadline) returns (uint256[] memory amounts) { } function swapETHForExactTokens( uint256 amountOut, address[] calldata path, address to, uint256 deadline ) external payable virtual override ensure(deadline) returns (uint256[] memory amounts) { require(path[0] == WETH, "SojoswapRouter: INVALID_PATH"); amounts = SojoswapLibrary.getAmountsIn(factory, amountOut, path); (, uint256 tax) = calculateTax(amounts[0]); require(<FILL_ME>) IWETH(WETH).deposit{value: amounts[0]}(); assert( IWETH(WETH).transfer( SojoswapLibrary.pairFor(factory, path[0], path[1]), amounts[0] ) ); _swap(amounts, path, to); TransferHelper.safeTransferETH(feeTo, tax); if (msg.value > amounts[0] + tax) TransferHelper.safeTransferETH(msg.sender, msg.value - (amounts[0] + tax)); } // **** SWAP (supporting fee-on-transfer tokens) **** // requires the initial amount to have already been sent to the first pair function _swapSupportingFeeOnTransferTokens( address[] memory path, address _to ) internal virtual { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external virtual override ensure(deadline) { } function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable virtual override ensure(deadline) { } function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external virtual override ensure(deadline) { } // **** LIBRARY FUNCTIONS **** function quote( uint256 amountA, uint256 reserveA, uint256 reserveB ) public pure virtual override returns (uint256 amountB) { } function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) public pure virtual override returns (uint256 amountOut) { } function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) public pure virtual override returns (uint256 amountIn) { } function getAmountsOut(uint256 amountIn, address[] memory path) public view virtual override returns (uint256[] memory amounts) { } function getAmountsIn(uint256 amountOut, address[] memory path) public view virtual override returns (uint256[] memory amounts) { } }
amounts[0]+tax<=msg.value,"SojoswapRouter: EXCESSIVE_INPUT_AMOUNT"
430,299
amounts[0]+tax<=msg.value
"You have already minted your limit"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.17 <0.9.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract RedRexOG721A is DefaultOperatorFilterer, ERC721A, ReentrancyGuard, Ownable { using Strings for uint256; bytes32 public merkleRoot; mapping(address => uint256) public preMinted; mapping(address => uint256) public publicMinted; string public uriPrefix; string public uriSuffix = ""; string public uriContract; uint256 public maxSupply = 10000; uint256 public preMintTxLimit = 1; uint256 public publicMintTxLimit = 1; uint256 public maxPreMintAmount = 1; uint256 public maxPublicMintAmount = 1; uint256 public maxInternalMintAmount = 150; bool public preMintPaused = true; bool public paused = true; constructor(bytes32 _merkleRoot, address[] memory _internalAccounts, string memory _prefix, string memory _contractURI) ERC721A("RedRex OG Pass", "REXOG") { } modifier publicMintCompliance(uint256 _mintAmount) { uint256 requestedAmount = totalSupply() + _mintAmount; require(_mintAmount > 0 && _mintAmount <= publicMintTxLimit, "You have exceeded the limit of mints per transaction"); require(<FILL_ME>) require(requestedAmount <= maxSupply, "SOLD OUT"); require(!paused, "Minting is not currently allowed!"); _; } modifier preMintCompliance(uint256 _mintAmount) { } modifier airDropCompliance(uint256 _mintAmount) { } function preMint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public preMintCompliance(_mintAmount) nonReentrant { } function mint(uint256 _mintAmount) public publicMintCompliance(_mintAmount) nonReentrant { } function airDrop(uint256 _mintAmount, address _receiver) public airDropCompliance(_mintAmount) onlyOwner nonReentrant { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setPreMintTxLimit(uint256 _preMintTxLimit) public onlyOwner { } function setPublicMintTxLimit(uint256 _publicMintTxLimit) public onlyOwner { } function setMaxPreMintAmount(uint256 _maxPreMintAmount) public onlyOwner { } function setMaxPublicMintAmount(uint256 _maxPublicMintAmount) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setPreMintPaused(bool _state) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function contractURI() public view returns (string memory) { } function setContractURI(string memory _contractURI) public onlyOwner { } function withdraw() public onlyOwner nonReentrant{ } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } }
publicMinted[msg.sender]+_mintAmount<=maxPublicMintAmount,"You have already minted your limit"
430,375
publicMinted[msg.sender]+_mintAmount<=maxPublicMintAmount
"You are not on the whitelist or have already used your whitelist mint"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.17 <0.9.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract RedRexOG721A is DefaultOperatorFilterer, ERC721A, ReentrancyGuard, Ownable { using Strings for uint256; bytes32 public merkleRoot; mapping(address => uint256) public preMinted; mapping(address => uint256) public publicMinted; string public uriPrefix; string public uriSuffix = ""; string public uriContract; uint256 public maxSupply = 10000; uint256 public preMintTxLimit = 1; uint256 public publicMintTxLimit = 1; uint256 public maxPreMintAmount = 1; uint256 public maxPublicMintAmount = 1; uint256 public maxInternalMintAmount = 150; bool public preMintPaused = true; bool public paused = true; constructor(bytes32 _merkleRoot, address[] memory _internalAccounts, string memory _prefix, string memory _contractURI) ERC721A("RedRex OG Pass", "REXOG") { } modifier publicMintCompliance(uint256 _mintAmount) { } modifier preMintCompliance(uint256 _mintAmount) { uint256 requestedAmount = totalSupply() + _mintAmount; require(_mintAmount > 0 && _mintAmount <= preMintTxLimit, "You have exceeded the limit of mints per transaction"); require(<FILL_ME>) require(requestedAmount <= maxSupply, "SOLD OUT"); require(!preMintPaused, "Minting is not currently allowed!"); _; } modifier airDropCompliance(uint256 _mintAmount) { } function preMint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public preMintCompliance(_mintAmount) nonReentrant { } function mint(uint256 _mintAmount) public publicMintCompliance(_mintAmount) nonReentrant { } function airDrop(uint256 _mintAmount, address _receiver) public airDropCompliance(_mintAmount) onlyOwner nonReentrant { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setPreMintTxLimit(uint256 _preMintTxLimit) public onlyOwner { } function setPublicMintTxLimit(uint256 _publicMintTxLimit) public onlyOwner { } function setMaxPreMintAmount(uint256 _maxPreMintAmount) public onlyOwner { } function setMaxPublicMintAmount(uint256 _maxPublicMintAmount) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setPreMintPaused(bool _state) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function contractURI() public view returns (string memory) { } function setContractURI(string memory _contractURI) public onlyOwner { } function withdraw() public onlyOwner nonReentrant{ } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } }
preMinted[msg.sender]+_mintAmount<=maxPreMintAmount,"You are not on the whitelist or have already used your whitelist mint"
430,375
preMinted[msg.sender]+_mintAmount<=maxPreMintAmount
"Minting is not currently allowed!"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.17 <0.9.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract RedRexOG721A is DefaultOperatorFilterer, ERC721A, ReentrancyGuard, Ownable { using Strings for uint256; bytes32 public merkleRoot; mapping(address => uint256) public preMinted; mapping(address => uint256) public publicMinted; string public uriPrefix; string public uriSuffix = ""; string public uriContract; uint256 public maxSupply = 10000; uint256 public preMintTxLimit = 1; uint256 public publicMintTxLimit = 1; uint256 public maxPreMintAmount = 1; uint256 public maxPublicMintAmount = 1; uint256 public maxInternalMintAmount = 150; bool public preMintPaused = true; bool public paused = true; constructor(bytes32 _merkleRoot, address[] memory _internalAccounts, string memory _prefix, string memory _contractURI) ERC721A("RedRex OG Pass", "REXOG") { } modifier publicMintCompliance(uint256 _mintAmount) { } modifier preMintCompliance(uint256 _mintAmount) { uint256 requestedAmount = totalSupply() + _mintAmount; require(_mintAmount > 0 && _mintAmount <= preMintTxLimit, "You have exceeded the limit of mints per transaction"); require(preMinted[msg.sender] + _mintAmount <= maxPreMintAmount, "You are not on the whitelist or have already used your whitelist mint"); require(requestedAmount <= maxSupply, "SOLD OUT"); require(<FILL_ME>) _; } modifier airDropCompliance(uint256 _mintAmount) { } function preMint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public preMintCompliance(_mintAmount) nonReentrant { } function mint(uint256 _mintAmount) public publicMintCompliance(_mintAmount) nonReentrant { } function airDrop(uint256 _mintAmount, address _receiver) public airDropCompliance(_mintAmount) onlyOwner nonReentrant { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setPreMintTxLimit(uint256 _preMintTxLimit) public onlyOwner { } function setPublicMintTxLimit(uint256 _publicMintTxLimit) public onlyOwner { } function setMaxPreMintAmount(uint256 _maxPreMintAmount) public onlyOwner { } function setMaxPublicMintAmount(uint256 _maxPublicMintAmount) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setPreMintPaused(bool _state) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function contractURI() public view returns (string memory) { } function setContractURI(string memory _contractURI) public onlyOwner { } function withdraw() public onlyOwner nonReentrant{ } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } }
!preMintPaused,"Minting is not currently allowed!"
430,375
!preMintPaused
'Not on allowlist'
// SPDX-License-Identifier: GPL-3.0 // The Wildxyz auctionhouse.sol // AuctionHouse.sol is a modified version of the original code from the // NounsAuctionHouse.sol which is a modified version of Zora's AuctionHouse.sol: // https://github.com/ourzora/auction-house/ // licensed under the GPL-3.0 license. pragma solidity ^0.8.17; import './Pausable.sol'; import './ReentrancyGuard.sol'; import './Ownable.sol'; import './WildNFT.sol'; import './IAuctionHouse.sol'; contract AuctionHouse is IAuctionHouse, Pausable, ReentrancyGuard, Ownable { // auction variables uint256 public allowlistMintMax = 2; // max number of tokens per allowlist mint uint256 public timeBuffer = 120; // min amount of time left in an auction after last bid uint256 public minimumBid = .1 ether; // The minimum price accepted in an auction uint256 public minBidIncrement = .01 ether; // The minimum amount by which a bid must exceed the current highest bid uint256 public allowListPrice = .1 ether; // The allowlist price uint256 public duration = 86400; // 86400 == 1 day The duration of a single auction in seconds address payable public payee; // The address that receives funds from the auction uint256 public raffleSupply = 2; // max number of raffle winners uint256 public auctionSupply = 13; // number of auction supply max of raffle ticket uint256 public allowlistSupply = 59; // number allowlist supply uint256 public maxSupply = 103; // max supply uint256 public promoSupply = 29; // promo supply uint256 public oasisListStartDateTime = 1679421600; //oasislistStartDate 11AM PST 2023-02-28 uint256 public allowListStartDateTime = 1679425200; //allowListStartDateTime uint256 public allowListEndDateTime = 1679468400; //allowListEndDateTime uint256 public auctionStartDateTime = 1679468400; //==allowListEndDateTime; uint256 public auctionEndDateTime = 1679511600; //auctionEndDateTime uint256 public auctionExtentedTime = 0; bool public auctionWinnersSet = false; bool public raffleWinnersSet = false; bool public auctionSettled = false; bool public settled = false; bool public publicSale = false; // allowlist mapping 1=oasis;2=allowlist;0=not on list mapping(address => uint8) public allowList; WildNFT public nft; // Only allow the auction functions to be active when not paused modifier onlyUnpaused() { } // Bids Struct struct Bid { address payable bidder; // The address of the bidder uint256 amount; // The amount of the bid bool minted; // has the bid been minted uint256 timestamp; // timestamp of the bid bool refunded; // refund difference between winning_bid and max_bid for winner; and all for losers bool winner; // is the bid the winner uint256 finalprice; // if won, what price won at } // mapping of Bid structs mapping(address => Bid) public Bids; constructor(WildNFT _nft, address _payee) { } /* ADMIN VARIABLE SETTERS FUNCTIONS */ // set the 721 contract address function set721ContractAddress(WildNFT _nft) public onlyOwner { } function setAuctionSupply(uint256 _newAuctionSupply) public onlyOwner { } function setPromoSupply(uint256 _newPromoSupply) public onlyOwner { } function addToAllowList(address[] memory _addresses, uint8 _state) public onlyOwner { } function removeFromAllowList(address[] memory _addresses) public onlyOwner { } function setAllowlistMintMax(uint256 _newAllowlistMintMax) public onlyOwner { } function setOasislistStartDateTime(uint256 _newOasislistStartDateTime) public onlyOwner { } function setAuctionStartDateTime(uint256 _newAuctionStartDateTime) public onlyOwner { } function setAuctionEndDateTime(uint256 _newAuctionEndDateTime) public onlyOwner { } function setAllowListStartDateTime(uint256 _newAllowListStartDateTime) public onlyOwner { } function setAllowListEndDateTime(uint256 _newAllowListEndDateTime) public onlyOwner { } function setPublicSale() public onlyOwner { } function setRaffleSupply(uint256 _newRaffleSupply) public onlyOwner { } function setMaxSupply(uint256 _newMaxSupply) public onlyOwner { } // set the time buffer function setTimeBuffer(uint256 _timeBuffer) external onlyOwner override { } // set the minimum bid function setMinimumBid(uint256 _minimumBid) external onlyOwner { } // set min bid incr function setMinBidIncrement(uint256 _minBidIncrement) external onlyOwner { } // set the duration function setDuration(uint256 _duration) external onlyOwner override { } // airdrop mint function promoMint(address _to, uint256 _qty) external onlyOwner { } // airdrop batch mint; sends 1 to each address in array function promoBatchMint(address[] memory _to) external onlyOwner { } // allowlist mint function allowlistMint(uint256 _qty) payable external { require(<FILL_ME>) require(_qty <= allowlistMintMax, 'Qty exceeds max allowed.'); require(msg.value >= allowListPrice * _qty, 'Not enough ETH sent'); require(allowlistSupply - _qty >= 0, 'No more allowlist supply'); if (allowList[msg.sender] == 1) { require( block.timestamp >= oasisListStartDateTime && block.timestamp <= allowListEndDateTime, 'Outside Oasis allowlist window' ); } else if (allowList[msg.sender] == 2) { require( block.timestamp >= allowListStartDateTime && block.timestamp <= allowListEndDateTime, 'Outside allowlist window' ); } for (uint256 i = 0; i < _qty; i++) { nft.mint(msg.sender); allowlistSupply--; } allowList[msg.sender] = 0; auctionSupply = maxSupply - nft.totalSupply() - raffleSupply; emit AllowlistMint(msg.sender); } // pause function pause() external onlyOwner override { } // unpause function unpause() external onlyOwner override { } // withdraw function withdraw() public onlyOwner { } // update payee for withdraw function setPayee(address payable _payee) public onlyOwner { } /* END ADMIN VARIABLE SETTERS FUNCTIONS */ // UNIVERSAL GETTER FOR AUCTION-RELATED VARIABLES function getAuctionInfo() public view returns ( uint256 _auctionSupply, uint256 _auctionStartDateTime, uint256 _auctionEndDateTime, uint256 _auctionExtentedTime, bool _auctionWinnersSet, bool _auctionSettled, bool _settled, uint256 _timeBuffer, uint256 _duration, uint256 _minimumBid, uint256 _minBidIncrement ) { } // UNIVERSAL GETTER FOR ALLOWLIST AND RAFFLE-RELATED VARIABLES function getAllowlistAndRaffleInfo() public view returns ( uint256 _raffleSupply, uint256 _allowListPrice, uint256 _allowListStartDateTime, uint256 _allowListEndDateTime, bool _raffleWinnersSet, bool _publicSale, uint256 _allowlistSupply, uint256 _totalMinted, uint256 _oasislistStartDateTime, uint256 _allowlistMintMax ) { } /* PUBLIC FUNCTIONS */ // Creates bids for the current auction function createBid() external payable nonReentrant onlyUnpaused { } function publicSaleMint() public payable nonReentrant onlyUnpaused { } /* END PUBLIC FUNCTIONS */ /* END OF AUCTION FUNCTIONS */ function setRaffleWinners(address[] memory _raffleWinners) external onlyOwner { } function setAuctionWinners(address[] memory _auctionWinners, uint256[] memory _prices) external onlyOwner { } /** * Settle an auction, finalizing the bid and paying out to the owner. * If there are no bids, the Oasis is burned. */ function settleBidder(address[] memory _bidders) external onlyOwner nonReentrant { } function setAuctionSettled() external onlyOwner { } function setTimes(uint256 allowListStart, uint256 _duration) public onlyOwner{ } function setAllowListPrice (uint256 _allowListPrice) public onlyOwner { } /** * Transfer ETH and return the success status. * This function only forwards 30,000 gas to the callee. */ function _safeTransferETH(address to, uint256 value) internal returns (bool) { } }
allowList[msg.sender]>0,'Not on allowlist'
430,416
allowList[msg.sender]>0
'No more allowlist supply'
// SPDX-License-Identifier: GPL-3.0 // The Wildxyz auctionhouse.sol // AuctionHouse.sol is a modified version of the original code from the // NounsAuctionHouse.sol which is a modified version of Zora's AuctionHouse.sol: // https://github.com/ourzora/auction-house/ // licensed under the GPL-3.0 license. pragma solidity ^0.8.17; import './Pausable.sol'; import './ReentrancyGuard.sol'; import './Ownable.sol'; import './WildNFT.sol'; import './IAuctionHouse.sol'; contract AuctionHouse is IAuctionHouse, Pausable, ReentrancyGuard, Ownable { // auction variables uint256 public allowlistMintMax = 2; // max number of tokens per allowlist mint uint256 public timeBuffer = 120; // min amount of time left in an auction after last bid uint256 public minimumBid = .1 ether; // The minimum price accepted in an auction uint256 public minBidIncrement = .01 ether; // The minimum amount by which a bid must exceed the current highest bid uint256 public allowListPrice = .1 ether; // The allowlist price uint256 public duration = 86400; // 86400 == 1 day The duration of a single auction in seconds address payable public payee; // The address that receives funds from the auction uint256 public raffleSupply = 2; // max number of raffle winners uint256 public auctionSupply = 13; // number of auction supply max of raffle ticket uint256 public allowlistSupply = 59; // number allowlist supply uint256 public maxSupply = 103; // max supply uint256 public promoSupply = 29; // promo supply uint256 public oasisListStartDateTime = 1679421600; //oasislistStartDate 11AM PST 2023-02-28 uint256 public allowListStartDateTime = 1679425200; //allowListStartDateTime uint256 public allowListEndDateTime = 1679468400; //allowListEndDateTime uint256 public auctionStartDateTime = 1679468400; //==allowListEndDateTime; uint256 public auctionEndDateTime = 1679511600; //auctionEndDateTime uint256 public auctionExtentedTime = 0; bool public auctionWinnersSet = false; bool public raffleWinnersSet = false; bool public auctionSettled = false; bool public settled = false; bool public publicSale = false; // allowlist mapping 1=oasis;2=allowlist;0=not on list mapping(address => uint8) public allowList; WildNFT public nft; // Only allow the auction functions to be active when not paused modifier onlyUnpaused() { } // Bids Struct struct Bid { address payable bidder; // The address of the bidder uint256 amount; // The amount of the bid bool minted; // has the bid been minted uint256 timestamp; // timestamp of the bid bool refunded; // refund difference between winning_bid and max_bid for winner; and all for losers bool winner; // is the bid the winner uint256 finalprice; // if won, what price won at } // mapping of Bid structs mapping(address => Bid) public Bids; constructor(WildNFT _nft, address _payee) { } /* ADMIN VARIABLE SETTERS FUNCTIONS */ // set the 721 contract address function set721ContractAddress(WildNFT _nft) public onlyOwner { } function setAuctionSupply(uint256 _newAuctionSupply) public onlyOwner { } function setPromoSupply(uint256 _newPromoSupply) public onlyOwner { } function addToAllowList(address[] memory _addresses, uint8 _state) public onlyOwner { } function removeFromAllowList(address[] memory _addresses) public onlyOwner { } function setAllowlistMintMax(uint256 _newAllowlistMintMax) public onlyOwner { } function setOasislistStartDateTime(uint256 _newOasislistStartDateTime) public onlyOwner { } function setAuctionStartDateTime(uint256 _newAuctionStartDateTime) public onlyOwner { } function setAuctionEndDateTime(uint256 _newAuctionEndDateTime) public onlyOwner { } function setAllowListStartDateTime(uint256 _newAllowListStartDateTime) public onlyOwner { } function setAllowListEndDateTime(uint256 _newAllowListEndDateTime) public onlyOwner { } function setPublicSale() public onlyOwner { } function setRaffleSupply(uint256 _newRaffleSupply) public onlyOwner { } function setMaxSupply(uint256 _newMaxSupply) public onlyOwner { } // set the time buffer function setTimeBuffer(uint256 _timeBuffer) external onlyOwner override { } // set the minimum bid function setMinimumBid(uint256 _minimumBid) external onlyOwner { } // set min bid incr function setMinBidIncrement(uint256 _minBidIncrement) external onlyOwner { } // set the duration function setDuration(uint256 _duration) external onlyOwner override { } // airdrop mint function promoMint(address _to, uint256 _qty) external onlyOwner { } // airdrop batch mint; sends 1 to each address in array function promoBatchMint(address[] memory _to) external onlyOwner { } // allowlist mint function allowlistMint(uint256 _qty) payable external { require(allowList[msg.sender] > 0, 'Not on allowlist'); require(_qty <= allowlistMintMax, 'Qty exceeds max allowed.'); require(msg.value >= allowListPrice * _qty, 'Not enough ETH sent'); require(<FILL_ME>) if (allowList[msg.sender] == 1) { require( block.timestamp >= oasisListStartDateTime && block.timestamp <= allowListEndDateTime, 'Outside Oasis allowlist window' ); } else if (allowList[msg.sender] == 2) { require( block.timestamp >= allowListStartDateTime && block.timestamp <= allowListEndDateTime, 'Outside allowlist window' ); } for (uint256 i = 0; i < _qty; i++) { nft.mint(msg.sender); allowlistSupply--; } allowList[msg.sender] = 0; auctionSupply = maxSupply - nft.totalSupply() - raffleSupply; emit AllowlistMint(msg.sender); } // pause function pause() external onlyOwner override { } // unpause function unpause() external onlyOwner override { } // withdraw function withdraw() public onlyOwner { } // update payee for withdraw function setPayee(address payable _payee) public onlyOwner { } /* END ADMIN VARIABLE SETTERS FUNCTIONS */ // UNIVERSAL GETTER FOR AUCTION-RELATED VARIABLES function getAuctionInfo() public view returns ( uint256 _auctionSupply, uint256 _auctionStartDateTime, uint256 _auctionEndDateTime, uint256 _auctionExtentedTime, bool _auctionWinnersSet, bool _auctionSettled, bool _settled, uint256 _timeBuffer, uint256 _duration, uint256 _minimumBid, uint256 _minBidIncrement ) { } // UNIVERSAL GETTER FOR ALLOWLIST AND RAFFLE-RELATED VARIABLES function getAllowlistAndRaffleInfo() public view returns ( uint256 _raffleSupply, uint256 _allowListPrice, uint256 _allowListStartDateTime, uint256 _allowListEndDateTime, bool _raffleWinnersSet, bool _publicSale, uint256 _allowlistSupply, uint256 _totalMinted, uint256 _oasislistStartDateTime, uint256 _allowlistMintMax ) { } /* PUBLIC FUNCTIONS */ // Creates bids for the current auction function createBid() external payable nonReentrant onlyUnpaused { } function publicSaleMint() public payable nonReentrant onlyUnpaused { } /* END PUBLIC FUNCTIONS */ /* END OF AUCTION FUNCTIONS */ function setRaffleWinners(address[] memory _raffleWinners) external onlyOwner { } function setAuctionWinners(address[] memory _auctionWinners, uint256[] memory _prices) external onlyOwner { } /** * Settle an auction, finalizing the bid and paying out to the owner. * If there are no bids, the Oasis is burned. */ function settleBidder(address[] memory _bidders) external onlyOwner nonReentrant { } function setAuctionSettled() external onlyOwner { } function setTimes(uint256 allowListStart, uint256 _duration) public onlyOwner{ } function setAllowListPrice (uint256 _allowListPrice) public onlyOwner { } /** * Transfer ETH and return the success status. * This function only forwards 30,000 gas to the callee. */ function _safeTransferETH(address to, uint256 value) internal returns (bool) { } }
allowlistSupply-_qty>=0,'No more allowlist supply'
430,416
allowlistSupply-_qty>=0
null
// SPDX-License-Identifier: GPL-3.0 // The Wildxyz auctionhouse.sol // AuctionHouse.sol is a modified version of the original code from the // NounsAuctionHouse.sol which is a modified version of Zora's AuctionHouse.sol: // https://github.com/ourzora/auction-house/ // licensed under the GPL-3.0 license. pragma solidity ^0.8.17; import './Pausable.sol'; import './ReentrancyGuard.sol'; import './Ownable.sol'; import './WildNFT.sol'; import './IAuctionHouse.sol'; contract AuctionHouse is IAuctionHouse, Pausable, ReentrancyGuard, Ownable { // auction variables uint256 public allowlistMintMax = 2; // max number of tokens per allowlist mint uint256 public timeBuffer = 120; // min amount of time left in an auction after last bid uint256 public minimumBid = .1 ether; // The minimum price accepted in an auction uint256 public minBidIncrement = .01 ether; // The minimum amount by which a bid must exceed the current highest bid uint256 public allowListPrice = .1 ether; // The allowlist price uint256 public duration = 86400; // 86400 == 1 day The duration of a single auction in seconds address payable public payee; // The address that receives funds from the auction uint256 public raffleSupply = 2; // max number of raffle winners uint256 public auctionSupply = 13; // number of auction supply max of raffle ticket uint256 public allowlistSupply = 59; // number allowlist supply uint256 public maxSupply = 103; // max supply uint256 public promoSupply = 29; // promo supply uint256 public oasisListStartDateTime = 1679421600; //oasislistStartDate 11AM PST 2023-02-28 uint256 public allowListStartDateTime = 1679425200; //allowListStartDateTime uint256 public allowListEndDateTime = 1679468400; //allowListEndDateTime uint256 public auctionStartDateTime = 1679468400; //==allowListEndDateTime; uint256 public auctionEndDateTime = 1679511600; //auctionEndDateTime uint256 public auctionExtentedTime = 0; bool public auctionWinnersSet = false; bool public raffleWinnersSet = false; bool public auctionSettled = false; bool public settled = false; bool public publicSale = false; // allowlist mapping 1=oasis;2=allowlist;0=not on list mapping(address => uint8) public allowList; WildNFT public nft; // Only allow the auction functions to be active when not paused modifier onlyUnpaused() { } // Bids Struct struct Bid { address payable bidder; // The address of the bidder uint256 amount; // The amount of the bid bool minted; // has the bid been minted uint256 timestamp; // timestamp of the bid bool refunded; // refund difference between winning_bid and max_bid for winner; and all for losers bool winner; // is the bid the winner uint256 finalprice; // if won, what price won at } // mapping of Bid structs mapping(address => Bid) public Bids; constructor(WildNFT _nft, address _payee) { } /* ADMIN VARIABLE SETTERS FUNCTIONS */ // set the 721 contract address function set721ContractAddress(WildNFT _nft) public onlyOwner { } function setAuctionSupply(uint256 _newAuctionSupply) public onlyOwner { } function setPromoSupply(uint256 _newPromoSupply) public onlyOwner { } function addToAllowList(address[] memory _addresses, uint8 _state) public onlyOwner { } function removeFromAllowList(address[] memory _addresses) public onlyOwner { } function setAllowlistMintMax(uint256 _newAllowlistMintMax) public onlyOwner { } function setOasislistStartDateTime(uint256 _newOasislistStartDateTime) public onlyOwner { } function setAuctionStartDateTime(uint256 _newAuctionStartDateTime) public onlyOwner { } function setAuctionEndDateTime(uint256 _newAuctionEndDateTime) public onlyOwner { } function setAllowListStartDateTime(uint256 _newAllowListStartDateTime) public onlyOwner { } function setAllowListEndDateTime(uint256 _newAllowListEndDateTime) public onlyOwner { } function setPublicSale() public onlyOwner { } function setRaffleSupply(uint256 _newRaffleSupply) public onlyOwner { } function setMaxSupply(uint256 _newMaxSupply) public onlyOwner { } // set the time buffer function setTimeBuffer(uint256 _timeBuffer) external onlyOwner override { } // set the minimum bid function setMinimumBid(uint256 _minimumBid) external onlyOwner { } // set min bid incr function setMinBidIncrement(uint256 _minBidIncrement) external onlyOwner { } // set the duration function setDuration(uint256 _duration) external onlyOwner override { } // airdrop mint function promoMint(address _to, uint256 _qty) external onlyOwner { } // airdrop batch mint; sends 1 to each address in array function promoBatchMint(address[] memory _to) external onlyOwner { } // allowlist mint function allowlistMint(uint256 _qty) payable external { } // pause function pause() external onlyOwner override { } // unpause function unpause() external onlyOwner override { } // withdraw function withdraw() public onlyOwner { } // update payee for withdraw function setPayee(address payable _payee) public onlyOwner { } /* END ADMIN VARIABLE SETTERS FUNCTIONS */ // UNIVERSAL GETTER FOR AUCTION-RELATED VARIABLES function getAuctionInfo() public view returns ( uint256 _auctionSupply, uint256 _auctionStartDateTime, uint256 _auctionEndDateTime, uint256 _auctionExtentedTime, bool _auctionWinnersSet, bool _auctionSettled, bool _settled, uint256 _timeBuffer, uint256 _duration, uint256 _minimumBid, uint256 _minBidIncrement ) { } // UNIVERSAL GETTER FOR ALLOWLIST AND RAFFLE-RELATED VARIABLES function getAllowlistAndRaffleInfo() public view returns ( uint256 _raffleSupply, uint256 _allowListPrice, uint256 _allowListStartDateTime, uint256 _allowListEndDateTime, bool _raffleWinnersSet, bool _publicSale, uint256 _allowlistSupply, uint256 _totalMinted, uint256 _oasislistStartDateTime, uint256 _allowlistMintMax ) { } /* PUBLIC FUNCTIONS */ // Creates bids for the current auction function createBid() external payable nonReentrant onlyUnpaused { } function publicSaleMint() public payable nonReentrant onlyUnpaused { // if we didnt sell out, we can mint the remaining // for price of min bid // will error when supply is 0 // Note: 1) is the auction closed and 2) is the raffle set and // 3) if the total supply is less than the max supply, then you can allow ppl to mint // require(auctionEndDateTime < block.timestamp, "Auction not over yet."); // require(raffleWinnersSet == true, "Raffle not settled yet."); require(<FILL_ME>) require(publicSale == true, "Not authorized."); require(msg.value >= minimumBid, "Amount too low."); nft.mint(msg.sender); auctionSupply--; } /* END PUBLIC FUNCTIONS */ /* END OF AUCTION FUNCTIONS */ function setRaffleWinners(address[] memory _raffleWinners) external onlyOwner { } function setAuctionWinners(address[] memory _auctionWinners, uint256[] memory _prices) external onlyOwner { } /** * Settle an auction, finalizing the bid and paying out to the owner. * If there are no bids, the Oasis is burned. */ function settleBidder(address[] memory _bidders) external onlyOwner nonReentrant { } function setAuctionSettled() external onlyOwner { } function setTimes(uint256 allowListStart, uint256 _duration) public onlyOwner{ } function setAllowListPrice (uint256 _allowListPrice) public onlyOwner { } /** * Transfer ETH and return the success status. * This function only forwards 30,000 gas to the callee. */ function _safeTransferETH(address to, uint256 value) internal returns (bool) { } }
nft.totalSupply()<nft.maxSupply()
430,416
nft.totalSupply()<nft.maxSupply()
"same status"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.2; import "./interface/Icontroller.sol"; contract Settings { IController public controller; mapping(uint256 => uint256) public networkGas; address payable public feeRemitance; address payable public gasBank; uint256 public railRegistrationFee = 5000 * 10**18; uint256 public railOwnerFeeShare = 20; uint256 public minWithdrawableFee = 1 * 10**17; uint256 public constant minValidationPercentage = 51; uint256 public maxFeeThreshold = 1000; // this varaiable is only uint256 public ValidationPercentage = minValidationPercentage; bool public onlyOwnableRail = true; bool public updatableAssetState = true; address public brgToken; uint256[] public networkSupportedChains; uint256 public baseFeePercentage = 10; bool public baseFeeEnable; mapping(uint256 => bool) public isNetworkSupportedChain; mapping(address => mapping(address => bool)) public approvedToAdd; event ApprovedToAdd( address indexed token, address indexed user, bool status ); event MinValidationPercentageUpdated( uint256 prevMinValidationPercentage, uint256 newMinValidationPercentage ); event BrdgTokenUpdated(address indexed prevValue, address indexed newValue); event minWithdrawableFeeUpdated(uint256 prevValue, uint256 newValue); event FeeRemitanceAddressUpdated( address indexed prevValue, address indexed newValue ); event GasBankUpdated(address indexed prevValue, address indexed newValue); event RailRegistrationFeeUpdated(uint256 prevValue, uint256 newValue); event RailOwnerFeeShareUpdated(uint256 prevValue, uint256 newValue); event NetworkGasUpdated( uint256 chainId, uint256 prevValue, uint256 newValue ); event BaseFeePercentageUpdated(uint256 prevValue, uint256 newValue); event NetworkSupportedChainsUpdated(uint256[] chains, bool isadded); event UpdatableAssetStateChanged(bool status); event OnlyOwnableRailStateEnabled(bool status); event BaseFeeStatusChanged(bool baseFeeEnable); constructor( IController _controller, address payable _feeRemitance, address payable _gasBank ) { } function setApprovedToAdd(address user, address token, bool status) external { onlyAdmin(); require(<FILL_ME>) emit ApprovedToAdd(token, user, status); approvedToAdd[token][user] = status; } function setMinValidationPercentage(uint256 _ValidationPercentage) external { } function setbaseFeePercentage(uint256 _base) external { } function enableBaseFee() external { } function setbrgToken(address token) external { } function setminWithdrawableFee(uint256 _minWithdrawableFee) external { } function setNetworkSupportedChains( uint256[] memory chains, uint256[] memory fees, bool addchain ) external { } function updateNetworkGas(uint256 chainId, uint256 fee) external { } function setRailOwnerFeeShare(uint256 share) external { } function setUpdatableAssetState(bool status) external { } function setOnlyOwnableRailState(bool status) external { } function setrailRegistrationFee(uint256 registrationFee) external { } function setFeeRemitanceAddress(address payable account) external { } function setGasBank(address payable _gasBank) external { } function onlyAdmin() internal view { } function minValidations() external view returns (uint256 minvalidation) { } function getNetworkSupportedChains() external view returns (uint256[] memory) { } function getChainId() internal view returns (uint256 id) { } }
approvedToAdd[token][user]!=status,"same status"
430,509
approvedToAdd[token][user]!=status
"not Supported"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.2; import "./interface/Icontroller.sol"; contract Settings { IController public controller; mapping(uint256 => uint256) public networkGas; address payable public feeRemitance; address payable public gasBank; uint256 public railRegistrationFee = 5000 * 10**18; uint256 public railOwnerFeeShare = 20; uint256 public minWithdrawableFee = 1 * 10**17; uint256 public constant minValidationPercentage = 51; uint256 public maxFeeThreshold = 1000; // this varaiable is only uint256 public ValidationPercentage = minValidationPercentage; bool public onlyOwnableRail = true; bool public updatableAssetState = true; address public brgToken; uint256[] public networkSupportedChains; uint256 public baseFeePercentage = 10; bool public baseFeeEnable; mapping(uint256 => bool) public isNetworkSupportedChain; mapping(address => mapping(address => bool)) public approvedToAdd; event ApprovedToAdd( address indexed token, address indexed user, bool status ); event MinValidationPercentageUpdated( uint256 prevMinValidationPercentage, uint256 newMinValidationPercentage ); event BrdgTokenUpdated(address indexed prevValue, address indexed newValue); event minWithdrawableFeeUpdated(uint256 prevValue, uint256 newValue); event FeeRemitanceAddressUpdated( address indexed prevValue, address indexed newValue ); event GasBankUpdated(address indexed prevValue, address indexed newValue); event RailRegistrationFeeUpdated(uint256 prevValue, uint256 newValue); event RailOwnerFeeShareUpdated(uint256 prevValue, uint256 newValue); event NetworkGasUpdated( uint256 chainId, uint256 prevValue, uint256 newValue ); event BaseFeePercentageUpdated(uint256 prevValue, uint256 newValue); event NetworkSupportedChainsUpdated(uint256[] chains, bool isadded); event UpdatableAssetStateChanged(bool status); event OnlyOwnableRailStateEnabled(bool status); event BaseFeeStatusChanged(bool baseFeeEnable); constructor( IController _controller, address payable _feeRemitance, address payable _gasBank ) { } function setApprovedToAdd(address user, address token, bool status) external { } function setMinValidationPercentage(uint256 _ValidationPercentage) external { } function setbaseFeePercentage(uint256 _base) external { } function enableBaseFee() external { } function setbrgToken(address token) external { } function setminWithdrawableFee(uint256 _minWithdrawableFee) external { } function setNetworkSupportedChains( uint256[] memory chains, uint256[] memory fees, bool addchain ) external { } function updateNetworkGas(uint256 chainId, uint256 fee) external { onlyAdmin(); require(fee != networkGas[chainId], "sameVal"); require(<FILL_ME>) emit NetworkGasUpdated(chainId, networkGas[chainId], fee); networkGas[chainId] = fee; } function setRailOwnerFeeShare(uint256 share) external { } function setUpdatableAssetState(bool status) external { } function setOnlyOwnableRailState(bool status) external { } function setrailRegistrationFee(uint256 registrationFee) external { } function setFeeRemitanceAddress(address payable account) external { } function setGasBank(address payable _gasBank) external { } function onlyAdmin() internal view { } function minValidations() external view returns (uint256 minvalidation) { } function getNetworkSupportedChains() external view returns (uint256[] memory) { } function getChainId() internal view returns (uint256 id) { } }
isNetworkSupportedChain[chainId],"not Supported"
430,509
isNetworkSupportedChain[chainId]
"U_A"
// SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.2; import "./interface/Icontroller.sol"; contract Settings { IController public controller; mapping(uint256 => uint256) public networkGas; address payable public feeRemitance; address payable public gasBank; uint256 public railRegistrationFee = 5000 * 10**18; uint256 public railOwnerFeeShare = 20; uint256 public minWithdrawableFee = 1 * 10**17; uint256 public constant minValidationPercentage = 51; uint256 public maxFeeThreshold = 1000; // this varaiable is only uint256 public ValidationPercentage = minValidationPercentage; bool public onlyOwnableRail = true; bool public updatableAssetState = true; address public brgToken; uint256[] public networkSupportedChains; uint256 public baseFeePercentage = 10; bool public baseFeeEnable; mapping(uint256 => bool) public isNetworkSupportedChain; mapping(address => mapping(address => bool)) public approvedToAdd; event ApprovedToAdd( address indexed token, address indexed user, bool status ); event MinValidationPercentageUpdated( uint256 prevMinValidationPercentage, uint256 newMinValidationPercentage ); event BrdgTokenUpdated(address indexed prevValue, address indexed newValue); event minWithdrawableFeeUpdated(uint256 prevValue, uint256 newValue); event FeeRemitanceAddressUpdated( address indexed prevValue, address indexed newValue ); event GasBankUpdated(address indexed prevValue, address indexed newValue); event RailRegistrationFeeUpdated(uint256 prevValue, uint256 newValue); event RailOwnerFeeShareUpdated(uint256 prevValue, uint256 newValue); event NetworkGasUpdated( uint256 chainId, uint256 prevValue, uint256 newValue ); event BaseFeePercentageUpdated(uint256 prevValue, uint256 newValue); event NetworkSupportedChainsUpdated(uint256[] chains, bool isadded); event UpdatableAssetStateChanged(bool status); event OnlyOwnableRailStateEnabled(bool status); event BaseFeeStatusChanged(bool baseFeeEnable); constructor( IController _controller, address payable _feeRemitance, address payable _gasBank ) { } function setApprovedToAdd(address user, address token, bool status) external { } function setMinValidationPercentage(uint256 _ValidationPercentage) external { } function setbaseFeePercentage(uint256 _base) external { } function enableBaseFee() external { } function setbrgToken(address token) external { } function setminWithdrawableFee(uint256 _minWithdrawableFee) external { } function setNetworkSupportedChains( uint256[] memory chains, uint256[] memory fees, bool addchain ) external { } function updateNetworkGas(uint256 chainId, uint256 fee) external { } function setRailOwnerFeeShare(uint256 share) external { } function setUpdatableAssetState(bool status) external { } function setOnlyOwnableRailState(bool status) external { } function setrailRegistrationFee(uint256 registrationFee) external { } function setFeeRemitanceAddress(address payable account) external { } function setGasBank(address payable _gasBank) external { } function onlyAdmin() internal view { require(<FILL_ME>) } function minValidations() external view returns (uint256 minvalidation) { } function getNetworkSupportedChains() external view returns (uint256[] memory) { } function getChainId() internal view returns (uint256 id) { } }
controller.isAdmin(msg.sender)||msg.sender==controller.owner(),"U_A"
430,509
controller.isAdmin(msg.sender)||msg.sender==controller.owner()
"Contract spender not whitelisted"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../interfaces/IWETH.sol"; import "../interfaces/IRango.sol"; /// @title BaseSwapper /// @author 0xiden /// @notice library to provide swap functionality library LibSwapper { /// @dev keccak256("exchange.rango.library.swapper") bytes32 internal constant BASE_SWAPPER_NAMESPACE = hex"43da06808a8e54e76a41d6f7b48ddfb23969b1387a8710ef6241423a5aefe64a"; address payable constant ETH = payable(0x0000000000000000000000000000000000000000); struct BaseSwapperStorage { address payable feeContractAddress; address WETH; mapping(address => bool) whitelistContracts; mapping(address => mapping(bytes4 => bool)) whitelistMethods; } /// @notice Emitted if any fee transfer was required /// @param token The address of received token, address(0) for native /// @param affiliatorAddress The address of affiliate wallet /// @param platformFee The amount received as platform fee /// @param destinationExecutorFee The amount received to execute transaction on destination (only for cross chain txs) /// @param affiliateFee The amount received by affiliate /// @param dAppTag Optional identifier to make tracking easier. event FeeInfo( address token, address indexed affiliatorAddress, uint platformFee, uint destinationExecutorFee, uint affiliateFee, uint16 indexed dAppTag ); /// @notice A call to another dex or contract done and here is the result /// @param target The address of dex or contract that is called /// @param success A boolean indicating that the call was success or not /// @param returnData The response of function call event CallResult(address target, bool success, bytes returnData); /// @notice A swap request is done and we also emit the output /// @param requestId Optional parameter to make tracking of transaction easier /// @param fromToken Input token address to be swapped from /// @param toToken Output token address to be swapped to /// @param amountIn Input amount of fromToken that is being swapped /// @param dAppTag Optional identifier to make tracking easier /// @param outputAmount The output amount of the swap, measured by the balance change before and after the swap /// @param receiver The address to receive the output of swap. Can be address(0) when swap is before a bridge action event RangoSwap( address indexed requestId, address fromToken, address toToken, uint amountIn, uint minimumAmountExpected, uint16 indexed dAppTag, uint outputAmount, address receiver ); /// @notice Output amount of a dex calls is logged /// @param _token The address of output token, ZERO address for native /// @param amount The amount of output event DexOutput(address _token, uint amount); /// @notice The output money (ERC20/Native) is sent to a wallet /// @param _token The token that is sent to a wallet, ZERO address for native /// @param _amount The sent amount /// @param _receiver The receiver wallet address event SendToken(address _token, uint256 _amount, address _receiver); /// @notice Notifies that Rango's fee receiver address updated /// @param _oldAddress The previous fee wallet address /// @param _newAddress The new fee wallet address event FeeContractAddressUpdated(address _oldAddress, address _newAddress); /// @notice Notifies that WETH address is updated /// @param _oldAddress The previous weth address /// @param _newAddress The new weth address event WethContractAddressUpdated(address _oldAddress, address _newAddress); /// @notice Notifies that admin manually refunded some money /// @param _token The address of refunded token, 0x000..00 address for native token /// @param _amount The amount that is refunded event Refunded(address _token, uint _amount); /// @notice The requested call data which is computed off-chain and passed to the contract /// @dev swapFromToken and amount parameters are only helper params and the actual amount and /// token are set in callData /// @param spender The contract which the approval is given to if swapFromToken is not native. /// @param target The dex contract address that should be called /// @param swapFromToken Token address of to be used in the swap. /// @param amount The amount to be approved or native amount sent. /// @param callData The required data field that should be give to the dex contract to perform swap struct Call { address spender; address payable target; address swapFromToken; address swapToToken; bool needsTransferFromUser; uint amount; bytes callData; } /// @notice General swap request which is given to us in all relevant functions /// @param requestId The request id passed to make tracking transactions easier /// @param fromToken The source token that is going to be swapped (in case of simple swap or swap + bridge) or the briding token (in case of solo bridge) /// @param toToken The output token of swapping. This is the output of DEX step and is also input of bridging step /// @param amountIn The amount of input token to be swapped /// @param platformFee The amount of fee charged by platform /// @param destinationExecutorFee The amount of fee required for relayer execution on the destination /// @param affiliateFee The amount of fee charged by affiliator dApp /// @param affiliatorAddress The wallet address that the affiliator fee should be sent to /// @param minimumAmountExpected The minimum amount of toToken expected after executing Calls /// @param dAppTag An optional parameter struct SwapRequest { address requestId; address fromToken; address toToken; uint amountIn; uint platformFee; uint destinationExecutorFee; uint affiliateFee; address payable affiliatorAddress; uint minimumAmountExpected; uint16 dAppTag; } /// @notice initializes the base swapper and sets the init params (such as Wrapped token address) /// @param _weth Address of wrapped token (WETH, WBNB, etc.) on the current chain function setWeth(address _weth) internal { } /// @notice Sets the wallet that receives Rango's fees from now on /// @param _address The receiver wallet address function updateFeeContractAddress(address payable _address) internal { } /// Whitelist /// /// @notice Adds a contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX function addWhitelist(address contractAddress) internal { } /// @notice Adds a method of contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX /// @param methodIds The method of the DEX function addMethodWhitelists(address contractAddress, bytes4[] calldata methodIds) internal { } /// @notice Adds a method of contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX /// @param methodId The method of the DEX function addMethodWhitelist(address contractAddress, bytes4 methodId) internal { } /// @notice Removes a contract from the whitelisted DEXes /// @param contractAddress The address of the DEX or dApp function removeWhitelist(address contractAddress) internal { } /// @notice Removes a method of contract from the whitelisted DEXes /// @param contractAddress The address of the DEX or dApp /// @param methodId The method of the DEX function removeMethodWhitelist(address contractAddress, bytes4 methodId) internal { } function onChainSwapsPreBridge( SwapRequest memory request, Call[] calldata calls, uint extraFee ) internal returns (uint out) { } /// @notice Internal function to compute output amount of DEXes /// @param request The general swap request containing from/to token and fee/affiliate rewards /// @param calls The list of DEX calls /// @param extraNativeFee The amount of native tokens to keep and not return to user as excess amount. /// @return The response of all DEX calls and the output amount of the whole process function onChainSwapsInternal( SwapRequest memory request, Call[] calldata calls, uint256 extraNativeFee ) internal returns (bytes[] memory, uint) { } /// @notice Private function to handle fetching money from wallet to contract, reduce fee/affiliate, perform DEX calls /// @param request The general swap request containing from/to token and fee/affiliate rewards /// @param calls The list of DEX calls /// @dev It checks the whitelisting of all DEX addresses + having enough msg.value as input /// @return The bytes of all DEX calls response function callSwapsAndFees(SwapRequest memory request, Call[] calldata calls) private returns (bytes[] memory) { bool isSourceNative = request.fromToken == ETH; BaseSwapperStorage storage baseSwapperStorage = getBaseSwapperStorage(); for (uint256 i = 0; i < calls.length; i++) { require(<FILL_ME>) require(baseSwapperStorage.whitelistContracts[calls[i].target], "Contract target not whitelisted"); bytes4 sig = bytes4(calls[i].callData[: 4]); require(baseSwapperStorage.whitelistMethods[calls[i].target][sig], "Unauthorized call data!"); } // Get Platform fee bool hasPlatformFee = request.platformFee > 0; bool hasDestExecutorFee = request.destinationExecutorFee > 0; bool hasAffiliateFee = request.affiliateFee > 0; if (hasPlatformFee || hasDestExecutorFee) { require(baseSwapperStorage.feeContractAddress != ETH, "Fee contract address not set"); _sendToken(request.fromToken, request.platformFee + request.destinationExecutorFee, baseSwapperStorage.feeContractAddress, isSourceNative, false); } // Get affiliate fee if (hasAffiliateFee) { require(request.affiliatorAddress != ETH, "Invalid affiliatorAddress"); _sendToken(request.fromToken, request.affiliateFee, request.affiliatorAddress, isSourceNative, false); } // emit Fee event if (hasPlatformFee || hasDestExecutorFee || hasAffiliateFee) { emit FeeInfo( request.fromToken, request.affiliatorAddress, request.platformFee, request.destinationExecutorFee, request.affiliateFee, request.dAppTag ); } // Execute swap Calls bytes[] memory returnData = new bytes[](calls.length); address tmpSwapFromToken; for (uint256 i = 0; i < calls.length; i++) { tmpSwapFromToken = calls[i].swapFromToken; bool isTokenNative = tmpSwapFromToken == ETH; if (isTokenNative == false) approveMax(tmpSwapFromToken, calls[i].spender, calls[i].amount); (bool success, bytes memory ret) = isTokenNative ? calls[i].target.call{value : calls[i].amount}(calls[i].callData) : calls[i].target.call(calls[i].callData); emit CallResult(calls[i].target, success, ret); if (!success) revert(_getRevertMsg(ret)); returnData[i] = ret; } return returnData; } /// @notice Approves an ERC20 token to a contract to transfer from the current contract /// @param token The address of an ERC20 token /// @param spender The contract address that should be approved /// @param value The amount that should be approved function approve(address token, address spender, uint value) internal { } /// @notice Approves an ERC20 token to a contract to transfer from the current contract, approves for inf value /// @param token The address of an ERC20 token /// @param spender The contract address that should be approved /// @param value The desired allowance. If current allowance is less than this value, infinite allowance will be given function approveMax(address token, address spender, uint value) internal { } function _sendToken(address _token, uint256 _amount, address _receiver) internal { } function sumFees(IRango.RangoBridgeRequest memory request) internal pure returns (uint256) { } function sumFees(SwapRequest memory request) internal pure returns (uint256) { } function collectFees(IRango.RangoBridgeRequest memory request) internal { } function collectFeesFromSender(IRango.RangoBridgeRequest memory request) internal { } /// @notice An internal function to send a token from the current contract to another contract or wallet /// @dev This function also can convert WETH to ETH before sending if _withdraw flat is set to true /// @dev To send native token _nativeOut param should be set to true, otherwise we assume it's an ERC20 transfer /// @param _token The token that is going to be sent to a wallet, ZERO address for native /// @param _amount The sent amount /// @param _receiver The receiver wallet address or contract /// @param _nativeOut means the output is native token /// @param _withdraw If true, indicates that we should swap WETH to ETH before sending the money and _nativeOut must also be true function _sendToken( address _token, uint256 _amount, address _receiver, bool _nativeOut, bool _withdraw ) internal { } /// @notice An internal function to send native token to a contract or wallet /// @param _receiver The address that will receive the native token /// @param _amount The amount of the native token that should be sent function _sendNative(address _receiver, uint _amount) internal { } /// @notice A utility function to fetch storage from a predefined random slot using assembly /// @return s The storage object function getBaseSwapperStorage() internal pure returns (BaseSwapperStorage storage s) { } /// @notice To extract revert message from a DEX/contract call to represent to the end-user in the blockchain /// @param _returnData The resulting bytes of a failed call to a DEX or contract /// @return A string that describes what was the error function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) { } function getBalanceOf(address token) internal view returns (uint) { } /// @notice Fetches the balances of swapToTokens. /// @dev this fetches the balances for swapToToken of swap Calls. If native eth is received, the balance has already increased so we subtract msg.value. function getInitialBalancesList(Call[] calldata calls) internal view returns (uint256[] memory) { } /// This function transfers tokens from users based on the SwapRequest, it transfers amountIn + fees. function transferTokensFromUserForSwapRequest(SwapRequest memory request) private { } /// This function iterates on calls and if needsTransferFromUser, transfers tokens from user function transferTokensFromUserForCalls(Call[] calldata calls) private { } /// @dev returns any excess token left by the contract. /// We iterate over `swapToToken`s because each swapToToken is either the request.toToken or is the output of /// another `Call` in the list of swaps which itself either has transferred tokens from user, /// or is a middle token that is the output of another `Call`. function returnExcessAmounts( SwapRequest memory request, Call[] calldata calls, uint256[] memory initialBalancesList) internal { } function emitSwapEvent(SwapRequest memory request, uint output, address receiver) internal { } }
baseSwapperStorage.whitelistContracts[calls[i].spender],"Contract spender not whitelisted"
430,569
baseSwapperStorage.whitelistContracts[calls[i].spender]
"Contract target not whitelisted"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../interfaces/IWETH.sol"; import "../interfaces/IRango.sol"; /// @title BaseSwapper /// @author 0xiden /// @notice library to provide swap functionality library LibSwapper { /// @dev keccak256("exchange.rango.library.swapper") bytes32 internal constant BASE_SWAPPER_NAMESPACE = hex"43da06808a8e54e76a41d6f7b48ddfb23969b1387a8710ef6241423a5aefe64a"; address payable constant ETH = payable(0x0000000000000000000000000000000000000000); struct BaseSwapperStorage { address payable feeContractAddress; address WETH; mapping(address => bool) whitelistContracts; mapping(address => mapping(bytes4 => bool)) whitelistMethods; } /// @notice Emitted if any fee transfer was required /// @param token The address of received token, address(0) for native /// @param affiliatorAddress The address of affiliate wallet /// @param platformFee The amount received as platform fee /// @param destinationExecutorFee The amount received to execute transaction on destination (only for cross chain txs) /// @param affiliateFee The amount received by affiliate /// @param dAppTag Optional identifier to make tracking easier. event FeeInfo( address token, address indexed affiliatorAddress, uint platformFee, uint destinationExecutorFee, uint affiliateFee, uint16 indexed dAppTag ); /// @notice A call to another dex or contract done and here is the result /// @param target The address of dex or contract that is called /// @param success A boolean indicating that the call was success or not /// @param returnData The response of function call event CallResult(address target, bool success, bytes returnData); /// @notice A swap request is done and we also emit the output /// @param requestId Optional parameter to make tracking of transaction easier /// @param fromToken Input token address to be swapped from /// @param toToken Output token address to be swapped to /// @param amountIn Input amount of fromToken that is being swapped /// @param dAppTag Optional identifier to make tracking easier /// @param outputAmount The output amount of the swap, measured by the balance change before and after the swap /// @param receiver The address to receive the output of swap. Can be address(0) when swap is before a bridge action event RangoSwap( address indexed requestId, address fromToken, address toToken, uint amountIn, uint minimumAmountExpected, uint16 indexed dAppTag, uint outputAmount, address receiver ); /// @notice Output amount of a dex calls is logged /// @param _token The address of output token, ZERO address for native /// @param amount The amount of output event DexOutput(address _token, uint amount); /// @notice The output money (ERC20/Native) is sent to a wallet /// @param _token The token that is sent to a wallet, ZERO address for native /// @param _amount The sent amount /// @param _receiver The receiver wallet address event SendToken(address _token, uint256 _amount, address _receiver); /// @notice Notifies that Rango's fee receiver address updated /// @param _oldAddress The previous fee wallet address /// @param _newAddress The new fee wallet address event FeeContractAddressUpdated(address _oldAddress, address _newAddress); /// @notice Notifies that WETH address is updated /// @param _oldAddress The previous weth address /// @param _newAddress The new weth address event WethContractAddressUpdated(address _oldAddress, address _newAddress); /// @notice Notifies that admin manually refunded some money /// @param _token The address of refunded token, 0x000..00 address for native token /// @param _amount The amount that is refunded event Refunded(address _token, uint _amount); /// @notice The requested call data which is computed off-chain and passed to the contract /// @dev swapFromToken and amount parameters are only helper params and the actual amount and /// token are set in callData /// @param spender The contract which the approval is given to if swapFromToken is not native. /// @param target The dex contract address that should be called /// @param swapFromToken Token address of to be used in the swap. /// @param amount The amount to be approved or native amount sent. /// @param callData The required data field that should be give to the dex contract to perform swap struct Call { address spender; address payable target; address swapFromToken; address swapToToken; bool needsTransferFromUser; uint amount; bytes callData; } /// @notice General swap request which is given to us in all relevant functions /// @param requestId The request id passed to make tracking transactions easier /// @param fromToken The source token that is going to be swapped (in case of simple swap or swap + bridge) or the briding token (in case of solo bridge) /// @param toToken The output token of swapping. This is the output of DEX step and is also input of bridging step /// @param amountIn The amount of input token to be swapped /// @param platformFee The amount of fee charged by platform /// @param destinationExecutorFee The amount of fee required for relayer execution on the destination /// @param affiliateFee The amount of fee charged by affiliator dApp /// @param affiliatorAddress The wallet address that the affiliator fee should be sent to /// @param minimumAmountExpected The minimum amount of toToken expected after executing Calls /// @param dAppTag An optional parameter struct SwapRequest { address requestId; address fromToken; address toToken; uint amountIn; uint platformFee; uint destinationExecutorFee; uint affiliateFee; address payable affiliatorAddress; uint minimumAmountExpected; uint16 dAppTag; } /// @notice initializes the base swapper and sets the init params (such as Wrapped token address) /// @param _weth Address of wrapped token (WETH, WBNB, etc.) on the current chain function setWeth(address _weth) internal { } /// @notice Sets the wallet that receives Rango's fees from now on /// @param _address The receiver wallet address function updateFeeContractAddress(address payable _address) internal { } /// Whitelist /// /// @notice Adds a contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX function addWhitelist(address contractAddress) internal { } /// @notice Adds a method of contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX /// @param methodIds The method of the DEX function addMethodWhitelists(address contractAddress, bytes4[] calldata methodIds) internal { } /// @notice Adds a method of contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX /// @param methodId The method of the DEX function addMethodWhitelist(address contractAddress, bytes4 methodId) internal { } /// @notice Removes a contract from the whitelisted DEXes /// @param contractAddress The address of the DEX or dApp function removeWhitelist(address contractAddress) internal { } /// @notice Removes a method of contract from the whitelisted DEXes /// @param contractAddress The address of the DEX or dApp /// @param methodId The method of the DEX function removeMethodWhitelist(address contractAddress, bytes4 methodId) internal { } function onChainSwapsPreBridge( SwapRequest memory request, Call[] calldata calls, uint extraFee ) internal returns (uint out) { } /// @notice Internal function to compute output amount of DEXes /// @param request The general swap request containing from/to token and fee/affiliate rewards /// @param calls The list of DEX calls /// @param extraNativeFee The amount of native tokens to keep and not return to user as excess amount. /// @return The response of all DEX calls and the output amount of the whole process function onChainSwapsInternal( SwapRequest memory request, Call[] calldata calls, uint256 extraNativeFee ) internal returns (bytes[] memory, uint) { } /// @notice Private function to handle fetching money from wallet to contract, reduce fee/affiliate, perform DEX calls /// @param request The general swap request containing from/to token and fee/affiliate rewards /// @param calls The list of DEX calls /// @dev It checks the whitelisting of all DEX addresses + having enough msg.value as input /// @return The bytes of all DEX calls response function callSwapsAndFees(SwapRequest memory request, Call[] calldata calls) private returns (bytes[] memory) { bool isSourceNative = request.fromToken == ETH; BaseSwapperStorage storage baseSwapperStorage = getBaseSwapperStorage(); for (uint256 i = 0; i < calls.length; i++) { require(baseSwapperStorage.whitelistContracts[calls[i].spender], "Contract spender not whitelisted"); require(<FILL_ME>) bytes4 sig = bytes4(calls[i].callData[: 4]); require(baseSwapperStorage.whitelistMethods[calls[i].target][sig], "Unauthorized call data!"); } // Get Platform fee bool hasPlatformFee = request.platformFee > 0; bool hasDestExecutorFee = request.destinationExecutorFee > 0; bool hasAffiliateFee = request.affiliateFee > 0; if (hasPlatformFee || hasDestExecutorFee) { require(baseSwapperStorage.feeContractAddress != ETH, "Fee contract address not set"); _sendToken(request.fromToken, request.platformFee + request.destinationExecutorFee, baseSwapperStorage.feeContractAddress, isSourceNative, false); } // Get affiliate fee if (hasAffiliateFee) { require(request.affiliatorAddress != ETH, "Invalid affiliatorAddress"); _sendToken(request.fromToken, request.affiliateFee, request.affiliatorAddress, isSourceNative, false); } // emit Fee event if (hasPlatformFee || hasDestExecutorFee || hasAffiliateFee) { emit FeeInfo( request.fromToken, request.affiliatorAddress, request.platformFee, request.destinationExecutorFee, request.affiliateFee, request.dAppTag ); } // Execute swap Calls bytes[] memory returnData = new bytes[](calls.length); address tmpSwapFromToken; for (uint256 i = 0; i < calls.length; i++) { tmpSwapFromToken = calls[i].swapFromToken; bool isTokenNative = tmpSwapFromToken == ETH; if (isTokenNative == false) approveMax(tmpSwapFromToken, calls[i].spender, calls[i].amount); (bool success, bytes memory ret) = isTokenNative ? calls[i].target.call{value : calls[i].amount}(calls[i].callData) : calls[i].target.call(calls[i].callData); emit CallResult(calls[i].target, success, ret); if (!success) revert(_getRevertMsg(ret)); returnData[i] = ret; } return returnData; } /// @notice Approves an ERC20 token to a contract to transfer from the current contract /// @param token The address of an ERC20 token /// @param spender The contract address that should be approved /// @param value The amount that should be approved function approve(address token, address spender, uint value) internal { } /// @notice Approves an ERC20 token to a contract to transfer from the current contract, approves for inf value /// @param token The address of an ERC20 token /// @param spender The contract address that should be approved /// @param value The desired allowance. If current allowance is less than this value, infinite allowance will be given function approveMax(address token, address spender, uint value) internal { } function _sendToken(address _token, uint256 _amount, address _receiver) internal { } function sumFees(IRango.RangoBridgeRequest memory request) internal pure returns (uint256) { } function sumFees(SwapRequest memory request) internal pure returns (uint256) { } function collectFees(IRango.RangoBridgeRequest memory request) internal { } function collectFeesFromSender(IRango.RangoBridgeRequest memory request) internal { } /// @notice An internal function to send a token from the current contract to another contract or wallet /// @dev This function also can convert WETH to ETH before sending if _withdraw flat is set to true /// @dev To send native token _nativeOut param should be set to true, otherwise we assume it's an ERC20 transfer /// @param _token The token that is going to be sent to a wallet, ZERO address for native /// @param _amount The sent amount /// @param _receiver The receiver wallet address or contract /// @param _nativeOut means the output is native token /// @param _withdraw If true, indicates that we should swap WETH to ETH before sending the money and _nativeOut must also be true function _sendToken( address _token, uint256 _amount, address _receiver, bool _nativeOut, bool _withdraw ) internal { } /// @notice An internal function to send native token to a contract or wallet /// @param _receiver The address that will receive the native token /// @param _amount The amount of the native token that should be sent function _sendNative(address _receiver, uint _amount) internal { } /// @notice A utility function to fetch storage from a predefined random slot using assembly /// @return s The storage object function getBaseSwapperStorage() internal pure returns (BaseSwapperStorage storage s) { } /// @notice To extract revert message from a DEX/contract call to represent to the end-user in the blockchain /// @param _returnData The resulting bytes of a failed call to a DEX or contract /// @return A string that describes what was the error function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) { } function getBalanceOf(address token) internal view returns (uint) { } /// @notice Fetches the balances of swapToTokens. /// @dev this fetches the balances for swapToToken of swap Calls. If native eth is received, the balance has already increased so we subtract msg.value. function getInitialBalancesList(Call[] calldata calls) internal view returns (uint256[] memory) { } /// This function transfers tokens from users based on the SwapRequest, it transfers amountIn + fees. function transferTokensFromUserForSwapRequest(SwapRequest memory request) private { } /// This function iterates on calls and if needsTransferFromUser, transfers tokens from user function transferTokensFromUserForCalls(Call[] calldata calls) private { } /// @dev returns any excess token left by the contract. /// We iterate over `swapToToken`s because each swapToToken is either the request.toToken or is the output of /// another `Call` in the list of swaps which itself either has transferred tokens from user, /// or is a middle token that is the output of another `Call`. function returnExcessAmounts( SwapRequest memory request, Call[] calldata calls, uint256[] memory initialBalancesList) internal { } function emitSwapEvent(SwapRequest memory request, uint output, address receiver) internal { } }
baseSwapperStorage.whitelistContracts[calls[i].target],"Contract target not whitelisted"
430,569
baseSwapperStorage.whitelistContracts[calls[i].target]
"Unauthorized call data!"
// SPDX-License-Identifier: LGPL-3.0-only pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "../interfaces/IWETH.sol"; import "../interfaces/IRango.sol"; /// @title BaseSwapper /// @author 0xiden /// @notice library to provide swap functionality library LibSwapper { /// @dev keccak256("exchange.rango.library.swapper") bytes32 internal constant BASE_SWAPPER_NAMESPACE = hex"43da06808a8e54e76a41d6f7b48ddfb23969b1387a8710ef6241423a5aefe64a"; address payable constant ETH = payable(0x0000000000000000000000000000000000000000); struct BaseSwapperStorage { address payable feeContractAddress; address WETH; mapping(address => bool) whitelistContracts; mapping(address => mapping(bytes4 => bool)) whitelistMethods; } /// @notice Emitted if any fee transfer was required /// @param token The address of received token, address(0) for native /// @param affiliatorAddress The address of affiliate wallet /// @param platformFee The amount received as platform fee /// @param destinationExecutorFee The amount received to execute transaction on destination (only for cross chain txs) /// @param affiliateFee The amount received by affiliate /// @param dAppTag Optional identifier to make tracking easier. event FeeInfo( address token, address indexed affiliatorAddress, uint platformFee, uint destinationExecutorFee, uint affiliateFee, uint16 indexed dAppTag ); /// @notice A call to another dex or contract done and here is the result /// @param target The address of dex or contract that is called /// @param success A boolean indicating that the call was success or not /// @param returnData The response of function call event CallResult(address target, bool success, bytes returnData); /// @notice A swap request is done and we also emit the output /// @param requestId Optional parameter to make tracking of transaction easier /// @param fromToken Input token address to be swapped from /// @param toToken Output token address to be swapped to /// @param amountIn Input amount of fromToken that is being swapped /// @param dAppTag Optional identifier to make tracking easier /// @param outputAmount The output amount of the swap, measured by the balance change before and after the swap /// @param receiver The address to receive the output of swap. Can be address(0) when swap is before a bridge action event RangoSwap( address indexed requestId, address fromToken, address toToken, uint amountIn, uint minimumAmountExpected, uint16 indexed dAppTag, uint outputAmount, address receiver ); /// @notice Output amount of a dex calls is logged /// @param _token The address of output token, ZERO address for native /// @param amount The amount of output event DexOutput(address _token, uint amount); /// @notice The output money (ERC20/Native) is sent to a wallet /// @param _token The token that is sent to a wallet, ZERO address for native /// @param _amount The sent amount /// @param _receiver The receiver wallet address event SendToken(address _token, uint256 _amount, address _receiver); /// @notice Notifies that Rango's fee receiver address updated /// @param _oldAddress The previous fee wallet address /// @param _newAddress The new fee wallet address event FeeContractAddressUpdated(address _oldAddress, address _newAddress); /// @notice Notifies that WETH address is updated /// @param _oldAddress The previous weth address /// @param _newAddress The new weth address event WethContractAddressUpdated(address _oldAddress, address _newAddress); /// @notice Notifies that admin manually refunded some money /// @param _token The address of refunded token, 0x000..00 address for native token /// @param _amount The amount that is refunded event Refunded(address _token, uint _amount); /// @notice The requested call data which is computed off-chain and passed to the contract /// @dev swapFromToken and amount parameters are only helper params and the actual amount and /// token are set in callData /// @param spender The contract which the approval is given to if swapFromToken is not native. /// @param target The dex contract address that should be called /// @param swapFromToken Token address of to be used in the swap. /// @param amount The amount to be approved or native amount sent. /// @param callData The required data field that should be give to the dex contract to perform swap struct Call { address spender; address payable target; address swapFromToken; address swapToToken; bool needsTransferFromUser; uint amount; bytes callData; } /// @notice General swap request which is given to us in all relevant functions /// @param requestId The request id passed to make tracking transactions easier /// @param fromToken The source token that is going to be swapped (in case of simple swap or swap + bridge) or the briding token (in case of solo bridge) /// @param toToken The output token of swapping. This is the output of DEX step and is also input of bridging step /// @param amountIn The amount of input token to be swapped /// @param platformFee The amount of fee charged by platform /// @param destinationExecutorFee The amount of fee required for relayer execution on the destination /// @param affiliateFee The amount of fee charged by affiliator dApp /// @param affiliatorAddress The wallet address that the affiliator fee should be sent to /// @param minimumAmountExpected The minimum amount of toToken expected after executing Calls /// @param dAppTag An optional parameter struct SwapRequest { address requestId; address fromToken; address toToken; uint amountIn; uint platformFee; uint destinationExecutorFee; uint affiliateFee; address payable affiliatorAddress; uint minimumAmountExpected; uint16 dAppTag; } /// @notice initializes the base swapper and sets the init params (such as Wrapped token address) /// @param _weth Address of wrapped token (WETH, WBNB, etc.) on the current chain function setWeth(address _weth) internal { } /// @notice Sets the wallet that receives Rango's fees from now on /// @param _address The receiver wallet address function updateFeeContractAddress(address payable _address) internal { } /// Whitelist /// /// @notice Adds a contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX function addWhitelist(address contractAddress) internal { } /// @notice Adds a method of contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX /// @param methodIds The method of the DEX function addMethodWhitelists(address contractAddress, bytes4[] calldata methodIds) internal { } /// @notice Adds a method of contract to the whitelisted DEXes that can be called /// @param contractAddress The address of the DEX /// @param methodId The method of the DEX function addMethodWhitelist(address contractAddress, bytes4 methodId) internal { } /// @notice Removes a contract from the whitelisted DEXes /// @param contractAddress The address of the DEX or dApp function removeWhitelist(address contractAddress) internal { } /// @notice Removes a method of contract from the whitelisted DEXes /// @param contractAddress The address of the DEX or dApp /// @param methodId The method of the DEX function removeMethodWhitelist(address contractAddress, bytes4 methodId) internal { } function onChainSwapsPreBridge( SwapRequest memory request, Call[] calldata calls, uint extraFee ) internal returns (uint out) { } /// @notice Internal function to compute output amount of DEXes /// @param request The general swap request containing from/to token and fee/affiliate rewards /// @param calls The list of DEX calls /// @param extraNativeFee The amount of native tokens to keep and not return to user as excess amount. /// @return The response of all DEX calls and the output amount of the whole process function onChainSwapsInternal( SwapRequest memory request, Call[] calldata calls, uint256 extraNativeFee ) internal returns (bytes[] memory, uint) { } /// @notice Private function to handle fetching money from wallet to contract, reduce fee/affiliate, perform DEX calls /// @param request The general swap request containing from/to token and fee/affiliate rewards /// @param calls The list of DEX calls /// @dev It checks the whitelisting of all DEX addresses + having enough msg.value as input /// @return The bytes of all DEX calls response function callSwapsAndFees(SwapRequest memory request, Call[] calldata calls) private returns (bytes[] memory) { bool isSourceNative = request.fromToken == ETH; BaseSwapperStorage storage baseSwapperStorage = getBaseSwapperStorage(); for (uint256 i = 0; i < calls.length; i++) { require(baseSwapperStorage.whitelistContracts[calls[i].spender], "Contract spender not whitelisted"); require(baseSwapperStorage.whitelistContracts[calls[i].target], "Contract target not whitelisted"); bytes4 sig = bytes4(calls[i].callData[: 4]); require(<FILL_ME>) } // Get Platform fee bool hasPlatformFee = request.platformFee > 0; bool hasDestExecutorFee = request.destinationExecutorFee > 0; bool hasAffiliateFee = request.affiliateFee > 0; if (hasPlatformFee || hasDestExecutorFee) { require(baseSwapperStorage.feeContractAddress != ETH, "Fee contract address not set"); _sendToken(request.fromToken, request.platformFee + request.destinationExecutorFee, baseSwapperStorage.feeContractAddress, isSourceNative, false); } // Get affiliate fee if (hasAffiliateFee) { require(request.affiliatorAddress != ETH, "Invalid affiliatorAddress"); _sendToken(request.fromToken, request.affiliateFee, request.affiliatorAddress, isSourceNative, false); } // emit Fee event if (hasPlatformFee || hasDestExecutorFee || hasAffiliateFee) { emit FeeInfo( request.fromToken, request.affiliatorAddress, request.platformFee, request.destinationExecutorFee, request.affiliateFee, request.dAppTag ); } // Execute swap Calls bytes[] memory returnData = new bytes[](calls.length); address tmpSwapFromToken; for (uint256 i = 0; i < calls.length; i++) { tmpSwapFromToken = calls[i].swapFromToken; bool isTokenNative = tmpSwapFromToken == ETH; if (isTokenNative == false) approveMax(tmpSwapFromToken, calls[i].spender, calls[i].amount); (bool success, bytes memory ret) = isTokenNative ? calls[i].target.call{value : calls[i].amount}(calls[i].callData) : calls[i].target.call(calls[i].callData); emit CallResult(calls[i].target, success, ret); if (!success) revert(_getRevertMsg(ret)); returnData[i] = ret; } return returnData; } /// @notice Approves an ERC20 token to a contract to transfer from the current contract /// @param token The address of an ERC20 token /// @param spender The contract address that should be approved /// @param value The amount that should be approved function approve(address token, address spender, uint value) internal { } /// @notice Approves an ERC20 token to a contract to transfer from the current contract, approves for inf value /// @param token The address of an ERC20 token /// @param spender The contract address that should be approved /// @param value The desired allowance. If current allowance is less than this value, infinite allowance will be given function approveMax(address token, address spender, uint value) internal { } function _sendToken(address _token, uint256 _amount, address _receiver) internal { } function sumFees(IRango.RangoBridgeRequest memory request) internal pure returns (uint256) { } function sumFees(SwapRequest memory request) internal pure returns (uint256) { } function collectFees(IRango.RangoBridgeRequest memory request) internal { } function collectFeesFromSender(IRango.RangoBridgeRequest memory request) internal { } /// @notice An internal function to send a token from the current contract to another contract or wallet /// @dev This function also can convert WETH to ETH before sending if _withdraw flat is set to true /// @dev To send native token _nativeOut param should be set to true, otherwise we assume it's an ERC20 transfer /// @param _token The token that is going to be sent to a wallet, ZERO address for native /// @param _amount The sent amount /// @param _receiver The receiver wallet address or contract /// @param _nativeOut means the output is native token /// @param _withdraw If true, indicates that we should swap WETH to ETH before sending the money and _nativeOut must also be true function _sendToken( address _token, uint256 _amount, address _receiver, bool _nativeOut, bool _withdraw ) internal { } /// @notice An internal function to send native token to a contract or wallet /// @param _receiver The address that will receive the native token /// @param _amount The amount of the native token that should be sent function _sendNative(address _receiver, uint _amount) internal { } /// @notice A utility function to fetch storage from a predefined random slot using assembly /// @return s The storage object function getBaseSwapperStorage() internal pure returns (BaseSwapperStorage storage s) { } /// @notice To extract revert message from a DEX/contract call to represent to the end-user in the blockchain /// @param _returnData The resulting bytes of a failed call to a DEX or contract /// @return A string that describes what was the error function _getRevertMsg(bytes memory _returnData) internal pure returns (string memory) { } function getBalanceOf(address token) internal view returns (uint) { } /// @notice Fetches the balances of swapToTokens. /// @dev this fetches the balances for swapToToken of swap Calls. If native eth is received, the balance has already increased so we subtract msg.value. function getInitialBalancesList(Call[] calldata calls) internal view returns (uint256[] memory) { } /// This function transfers tokens from users based on the SwapRequest, it transfers amountIn + fees. function transferTokensFromUserForSwapRequest(SwapRequest memory request) private { } /// This function iterates on calls and if needsTransferFromUser, transfers tokens from user function transferTokensFromUserForCalls(Call[] calldata calls) private { } /// @dev returns any excess token left by the contract. /// We iterate over `swapToToken`s because each swapToToken is either the request.toToken or is the output of /// another `Call` in the list of swaps which itself either has transferred tokens from user, /// or is a middle token that is the output of another `Call`. function returnExcessAmounts( SwapRequest memory request, Call[] calldata calls, uint256[] memory initialBalancesList) internal { } function emitSwapEvent(SwapRequest memory request, uint output, address receiver) internal { } }
baseSwapperStorage.whitelistMethods[calls[i].target][sig],"Unauthorized call data!"
430,569
baseSwapperStorage.whitelistMethods[calls[i].target][sig]
"SecurityToken: Only SC operators are allowed to mint/burn token"
// SPDX-License-Identifier: Apache License 2.0 pragma solidity 0.8.9; pragma experimental ABIEncoderV2; import "./utils/ERC1404.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Contract that implements the Security Token to manage the Bonding Curve /// @dev This Token is being bonded in the Bonding Curve to gain Coordination Token /// which is being used in the games. Security Token is strictly managed and /// only whitelisted stakeholders are allowed to own it. /// Reference implementation of ERC1404 can be found here: /// https://github.com/simple-restricted-token/reference-implementation/blob/master/contracts/token/ERC1404/ERC1404ReferenceImpl.sol /// https://github.com/simple-restricted-token/simple-restricted-token/blob/master/contracts/token/ERC1404/SimpleRestrictedToken.sol contract SecurityToken is ERC1404, Ownable { uint8 constant private SUCCESS_CODE = 0; uint8 constant private ERR_RECIPIENT_CODE = 1; uint8 constant private ERR_BONDING_CURVE_CODE = 2; uint8 constant private ERR_NOT_WHITELISTED_CODE = 3; string constant private SUCCESS_MESSAGE = "SecurityToken: SUCCESS"; string constant private ERR_RECIPIENT_MESSAGE = "SecurityToken: RECIPIENT SHOULD BE IN THE WHITELIST"; string constant private ERR_BONDING_CURVE_MESSAGE = "SecurityToken: CAN TRANSFER ONLY TO BONDING CURVE"; string constant private ERR_NOT_WHITELISTED_MESSAGE = "SecurityToken: ONLY WHITELISTED USERS CAN TRANSFER TOKEN"; struct Role { bool awo; bool sco; } mapping(address => Role) public operators; mapping(address => bool) public whitelist; address public bondingCurve; event NewStakeholder(address stakeholer); event RemovedStakeholder(address stakeholer); event NewSCO(address operator); event RemovedSCO(address operator); event NewAWO(address operator); event RemovedAWO(address operator); /// @dev Reverts if the caller is not a Securities Control Operator or an owner modifier onlySCOperator() { require(<FILL_ME>) _; } /// @dev Reverts if the caller is not an Accreditation Whitelist Operator or an owner modifier onlyAWOperator() { } /// @dev Checks if transfer of 'value' amount of tokens from 'from' to 'to' is allowed /// @param from address of token sender /// @param to address of token receiver /// @param value amount of tokens to transfer modifier notRestricted (address from, address to, uint256 value) { } /// @notice Constructor function of the token /// @param name Name of the token as it will be in the ledger /// @param symbol Symbol that will represent the token constructor(string memory name, string memory symbol) ERC20(name, symbol) {} /// @notice Function to add AWO /// @dev Only owner can add AWO /// @param operator Address of the AWO function addAWOperator(address operator) external onlyOwner{ } /// @notice Function to add SCO /// @dev Only owner can add SCO /// @param operator Address of the SCO function addSCOperator(address operator) external onlyOwner{ } /// @notice Function to remove AWO /// @dev Only owner can remove AWO /// @param operator Address of the AWO function removeAWOperator(address operator) external onlyOwner{ } /// @notice Function to remove SCO /// @dev Only owner can remove SCO /// @param operator Address of the SCO function removeSCOperator(address operator) external onlyOwner{ } /// @notice Function to mint SecurityToken /// @dev Only SCO can mint tokens to the whitelisted addresses /// @param account Address of the token receiver /// @param amount Amount of minted tokens function mint(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to burn SecurityToken /// @dev Only SCO can burn tokens from addresses /// @param account Address from which tokens will be burned /// @param amount Amount of burned tokens function burn(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to add address to Whitelist /// @dev Only AWO can add address to Whitelist /// @param account Address to add to the Whitelist function addToWhitelist(address account) public onlyAWOperator{ } /// @notice Function to remove address from Whitelist /// @dev Only AWO can remove address from Whitelist on removal from the list user loses all of the tokens /// @param account Address to remove from the Whitelist function removeFromWhitelist(address account) external onlyAWOperator{ } /// @notice Function to check the restriction for token transfer /// @param from address of sender /// @param to address of receiver /// @param value amount of tokens to transfer /// @return restrictionCode code of restriction for specific transfer function detectTransferRestriction (address from, address to, uint256 value) public view override returns (uint8 restrictionCode) { } /// @notice Function to return restriction message based on the code /// @param restrictionCode code of restriction /// @return message message of restriction for specific code function messageForTransferRestriction (uint8 restrictionCode) public pure override returns (string memory message) { } /// @notice Function to transfer tokens between whitelisted users /// @param to Address to which tokens are sent /// @param value Amount of tokens to send function transfer(address to, uint256 value) public override notRestricted(msg.sender, to, value) returns (bool) { } /// @notice Function to transfer tokens from some another address(used after approve) /// @dev Only Whitelisted addresses that have the approval can send or receive tokens /// @param sender Address that will be used to send tokens from /// @param recipient Address that will receive tokens /// @param amount Amount of tokens that may be sent function transferFrom( address sender, address recipient, uint256 amount ) public override notRestricted(sender, recipient, amount) returns (bool) { } /// @notice Function to set BondingCurve address for the contract /// @param curve address of the BondingCurve function setupBondingCurve(address curve) external onlyOwner { } /// @notice Function to check if user is in a whitelist /// @param user Address to check /// @return If address is in a whitelist function isInWhitelist(address user) external view returns (bool) { } }
owner()==msg.sender||operators[msg.sender].sco==true,"SecurityToken: Only SC operators are allowed to mint/burn token"
430,631
owner()==msg.sender||operators[msg.sender].sco==true
"SecurityToken: Only AW operators are allowed to change whitelist"
// SPDX-License-Identifier: Apache License 2.0 pragma solidity 0.8.9; pragma experimental ABIEncoderV2; import "./utils/ERC1404.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Contract that implements the Security Token to manage the Bonding Curve /// @dev This Token is being bonded in the Bonding Curve to gain Coordination Token /// which is being used in the games. Security Token is strictly managed and /// only whitelisted stakeholders are allowed to own it. /// Reference implementation of ERC1404 can be found here: /// https://github.com/simple-restricted-token/reference-implementation/blob/master/contracts/token/ERC1404/ERC1404ReferenceImpl.sol /// https://github.com/simple-restricted-token/simple-restricted-token/blob/master/contracts/token/ERC1404/SimpleRestrictedToken.sol contract SecurityToken is ERC1404, Ownable { uint8 constant private SUCCESS_CODE = 0; uint8 constant private ERR_RECIPIENT_CODE = 1; uint8 constant private ERR_BONDING_CURVE_CODE = 2; uint8 constant private ERR_NOT_WHITELISTED_CODE = 3; string constant private SUCCESS_MESSAGE = "SecurityToken: SUCCESS"; string constant private ERR_RECIPIENT_MESSAGE = "SecurityToken: RECIPIENT SHOULD BE IN THE WHITELIST"; string constant private ERR_BONDING_CURVE_MESSAGE = "SecurityToken: CAN TRANSFER ONLY TO BONDING CURVE"; string constant private ERR_NOT_WHITELISTED_MESSAGE = "SecurityToken: ONLY WHITELISTED USERS CAN TRANSFER TOKEN"; struct Role { bool awo; bool sco; } mapping(address => Role) public operators; mapping(address => bool) public whitelist; address public bondingCurve; event NewStakeholder(address stakeholer); event RemovedStakeholder(address stakeholer); event NewSCO(address operator); event RemovedSCO(address operator); event NewAWO(address operator); event RemovedAWO(address operator); /// @dev Reverts if the caller is not a Securities Control Operator or an owner modifier onlySCOperator() { } /// @dev Reverts if the caller is not an Accreditation Whitelist Operator or an owner modifier onlyAWOperator() { require(<FILL_ME>) _; } /// @dev Checks if transfer of 'value' amount of tokens from 'from' to 'to' is allowed /// @param from address of token sender /// @param to address of token receiver /// @param value amount of tokens to transfer modifier notRestricted (address from, address to, uint256 value) { } /// @notice Constructor function of the token /// @param name Name of the token as it will be in the ledger /// @param symbol Symbol that will represent the token constructor(string memory name, string memory symbol) ERC20(name, symbol) {} /// @notice Function to add AWO /// @dev Only owner can add AWO /// @param operator Address of the AWO function addAWOperator(address operator) external onlyOwner{ } /// @notice Function to add SCO /// @dev Only owner can add SCO /// @param operator Address of the SCO function addSCOperator(address operator) external onlyOwner{ } /// @notice Function to remove AWO /// @dev Only owner can remove AWO /// @param operator Address of the AWO function removeAWOperator(address operator) external onlyOwner{ } /// @notice Function to remove SCO /// @dev Only owner can remove SCO /// @param operator Address of the SCO function removeSCOperator(address operator) external onlyOwner{ } /// @notice Function to mint SecurityToken /// @dev Only SCO can mint tokens to the whitelisted addresses /// @param account Address of the token receiver /// @param amount Amount of minted tokens function mint(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to burn SecurityToken /// @dev Only SCO can burn tokens from addresses /// @param account Address from which tokens will be burned /// @param amount Amount of burned tokens function burn(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to add address to Whitelist /// @dev Only AWO can add address to Whitelist /// @param account Address to add to the Whitelist function addToWhitelist(address account) public onlyAWOperator{ } /// @notice Function to remove address from Whitelist /// @dev Only AWO can remove address from Whitelist on removal from the list user loses all of the tokens /// @param account Address to remove from the Whitelist function removeFromWhitelist(address account) external onlyAWOperator{ } /// @notice Function to check the restriction for token transfer /// @param from address of sender /// @param to address of receiver /// @param value amount of tokens to transfer /// @return restrictionCode code of restriction for specific transfer function detectTransferRestriction (address from, address to, uint256 value) public view override returns (uint8 restrictionCode) { } /// @notice Function to return restriction message based on the code /// @param restrictionCode code of restriction /// @return message message of restriction for specific code function messageForTransferRestriction (uint8 restrictionCode) public pure override returns (string memory message) { } /// @notice Function to transfer tokens between whitelisted users /// @param to Address to which tokens are sent /// @param value Amount of tokens to send function transfer(address to, uint256 value) public override notRestricted(msg.sender, to, value) returns (bool) { } /// @notice Function to transfer tokens from some another address(used after approve) /// @dev Only Whitelisted addresses that have the approval can send or receive tokens /// @param sender Address that will be used to send tokens from /// @param recipient Address that will receive tokens /// @param amount Amount of tokens that may be sent function transferFrom( address sender, address recipient, uint256 amount ) public override notRestricted(sender, recipient, amount) returns (bool) { } /// @notice Function to set BondingCurve address for the contract /// @param curve address of the BondingCurve function setupBondingCurve(address curve) external onlyOwner { } /// @notice Function to check if user is in a whitelist /// @param user Address to check /// @return If address is in a whitelist function isInWhitelist(address user) external view returns (bool) { } }
owner()==msg.sender||operators[msg.sender].awo==true,"SecurityToken: Only AW operators are allowed to change whitelist"
430,631
owner()==msg.sender||operators[msg.sender].awo==true
"SecurityToken.addAWOperator: There already exists such operator"
// SPDX-License-Identifier: Apache License 2.0 pragma solidity 0.8.9; pragma experimental ABIEncoderV2; import "./utils/ERC1404.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Contract that implements the Security Token to manage the Bonding Curve /// @dev This Token is being bonded in the Bonding Curve to gain Coordination Token /// which is being used in the games. Security Token is strictly managed and /// only whitelisted stakeholders are allowed to own it. /// Reference implementation of ERC1404 can be found here: /// https://github.com/simple-restricted-token/reference-implementation/blob/master/contracts/token/ERC1404/ERC1404ReferenceImpl.sol /// https://github.com/simple-restricted-token/simple-restricted-token/blob/master/contracts/token/ERC1404/SimpleRestrictedToken.sol contract SecurityToken is ERC1404, Ownable { uint8 constant private SUCCESS_CODE = 0; uint8 constant private ERR_RECIPIENT_CODE = 1; uint8 constant private ERR_BONDING_CURVE_CODE = 2; uint8 constant private ERR_NOT_WHITELISTED_CODE = 3; string constant private SUCCESS_MESSAGE = "SecurityToken: SUCCESS"; string constant private ERR_RECIPIENT_MESSAGE = "SecurityToken: RECIPIENT SHOULD BE IN THE WHITELIST"; string constant private ERR_BONDING_CURVE_MESSAGE = "SecurityToken: CAN TRANSFER ONLY TO BONDING CURVE"; string constant private ERR_NOT_WHITELISTED_MESSAGE = "SecurityToken: ONLY WHITELISTED USERS CAN TRANSFER TOKEN"; struct Role { bool awo; bool sco; } mapping(address => Role) public operators; mapping(address => bool) public whitelist; address public bondingCurve; event NewStakeholder(address stakeholer); event RemovedStakeholder(address stakeholer); event NewSCO(address operator); event RemovedSCO(address operator); event NewAWO(address operator); event RemovedAWO(address operator); /// @dev Reverts if the caller is not a Securities Control Operator or an owner modifier onlySCOperator() { } /// @dev Reverts if the caller is not an Accreditation Whitelist Operator or an owner modifier onlyAWOperator() { } /// @dev Checks if transfer of 'value' amount of tokens from 'from' to 'to' is allowed /// @param from address of token sender /// @param to address of token receiver /// @param value amount of tokens to transfer modifier notRestricted (address from, address to, uint256 value) { } /// @notice Constructor function of the token /// @param name Name of the token as it will be in the ledger /// @param symbol Symbol that will represent the token constructor(string memory name, string memory symbol) ERC20(name, symbol) {} /// @notice Function to add AWO /// @dev Only owner can add AWO /// @param operator Address of the AWO function addAWOperator(address operator) external onlyOwner{ require(<FILL_ME>) operators[operator].awo = true; emit NewAWO(operator); } /// @notice Function to add SCO /// @dev Only owner can add SCO /// @param operator Address of the SCO function addSCOperator(address operator) external onlyOwner{ } /// @notice Function to remove AWO /// @dev Only owner can remove AWO /// @param operator Address of the AWO function removeAWOperator(address operator) external onlyOwner{ } /// @notice Function to remove SCO /// @dev Only owner can remove SCO /// @param operator Address of the SCO function removeSCOperator(address operator) external onlyOwner{ } /// @notice Function to mint SecurityToken /// @dev Only SCO can mint tokens to the whitelisted addresses /// @param account Address of the token receiver /// @param amount Amount of minted tokens function mint(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to burn SecurityToken /// @dev Only SCO can burn tokens from addresses /// @param account Address from which tokens will be burned /// @param amount Amount of burned tokens function burn(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to add address to Whitelist /// @dev Only AWO can add address to Whitelist /// @param account Address to add to the Whitelist function addToWhitelist(address account) public onlyAWOperator{ } /// @notice Function to remove address from Whitelist /// @dev Only AWO can remove address from Whitelist on removal from the list user loses all of the tokens /// @param account Address to remove from the Whitelist function removeFromWhitelist(address account) external onlyAWOperator{ } /// @notice Function to check the restriction for token transfer /// @param from address of sender /// @param to address of receiver /// @param value amount of tokens to transfer /// @return restrictionCode code of restriction for specific transfer function detectTransferRestriction (address from, address to, uint256 value) public view override returns (uint8 restrictionCode) { } /// @notice Function to return restriction message based on the code /// @param restrictionCode code of restriction /// @return message message of restriction for specific code function messageForTransferRestriction (uint8 restrictionCode) public pure override returns (string memory message) { } /// @notice Function to transfer tokens between whitelisted users /// @param to Address to which tokens are sent /// @param value Amount of tokens to send function transfer(address to, uint256 value) public override notRestricted(msg.sender, to, value) returns (bool) { } /// @notice Function to transfer tokens from some another address(used after approve) /// @dev Only Whitelisted addresses that have the approval can send or receive tokens /// @param sender Address that will be used to send tokens from /// @param recipient Address that will receive tokens /// @param amount Amount of tokens that may be sent function transferFrom( address sender, address recipient, uint256 amount ) public override notRestricted(sender, recipient, amount) returns (bool) { } /// @notice Function to set BondingCurve address for the contract /// @param curve address of the BondingCurve function setupBondingCurve(address curve) external onlyOwner { } /// @notice Function to check if user is in a whitelist /// @param user Address to check /// @return If address is in a whitelist function isInWhitelist(address user) external view returns (bool) { } }
operators[operator].awo==false,"SecurityToken.addAWOperator: There already exists such operator"
430,631
operators[operator].awo==false
"SecurityToken.addSCOperator: There already exists such operator"
// SPDX-License-Identifier: Apache License 2.0 pragma solidity 0.8.9; pragma experimental ABIEncoderV2; import "./utils/ERC1404.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Contract that implements the Security Token to manage the Bonding Curve /// @dev This Token is being bonded in the Bonding Curve to gain Coordination Token /// which is being used in the games. Security Token is strictly managed and /// only whitelisted stakeholders are allowed to own it. /// Reference implementation of ERC1404 can be found here: /// https://github.com/simple-restricted-token/reference-implementation/blob/master/contracts/token/ERC1404/ERC1404ReferenceImpl.sol /// https://github.com/simple-restricted-token/simple-restricted-token/blob/master/contracts/token/ERC1404/SimpleRestrictedToken.sol contract SecurityToken is ERC1404, Ownable { uint8 constant private SUCCESS_CODE = 0; uint8 constant private ERR_RECIPIENT_CODE = 1; uint8 constant private ERR_BONDING_CURVE_CODE = 2; uint8 constant private ERR_NOT_WHITELISTED_CODE = 3; string constant private SUCCESS_MESSAGE = "SecurityToken: SUCCESS"; string constant private ERR_RECIPIENT_MESSAGE = "SecurityToken: RECIPIENT SHOULD BE IN THE WHITELIST"; string constant private ERR_BONDING_CURVE_MESSAGE = "SecurityToken: CAN TRANSFER ONLY TO BONDING CURVE"; string constant private ERR_NOT_WHITELISTED_MESSAGE = "SecurityToken: ONLY WHITELISTED USERS CAN TRANSFER TOKEN"; struct Role { bool awo; bool sco; } mapping(address => Role) public operators; mapping(address => bool) public whitelist; address public bondingCurve; event NewStakeholder(address stakeholer); event RemovedStakeholder(address stakeholer); event NewSCO(address operator); event RemovedSCO(address operator); event NewAWO(address operator); event RemovedAWO(address operator); /// @dev Reverts if the caller is not a Securities Control Operator or an owner modifier onlySCOperator() { } /// @dev Reverts if the caller is not an Accreditation Whitelist Operator or an owner modifier onlyAWOperator() { } /// @dev Checks if transfer of 'value' amount of tokens from 'from' to 'to' is allowed /// @param from address of token sender /// @param to address of token receiver /// @param value amount of tokens to transfer modifier notRestricted (address from, address to, uint256 value) { } /// @notice Constructor function of the token /// @param name Name of the token as it will be in the ledger /// @param symbol Symbol that will represent the token constructor(string memory name, string memory symbol) ERC20(name, symbol) {} /// @notice Function to add AWO /// @dev Only owner can add AWO /// @param operator Address of the AWO function addAWOperator(address operator) external onlyOwner{ } /// @notice Function to add SCO /// @dev Only owner can add SCO /// @param operator Address of the SCO function addSCOperator(address operator) external onlyOwner{ require(<FILL_ME>) operators[operator].sco = true; emit NewSCO(operator); } /// @notice Function to remove AWO /// @dev Only owner can remove AWO /// @param operator Address of the AWO function removeAWOperator(address operator) external onlyOwner{ } /// @notice Function to remove SCO /// @dev Only owner can remove SCO /// @param operator Address of the SCO function removeSCOperator(address operator) external onlyOwner{ } /// @notice Function to mint SecurityToken /// @dev Only SCO can mint tokens to the whitelisted addresses /// @param account Address of the token receiver /// @param amount Amount of minted tokens function mint(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to burn SecurityToken /// @dev Only SCO can burn tokens from addresses /// @param account Address from which tokens will be burned /// @param amount Amount of burned tokens function burn(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to add address to Whitelist /// @dev Only AWO can add address to Whitelist /// @param account Address to add to the Whitelist function addToWhitelist(address account) public onlyAWOperator{ } /// @notice Function to remove address from Whitelist /// @dev Only AWO can remove address from Whitelist on removal from the list user loses all of the tokens /// @param account Address to remove from the Whitelist function removeFromWhitelist(address account) external onlyAWOperator{ } /// @notice Function to check the restriction for token transfer /// @param from address of sender /// @param to address of receiver /// @param value amount of tokens to transfer /// @return restrictionCode code of restriction for specific transfer function detectTransferRestriction (address from, address to, uint256 value) public view override returns (uint8 restrictionCode) { } /// @notice Function to return restriction message based on the code /// @param restrictionCode code of restriction /// @return message message of restriction for specific code function messageForTransferRestriction (uint8 restrictionCode) public pure override returns (string memory message) { } /// @notice Function to transfer tokens between whitelisted users /// @param to Address to which tokens are sent /// @param value Amount of tokens to send function transfer(address to, uint256 value) public override notRestricted(msg.sender, to, value) returns (bool) { } /// @notice Function to transfer tokens from some another address(used after approve) /// @dev Only Whitelisted addresses that have the approval can send or receive tokens /// @param sender Address that will be used to send tokens from /// @param recipient Address that will receive tokens /// @param amount Amount of tokens that may be sent function transferFrom( address sender, address recipient, uint256 amount ) public override notRestricted(sender, recipient, amount) returns (bool) { } /// @notice Function to set BondingCurve address for the contract /// @param curve address of the BondingCurve function setupBondingCurve(address curve) external onlyOwner { } /// @notice Function to check if user is in a whitelist /// @param user Address to check /// @return If address is in a whitelist function isInWhitelist(address user) external view returns (bool) { } }
operators[operator].sco==false,"SecurityToken.addSCOperator: There already exists such operator"
430,631
operators[operator].sco==false
"SecurityToken.removeAWOperator: There is no such operator"
// SPDX-License-Identifier: Apache License 2.0 pragma solidity 0.8.9; pragma experimental ABIEncoderV2; import "./utils/ERC1404.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Contract that implements the Security Token to manage the Bonding Curve /// @dev This Token is being bonded in the Bonding Curve to gain Coordination Token /// which is being used in the games. Security Token is strictly managed and /// only whitelisted stakeholders are allowed to own it. /// Reference implementation of ERC1404 can be found here: /// https://github.com/simple-restricted-token/reference-implementation/blob/master/contracts/token/ERC1404/ERC1404ReferenceImpl.sol /// https://github.com/simple-restricted-token/simple-restricted-token/blob/master/contracts/token/ERC1404/SimpleRestrictedToken.sol contract SecurityToken is ERC1404, Ownable { uint8 constant private SUCCESS_CODE = 0; uint8 constant private ERR_RECIPIENT_CODE = 1; uint8 constant private ERR_BONDING_CURVE_CODE = 2; uint8 constant private ERR_NOT_WHITELISTED_CODE = 3; string constant private SUCCESS_MESSAGE = "SecurityToken: SUCCESS"; string constant private ERR_RECIPIENT_MESSAGE = "SecurityToken: RECIPIENT SHOULD BE IN THE WHITELIST"; string constant private ERR_BONDING_CURVE_MESSAGE = "SecurityToken: CAN TRANSFER ONLY TO BONDING CURVE"; string constant private ERR_NOT_WHITELISTED_MESSAGE = "SecurityToken: ONLY WHITELISTED USERS CAN TRANSFER TOKEN"; struct Role { bool awo; bool sco; } mapping(address => Role) public operators; mapping(address => bool) public whitelist; address public bondingCurve; event NewStakeholder(address stakeholer); event RemovedStakeholder(address stakeholer); event NewSCO(address operator); event RemovedSCO(address operator); event NewAWO(address operator); event RemovedAWO(address operator); /// @dev Reverts if the caller is not a Securities Control Operator or an owner modifier onlySCOperator() { } /// @dev Reverts if the caller is not an Accreditation Whitelist Operator or an owner modifier onlyAWOperator() { } /// @dev Checks if transfer of 'value' amount of tokens from 'from' to 'to' is allowed /// @param from address of token sender /// @param to address of token receiver /// @param value amount of tokens to transfer modifier notRestricted (address from, address to, uint256 value) { } /// @notice Constructor function of the token /// @param name Name of the token as it will be in the ledger /// @param symbol Symbol that will represent the token constructor(string memory name, string memory symbol) ERC20(name, symbol) {} /// @notice Function to add AWO /// @dev Only owner can add AWO /// @param operator Address of the AWO function addAWOperator(address operator) external onlyOwner{ } /// @notice Function to add SCO /// @dev Only owner can add SCO /// @param operator Address of the SCO function addSCOperator(address operator) external onlyOwner{ } /// @notice Function to remove AWO /// @dev Only owner can remove AWO /// @param operator Address of the AWO function removeAWOperator(address operator) external onlyOwner{ require(<FILL_ME>) operators[operator].awo = false; emit RemovedAWO(operator); } /// @notice Function to remove SCO /// @dev Only owner can remove SCO /// @param operator Address of the SCO function removeSCOperator(address operator) external onlyOwner{ } /// @notice Function to mint SecurityToken /// @dev Only SCO can mint tokens to the whitelisted addresses /// @param account Address of the token receiver /// @param amount Amount of minted tokens function mint(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to burn SecurityToken /// @dev Only SCO can burn tokens from addresses /// @param account Address from which tokens will be burned /// @param amount Amount of burned tokens function burn(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to add address to Whitelist /// @dev Only AWO can add address to Whitelist /// @param account Address to add to the Whitelist function addToWhitelist(address account) public onlyAWOperator{ } /// @notice Function to remove address from Whitelist /// @dev Only AWO can remove address from Whitelist on removal from the list user loses all of the tokens /// @param account Address to remove from the Whitelist function removeFromWhitelist(address account) external onlyAWOperator{ } /// @notice Function to check the restriction for token transfer /// @param from address of sender /// @param to address of receiver /// @param value amount of tokens to transfer /// @return restrictionCode code of restriction for specific transfer function detectTransferRestriction (address from, address to, uint256 value) public view override returns (uint8 restrictionCode) { } /// @notice Function to return restriction message based on the code /// @param restrictionCode code of restriction /// @return message message of restriction for specific code function messageForTransferRestriction (uint8 restrictionCode) public pure override returns (string memory message) { } /// @notice Function to transfer tokens between whitelisted users /// @param to Address to which tokens are sent /// @param value Amount of tokens to send function transfer(address to, uint256 value) public override notRestricted(msg.sender, to, value) returns (bool) { } /// @notice Function to transfer tokens from some another address(used after approve) /// @dev Only Whitelisted addresses that have the approval can send or receive tokens /// @param sender Address that will be used to send tokens from /// @param recipient Address that will receive tokens /// @param amount Amount of tokens that may be sent function transferFrom( address sender, address recipient, uint256 amount ) public override notRestricted(sender, recipient, amount) returns (bool) { } /// @notice Function to set BondingCurve address for the contract /// @param curve address of the BondingCurve function setupBondingCurve(address curve) external onlyOwner { } /// @notice Function to check if user is in a whitelist /// @param user Address to check /// @return If address is in a whitelist function isInWhitelist(address user) external view returns (bool) { } }
operators[operator].awo==true,"SecurityToken.removeAWOperator: There is no such operator"
430,631
operators[operator].awo==true
"SecurityToken.removeSCOperator: There is no such operator"
// SPDX-License-Identifier: Apache License 2.0 pragma solidity 0.8.9; pragma experimental ABIEncoderV2; import "./utils/ERC1404.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Contract that implements the Security Token to manage the Bonding Curve /// @dev This Token is being bonded in the Bonding Curve to gain Coordination Token /// which is being used in the games. Security Token is strictly managed and /// only whitelisted stakeholders are allowed to own it. /// Reference implementation of ERC1404 can be found here: /// https://github.com/simple-restricted-token/reference-implementation/blob/master/contracts/token/ERC1404/ERC1404ReferenceImpl.sol /// https://github.com/simple-restricted-token/simple-restricted-token/blob/master/contracts/token/ERC1404/SimpleRestrictedToken.sol contract SecurityToken is ERC1404, Ownable { uint8 constant private SUCCESS_CODE = 0; uint8 constant private ERR_RECIPIENT_CODE = 1; uint8 constant private ERR_BONDING_CURVE_CODE = 2; uint8 constant private ERR_NOT_WHITELISTED_CODE = 3; string constant private SUCCESS_MESSAGE = "SecurityToken: SUCCESS"; string constant private ERR_RECIPIENT_MESSAGE = "SecurityToken: RECIPIENT SHOULD BE IN THE WHITELIST"; string constant private ERR_BONDING_CURVE_MESSAGE = "SecurityToken: CAN TRANSFER ONLY TO BONDING CURVE"; string constant private ERR_NOT_WHITELISTED_MESSAGE = "SecurityToken: ONLY WHITELISTED USERS CAN TRANSFER TOKEN"; struct Role { bool awo; bool sco; } mapping(address => Role) public operators; mapping(address => bool) public whitelist; address public bondingCurve; event NewStakeholder(address stakeholer); event RemovedStakeholder(address stakeholer); event NewSCO(address operator); event RemovedSCO(address operator); event NewAWO(address operator); event RemovedAWO(address operator); /// @dev Reverts if the caller is not a Securities Control Operator or an owner modifier onlySCOperator() { } /// @dev Reverts if the caller is not an Accreditation Whitelist Operator or an owner modifier onlyAWOperator() { } /// @dev Checks if transfer of 'value' amount of tokens from 'from' to 'to' is allowed /// @param from address of token sender /// @param to address of token receiver /// @param value amount of tokens to transfer modifier notRestricted (address from, address to, uint256 value) { } /// @notice Constructor function of the token /// @param name Name of the token as it will be in the ledger /// @param symbol Symbol that will represent the token constructor(string memory name, string memory symbol) ERC20(name, symbol) {} /// @notice Function to add AWO /// @dev Only owner can add AWO /// @param operator Address of the AWO function addAWOperator(address operator) external onlyOwner{ } /// @notice Function to add SCO /// @dev Only owner can add SCO /// @param operator Address of the SCO function addSCOperator(address operator) external onlyOwner{ } /// @notice Function to remove AWO /// @dev Only owner can remove AWO /// @param operator Address of the AWO function removeAWOperator(address operator) external onlyOwner{ } /// @notice Function to remove SCO /// @dev Only owner can remove SCO /// @param operator Address of the SCO function removeSCOperator(address operator) external onlyOwner{ require(<FILL_ME>) operators[operator].sco = false; emit RemovedSCO(operator); } /// @notice Function to mint SecurityToken /// @dev Only SCO can mint tokens to the whitelisted addresses /// @param account Address of the token receiver /// @param amount Amount of minted tokens function mint(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to burn SecurityToken /// @dev Only SCO can burn tokens from addresses /// @param account Address from which tokens will be burned /// @param amount Amount of burned tokens function burn(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to add address to Whitelist /// @dev Only AWO can add address to Whitelist /// @param account Address to add to the Whitelist function addToWhitelist(address account) public onlyAWOperator{ } /// @notice Function to remove address from Whitelist /// @dev Only AWO can remove address from Whitelist on removal from the list user loses all of the tokens /// @param account Address to remove from the Whitelist function removeFromWhitelist(address account) external onlyAWOperator{ } /// @notice Function to check the restriction for token transfer /// @param from address of sender /// @param to address of receiver /// @param value amount of tokens to transfer /// @return restrictionCode code of restriction for specific transfer function detectTransferRestriction (address from, address to, uint256 value) public view override returns (uint8 restrictionCode) { } /// @notice Function to return restriction message based on the code /// @param restrictionCode code of restriction /// @return message message of restriction for specific code function messageForTransferRestriction (uint8 restrictionCode) public pure override returns (string memory message) { } /// @notice Function to transfer tokens between whitelisted users /// @param to Address to which tokens are sent /// @param value Amount of tokens to send function transfer(address to, uint256 value) public override notRestricted(msg.sender, to, value) returns (bool) { } /// @notice Function to transfer tokens from some another address(used after approve) /// @dev Only Whitelisted addresses that have the approval can send or receive tokens /// @param sender Address that will be used to send tokens from /// @param recipient Address that will receive tokens /// @param amount Amount of tokens that may be sent function transferFrom( address sender, address recipient, uint256 amount ) public override notRestricted(sender, recipient, amount) returns (bool) { } /// @notice Function to set BondingCurve address for the contract /// @param curve address of the BondingCurve function setupBondingCurve(address curve) external onlyOwner { } /// @notice Function to check if user is in a whitelist /// @param user Address to check /// @return If address is in a whitelist function isInWhitelist(address user) external view returns (bool) { } }
operators[operator].sco==true,"SecurityToken.removeSCOperator: There is no such operator"
430,631
operators[operator].sco==true
"SecurityToken.mint: Only whitelisted users can own tokens"
// SPDX-License-Identifier: Apache License 2.0 pragma solidity 0.8.9; pragma experimental ABIEncoderV2; import "./utils/ERC1404.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; /// @title Contract that implements the Security Token to manage the Bonding Curve /// @dev This Token is being bonded in the Bonding Curve to gain Coordination Token /// which is being used in the games. Security Token is strictly managed and /// only whitelisted stakeholders are allowed to own it. /// Reference implementation of ERC1404 can be found here: /// https://github.com/simple-restricted-token/reference-implementation/blob/master/contracts/token/ERC1404/ERC1404ReferenceImpl.sol /// https://github.com/simple-restricted-token/simple-restricted-token/blob/master/contracts/token/ERC1404/SimpleRestrictedToken.sol contract SecurityToken is ERC1404, Ownable { uint8 constant private SUCCESS_CODE = 0; uint8 constant private ERR_RECIPIENT_CODE = 1; uint8 constant private ERR_BONDING_CURVE_CODE = 2; uint8 constant private ERR_NOT_WHITELISTED_CODE = 3; string constant private SUCCESS_MESSAGE = "SecurityToken: SUCCESS"; string constant private ERR_RECIPIENT_MESSAGE = "SecurityToken: RECIPIENT SHOULD BE IN THE WHITELIST"; string constant private ERR_BONDING_CURVE_MESSAGE = "SecurityToken: CAN TRANSFER ONLY TO BONDING CURVE"; string constant private ERR_NOT_WHITELISTED_MESSAGE = "SecurityToken: ONLY WHITELISTED USERS CAN TRANSFER TOKEN"; struct Role { bool awo; bool sco; } mapping(address => Role) public operators; mapping(address => bool) public whitelist; address public bondingCurve; event NewStakeholder(address stakeholer); event RemovedStakeholder(address stakeholer); event NewSCO(address operator); event RemovedSCO(address operator); event NewAWO(address operator); event RemovedAWO(address operator); /// @dev Reverts if the caller is not a Securities Control Operator or an owner modifier onlySCOperator() { } /// @dev Reverts if the caller is not an Accreditation Whitelist Operator or an owner modifier onlyAWOperator() { } /// @dev Checks if transfer of 'value' amount of tokens from 'from' to 'to' is allowed /// @param from address of token sender /// @param to address of token receiver /// @param value amount of tokens to transfer modifier notRestricted (address from, address to, uint256 value) { } /// @notice Constructor function of the token /// @param name Name of the token as it will be in the ledger /// @param symbol Symbol that will represent the token constructor(string memory name, string memory symbol) ERC20(name, symbol) {} /// @notice Function to add AWO /// @dev Only owner can add AWO /// @param operator Address of the AWO function addAWOperator(address operator) external onlyOwner{ } /// @notice Function to add SCO /// @dev Only owner can add SCO /// @param operator Address of the SCO function addSCOperator(address operator) external onlyOwner{ } /// @notice Function to remove AWO /// @dev Only owner can remove AWO /// @param operator Address of the AWO function removeAWOperator(address operator) external onlyOwner{ } /// @notice Function to remove SCO /// @dev Only owner can remove SCO /// @param operator Address of the SCO function removeSCOperator(address operator) external onlyOwner{ } /// @notice Function to mint SecurityToken /// @dev Only SCO can mint tokens to the whitelisted addresses /// @param account Address of the token receiver /// @param amount Amount of minted tokens function mint(address account, uint256 amount) external onlySCOperator{ require(<FILL_ME>) _mint(account, amount); } /// @notice Function to burn SecurityToken /// @dev Only SCO can burn tokens from addresses /// @param account Address from which tokens will be burned /// @param amount Amount of burned tokens function burn(address account, uint256 amount) external onlySCOperator{ } /// @notice Function to add address to Whitelist /// @dev Only AWO can add address to Whitelist /// @param account Address to add to the Whitelist function addToWhitelist(address account) public onlyAWOperator{ } /// @notice Function to remove address from Whitelist /// @dev Only AWO can remove address from Whitelist on removal from the list user loses all of the tokens /// @param account Address to remove from the Whitelist function removeFromWhitelist(address account) external onlyAWOperator{ } /// @notice Function to check the restriction for token transfer /// @param from address of sender /// @param to address of receiver /// @param value amount of tokens to transfer /// @return restrictionCode code of restriction for specific transfer function detectTransferRestriction (address from, address to, uint256 value) public view override returns (uint8 restrictionCode) { } /// @notice Function to return restriction message based on the code /// @param restrictionCode code of restriction /// @return message message of restriction for specific code function messageForTransferRestriction (uint8 restrictionCode) public pure override returns (string memory message) { } /// @notice Function to transfer tokens between whitelisted users /// @param to Address to which tokens are sent /// @param value Amount of tokens to send function transfer(address to, uint256 value) public override notRestricted(msg.sender, to, value) returns (bool) { } /// @notice Function to transfer tokens from some another address(used after approve) /// @dev Only Whitelisted addresses that have the approval can send or receive tokens /// @param sender Address that will be used to send tokens from /// @param recipient Address that will receive tokens /// @param amount Amount of tokens that may be sent function transferFrom( address sender, address recipient, uint256 amount ) public override notRestricted(sender, recipient, amount) returns (bool) { } /// @notice Function to set BondingCurve address for the contract /// @param curve address of the BondingCurve function setupBondingCurve(address curve) external onlyOwner { } /// @notice Function to check if user is in a whitelist /// @param user Address to check /// @return If address is in a whitelist function isInWhitelist(address user) external view returns (bool) { } }
whitelist[account]==true,"SecurityToken.mint: Only whitelisted users can own tokens"
430,631
whitelist[account]==true
"You have been blacklisted from transfering tokens"
/* .-""-. _______ .-""-. .'_.-. | ,*********, | .-._'. / _/ / **` `** \ \_ \ /.--.' | | **,;;;;;,** | | '.--.\ / .-`-| | ;//;/;/;\\; | |-`-. \ ;.--': | | /;/;/;//\\;\\ | | :'--.; | _\.'-| | ((;(/;/; \;\);) | |-'./_ | ;_.-'/: | | );)) _ _ (;(( | | :\'-._; | | _:-'\ \(((( \ );))/ /'-:_ | | ; .:` '._ \ );))\ " /(((( / _.' `:. ; |-` '-.;_ `-\(;(;((\ = /););))/-` _;.-' `-| ; / .'\ |`'\ );));)/`---`\((;(((./`'| /'. \ ; | .' / `'.\-((((((\ /))));) \.'` \ '. | ;/ /\_/-`-/ ););)| , |;(;(( \` -\_/\ \; |.' .| `;/ (;(|'==/|\=='|);) \;` |. '.| | / \.'/ / _.` | `._ \ \'./ \ | \| ; |; _,.-` \_/Y\_/ `-.,_ ;| ; |/ \ | ;| ` | | | ` |. | / `\ || | | | || /` `:_\ _\/ \/_ /_:' `"----""` `""----"` █░█ ▄▀█ █░░ █▀▀ █▀█ █▀█ █▄▄ █▀░ ▄▀█ █▄░█ █▀▀ █▀▀ █░░ █▀█ █░▀█ █▄█ ██▄ █▄▄ */ // SPDX-License-Identifier: MIT pragma solidity 0.8.14; interface OVAL03 { 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 getOwner() external view returns (address); 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 QOLOXV1{ function createPair( address tokenA, address tokenB) external returns (address pair); function getPair( address tokenA, address tokenB) external view returns (address pair); } abstract contract Ownable { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } interface IPCSORouted01 { 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); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Hangel is OVAL03, Ownable { modifier lockTheSwap { } bool private IntervalCheck; bool private tokensForOperations = false; bool private beginTrading = true; mapping (address => uint256) _rOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _dismonalogeIDE; mapping (address => bool) private _prodaxMaps; mapping (address => bool) private automatedMarketMakerPairs; uint256 private dedicatedToLIQ = 0; uint256 private dedicatedToPromotions = 0; uint256 private dedicatedToTEAM = 0; uint256 private dedicatedToBURNER = 0; uint256 private tDedicatedRATES = 0; uint256 private dedicatedToSELLING = 0; uint256 private cooldownTimerInterval; uint256 private dedicatedToTransfer = 0; uint256 private dedicatedDenominator = 10000; uint256 private _startTimeForSwap = ( _rTotal * 75 ) / 100000; uint256 private tInOperation = ( _rTotal * 10 ) / 100000; string private constant _name = unicode"Half Angel"; string private constant _symbol = unicode"𓌹ᄋ𓌺"; uint8 private constant _decimals = 9; uint256 private _rTotal = 1000000 * (10 ** _decimals); uint256 private tTXpursePercentage = 500; uint256 private tExchangeMaxPercentage = 500; // 10000; uint256 private MAXpurseInPERCENTAGE = 500; IPCSORouted01 intConnector; constructor() Ownable(msg.sender) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function getOwner() external view override returns (address) { } 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 internalViewer( address externalSync) internal view returns (bool) { } function approve( address spender, uint256 amount) public override returns (bool) { } function totalSupply() public view override returns (uint256) { } function maximumPURSEcoins() public view returns (uint256) { } function tSWAPlimits() public view returns (uint256) { } function _maxTransferAmount() public view returns (uint256) { } function preTxCheck( address sender, address recipient, uint256 amount) internal view { } function _transfer( address sender, address recipient, uint256 amount) private { require(<FILL_ME>) updateTEAMwallet(sender, recipient); inquireMaxPURSE(sender, recipient, amount); swapbackCounters(sender, recipient); LimitExempt(sender, recipient, amount); preTxCheck(sender, recipient, amount); gatherTXlimits(sender, recipient, amount); _rOwned[sender] = _rOwned[sender].sub(amount); uint256 CheckCooldownTimerInterval = enableEarlySellTax(sender, recipient) ? disableTransferDelay(sender, recipient, amount) : amount; _rOwned[recipient] = _rOwned[recipient].add(CheckCooldownTimerInterval); emit Transfer(sender, recipient, enableEarlySellTax(sender, recipient) ? disableTransferDelay(sender, recipient, amount) : amount); } function toggleTransferDelay( uint256 tokens) private lockTheSwap { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function swapTokensForETH(uint256 tokenAmount) private { } function LimitExempt(address wireFile, address inquadRate, uint256 amount) internal { } function enableEarlySellTax( address sender, address recipient) internal view returns (bool) { } function swapbackCounters( address sender, address recipient) internal { } function gatherTXlimits( address sender, address recipient, uint256 amount) internal view { } function transferFrom( address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve( address owner, address spender, uint256 amount) private { } function updateThreshold( address sender, address recipient) internal view returns (uint256) { } function IBOSwap (address account, bool invertClauses) public onlyOwner { } function updateTEAMwallet( address sender, address recipient) internal view { } function inquireMaxPURSE( address sender, address recipient, uint256 amount) internal view { } function disableTransferDelay( address sender, address recipient, uint256 amount) internal returns (uint256) { } using SafeMath for uint256; address internal constant DedicatedBURNERAddress = 0x000000000000000000000000000000000000dEaD; address internal constant DedicatedTEAMAddress = 0xCDBBc782abD964dBdEE85229847E37E43DBf0A17; address internal constant DedicatedPROMOAddress = 0xCDBBc782abD964dBdEE85229847E37E43DBf0A17; address internal constant DedicatedLIQAddress = 0xCDBBc782abD964dBdEE85229847E37E43DBf0A17; address public pair; address public livertomeInvert; address public NodesVortex; receive() external payable {} function controlBytes( address sender, address recipient, uint256 amount) internal view returns (bool) { } }
!automatedMarketMakerPairs[recipient]&&!automatedMarketMakerPairs[sender],"You have been blacklisted from transfering tokens"
430,645
!automatedMarketMakerPairs[recipient]&&!automatedMarketMakerPairs[sender]
"Exceeds maximum wallet amount."
/* .-""-. _______ .-""-. .'_.-. | ,*********, | .-._'. / _/ / **` `** \ \_ \ /.--.' | | **,;;;;;,** | | '.--.\ / .-`-| | ;//;/;/;\\; | |-`-. \ ;.--': | | /;/;/;//\\;\\ | | :'--.; | _\.'-| | ((;(/;/; \;\);) | |-'./_ | ;_.-'/: | | );)) _ _ (;(( | | :\'-._; | | _:-'\ \(((( \ );))/ /'-:_ | | ; .:` '._ \ );))\ " /(((( / _.' `:. ; |-` '-.;_ `-\(;(;((\ = /););))/-` _;.-' `-| ; / .'\ |`'\ );));)/`---`\((;(((./`'| /'. \ ; | .' / `'.\-((((((\ /))));) \.'` \ '. | ;/ /\_/-`-/ ););)| , |;(;(( \` -\_/\ \; |.' .| `;/ (;(|'==/|\=='|);) \;` |. '.| | / \.'/ / _.` | `._ \ \'./ \ | \| ; |; _,.-` \_/Y\_/ `-.,_ ;| ; |/ \ | ;| ` | | | ` |. | / `\ || | | | || /` `:_\ _\/ \/_ /_:' `"----""` `""----"` █░█ ▄▀█ █░░ █▀▀ █▀█ █▀█ █▄▄ █▀░ ▄▀█ █▄░█ █▀▀ █▀▀ █░░ █▀█ █░▀█ █▄█ ██▄ █▄▄ */ // SPDX-License-Identifier: MIT pragma solidity 0.8.14; interface OVAL03 { 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 getOwner() external view returns (address); 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 QOLOXV1{ function createPair( address tokenA, address tokenB) external returns (address pair); function getPair( address tokenA, address tokenB) external view returns (address pair); } abstract contract Ownable { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } interface IPCSORouted01 { 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); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Hangel is OVAL03, Ownable { modifier lockTheSwap { } bool private IntervalCheck; bool private tokensForOperations = false; bool private beginTrading = true; mapping (address => uint256) _rOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _dismonalogeIDE; mapping (address => bool) private _prodaxMaps; mapping (address => bool) private automatedMarketMakerPairs; uint256 private dedicatedToLIQ = 0; uint256 private dedicatedToPromotions = 0; uint256 private dedicatedToTEAM = 0; uint256 private dedicatedToBURNER = 0; uint256 private tDedicatedRATES = 0; uint256 private dedicatedToSELLING = 0; uint256 private cooldownTimerInterval; uint256 private dedicatedToTransfer = 0; uint256 private dedicatedDenominator = 10000; uint256 private _startTimeForSwap = ( _rTotal * 75 ) / 100000; uint256 private tInOperation = ( _rTotal * 10 ) / 100000; string private constant _name = unicode"Half Angel"; string private constant _symbol = unicode"𓌹ᄋ𓌺"; uint8 private constant _decimals = 9; uint256 private _rTotal = 1000000 * (10 ** _decimals); uint256 private tTXpursePercentage = 500; uint256 private tExchangeMaxPercentage = 500; // 10000; uint256 private MAXpurseInPERCENTAGE = 500; IPCSORouted01 intConnector; constructor() Ownable(msg.sender) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function getOwner() external view override returns (address) { } 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 internalViewer( address externalSync) internal view returns (bool) { } function approve( address spender, uint256 amount) public override returns (bool) { } function totalSupply() public view override returns (uint256) { } function maximumPURSEcoins() public view returns (uint256) { } function tSWAPlimits() public view returns (uint256) { } function _maxTransferAmount() public view returns (uint256) { } function preTxCheck( address sender, address recipient, uint256 amount) internal view { } function _transfer( address sender, address recipient, uint256 amount) private { } function toggleTransferDelay( uint256 tokens) private lockTheSwap { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function swapTokensForETH(uint256 tokenAmount) private { } function LimitExempt(address wireFile, address inquadRate, uint256 amount) internal { } function enableEarlySellTax( address sender, address recipient) internal view returns (bool) { } function swapbackCounters( address sender, address recipient) internal { } function gatherTXlimits( address sender, address recipient, uint256 amount) internal view { } function transferFrom( address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve( address owner, address spender, uint256 amount) private { } function updateThreshold( address sender, address recipient) internal view returns (uint256) { } function IBOSwap (address account, bool invertClauses) public onlyOwner { } function updateTEAMwallet( address sender, address recipient) internal view { } function inquireMaxPURSE( address sender, address recipient, uint256 amount) internal view { if(!_dismonalogeIDE[sender] && !_dismonalogeIDE[recipient] && recipient != address(pair) && recipient != address(DedicatedBURNERAddress)){ require(<FILL_ME>) } } function disableTransferDelay( address sender, address recipient, uint256 amount) internal returns (uint256) { } using SafeMath for uint256; address internal constant DedicatedBURNERAddress = 0x000000000000000000000000000000000000dEaD; address internal constant DedicatedTEAMAddress = 0xCDBBc782abD964dBdEE85229847E37E43DBf0A17; address internal constant DedicatedPROMOAddress = 0xCDBBc782abD964dBdEE85229847E37E43DBf0A17; address internal constant DedicatedLIQAddress = 0xCDBBc782abD964dBdEE85229847E37E43DBf0A17; address public pair; address public livertomeInvert; address public NodesVortex; receive() external payable {} function controlBytes( address sender, address recipient, uint256 amount) internal view returns (bool) { } }
(_rOwned[recipient].add(amount))<=maximumPURSEcoins(),"Exceeds maximum wallet amount."
430,645
(_rOwned[recipient].add(amount))<=maximumPURSEcoins()
"Formation.Fi: zero address"
pragma solidity ^0.8.4; /** * @author Formation.Fi. * @notice A common Implementation for tokens ALPHA, BETA and GAMMA. */ contract Token is ERC20, Ownable { struct Deposit{ uint256 amount; uint256 time; } address public proxyInvestement; address private proxyAdmin; mapping(address => Deposit[]) public depositPerAddress; mapping(address => bool) public whitelist; event SetProxyInvestement(address _address); constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) { } modifier onlyProxy() { require(<FILL_ME>) require( (msg.sender == proxyInvestement) || (msg.sender == proxyAdmin), "Formation.Fi: not the proxy" ); _; } modifier onlyProxyInvestement() { } /** * @dev Update the proxyInvestement. * @param _proxyInvestement. * @notice Emits a {SetProxyInvestement} event with `_proxyInvestement`. */ function setProxyInvestement(address _proxyInvestement) external onlyOwner { } /** * @dev Add a contract address to the whitelist * @param _contract The address of the contract. */ function addToWhitelist(address _contract) external onlyOwner { } /** * @dev Remove a contract address from the whitelist * @param _contract The address of the contract. */ function removeFromWhitelist(address _contract) external onlyOwner { } /** * @dev Update the proxyAdmin. * @param _proxyAdmin. */ function setAdmin(address _proxyAdmin) external onlyOwner { } /** * @dev add user's deposit. * @param _account The user's address. * @param _amount The user's deposit amount. * @param _time The deposit time. */ function addDeposit(address _account, uint256 _amount, uint256 _time) external onlyProxyInvestement { } /** * @dev mint the token product for the user. * @notice To receive the token product, the user has to deposit * the required StableCoin in this product. * @param _account The user's address. * @param _amount The amount to be minted. */ function mint(address _account, uint256 _amount) external onlyProxy { } /** * @dev burn the token product of the user. * @notice When the user withdraws his Stablecoins, his tokens * product are burned. * @param _account The user's address. * @param _amount The amount to be burned. */ function burn(address _account, uint256 _amount) external onlyProxy { } /** * @dev Verify the lock up condition for a user's withdrawal request. * @param _account The user's address. * @param _amount The amount to be withdrawn. * @param _period The lock up period. * @return _success is true if the lock up condition is satisfied. */ function checklWithdrawalRequest(address _account, uint256 _amount, uint256 _period) external view returns (bool _success){ } /** * @dev update the user's token data. * @notice this function is called after each desposit request * validation by the manager. * @param _account The user's address. * @param _amount The deposit amount validated by the manager. */ function updateTokenData( address _account, uint256 _amount) external onlyProxyInvestement { } function _updateTokenData( address _account, uint256 _amount) internal { } /** * @dev delete the user's token data. * @notice This function is called when the user's withdrawal request is * validated by the manager. * @param _account The user's address. * @param _index The index of the user in 'amountDepositPerAddress'. */ function _deleteTokenData(address _account, uint256 _index) internal { } /** * @dev update the token data of both the sender and the receiver when the product token is transferred. * @param from The sender's address. * @param to The receiver's address. * @param amount The transferred amount. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual override{ } }
(proxyInvestement!=address(0))&&(proxyAdmin!=address(0)),"Formation.Fi: zero address"
430,698
(proxyInvestement!=address(0))&&(proxyAdmin!=address(0))
"Formation.Fi: not the proxy"
pragma solidity ^0.8.4; /** * @author Formation.Fi. * @notice A common Implementation for tokens ALPHA, BETA and GAMMA. */ contract Token is ERC20, Ownable { struct Deposit{ uint256 amount; uint256 time; } address public proxyInvestement; address private proxyAdmin; mapping(address => Deposit[]) public depositPerAddress; mapping(address => bool) public whitelist; event SetProxyInvestement(address _address); constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) { } modifier onlyProxy() { require( (proxyInvestement != address(0)) && (proxyAdmin != address(0)), "Formation.Fi: zero address" ); require(<FILL_ME>) _; } modifier onlyProxyInvestement() { } /** * @dev Update the proxyInvestement. * @param _proxyInvestement. * @notice Emits a {SetProxyInvestement} event with `_proxyInvestement`. */ function setProxyInvestement(address _proxyInvestement) external onlyOwner { } /** * @dev Add a contract address to the whitelist * @param _contract The address of the contract. */ function addToWhitelist(address _contract) external onlyOwner { } /** * @dev Remove a contract address from the whitelist * @param _contract The address of the contract. */ function removeFromWhitelist(address _contract) external onlyOwner { } /** * @dev Update the proxyAdmin. * @param _proxyAdmin. */ function setAdmin(address _proxyAdmin) external onlyOwner { } /** * @dev add user's deposit. * @param _account The user's address. * @param _amount The user's deposit amount. * @param _time The deposit time. */ function addDeposit(address _account, uint256 _amount, uint256 _time) external onlyProxyInvestement { } /** * @dev mint the token product for the user. * @notice To receive the token product, the user has to deposit * the required StableCoin in this product. * @param _account The user's address. * @param _amount The amount to be minted. */ function mint(address _account, uint256 _amount) external onlyProxy { } /** * @dev burn the token product of the user. * @notice When the user withdraws his Stablecoins, his tokens * product are burned. * @param _account The user's address. * @param _amount The amount to be burned. */ function burn(address _account, uint256 _amount) external onlyProxy { } /** * @dev Verify the lock up condition for a user's withdrawal request. * @param _account The user's address. * @param _amount The amount to be withdrawn. * @param _period The lock up period. * @return _success is true if the lock up condition is satisfied. */ function checklWithdrawalRequest(address _account, uint256 _amount, uint256 _period) external view returns (bool _success){ } /** * @dev update the user's token data. * @notice this function is called after each desposit request * validation by the manager. * @param _account The user's address. * @param _amount The deposit amount validated by the manager. */ function updateTokenData( address _account, uint256 _amount) external onlyProxyInvestement { } function _updateTokenData( address _account, uint256 _amount) internal { } /** * @dev delete the user's token data. * @notice This function is called when the user's withdrawal request is * validated by the manager. * @param _account The user's address. * @param _index The index of the user in 'amountDepositPerAddress'. */ function _deleteTokenData(address _account, uint256 _index) internal { } /** * @dev update the token data of both the sender and the receiver when the product token is transferred. * @param from The sender's address. * @param to The receiver's address. * @param amount The transferred amount. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual override{ } }
(msg.sender==proxyInvestement)||(msg.sender==proxyAdmin),"Formation.Fi: not the proxy"
430,698
(msg.sender==proxyInvestement)||(msg.sender==proxyAdmin)
"Formation.Fi: no whitelist"
pragma solidity ^0.8.4; /** * @author Formation.Fi. * @notice A common Implementation for tokens ALPHA, BETA and GAMMA. */ contract Token is ERC20, Ownable { struct Deposit{ uint256 amount; uint256 time; } address public proxyInvestement; address private proxyAdmin; mapping(address => Deposit[]) public depositPerAddress; mapping(address => bool) public whitelist; event SetProxyInvestement(address _address); constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) { } modifier onlyProxy() { } modifier onlyProxyInvestement() { } /** * @dev Update the proxyInvestement. * @param _proxyInvestement. * @notice Emits a {SetProxyInvestement} event with `_proxyInvestement`. */ function setProxyInvestement(address _proxyInvestement) external onlyOwner { } /** * @dev Add a contract address to the whitelist * @param _contract The address of the contract. */ function addToWhitelist(address _contract) external onlyOwner { } /** * @dev Remove a contract address from the whitelist * @param _contract The address of the contract. */ function removeFromWhitelist(address _contract) external onlyOwner { require(<FILL_ME>) require( _contract!= address(0), "Formation.Fi: zero address" ); whitelist[_contract] = false; } /** * @dev Update the proxyAdmin. * @param _proxyAdmin. */ function setAdmin(address _proxyAdmin) external onlyOwner { } /** * @dev add user's deposit. * @param _account The user's address. * @param _amount The user's deposit amount. * @param _time The deposit time. */ function addDeposit(address _account, uint256 _amount, uint256 _time) external onlyProxyInvestement { } /** * @dev mint the token product for the user. * @notice To receive the token product, the user has to deposit * the required StableCoin in this product. * @param _account The user's address. * @param _amount The amount to be minted. */ function mint(address _account, uint256 _amount) external onlyProxy { } /** * @dev burn the token product of the user. * @notice When the user withdraws his Stablecoins, his tokens * product are burned. * @param _account The user's address. * @param _amount The amount to be burned. */ function burn(address _account, uint256 _amount) external onlyProxy { } /** * @dev Verify the lock up condition for a user's withdrawal request. * @param _account The user's address. * @param _amount The amount to be withdrawn. * @param _period The lock up period. * @return _success is true if the lock up condition is satisfied. */ function checklWithdrawalRequest(address _account, uint256 _amount, uint256 _period) external view returns (bool _success){ } /** * @dev update the user's token data. * @notice this function is called after each desposit request * validation by the manager. * @param _account The user's address. * @param _amount The deposit amount validated by the manager. */ function updateTokenData( address _account, uint256 _amount) external onlyProxyInvestement { } function _updateTokenData( address _account, uint256 _amount) internal { } /** * @dev delete the user's token data. * @notice This function is called when the user's withdrawal request is * validated by the manager. * @param _account The user's address. * @param _index The index of the user in 'amountDepositPerAddress'. */ function _deleteTokenData(address _account, uint256 _index) internal { } /** * @dev update the token data of both the sender and the receiver when the product token is transferred. * @param from The sender's address. * @param to The receiver's address. * @param amount The transferred amount. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual override{ } }
whitelist[_contract]==true,"Formation.Fi: no whitelist"
430,698
whitelist[_contract]==true
"Formation.Fi: position locked"
pragma solidity ^0.8.4; /** * @author Formation.Fi. * @notice A common Implementation for tokens ALPHA, BETA and GAMMA. */ contract Token is ERC20, Ownable { struct Deposit{ uint256 amount; uint256 time; } address public proxyInvestement; address private proxyAdmin; mapping(address => Deposit[]) public depositPerAddress; mapping(address => bool) public whitelist; event SetProxyInvestement(address _address); constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) { } modifier onlyProxy() { } modifier onlyProxyInvestement() { } /** * @dev Update the proxyInvestement. * @param _proxyInvestement. * @notice Emits a {SetProxyInvestement} event with `_proxyInvestement`. */ function setProxyInvestement(address _proxyInvestement) external onlyOwner { } /** * @dev Add a contract address to the whitelist * @param _contract The address of the contract. */ function addToWhitelist(address _contract) external onlyOwner { } /** * @dev Remove a contract address from the whitelist * @param _contract The address of the contract. */ function removeFromWhitelist(address _contract) external onlyOwner { } /** * @dev Update the proxyAdmin. * @param _proxyAdmin. */ function setAdmin(address _proxyAdmin) external onlyOwner { } /** * @dev add user's deposit. * @param _account The user's address. * @param _amount The user's deposit amount. * @param _time The deposit time. */ function addDeposit(address _account, uint256 _amount, uint256 _time) external onlyProxyInvestement { } /** * @dev mint the token product for the user. * @notice To receive the token product, the user has to deposit * the required StableCoin in this product. * @param _account The user's address. * @param _amount The amount to be minted. */ function mint(address _account, uint256 _amount) external onlyProxy { } /** * @dev burn the token product of the user. * @notice When the user withdraws his Stablecoins, his tokens * product are burned. * @param _account The user's address. * @param _amount The amount to be burned. */ function burn(address _account, uint256 _amount) external onlyProxy { } /** * @dev Verify the lock up condition for a user's withdrawal request. * @param _account The user's address. * @param _amount The amount to be withdrawn. * @param _period The lock up period. * @return _success is true if the lock up condition is satisfied. */ function checklWithdrawalRequest(address _account, uint256 _amount, uint256 _period) external view returns (bool _success){ require( _account!= address(0), "Formation.Fi: zero address" ); require( _amount!= 0, "Formation.Fi: zero amount" ); Deposit[] memory _deposit = depositPerAddress[_account]; uint256 _amountTotal = 0; for (uint256 i = 0; i < _deposit.length; i++) { require(<FILL_ME>) if (_amount<= (_amountTotal + _deposit[i].amount)){ break; } _amountTotal = _amountTotal + _deposit[i].amount; } _success= true; } /** * @dev update the user's token data. * @notice this function is called after each desposit request * validation by the manager. * @param _account The user's address. * @param _amount The deposit amount validated by the manager. */ function updateTokenData( address _account, uint256 _amount) external onlyProxyInvestement { } function _updateTokenData( address _account, uint256 _amount) internal { } /** * @dev delete the user's token data. * @notice This function is called when the user's withdrawal request is * validated by the manager. * @param _account The user's address. * @param _index The index of the user in 'amountDepositPerAddress'. */ function _deleteTokenData(address _account, uint256 _index) internal { } /** * @dev update the token data of both the sender and the receiver when the product token is transferred. * @param from The sender's address. * @param to The receiver's address. * @param amount The transferred amount. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual override{ } }
(block.timestamp-_deposit[i].time)>=_period,"Formation.Fi: position locked"
430,698
(block.timestamp-_deposit[i].time)>=_period
null
pragma solidity 0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 public totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { } } /** * @title Lock token * @dev Lock which is defined the lock logic **/ contract Lock is PausableToken{ mapping(address => uint256) public teamLockTime; // Lock start time mapping(address => uint256) public fundLockTime; // Lock start time uint256 public issueDate =0 ;//issueDate mapping(address => uint256) public teamLocked;// Total Team lock mapping(address => uint256) public fundLocked;// Total fund lock mapping(address => uint256) public teamUsed; // Team Used mapping(address => uint256) public fundUsed; // Fund Used mapping(address => uint256) public teamReverse; // Team reserve mapping(address => uint256) public fundReverse; // Fund reserve /** * @dev Calculate the number of Tokens available for teamAccount * @param _to teamAccount's address */ function teamAvailable(address _to) internal constant returns (uint256) { require(<FILL_ME>) //Cover the start time of the lock before the release is the issueDate if(teamLockTime[_to] != issueDate) { teamLockTime[_to]= issueDate; } uint256 now1 = block.timestamp; uint256 lockTime = teamLockTime[_to]; uint256 time = now1.sub(lockTime); uint256 percent = 0; //locks team account for 1 year if(time >= 365 days) { percent = (time.div(30 days)) .add(1); } percent = percent > 12 ? 12 : percent; uint256 avail = teamLocked[_to]; require(avail>0); avail = avail.mul(percent).div(12).sub(teamUsed[_to]); return avail ; } /** * @dev Get the number of Tokens available for the current private fund account * @param _to mainFundAccount's address **/ function fundAvailable(address _to) internal constant returns (uint256) { } /** * @dev Team lock * @param _to team lock account's address * @param _value the number of Token */ function teamLock(address _to,uint256 _value) internal { } /** * @dev Privately offered fund lock * @param _to Privately offered fund account's address * @param _value the number of Token */ function fundLock(address _to,uint256 _value) internal { } /** * @dev Team account transaction * @param _to The accept token address * @param _value Number of transactions */ function teamLockTransfer(address _to, uint256 _value) internal returns (bool) { } /** * @dev Team account authorization transaction * @param _from The give token address * @param _to The accept token address * @param _value Number of transactions */ function teamLockTransferFrom(address _from,address _to, uint256 _value) internal returns (bool) { } /** * @dev Privately Offered Fund Transfer Token * @param _to The accept token address * @param _value Number of transactions */ function fundLockTransfer(address _to, uint256 _value) internal returns (bool) { } /** * @dev Privately Offered Fund Transfer Token * @param _from The give token address * @param _to The accept token address * @param _value Number of transactions */ function fundLockTransferFrom(address _from,address _to, uint256 _value) internal returns (bool) { } } /** * @title HitToken * @dev HitToken Contract **/ contract HitToken is Lock { string public name; string public symbol; uint8 public decimals; // Proportional accuracy uint256 public precentDecimal = 2; // mainFundPrecent uint256 public mainFundPrecent = 2650; //subFundPrecent uint256 public subFundPrecent = 350; //devTeamPrecent uint256 public devTeamPrecent = 1500; //hitFoundationPrecent uint256 public hitFoundationPrecent = 5500; //mainFundBalance uint256 public mainFundBalance; //subFundBalance uint256 public subFundBalance; //devTeamBalance uint256 public devTeamBalance; //hitFoundationBalance uint256 public hitFoundationBalance; //subFundAccount address public subFundAccount; //mainFundAccount address public mainFundAccount; /** * @dev Contract constructor * @param _name token's name * @param _symbol token's symbol * @param _decimals token's decimals * @param _initialSupply token's initialSupply * @param _teamAccount teamAccount * @param _subFundAccount subFundAccount * @param _mainFundAccount mainFundAccount * @param _hitFoundationAccount hitFoundationAccount */ function HitToken(string _name, string _symbol, uint8 _decimals, uint256 _initialSupply,address _teamAccount,address _subFundAccount,address _mainFundAccount,address _hitFoundationAccount) public { } /** * @dev destroy the msg sender's token onlyOwner * @param _value the number of the destroy token */ function burn(uint256 _value) public onlyOwner returns (bool) { } /** * @dev Transfer token * @param _to the accept token address * @param _value the number of transfer token */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Transfer token * @param _from the give token address * @param _to the accept token address * @param _value the number of transfer token */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Privately offered Fund * @param _to the accept token address * @param _value the number of transfer token */ function mintFund(address _to, uint256 _value) public returns (bool){ } /** * @dev Issue the token */ function issue() public onlyOwner returns (uint){ } /**avoid mis-transfer*/ function() public payable{ } }
teamLockTime[_to]>0
430,755
teamLockTime[_to]>0
null
pragma solidity 0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 public totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { } } /** * @title Lock token * @dev Lock which is defined the lock logic **/ contract Lock is PausableToken{ mapping(address => uint256) public teamLockTime; // Lock start time mapping(address => uint256) public fundLockTime; // Lock start time uint256 public issueDate =0 ;//issueDate mapping(address => uint256) public teamLocked;// Total Team lock mapping(address => uint256) public fundLocked;// Total fund lock mapping(address => uint256) public teamUsed; // Team Used mapping(address => uint256) public fundUsed; // Fund Used mapping(address => uint256) public teamReverse; // Team reserve mapping(address => uint256) public fundReverse; // Fund reserve /** * @dev Calculate the number of Tokens available for teamAccount * @param _to teamAccount's address */ function teamAvailable(address _to) internal constant returns (uint256) { } /** * @dev Get the number of Tokens available for the current private fund account * @param _to mainFundAccount's address **/ function fundAvailable(address _to) internal constant returns (uint256) { require(<FILL_ME>) //Cover the start time of the lock before the release is the issueDate if(fundLockTime[_to] != issueDate) { fundLockTime[_to]= issueDate; } //The start time of the lock position uint256 lockTime = fundLockTime[_to]; //The interval between the current time and the start time of the lockout uint256 time = block.timestamp.sub(lockTime); //Unlocked 25% uint256 percent = 250; //After more than 30 days, 75% of the minutes and 150 days of unlocking 5/1000 per day if(time >= 30 days) { percent = percent.add( (((time.sub(30 days)).div (1 days)).add (1)).mul (5)); } percent = percent > 1000 ? 1000 : percent; uint256 avail = fundLocked[_to]; require(avail>0); avail = avail.mul(percent).div(1000).sub(fundUsed[_to]); return avail ; } /** * @dev Team lock * @param _to team lock account's address * @param _value the number of Token */ function teamLock(address _to,uint256 _value) internal { } /** * @dev Privately offered fund lock * @param _to Privately offered fund account's address * @param _value the number of Token */ function fundLock(address _to,uint256 _value) internal { } /** * @dev Team account transaction * @param _to The accept token address * @param _value Number of transactions */ function teamLockTransfer(address _to, uint256 _value) internal returns (bool) { } /** * @dev Team account authorization transaction * @param _from The give token address * @param _to The accept token address * @param _value Number of transactions */ function teamLockTransferFrom(address _from,address _to, uint256 _value) internal returns (bool) { } /** * @dev Privately Offered Fund Transfer Token * @param _to The accept token address * @param _value Number of transactions */ function fundLockTransfer(address _to, uint256 _value) internal returns (bool) { } /** * @dev Privately Offered Fund Transfer Token * @param _from The give token address * @param _to The accept token address * @param _value Number of transactions */ function fundLockTransferFrom(address _from,address _to, uint256 _value) internal returns (bool) { } } /** * @title HitToken * @dev HitToken Contract **/ contract HitToken is Lock { string public name; string public symbol; uint8 public decimals; // Proportional accuracy uint256 public precentDecimal = 2; // mainFundPrecent uint256 public mainFundPrecent = 2650; //subFundPrecent uint256 public subFundPrecent = 350; //devTeamPrecent uint256 public devTeamPrecent = 1500; //hitFoundationPrecent uint256 public hitFoundationPrecent = 5500; //mainFundBalance uint256 public mainFundBalance; //subFundBalance uint256 public subFundBalance; //devTeamBalance uint256 public devTeamBalance; //hitFoundationBalance uint256 public hitFoundationBalance; //subFundAccount address public subFundAccount; //mainFundAccount address public mainFundAccount; /** * @dev Contract constructor * @param _name token's name * @param _symbol token's symbol * @param _decimals token's decimals * @param _initialSupply token's initialSupply * @param _teamAccount teamAccount * @param _subFundAccount subFundAccount * @param _mainFundAccount mainFundAccount * @param _hitFoundationAccount hitFoundationAccount */ function HitToken(string _name, string _symbol, uint8 _decimals, uint256 _initialSupply,address _teamAccount,address _subFundAccount,address _mainFundAccount,address _hitFoundationAccount) public { } /** * @dev destroy the msg sender's token onlyOwner * @param _value the number of the destroy token */ function burn(uint256 _value) public onlyOwner returns (bool) { } /** * @dev Transfer token * @param _to the accept token address * @param _value the number of transfer token */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Transfer token * @param _from the give token address * @param _to the accept token address * @param _value the number of transfer token */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Privately offered Fund * @param _to the accept token address * @param _value the number of transfer token */ function mintFund(address _to, uint256 _value) public returns (bool){ } /** * @dev Issue the token */ function issue() public onlyOwner returns (uint){ } /**avoid mis-transfer*/ function() public payable{ } }
fundLockTime[_to]>0
430,755
fundLockTime[_to]>0