comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Seat does not exist"
// SPDX-License-Identifier: UNLICENSED /** /@#(@@@@@ @@ @@@ @@ .@@@# ##@@@@@@, @@@ /@@@& .@@@ @ @ @@@@ @@@@ @@@@@ @@@@ @@@@ @ @ @@@/ @@@@ @@@ (@@@@#@@@ THE AORI PROTOCOL */ pragma solidity ^0.8.13; import "./OpenZeppelin/IERC20.sol"; import "./AoriSeats.sol"; import "./OpenZeppelin/Ownable.sol"; import "./OpenZeppelin/ReentrancyGuard.sol"; import "./Chainlink/AggregatorV3Interface.sol"; contract Ask is ReentrancyGuard { address public immutable factory; address public immutable factoryOwner; address public immutable maker; uint256 public immutable USDCPerOPTION; uint256 public immutable OPTIONSize; uint256 public immutable fee; // in bps, default is 30 bps uint256 public immutable feeMultiplier; uint256 public immutable duration; uint256 public endingTime; AoriSeats public immutable AORISEATSADD; bool public hasEnded = false; bool public hasBeenFunded = false; IERC20 public OPTION; IERC20 public USDC; uint256 public OPTIONDecimals = 18; uint256 public USDCDecimals = 6; uint256 public decimalDiff = (10**OPTIONDecimals) / (10**USDCDecimals); uint256 public immutable BPS_DIVISOR = 10000; uint256 public USDCFilled; event OfferFunded(address maker, uint256 OPTIONSize, uint256 duration); event Filled(address buyer, uint256 OPTIONAmount, uint256 AmountFilled, bool hasEnded); event OfferCanceled(address maker, uint256 OPTIONAmount); constructor( IERC20 _OPTION, IERC20 _USDC, AoriSeats _AORISEATSADD, address _maker, uint256 _USDCPerOPTION, uint256 _fee, uint256 _feeMultiplier, uint256 _duration, //in blocks uint256 _OPTIONSize ) { } // release trapped funds function withdrawTokens(address token) public { } /** Fund the Ask with Aori option ERC20's */ function fundContract() public nonReentrant { } /** Partial or complete fill of the offer, with the requirement of trading through a seat regardless of whether the seat is owned or not. In the case of not owning the seat, a fee is charged in USDC. */ function fill(uint256 amountOfUSDC, uint256 seatId) public nonReentrant { require(isFunded(), "no option balance"); require(msg.sender != maker && msg.sender != factory, "Cannot take one's own order"); require(!hasEnded, "offer has been previously been cancelled"); require(block.timestamp <= endingTime, "This offer has expired"); require(USDC.balanceOf(msg.sender) >= amountOfUSDC, "Not enough USDC"); require(<FILL_ME>) uint256 USDCAfterFee; uint256 OPTIONToReceive; uint256 refRate; if(msg.sender == AORISEATSADD.ownerOf(seatId)) { //Seat holders receive 0 fees for trading USDCAfterFee = amountOfUSDC; OPTIONToReceive = mulDiv(USDCAfterFee, 10**OPTIONDecimals, USDCPerOPTION); //1eY = (1eX * 1eY) / 1eX //transfers To the msg.sender USDC.transferFrom(msg.sender, maker, USDCAfterFee); //transfer to the Msg.sender OPTION.transfer(msg.sender, OPTIONToReceive); } else { //What the user will receive out of 100 percent in referral fees with a floor of 40 refRate = (AORISEATSADD.getSeatScore(seatId) * 500) + 3500; //This means for Aori seat governance they should not allow more than 12 seats to be combined at once uint256 seatScoreFeeInBPS = mulDiv(fee, refRate, BPS_DIVISOR); //calculating the fee breakdown uint256 seatTxFee = mulDiv(amountOfUSDC, seatScoreFeeInBPS, BPS_DIVISOR); uint256 ownerTxFee = mulDiv(amountOfUSDC, fee - seatScoreFeeInBPS, BPS_DIVISOR); //Calcualting the base tokens to transfer after fees USDCAfterFee = (amountOfUSDC - (ownerTxFee + seatTxFee)); //And the amount of the quote currency the msg.sender will receive OPTIONToReceive = mulDiv(USDCAfterFee, 10**OPTIONDecimals, USDCPerOPTION); //(1e6 * 1e18) / 1e6 = 1e18 //Transfers from the msg.sender USDC.transferFrom(msg.sender, factoryOwner, ownerTxFee); USDC.transferFrom(msg.sender, AORISEATSADD.ownerOf(seatId), seatTxFee); USDC.transferFrom(msg.sender, maker, USDCAfterFee); //Transfers to the msg.sender OPTION.transfer(msg.sender, OPTIONToReceive); //Tracking the volume in the NFT AORISEATSADD.addTakerVolume(amountOfUSDC, seatId, factory); } //Storage USDCFilled += USDCAfterFee; if(OPTION.balanceOf(address(this)) == 0) { hasEnded = true; } emit Filled(msg.sender, USDCAfterFee, amountOfUSDC, hasEnded); } /** Cancel this order and refund all remaining tokens */ function cancel() public nonReentrant { } //Check if the contract is funded still. function isFunded() public view returns (bool) { } //View function to see if this offer still holds one USDC function isFundedOverOne() public view returns (bool) { } function mulDiv( uint256 x, uint256 y, uint256 z ) public pure returns (uint256) { } function safeTransfer( address token, address to, uint256 value ) internal { } /** Additional view functions */ function getCurrentBalance() public view returns (uint256) { } function totalUSDCWanted() public view returns (uint256) { } }
AORISEATSADD.confirmExists(seatId)&&AORISEATSADD.ownerOf(seatId)!=address(0x0),"Seat does not exist"
184,895
AORISEATSADD.confirmExists(seatId)&&AORISEATSADD.ownerOf(seatId)!=address(0x0)
"Incorrect ETH value sent"
pragma solidity ^0.8.0; contract Avacadoez is ERC721A, Ownable, ReentrancyGuard { using Address for address; using Strings for uint; bool public revealed = false; bool public paused = false; string private revealedURI = "ipfs://QmSzJCfAgzBzFek61MtGHLEK3TuFmRU5XzKiA8RZDoap7n/"; string private hiddenURI = "ipfs://QmTvKx87xe31PhYy18ZehVCAqh1cE6EMHNk4W3zeQPdBvV/hidden.json"; uint256 public maxSupply = 7777; uint256 public Max_Guac_Per_Tx = 3; uint256 public Free_Guac_Per_Tx = 1; uint256 public Public_Guac_Price = 0.0069 ether; uint256 public Toatl_Free_Guac = 3000; bool public isPublicSaleActive = false; constructor() ERC721A("Avacadoez", "AVCDO") { } function mint(uint256 numberOfTokens) external payable { require(isPublicSaleActive, "Public sale is not open"); require( totalSupply() + numberOfTokens <= maxSupply, "Maximum supply exceeded" ); if(totalSupply() + numberOfTokens > Toatl_Free_Guac || numberOfTokens > Free_Guac_Per_Tx){ require(<FILL_ME>) } _safeMint(msg.sender, numberOfTokens); } function _startTokenId() internal view virtual override returns (uint256) { } function treasuryMint(uint quantity, address user) public onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function setIsPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function setNumFreeMints(uint256 _numfreemints) external onlyOwner { } function setSalePrice(uint256 _price) external onlyOwner { } function setMaxLimitPerTransaction(uint256 _limit) external onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function revealCollection(bool _revealed, string memory _baseUri) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setBaseURI(string memory _baseUri) public onlyOwner { } }
(Public_Guac_Price*numberOfTokens)<=msg.value,"Incorrect ETH value sent"
184,922
(Public_Guac_Price*numberOfTokens)<=msg.value
"Can't mint if not on whitelist"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract KNKContract is ERC721Enumerable, Ownable { using Counters for Counters.Counter; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant MAX_PER_WALLET = 6; uint256 public constant WHITELIST_PRICE = 90000000000000000; // Equivalent to 0.09 ether uint256 public constant PUBLIC_PRICE = 200000000000000000; // Equivalent to 0.2 ether enum ContractPhase { PRE_SALE, WHITELIST_SALE, PUBLIC_SALE, POST_SALE } string private __baseURI = ""; ContractPhase private _contractPhase = ContractPhase.PRE_SALE; mapping(address => bool) private _whiteList; Counters.Counter private amountMinted; constructor() ERC721("KiwisnKangaroos", "KNK") { } function _baseURI() override internal view returns (string memory) { } /// @notice Lets the owner of the contract update the baseURI of the tokens, this will be used to reveal the tokens after launch function setBaseURI(string memory uri) public onlyOwner { } /// @notice Gets the current phase of the contract (whitelist only, public sale, etc) function getContractPhase() public view returns (ContractPhase) { } /// @notice Lets the owner set the current phase of the contract function setContractPhase(uint newStatus) public onlyOwner { } /// @notice Checks if an address is on the whitelist function isOnWhiteList(address newAddress) public view returns (bool) { } /// @notice Lets the owner add an address to the whitelist function addToWhiteList(address newAddress) public onlyOwner { } /// @notice Lets the owner add multiple addresses to the whitelist function addMultipleToWhiteList(address[] memory newAddresses) public onlyOwner { } /// @notice Lets the owner remove an address to the whitelist function removeFromWhiteList(address newAddress) public onlyOwner { } /// @notice Get the total amount of tokens minted function totalMinted() public view returns (uint) { } /// @notice Public method to mint tokens, tokens can only be minted during the whitelist sale phase (for 0.09ETH) or the public sale phase (for 0.2ETH). Addresses can only mint up to 6 tokens for themselves, and the total amount of tokens is limited to 6666 function mintTokens(uint amount) public payable { require(_contractPhase != ContractPhase.PRE_SALE, "Can't mint during presale"); require(<FILL_ME>) require((_contractPhase != ContractPhase.WHITELIST_SALE) || (msg.value == (WHITELIST_PRICE * amount)), "incorrect amount of eth sent"); require((_contractPhase != ContractPhase.PUBLIC_SALE) || (msg.value == (PUBLIC_PRICE * amount)), "incorrect amount of eth sent"); require(_contractPhase != ContractPhase.POST_SALE, "Can't mint after sale"); require(amount > 0 && amount <= MAX_PER_WALLET, "Trying to mint too many or 0 tokens"); require((balanceOf(msg.sender) + amount) <= MAX_PER_WALLET, "Exceeded limit on tokens per wallet"); require((amountMinted.current() + amount) <= MAX_SUPPLY, "Token supply exceeded"); for (uint i = 0; i < amount; i++) { _safeMint(msg.sender, amountMinted.current()); amountMinted.increment(); } } /// @notice Lets the owner mint tokens on behalf of other users function adminMintTokens(uint amount, address addr) public onlyOwner { } /// @notice Lets the owner withdraw all the eth in the contract function withdraw() public onlyOwner { } }
(_contractPhase!=ContractPhase.WHITELIST_SALE)||_whiteList[msg.sender],"Can't mint if not on whitelist"
184,930
(_contractPhase!=ContractPhase.WHITELIST_SALE)||_whiteList[msg.sender]
"incorrect amount of eth sent"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract KNKContract is ERC721Enumerable, Ownable { using Counters for Counters.Counter; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant MAX_PER_WALLET = 6; uint256 public constant WHITELIST_PRICE = 90000000000000000; // Equivalent to 0.09 ether uint256 public constant PUBLIC_PRICE = 200000000000000000; // Equivalent to 0.2 ether enum ContractPhase { PRE_SALE, WHITELIST_SALE, PUBLIC_SALE, POST_SALE } string private __baseURI = ""; ContractPhase private _contractPhase = ContractPhase.PRE_SALE; mapping(address => bool) private _whiteList; Counters.Counter private amountMinted; constructor() ERC721("KiwisnKangaroos", "KNK") { } function _baseURI() override internal view returns (string memory) { } /// @notice Lets the owner of the contract update the baseURI of the tokens, this will be used to reveal the tokens after launch function setBaseURI(string memory uri) public onlyOwner { } /// @notice Gets the current phase of the contract (whitelist only, public sale, etc) function getContractPhase() public view returns (ContractPhase) { } /// @notice Lets the owner set the current phase of the contract function setContractPhase(uint newStatus) public onlyOwner { } /// @notice Checks if an address is on the whitelist function isOnWhiteList(address newAddress) public view returns (bool) { } /// @notice Lets the owner add an address to the whitelist function addToWhiteList(address newAddress) public onlyOwner { } /// @notice Lets the owner add multiple addresses to the whitelist function addMultipleToWhiteList(address[] memory newAddresses) public onlyOwner { } /// @notice Lets the owner remove an address to the whitelist function removeFromWhiteList(address newAddress) public onlyOwner { } /// @notice Get the total amount of tokens minted function totalMinted() public view returns (uint) { } /// @notice Public method to mint tokens, tokens can only be minted during the whitelist sale phase (for 0.09ETH) or the public sale phase (for 0.2ETH). Addresses can only mint up to 6 tokens for themselves, and the total amount of tokens is limited to 6666 function mintTokens(uint amount) public payable { require(_contractPhase != ContractPhase.PRE_SALE, "Can't mint during presale"); require((_contractPhase != ContractPhase.WHITELIST_SALE) || _whiteList[msg.sender], "Can't mint if not on whitelist"); require(<FILL_ME>) require((_contractPhase != ContractPhase.PUBLIC_SALE) || (msg.value == (PUBLIC_PRICE * amount)), "incorrect amount of eth sent"); require(_contractPhase != ContractPhase.POST_SALE, "Can't mint after sale"); require(amount > 0 && amount <= MAX_PER_WALLET, "Trying to mint too many or 0 tokens"); require((balanceOf(msg.sender) + amount) <= MAX_PER_WALLET, "Exceeded limit on tokens per wallet"); require((amountMinted.current() + amount) <= MAX_SUPPLY, "Token supply exceeded"); for (uint i = 0; i < amount; i++) { _safeMint(msg.sender, amountMinted.current()); amountMinted.increment(); } } /// @notice Lets the owner mint tokens on behalf of other users function adminMintTokens(uint amount, address addr) public onlyOwner { } /// @notice Lets the owner withdraw all the eth in the contract function withdraw() public onlyOwner { } }
(_contractPhase!=ContractPhase.WHITELIST_SALE)||(msg.value==(WHITELIST_PRICE*amount)),"incorrect amount of eth sent"
184,930
(_contractPhase!=ContractPhase.WHITELIST_SALE)||(msg.value==(WHITELIST_PRICE*amount))
"incorrect amount of eth sent"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract KNKContract is ERC721Enumerable, Ownable { using Counters for Counters.Counter; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant MAX_PER_WALLET = 6; uint256 public constant WHITELIST_PRICE = 90000000000000000; // Equivalent to 0.09 ether uint256 public constant PUBLIC_PRICE = 200000000000000000; // Equivalent to 0.2 ether enum ContractPhase { PRE_SALE, WHITELIST_SALE, PUBLIC_SALE, POST_SALE } string private __baseURI = ""; ContractPhase private _contractPhase = ContractPhase.PRE_SALE; mapping(address => bool) private _whiteList; Counters.Counter private amountMinted; constructor() ERC721("KiwisnKangaroos", "KNK") { } function _baseURI() override internal view returns (string memory) { } /// @notice Lets the owner of the contract update the baseURI of the tokens, this will be used to reveal the tokens after launch function setBaseURI(string memory uri) public onlyOwner { } /// @notice Gets the current phase of the contract (whitelist only, public sale, etc) function getContractPhase() public view returns (ContractPhase) { } /// @notice Lets the owner set the current phase of the contract function setContractPhase(uint newStatus) public onlyOwner { } /// @notice Checks if an address is on the whitelist function isOnWhiteList(address newAddress) public view returns (bool) { } /// @notice Lets the owner add an address to the whitelist function addToWhiteList(address newAddress) public onlyOwner { } /// @notice Lets the owner add multiple addresses to the whitelist function addMultipleToWhiteList(address[] memory newAddresses) public onlyOwner { } /// @notice Lets the owner remove an address to the whitelist function removeFromWhiteList(address newAddress) public onlyOwner { } /// @notice Get the total amount of tokens minted function totalMinted() public view returns (uint) { } /// @notice Public method to mint tokens, tokens can only be minted during the whitelist sale phase (for 0.09ETH) or the public sale phase (for 0.2ETH). Addresses can only mint up to 6 tokens for themselves, and the total amount of tokens is limited to 6666 function mintTokens(uint amount) public payable { require(_contractPhase != ContractPhase.PRE_SALE, "Can't mint during presale"); require((_contractPhase != ContractPhase.WHITELIST_SALE) || _whiteList[msg.sender], "Can't mint if not on whitelist"); require((_contractPhase != ContractPhase.WHITELIST_SALE) || (msg.value == (WHITELIST_PRICE * amount)), "incorrect amount of eth sent"); require(<FILL_ME>) require(_contractPhase != ContractPhase.POST_SALE, "Can't mint after sale"); require(amount > 0 && amount <= MAX_PER_WALLET, "Trying to mint too many or 0 tokens"); require((balanceOf(msg.sender) + amount) <= MAX_PER_WALLET, "Exceeded limit on tokens per wallet"); require((amountMinted.current() + amount) <= MAX_SUPPLY, "Token supply exceeded"); for (uint i = 0; i < amount; i++) { _safeMint(msg.sender, amountMinted.current()); amountMinted.increment(); } } /// @notice Lets the owner mint tokens on behalf of other users function adminMintTokens(uint amount, address addr) public onlyOwner { } /// @notice Lets the owner withdraw all the eth in the contract function withdraw() public onlyOwner { } }
(_contractPhase!=ContractPhase.PUBLIC_SALE)||(msg.value==(PUBLIC_PRICE*amount)),"incorrect amount of eth sent"
184,930
(_contractPhase!=ContractPhase.PUBLIC_SALE)||(msg.value==(PUBLIC_PRICE*amount))
"Exceeded limit on tokens per wallet"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract KNKContract is ERC721Enumerable, Ownable { using Counters for Counters.Counter; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant MAX_PER_WALLET = 6; uint256 public constant WHITELIST_PRICE = 90000000000000000; // Equivalent to 0.09 ether uint256 public constant PUBLIC_PRICE = 200000000000000000; // Equivalent to 0.2 ether enum ContractPhase { PRE_SALE, WHITELIST_SALE, PUBLIC_SALE, POST_SALE } string private __baseURI = ""; ContractPhase private _contractPhase = ContractPhase.PRE_SALE; mapping(address => bool) private _whiteList; Counters.Counter private amountMinted; constructor() ERC721("KiwisnKangaroos", "KNK") { } function _baseURI() override internal view returns (string memory) { } /// @notice Lets the owner of the contract update the baseURI of the tokens, this will be used to reveal the tokens after launch function setBaseURI(string memory uri) public onlyOwner { } /// @notice Gets the current phase of the contract (whitelist only, public sale, etc) function getContractPhase() public view returns (ContractPhase) { } /// @notice Lets the owner set the current phase of the contract function setContractPhase(uint newStatus) public onlyOwner { } /// @notice Checks if an address is on the whitelist function isOnWhiteList(address newAddress) public view returns (bool) { } /// @notice Lets the owner add an address to the whitelist function addToWhiteList(address newAddress) public onlyOwner { } /// @notice Lets the owner add multiple addresses to the whitelist function addMultipleToWhiteList(address[] memory newAddresses) public onlyOwner { } /// @notice Lets the owner remove an address to the whitelist function removeFromWhiteList(address newAddress) public onlyOwner { } /// @notice Get the total amount of tokens minted function totalMinted() public view returns (uint) { } /// @notice Public method to mint tokens, tokens can only be minted during the whitelist sale phase (for 0.09ETH) or the public sale phase (for 0.2ETH). Addresses can only mint up to 6 tokens for themselves, and the total amount of tokens is limited to 6666 function mintTokens(uint amount) public payable { require(_contractPhase != ContractPhase.PRE_SALE, "Can't mint during presale"); require((_contractPhase != ContractPhase.WHITELIST_SALE) || _whiteList[msg.sender], "Can't mint if not on whitelist"); require((_contractPhase != ContractPhase.WHITELIST_SALE) || (msg.value == (WHITELIST_PRICE * amount)), "incorrect amount of eth sent"); require((_contractPhase != ContractPhase.PUBLIC_SALE) || (msg.value == (PUBLIC_PRICE * amount)), "incorrect amount of eth sent"); require(_contractPhase != ContractPhase.POST_SALE, "Can't mint after sale"); require(amount > 0 && amount <= MAX_PER_WALLET, "Trying to mint too many or 0 tokens"); require(<FILL_ME>) require((amountMinted.current() + amount) <= MAX_SUPPLY, "Token supply exceeded"); for (uint i = 0; i < amount; i++) { _safeMint(msg.sender, amountMinted.current()); amountMinted.increment(); } } /// @notice Lets the owner mint tokens on behalf of other users function adminMintTokens(uint amount, address addr) public onlyOwner { } /// @notice Lets the owner withdraw all the eth in the contract function withdraw() public onlyOwner { } }
(balanceOf(msg.sender)+amount)<=MAX_PER_WALLET,"Exceeded limit on tokens per wallet"
184,930
(balanceOf(msg.sender)+amount)<=MAX_PER_WALLET
"Token supply exceeded"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract KNKContract is ERC721Enumerable, Ownable { using Counters for Counters.Counter; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant MAX_PER_WALLET = 6; uint256 public constant WHITELIST_PRICE = 90000000000000000; // Equivalent to 0.09 ether uint256 public constant PUBLIC_PRICE = 200000000000000000; // Equivalent to 0.2 ether enum ContractPhase { PRE_SALE, WHITELIST_SALE, PUBLIC_SALE, POST_SALE } string private __baseURI = ""; ContractPhase private _contractPhase = ContractPhase.PRE_SALE; mapping(address => bool) private _whiteList; Counters.Counter private amountMinted; constructor() ERC721("KiwisnKangaroos", "KNK") { } function _baseURI() override internal view returns (string memory) { } /// @notice Lets the owner of the contract update the baseURI of the tokens, this will be used to reveal the tokens after launch function setBaseURI(string memory uri) public onlyOwner { } /// @notice Gets the current phase of the contract (whitelist only, public sale, etc) function getContractPhase() public view returns (ContractPhase) { } /// @notice Lets the owner set the current phase of the contract function setContractPhase(uint newStatus) public onlyOwner { } /// @notice Checks if an address is on the whitelist function isOnWhiteList(address newAddress) public view returns (bool) { } /// @notice Lets the owner add an address to the whitelist function addToWhiteList(address newAddress) public onlyOwner { } /// @notice Lets the owner add multiple addresses to the whitelist function addMultipleToWhiteList(address[] memory newAddresses) public onlyOwner { } /// @notice Lets the owner remove an address to the whitelist function removeFromWhiteList(address newAddress) public onlyOwner { } /// @notice Get the total amount of tokens minted function totalMinted() public view returns (uint) { } /// @notice Public method to mint tokens, tokens can only be minted during the whitelist sale phase (for 0.09ETH) or the public sale phase (for 0.2ETH). Addresses can only mint up to 6 tokens for themselves, and the total amount of tokens is limited to 6666 function mintTokens(uint amount) public payable { require(_contractPhase != ContractPhase.PRE_SALE, "Can't mint during presale"); require((_contractPhase != ContractPhase.WHITELIST_SALE) || _whiteList[msg.sender], "Can't mint if not on whitelist"); require((_contractPhase != ContractPhase.WHITELIST_SALE) || (msg.value == (WHITELIST_PRICE * amount)), "incorrect amount of eth sent"); require((_contractPhase != ContractPhase.PUBLIC_SALE) || (msg.value == (PUBLIC_PRICE * amount)), "incorrect amount of eth sent"); require(_contractPhase != ContractPhase.POST_SALE, "Can't mint after sale"); require(amount > 0 && amount <= MAX_PER_WALLET, "Trying to mint too many or 0 tokens"); require((balanceOf(msg.sender) + amount) <= MAX_PER_WALLET, "Exceeded limit on tokens per wallet"); require(<FILL_ME>) for (uint i = 0; i < amount; i++) { _safeMint(msg.sender, amountMinted.current()); amountMinted.increment(); } } /// @notice Lets the owner mint tokens on behalf of other users function adminMintTokens(uint amount, address addr) public onlyOwner { } /// @notice Lets the owner withdraw all the eth in the contract function withdraw() public onlyOwner { } }
(amountMinted.current()+amount)<=MAX_SUPPLY,"Token supply exceeded"
184,930
(amountMinted.current()+amount)<=MAX_SUPPLY
'Dancin Man balance not >= 5'
// SPDX-License-Identifier: CC0 /* /$$$$$$$$ /$$$$$$$ /$$$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$ | $$_____/| $$__ $$| $$_____/| $$_____/ /$$__ $$ /$$__ $$ | $$ | $$ \ $$| $$ | $$ |__/ \ $$|__/ \ $$ | $$$$$ | $$$$$$$/| $$$$$ | $$$$$ /$$$$$$/ /$$$$$/ | $$__/ | $$__ $$| $$__/ | $$__/ /$$____/ |___ $$ | $$ | $$ \ $$| $$ | $$ | $$ /$$ \ $$ | $$ | $$ | $$| $$$$$$$$| $$$$$$$$ | $$$$$$$$| $$$$$$/ |__/ |__/ |__/|________/|________/ |________/ \______/ /$$ | $$ | $$$$$$$ /$$ /$$ | $$__ $$| $$ | $$ | $$ \ $$| $$ | $$ | $$ | $$| $$ | $$ | $$$$$$$/| $$$$$$$ |_______/ \____ $$ /$$ | $$ | $$$$$$/ \______/ /$$$$$$ /$$$$$$$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$$ /$$$$$$$ /$$__ $$|__ $$__/| $$_____/| $$ | $$|_ $$_/| $$_____/| $$__ $$ | $$ \__/ | $$ | $$ | $$ | $$ | $$ | $$ | $$ \ $$ | $$$$$$ | $$ | $$$$$ | $$ / $$/ | $$ | $$$$$ | $$$$$$$/ \____ $$ | $$ | $$__/ \ $$ $$/ | $$ | $$__/ | $$____/ /$$ \ $$ | $$ | $$ \ $$$/ | $$ | $$ | $$ | $$$$$$/ | $$ | $$$$$$$$ \ $/ /$$$$$$| $$$$$$$$| $$ \______/ |__/ |________/ \_/ |______/|________/|__/ CC0 2023 */ pragma solidity ^0.8.23; import "./FreeChecker.sol"; interface DancingMan { function balanceOf(address, uint256) external returns (uint256); function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) external; } contract Free23 is FreeChecker { DancingMan public dancingMan = DancingMan(0xC8D1a7814194aa6355727098448C7EE48f2a1e1C); uint256 public totalDancingMen; mapping(address => uint256) public ownerToStakedDancingMen; mapping(uint256 => bool) public free22Used; function onERC1155Received( address, address from, uint256 id, uint256 amount, bytes calldata ) external returns (bytes4) { } function withdrawDancingMan(uint256 amount) external { } function claim(uint256 free0TokenId, uint256 free22TokenId) external { preCheck(free0TokenId, '23'); require(<FILL_ME>) checkFreeToken(free22TokenId, 22); require(!free22Used[free22TokenId], 'Free22 already used'); free22Used[free22TokenId] = true; postCheck(free0TokenId, 23, '23'); } }
dancingMan.balanceOf(address(this),1)>=5,'Dancin Man balance not >= 5'
185,089
dancingMan.balanceOf(address(this),1)>=5
'Free22 already used'
// SPDX-License-Identifier: CC0 /* /$$$$$$$$ /$$$$$$$ /$$$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$ | $$_____/| $$__ $$| $$_____/| $$_____/ /$$__ $$ /$$__ $$ | $$ | $$ \ $$| $$ | $$ |__/ \ $$|__/ \ $$ | $$$$$ | $$$$$$$/| $$$$$ | $$$$$ /$$$$$$/ /$$$$$/ | $$__/ | $$__ $$| $$__/ | $$__/ /$$____/ |___ $$ | $$ | $$ \ $$| $$ | $$ | $$ /$$ \ $$ | $$ | $$ | $$| $$$$$$$$| $$$$$$$$ | $$$$$$$$| $$$$$$/ |__/ |__/ |__/|________/|________/ |________/ \______/ /$$ | $$ | $$$$$$$ /$$ /$$ | $$__ $$| $$ | $$ | $$ \ $$| $$ | $$ | $$ | $$| $$ | $$ | $$$$$$$/| $$$$$$$ |_______/ \____ $$ /$$ | $$ | $$$$$$/ \______/ /$$$$$$ /$$$$$$$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$$ /$$$$$$$ /$$__ $$|__ $$__/| $$_____/| $$ | $$|_ $$_/| $$_____/| $$__ $$ | $$ \__/ | $$ | $$ | $$ | $$ | $$ | $$ | $$ \ $$ | $$$$$$ | $$ | $$$$$ | $$ / $$/ | $$ | $$$$$ | $$$$$$$/ \____ $$ | $$ | $$__/ \ $$ $$/ | $$ | $$__/ | $$____/ /$$ \ $$ | $$ | $$ \ $$$/ | $$ | $$ | $$ | $$$$$$/ | $$ | $$$$$$$$ \ $/ /$$$$$$| $$$$$$$$| $$ \______/ |__/ |________/ \_/ |______/|________/|__/ CC0 2023 */ pragma solidity ^0.8.23; import "./FreeChecker.sol"; interface DancingMan { function balanceOf(address, uint256) external returns (uint256); function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) external; } contract Free23 is FreeChecker { DancingMan public dancingMan = DancingMan(0xC8D1a7814194aa6355727098448C7EE48f2a1e1C); uint256 public totalDancingMen; mapping(address => uint256) public ownerToStakedDancingMen; mapping(uint256 => bool) public free22Used; function onERC1155Received( address, address from, uint256 id, uint256 amount, bytes calldata ) external returns (bytes4) { } function withdrawDancingMan(uint256 amount) external { } function claim(uint256 free0TokenId, uint256 free22TokenId) external { preCheck(free0TokenId, '23'); require(dancingMan.balanceOf(address(this), 1) >= 5, 'Dancin Man balance not >= 5'); checkFreeToken(free22TokenId, 22); require(<FILL_ME>) free22Used[free22TokenId] = true; postCheck(free0TokenId, 23, '23'); } }
!free22Used[free22TokenId],'Free22 already used'
185,089
!free22Used[free22TokenId]
"E002"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./AppType.sol"; import "./Utils.sol"; library BatchFactory { using LeafUtils for AppType.NFT; using MerkleProof for bytes32[]; event BatchCreated( uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ); event BatchUpdated( uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ); event ExcludedLeaf(bytes32 leaf, uint256 batchId, bool isExcluded); event AuthorizedMint( uint256 nftBatchId, string nftUri, uint256 tierId, address swapToken, uint256 swapAmount, address account, uint256 newTokenId ); function createBatch( AppType.State storage state, uint256 isOpenAt, bool disabled, bytes32 root ) public { } function updateBatch( AppType.State storage state, uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ) public { require( msg.sender == state.config.addresses[AppType.AddressConfig.ADMIN], "E001" ); require(<FILL_ME>) AppType.Batch storage batch = state.batches[batchId]; batch.isOpenAt = isOpenAt; batch.disabled = disabled; batch.root = root; emit BatchUpdated(batchId, isOpenAt, disabled, root); } function readBatch(AppType.State storage state, uint256 batchId) public view returns ( uint256 isOpenAt, bool disabled, bytes32 root ) { } function excludeNFTLeaf( AppType.State storage state, AppType.NFT memory nft, bool isExcluded ) public { } function authorizeMint( AppType.State storage state, AppType.NFT memory nft, uint256 nftAmount, bytes32[] memory proof ) public returns (uint256 newTokenId) { } }
state.batches[batchId].id==batchId,"E002"
185,098
state.batches[batchId].id==batchId
"E011"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./AppType.sol"; import "./Utils.sol"; library BatchFactory { using LeafUtils for AppType.NFT; using MerkleProof for bytes32[]; event BatchCreated( uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ); event BatchUpdated( uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ); event ExcludedLeaf(bytes32 leaf, uint256 batchId, bool isExcluded); event AuthorizedMint( uint256 nftBatchId, string nftUri, uint256 tierId, address swapToken, uint256 swapAmount, address account, uint256 newTokenId ); function createBatch( AppType.State storage state, uint256 isOpenAt, bool disabled, bytes32 root ) public { } function updateBatch( AppType.State storage state, uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ) public { } function readBatch(AppType.State storage state, uint256 batchId) public view returns ( uint256 isOpenAt, bool disabled, bytes32 root ) { } function excludeNFTLeaf( AppType.State storage state, AppType.NFT memory nft, bool isExcluded ) public { } function authorizeMint( AppType.State storage state, AppType.NFT memory nft, uint256 nftAmount, bytes32[] memory proof ) public returns (uint256 newTokenId) { require(<FILL_ME>) { AppType.Batch storage nftBatch = state.batches[nft.batchId]; require( nftBatch.id == nft.batchId && nftBatch.isOpenAt <= block.timestamp && !nftBatch.disabled, "E003" ); bytes32 nftLeaf = nft.nftLeaf(state); require(proof.verify(nftBatch.root, nftLeaf), "E004"); require(state.excludedLeaves[nftLeaf] == false, "E005"); } uint256 swapAmount = state.tierSwapAmounts[nft.tierId][nft.swapToken]; swapAmount = swapAmount * nftAmount; { require(swapAmount > 0, "E006"); if (nft.swapToken == address(0)) { require(msg.value >= swapAmount, "E007"); } else { IERC20(nft.swapToken).transferFrom( msg.sender, state.config.addresses[AppType.AddressConfig.FEE_WALLET], swapAmount ); } } newTokenId = uint256(keccak256(abi.encode(nft.uri))); emit AuthorizedMint( nft.batchId, nft.uri, nft.tierId, nft.swapToken, swapAmount, msg.sender, newTokenId ); } }
!state.config.bools[AppType.BoolConfig.PAUSED],"E011"
185,098
!state.config.bools[AppType.BoolConfig.PAUSED]
"E004"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./AppType.sol"; import "./Utils.sol"; library BatchFactory { using LeafUtils for AppType.NFT; using MerkleProof for bytes32[]; event BatchCreated( uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ); event BatchUpdated( uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ); event ExcludedLeaf(bytes32 leaf, uint256 batchId, bool isExcluded); event AuthorizedMint( uint256 nftBatchId, string nftUri, uint256 tierId, address swapToken, uint256 swapAmount, address account, uint256 newTokenId ); function createBatch( AppType.State storage state, uint256 isOpenAt, bool disabled, bytes32 root ) public { } function updateBatch( AppType.State storage state, uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ) public { } function readBatch(AppType.State storage state, uint256 batchId) public view returns ( uint256 isOpenAt, bool disabled, bytes32 root ) { } function excludeNFTLeaf( AppType.State storage state, AppType.NFT memory nft, bool isExcluded ) public { } function authorizeMint( AppType.State storage state, AppType.NFT memory nft, uint256 nftAmount, bytes32[] memory proof ) public returns (uint256 newTokenId) { require(!state.config.bools[AppType.BoolConfig.PAUSED], "E011"); { AppType.Batch storage nftBatch = state.batches[nft.batchId]; require( nftBatch.id == nft.batchId && nftBatch.isOpenAt <= block.timestamp && !nftBatch.disabled, "E003" ); bytes32 nftLeaf = nft.nftLeaf(state); require(<FILL_ME>) require(state.excludedLeaves[nftLeaf] == false, "E005"); } uint256 swapAmount = state.tierSwapAmounts[nft.tierId][nft.swapToken]; swapAmount = swapAmount * nftAmount; { require(swapAmount > 0, "E006"); if (nft.swapToken == address(0)) { require(msg.value >= swapAmount, "E007"); } else { IERC20(nft.swapToken).transferFrom( msg.sender, state.config.addresses[AppType.AddressConfig.FEE_WALLET], swapAmount ); } } newTokenId = uint256(keccak256(abi.encode(nft.uri))); emit AuthorizedMint( nft.batchId, nft.uri, nft.tierId, nft.swapToken, swapAmount, msg.sender, newTokenId ); } }
proof.verify(nftBatch.root,nftLeaf),"E004"
185,098
proof.verify(nftBatch.root,nftLeaf)
"E005"
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.13; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./AppType.sol"; import "./Utils.sol"; library BatchFactory { using LeafUtils for AppType.NFT; using MerkleProof for bytes32[]; event BatchCreated( uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ); event BatchUpdated( uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ); event ExcludedLeaf(bytes32 leaf, uint256 batchId, bool isExcluded); event AuthorizedMint( uint256 nftBatchId, string nftUri, uint256 tierId, address swapToken, uint256 swapAmount, address account, uint256 newTokenId ); function createBatch( AppType.State storage state, uint256 isOpenAt, bool disabled, bytes32 root ) public { } function updateBatch( AppType.State storage state, uint256 batchId, uint256 isOpenAt, bool disabled, bytes32 root ) public { } function readBatch(AppType.State storage state, uint256 batchId) public view returns ( uint256 isOpenAt, bool disabled, bytes32 root ) { } function excludeNFTLeaf( AppType.State storage state, AppType.NFT memory nft, bool isExcluded ) public { } function authorizeMint( AppType.State storage state, AppType.NFT memory nft, uint256 nftAmount, bytes32[] memory proof ) public returns (uint256 newTokenId) { require(!state.config.bools[AppType.BoolConfig.PAUSED], "E011"); { AppType.Batch storage nftBatch = state.batches[nft.batchId]; require( nftBatch.id == nft.batchId && nftBatch.isOpenAt <= block.timestamp && !nftBatch.disabled, "E003" ); bytes32 nftLeaf = nft.nftLeaf(state); require(proof.verify(nftBatch.root, nftLeaf), "E004"); require(<FILL_ME>) } uint256 swapAmount = state.tierSwapAmounts[nft.tierId][nft.swapToken]; swapAmount = swapAmount * nftAmount; { require(swapAmount > 0, "E006"); if (nft.swapToken == address(0)) { require(msg.value >= swapAmount, "E007"); } else { IERC20(nft.swapToken).transferFrom( msg.sender, state.config.addresses[AppType.AddressConfig.FEE_WALLET], swapAmount ); } } newTokenId = uint256(keccak256(abi.encode(nft.uri))); emit AuthorizedMint( nft.batchId, nft.uri, nft.tierId, nft.swapToken, swapAmount, msg.sender, newTokenId ); } }
state.excludedLeaves[nftLeaf]==false,"E005"
185,098
state.excludedLeaves[nftLeaf]==false
"Failed to transfer USDC"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import {IVersioned} from "../../interfaces/IVersioned.sol"; import {ICreditLine} from "../../interfaces/ICreditLine.sol"; import {SafeERC20Transfer} from "../../library/SafeERC20Transfer.sol"; import {BaseUpgradeablePausable} from "../core/BaseUpgradeablePausable.sol"; import {ConfigHelper} from "../core/ConfigHelper.sol"; import {GoldfinchConfig} from "../core/GoldfinchConfig.sol"; import {IERC20withDec} from "../../interfaces/IERC20withDec.sol"; import {ITranchedPool} from "../../interfaces/ITranchedPool.sol"; import {ILoan} from "../../interfaces/ILoan.sol"; import {IBorrower} from "../../interfaces/IBorrower.sol"; import {BaseRelayRecipient} from "../../external/BaseRelayRecipient.sol"; import {ContextUpgradeSafe} from "@openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol"; import {Math} from "@openzeppelin/contracts-ethereum-package/contracts/math/Math.sol"; /** * @title Goldfinch's Borrower contract * @notice These contracts represent the a convenient way for a borrower to interact with Goldfinch * They are 100% optional. However, they let us add many sophisticated and convient features for borrowers * while still keeping our core protocol small and secure. We therefore expect most borrowers will use them. * This contract is the "official" borrower contract that will be maintained by Goldfinch governance. However, * in theory, anyone can fork or create their own version, or not use any contract at all. The core functionality * is completely agnostic to whether it is interacting with a contract or an externally owned account (EOA). * @author Goldfinch */ contract Borrower is BaseUpgradeablePausable, BaseRelayRecipient, IBorrower { using SafeERC20Transfer for IERC20withDec; using ConfigHelper for GoldfinchConfig; GoldfinchConfig public config; address private constant USDT_ADDRESS = address(0xdAC17F958D2ee523a2206206994597C13D831ec7); address private constant BUSD_ADDRESS = address(0x4Fabb145d64652a948d72533023f6E7A623C7C53); address private constant GUSD_ADDRESS = address(0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd); address private constant DAI_ADDRESS = address(0x6B175474E89094C44Da98b954EedeAC495271d0F); function initialize(address owner, address _config) external override initializer { } function lockJuniorCapital(address poolAddress) external onlyAdmin { } function lockPool(address poolAddress) external onlyAdmin { } /** * @notice Drawdown on a loan * @param poolAddress Pool to drawdown from * @param amount usdc amount to drawdown * @param addressToSendTo Address to send the funds. Null address or address(this) will send funds back to the caller */ function drawdown( address poolAddress, uint256 amount, address addressToSendTo ) external onlyAdmin { } /** * @notice Drawdown on a v1 or v2 pool and swap the usdc to the desired token using OneInch * @param amount usdc amount to drawdown from the pool * @param addressToSendTo address to send the `toToken` to * @param toToken address of the ERC20 to swap to * @param minTargetAmount min amount of `toToken` you're willing to accept from the swap (i.e. a slippage tolerance) */ function drawdownWithSwapOnOneInch( address poolAddress, uint256 amount, address addressToSendTo, address toToken, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) public onlyAdmin { } function transferERC20(address token, address to, uint256 amount) public onlyAdmin { } /** * @notice Pay back a v1 or v2 tranched pool * @param poolAddress pool address * @param amount USDC amount to pay */ function pay(address poolAddress, uint256 amount) external onlyAdmin { require(<FILL_ME>) _pay(poolAddress, amount); } /** * @notice Pay back multiple pools. Supports v0.1.0 and v1.0.0 pools * @param pools list of pool addresses for which the caller is the borrower * @param amounts amounts to pay back */ function payMultiple(address[] calldata pools, uint256[] calldata amounts) external onlyAdmin { } /** * @notice Pay back a v2.0.0 Tranched Pool * @param poolAddress The pool to be paid back * @param principalAmount principal amount to pay * @param interestAmount interest amount to pay */ function pay( address poolAddress, uint256 principalAmount, uint256 interestAmount ) external onlyAdmin { } function payInFull(address poolAddress, uint256 amount) external onlyAdmin { } function payWithSwapOnOneInch( address poolAddress, uint256 originAmount, address fromToken, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) external onlyAdmin { } function payMultipleWithSwapOnOneInch( address[] calldata pools, uint256[] calldata minAmounts, uint256 originAmount, address fromToken, uint256[] calldata exchangeDistribution ) external onlyAdmin { } /* INTERNAL FUNCTIONS */ function _pay(address poolAddress, uint256 amount) internal { } function _payV2Separate( address poolAddress, uint256 principalAmount, uint256 interestAmount ) internal returns (ILoan.PaymentAllocation memory) { } function transferFrom(address erc20, address sender, address recipient, uint256 amount) internal { } function swapOnOneInch( address fromToken, address toToken, uint256 originAmount, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) internal { } /** * @notice Performs a generic transaction. * @param _target The address for the transaction. * @param _data The data of the transaction. * Mostly copied from Argent: * https://github.com/argentlabs/argent-contracts/blob/develop/contracts/wallet/BaseWallet.sol#L111 */ function _invoke(address _target, bytes memory _data) internal returns (bytes memory) { } function _toUint256(bytes memory _bytes) internal pure returns (uint256 value) { } // OpenZeppelin contracts come with support for GSN _msgSender() (which just defaults to msg.sender) // Since there are two different versions of the function in the hierarchy, we need to instruct solidity to // use the relay recipient version which can actually pull the real sender from the parameters. // https://www.notion.so/My-contract-is-using-OpenZeppelin-How-do-I-add-GSN-support-2bee7e9d5f774a0cbb60d3a8de03e9fb function _msgSender() internal view override(ContextUpgradeSafe, BaseRelayRecipient) returns (address payable) { } function _msgData() internal view override(ContextUpgradeSafe, BaseRelayRecipient) returns (bytes memory ret) { } function versionRecipient() external view override returns (string memory) { } }
config.getUSDC().transferFrom(_msgSender(),address(this),amount),"Failed to transfer USDC"
185,181
config.getUSDC().transferFrom(_msgSender(),address(this),amount)
"Failed to transfer USDC"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import {IVersioned} from "../../interfaces/IVersioned.sol"; import {ICreditLine} from "../../interfaces/ICreditLine.sol"; import {SafeERC20Transfer} from "../../library/SafeERC20Transfer.sol"; import {BaseUpgradeablePausable} from "../core/BaseUpgradeablePausable.sol"; import {ConfigHelper} from "../core/ConfigHelper.sol"; import {GoldfinchConfig} from "../core/GoldfinchConfig.sol"; import {IERC20withDec} from "../../interfaces/IERC20withDec.sol"; import {ITranchedPool} from "../../interfaces/ITranchedPool.sol"; import {ILoan} from "../../interfaces/ILoan.sol"; import {IBorrower} from "../../interfaces/IBorrower.sol"; import {BaseRelayRecipient} from "../../external/BaseRelayRecipient.sol"; import {ContextUpgradeSafe} from "@openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol"; import {Math} from "@openzeppelin/contracts-ethereum-package/contracts/math/Math.sol"; /** * @title Goldfinch's Borrower contract * @notice These contracts represent the a convenient way for a borrower to interact with Goldfinch * They are 100% optional. However, they let us add many sophisticated and convient features for borrowers * while still keeping our core protocol small and secure. We therefore expect most borrowers will use them. * This contract is the "official" borrower contract that will be maintained by Goldfinch governance. However, * in theory, anyone can fork or create their own version, or not use any contract at all. The core functionality * is completely agnostic to whether it is interacting with a contract or an externally owned account (EOA). * @author Goldfinch */ contract Borrower is BaseUpgradeablePausable, BaseRelayRecipient, IBorrower { using SafeERC20Transfer for IERC20withDec; using ConfigHelper for GoldfinchConfig; GoldfinchConfig public config; address private constant USDT_ADDRESS = address(0xdAC17F958D2ee523a2206206994597C13D831ec7); address private constant BUSD_ADDRESS = address(0x4Fabb145d64652a948d72533023f6E7A623C7C53); address private constant GUSD_ADDRESS = address(0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd); address private constant DAI_ADDRESS = address(0x6B175474E89094C44Da98b954EedeAC495271d0F); function initialize(address owner, address _config) external override initializer { } function lockJuniorCapital(address poolAddress) external onlyAdmin { } function lockPool(address poolAddress) external onlyAdmin { } /** * @notice Drawdown on a loan * @param poolAddress Pool to drawdown from * @param amount usdc amount to drawdown * @param addressToSendTo Address to send the funds. Null address or address(this) will send funds back to the caller */ function drawdown( address poolAddress, uint256 amount, address addressToSendTo ) external onlyAdmin { } /** * @notice Drawdown on a v1 or v2 pool and swap the usdc to the desired token using OneInch * @param amount usdc amount to drawdown from the pool * @param addressToSendTo address to send the `toToken` to * @param toToken address of the ERC20 to swap to * @param minTargetAmount min amount of `toToken` you're willing to accept from the swap (i.e. a slippage tolerance) */ function drawdownWithSwapOnOneInch( address poolAddress, uint256 amount, address addressToSendTo, address toToken, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) public onlyAdmin { } function transferERC20(address token, address to, uint256 amount) public onlyAdmin { } /** * @notice Pay back a v1 or v2 tranched pool * @param poolAddress pool address * @param amount USDC amount to pay */ function pay(address poolAddress, uint256 amount) external onlyAdmin { } /** * @notice Pay back multiple pools. Supports v0.1.0 and v1.0.0 pools * @param pools list of pool addresses for which the caller is the borrower * @param amounts amounts to pay back */ function payMultiple(address[] calldata pools, uint256[] calldata amounts) external onlyAdmin { require(pools.length == amounts.length, "Pools and amounts must be the same length"); uint256 totalAmount; for (uint256 i = 0; i < amounts.length; i++) { totalAmount = totalAmount.add(amounts[i]); } // Do a single transfer, which is cheaper require(<FILL_ME>) for (uint256 i = 0; i < amounts.length; i++) { _pay(pools[i], amounts[i]); } } /** * @notice Pay back a v2.0.0 Tranched Pool * @param poolAddress The pool to be paid back * @param principalAmount principal amount to pay * @param interestAmount interest amount to pay */ function pay( address poolAddress, uint256 principalAmount, uint256 interestAmount ) external onlyAdmin { } function payInFull(address poolAddress, uint256 amount) external onlyAdmin { } function payWithSwapOnOneInch( address poolAddress, uint256 originAmount, address fromToken, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) external onlyAdmin { } function payMultipleWithSwapOnOneInch( address[] calldata pools, uint256[] calldata minAmounts, uint256 originAmount, address fromToken, uint256[] calldata exchangeDistribution ) external onlyAdmin { } /* INTERNAL FUNCTIONS */ function _pay(address poolAddress, uint256 amount) internal { } function _payV2Separate( address poolAddress, uint256 principalAmount, uint256 interestAmount ) internal returns (ILoan.PaymentAllocation memory) { } function transferFrom(address erc20, address sender, address recipient, uint256 amount) internal { } function swapOnOneInch( address fromToken, address toToken, uint256 originAmount, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) internal { } /** * @notice Performs a generic transaction. * @param _target The address for the transaction. * @param _data The data of the transaction. * Mostly copied from Argent: * https://github.com/argentlabs/argent-contracts/blob/develop/contracts/wallet/BaseWallet.sol#L111 */ function _invoke(address _target, bytes memory _data) internal returns (bytes memory) { } function _toUint256(bytes memory _bytes) internal pure returns (uint256 value) { } // OpenZeppelin contracts come with support for GSN _msgSender() (which just defaults to msg.sender) // Since there are two different versions of the function in the hierarchy, we need to instruct solidity to // use the relay recipient version which can actually pull the real sender from the parameters. // https://www.notion.so/My-contract-is-using-OpenZeppelin-How-do-I-add-GSN-support-2bee7e9d5f774a0cbb60d3a8de03e9fb function _msgSender() internal view override(ContextUpgradeSafe, BaseRelayRecipient) returns (address payable) { } function _msgData() internal view override(ContextUpgradeSafe, BaseRelayRecipient) returns (bytes memory ret) { } function versionRecipient() external view override returns (string memory) { } }
config.getUSDC().transferFrom(_msgSender(),address(this),totalAmount),"Failed to transfer USDC"
185,181
config.getUSDC().transferFrom(_msgSender(),address(this),totalAmount)
"Failed to fully pay off creditline"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; import {IVersioned} from "../../interfaces/IVersioned.sol"; import {ICreditLine} from "../../interfaces/ICreditLine.sol"; import {SafeERC20Transfer} from "../../library/SafeERC20Transfer.sol"; import {BaseUpgradeablePausable} from "../core/BaseUpgradeablePausable.sol"; import {ConfigHelper} from "../core/ConfigHelper.sol"; import {GoldfinchConfig} from "../core/GoldfinchConfig.sol"; import {IERC20withDec} from "../../interfaces/IERC20withDec.sol"; import {ITranchedPool} from "../../interfaces/ITranchedPool.sol"; import {ILoan} from "../../interfaces/ILoan.sol"; import {IBorrower} from "../../interfaces/IBorrower.sol"; import {BaseRelayRecipient} from "../../external/BaseRelayRecipient.sol"; import {ContextUpgradeSafe} from "@openzeppelin/contracts-ethereum-package/contracts/GSN/Context.sol"; import {Math} from "@openzeppelin/contracts-ethereum-package/contracts/math/Math.sol"; /** * @title Goldfinch's Borrower contract * @notice These contracts represent the a convenient way for a borrower to interact with Goldfinch * They are 100% optional. However, they let us add many sophisticated and convient features for borrowers * while still keeping our core protocol small and secure. We therefore expect most borrowers will use them. * This contract is the "official" borrower contract that will be maintained by Goldfinch governance. However, * in theory, anyone can fork or create their own version, or not use any contract at all. The core functionality * is completely agnostic to whether it is interacting with a contract or an externally owned account (EOA). * @author Goldfinch */ contract Borrower is BaseUpgradeablePausable, BaseRelayRecipient, IBorrower { using SafeERC20Transfer for IERC20withDec; using ConfigHelper for GoldfinchConfig; GoldfinchConfig public config; address private constant USDT_ADDRESS = address(0xdAC17F958D2ee523a2206206994597C13D831ec7); address private constant BUSD_ADDRESS = address(0x4Fabb145d64652a948d72533023f6E7A623C7C53); address private constant GUSD_ADDRESS = address(0x056Fd409E1d7A124BD7017459dFEa2F387b6d5Cd); address private constant DAI_ADDRESS = address(0x6B175474E89094C44Da98b954EedeAC495271d0F); function initialize(address owner, address _config) external override initializer { } function lockJuniorCapital(address poolAddress) external onlyAdmin { } function lockPool(address poolAddress) external onlyAdmin { } /** * @notice Drawdown on a loan * @param poolAddress Pool to drawdown from * @param amount usdc amount to drawdown * @param addressToSendTo Address to send the funds. Null address or address(this) will send funds back to the caller */ function drawdown( address poolAddress, uint256 amount, address addressToSendTo ) external onlyAdmin { } /** * @notice Drawdown on a v1 or v2 pool and swap the usdc to the desired token using OneInch * @param amount usdc amount to drawdown from the pool * @param addressToSendTo address to send the `toToken` to * @param toToken address of the ERC20 to swap to * @param minTargetAmount min amount of `toToken` you're willing to accept from the swap (i.e. a slippage tolerance) */ function drawdownWithSwapOnOneInch( address poolAddress, uint256 amount, address addressToSendTo, address toToken, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) public onlyAdmin { } function transferERC20(address token, address to, uint256 amount) public onlyAdmin { } /** * @notice Pay back a v1 or v2 tranched pool * @param poolAddress pool address * @param amount USDC amount to pay */ function pay(address poolAddress, uint256 amount) external onlyAdmin { } /** * @notice Pay back multiple pools. Supports v0.1.0 and v1.0.0 pools * @param pools list of pool addresses for which the caller is the borrower * @param amounts amounts to pay back */ function payMultiple(address[] calldata pools, uint256[] calldata amounts) external onlyAdmin { } /** * @notice Pay back a v2.0.0 Tranched Pool * @param poolAddress The pool to be paid back * @param principalAmount principal amount to pay * @param interestAmount interest amount to pay */ function pay( address poolAddress, uint256 principalAmount, uint256 interestAmount ) external onlyAdmin { } function payInFull(address poolAddress, uint256 amount) external onlyAdmin { require( config.getUSDC().transferFrom(_msgSender(), address(this), amount), "Failed to transfer USDC" ); _pay(poolAddress, amount); require(<FILL_ME>) } function payWithSwapOnOneInch( address poolAddress, uint256 originAmount, address fromToken, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) external onlyAdmin { } function payMultipleWithSwapOnOneInch( address[] calldata pools, uint256[] calldata minAmounts, uint256 originAmount, address fromToken, uint256[] calldata exchangeDistribution ) external onlyAdmin { } /* INTERNAL FUNCTIONS */ function _pay(address poolAddress, uint256 amount) internal { } function _payV2Separate( address poolAddress, uint256 principalAmount, uint256 interestAmount ) internal returns (ILoan.PaymentAllocation memory) { } function transferFrom(address erc20, address sender, address recipient, uint256 amount) internal { } function swapOnOneInch( address fromToken, address toToken, uint256 originAmount, uint256 minTargetAmount, uint256[] calldata exchangeDistribution ) internal { } /** * @notice Performs a generic transaction. * @param _target The address for the transaction. * @param _data The data of the transaction. * Mostly copied from Argent: * https://github.com/argentlabs/argent-contracts/blob/develop/contracts/wallet/BaseWallet.sol#L111 */ function _invoke(address _target, bytes memory _data) internal returns (bytes memory) { } function _toUint256(bytes memory _bytes) internal pure returns (uint256 value) { } // OpenZeppelin contracts come with support for GSN _msgSender() (which just defaults to msg.sender) // Since there are two different versions of the function in the hierarchy, we need to instruct solidity to // use the relay recipient version which can actually pull the real sender from the parameters. // https://www.notion.so/My-contract-is-using-OpenZeppelin-How-do-I-add-GSN-support-2bee7e9d5f774a0cbb60d3a8de03e9fb function _msgSender() internal view override(ContextUpgradeSafe, BaseRelayRecipient) returns (address payable) { } function _msgData() internal view override(ContextUpgradeSafe, BaseRelayRecipient) returns (bytes memory ret) { } function versionRecipient() external view override returns (string memory) { } }
ILoan(poolAddress).creditLine().balance()==0,"Failed to fully pay off creditline"
185,181
ILoan(poolAddress).creditLine().balance()==0
"Grant already accepted"
// SPDX-License-Identifier: GPL-3.0-only // solhint-disable-next-line max-line-length // Adapted from https://github.com/Uniswap/merkle-distributor/blob/c3255bfa2b684594ecd562cacd7664b0f18330bf/contracts/MerkleDistributor.sol. pragma solidity 0.6.12; import {MerkleProof} from "@openzeppelin/contracts/cryptography/MerkleProof.sol"; import {SafeERC20} from "@openzeppelin/contracts-ethereum-package/contracts/token/ERC20/SafeERC20.sol"; import {IERC20withDec} from "../interfaces/IERC20withDec.sol"; import {IMerkleDirectDistributor} from "../interfaces/IMerkleDirectDistributor.sol"; import {BaseUpgradeablePausable} from "../protocol/core/BaseUpgradeablePausable.sol"; contract MerkleDirectDistributor is IMerkleDirectDistributor, BaseUpgradeablePausable { using SafeERC20 for IERC20withDec; address public override gfi; bytes32 public override merkleRoot; // @dev This is a packed array of booleans. mapping(uint256 => uint256) private acceptedBitMap; function initialize(address owner, address _gfi, bytes32 _merkleRoot) public initializer { } function isGrantAccepted(uint256 index) public view override returns (bool) { } function _setGrantAccepted(uint256 index) private { } function acceptGrant( uint256 index, uint256 amount, bytes32[] calldata merkleProof ) external override whenNotPaused { require(<FILL_ME>) // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, msg.sender, amount)); require(MerkleProof.verify(merkleProof, merkleRoot, node), "Invalid proof"); // Mark it accepted and perform the granting. _setGrantAccepted(index); IERC20withDec(gfi).safeTransfer(msg.sender, amount); emit GrantAccepted(index, msg.sender, amount); } }
!isGrantAccepted(index),"Grant already accepted"
185,186
!isGrantAccepted(index)
null
pragma solidity ^0.8.7; /* Lil Dunks ------------------------- Founder - Lil Anx (@AnxFren) Founder - Gonna (@0xGonna) ------------------------- Contract Dev / Co-Founder - Astra (@0x_astra) */ contract LilDunksNFT is ERC721Enumerable, Pausable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; // Maximum tokens will be 2000 uint256 public _totalSupply = 2000; uint256 public _price = 70000000000000000; // .07 ETH uint256 public _whitelistPrice = 59000000000000000; // 0.059 ETH // Mappings mapping (address => bool) private _whitelist; mapping (address => uint256) public _whitelistMinted; mapping (address => uint256) public _minted; // Settings bool public _presaleActive = false; bool public _mintActive = false; uint256 public _whitelistMaxMint = 5; uint256 public _maxMint = 25; // Base URI for metadata string public _prefixURI; // Wallet Addresses address public founder1Address = 0x045524425F6371e66324b7728Df5201410f1Eac7; address public founder2Address = 0x71fc301BD42723b8Cc9Ef6af3041047Fbf405AC8; address public devAddress = 0x2Ea23ad853A68c0bD10cA15d5e896273585Ac3E0; address public communityAddress = 0x2DeE5ef42eBa5683332b574381e6DA3a5b820F1c; // Events event BurnToken(uint256 tokenID); event SetBaseURI(string newURI); event AirDrop(address[] indexed addrs); event TogglePresaleActive(bool presaleActive); event ToggleMintActive(bool mint1Active); event AddToWhiteList(address[] indexed addrs); event RemoveFromWhiteList(address[] indexed addrs); event WhiteListMint(address indexed addr, uint256 amount, uint256 price); event Mint(address indexed addr, uint256 amount, uint256 price); event ToggleTransferPause(bool paused); event UpdateTotalSupply(uint256 newMax); event UpdatePrice(uint256 newPrice); event UpdateWhiteListPrice(uint256 newPrice); event UpdateWhiteListMaxMint(uint256 newMax); event UpdateMaxMint(uint256 newMax); event Withdraw(uint256 amount); constructor() ERC721("Lil Dunks", "LD") { } function burnToken(uint256 tokenId) public virtual { } // URI Functions function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _uri) public onlyOwner { } function airDrop(address[] memory addrs) public onlyOwner { } function togglePresaleActive() public onlyOwner { } function toggleMintActive() public onlyOwner { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function removeFromWhitelist(address[] memory addrs) public onlyOwner { } function isWhiteListed(address addr) public view returns (bool) { } function whiteListMint(uint256 amount) public payable { address sender = msg.sender; require(amount > 0); require(_presaleActive); require(<FILL_ME>) uint256 totalMinted = _tokenIds.current(); require(totalMinted < _totalSupply); require(totalMinted + amount <= _totalSupply); require(_whitelistMinted[sender] + amount <= _whitelistMaxMint); require(msg.value >= amount * _whitelistPrice); for (uint256 i = 0; i < amount; i++) { _mintItem(sender); } _whitelistMinted[sender] = _whitelistMinted[sender] + amount; emit WhiteListMint(sender, amount, _price); } function mint(uint256 amount) public payable { } // function _mintItem(address to) internal { } // State management function updateWhiteListMaxMint(uint256 newMax) public onlyOwner { } function updateMaxMint(uint256 newMax) public onlyOwner { } function toggleTransferPause() public onlyOwner { } function updateWhiteListPrice(uint256 newPrice) public onlyOwner { } function updatePrice(uint256 newPrice) public onlyOwner { } function updateTotalSupply(uint256 newSupply) external onlyOwner { } function withdraw() external onlyOwner { } }
isWhiteListed(sender)
185,302
isWhiteListed(sender)
null
pragma solidity ^0.8.7; /* Lil Dunks ------------------------- Founder - Lil Anx (@AnxFren) Founder - Gonna (@0xGonna) ------------------------- Contract Dev / Co-Founder - Astra (@0x_astra) */ contract LilDunksNFT is ERC721Enumerable, Pausable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; // Maximum tokens will be 2000 uint256 public _totalSupply = 2000; uint256 public _price = 70000000000000000; // .07 ETH uint256 public _whitelistPrice = 59000000000000000; // 0.059 ETH // Mappings mapping (address => bool) private _whitelist; mapping (address => uint256) public _whitelistMinted; mapping (address => uint256) public _minted; // Settings bool public _presaleActive = false; bool public _mintActive = false; uint256 public _whitelistMaxMint = 5; uint256 public _maxMint = 25; // Base URI for metadata string public _prefixURI; // Wallet Addresses address public founder1Address = 0x045524425F6371e66324b7728Df5201410f1Eac7; address public founder2Address = 0x71fc301BD42723b8Cc9Ef6af3041047Fbf405AC8; address public devAddress = 0x2Ea23ad853A68c0bD10cA15d5e896273585Ac3E0; address public communityAddress = 0x2DeE5ef42eBa5683332b574381e6DA3a5b820F1c; // Events event BurnToken(uint256 tokenID); event SetBaseURI(string newURI); event AirDrop(address[] indexed addrs); event TogglePresaleActive(bool presaleActive); event ToggleMintActive(bool mint1Active); event AddToWhiteList(address[] indexed addrs); event RemoveFromWhiteList(address[] indexed addrs); event WhiteListMint(address indexed addr, uint256 amount, uint256 price); event Mint(address indexed addr, uint256 amount, uint256 price); event ToggleTransferPause(bool paused); event UpdateTotalSupply(uint256 newMax); event UpdatePrice(uint256 newPrice); event UpdateWhiteListPrice(uint256 newPrice); event UpdateWhiteListMaxMint(uint256 newMax); event UpdateMaxMint(uint256 newMax); event Withdraw(uint256 amount); constructor() ERC721("Lil Dunks", "LD") { } function burnToken(uint256 tokenId) public virtual { } // URI Functions function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _uri) public onlyOwner { } function airDrop(address[] memory addrs) public onlyOwner { } function togglePresaleActive() public onlyOwner { } function toggleMintActive() public onlyOwner { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function removeFromWhitelist(address[] memory addrs) public onlyOwner { } function isWhiteListed(address addr) public view returns (bool) { } function whiteListMint(uint256 amount) public payable { address sender = msg.sender; require(amount > 0); require(_presaleActive); require(isWhiteListed(sender)); uint256 totalMinted = _tokenIds.current(); require(totalMinted < _totalSupply); require(<FILL_ME>) require(_whitelistMinted[sender] + amount <= _whitelistMaxMint); require(msg.value >= amount * _whitelistPrice); for (uint256 i = 0; i < amount; i++) { _mintItem(sender); } _whitelistMinted[sender] = _whitelistMinted[sender] + amount; emit WhiteListMint(sender, amount, _price); } function mint(uint256 amount) public payable { } // function _mintItem(address to) internal { } // State management function updateWhiteListMaxMint(uint256 newMax) public onlyOwner { } function updateMaxMint(uint256 newMax) public onlyOwner { } function toggleTransferPause() public onlyOwner { } function updateWhiteListPrice(uint256 newPrice) public onlyOwner { } function updatePrice(uint256 newPrice) public onlyOwner { } function updateTotalSupply(uint256 newSupply) external onlyOwner { } function withdraw() external onlyOwner { } }
totalMinted+amount<=_totalSupply
185,302
totalMinted+amount<=_totalSupply
null
pragma solidity ^0.8.7; /* Lil Dunks ------------------------- Founder - Lil Anx (@AnxFren) Founder - Gonna (@0xGonna) ------------------------- Contract Dev / Co-Founder - Astra (@0x_astra) */ contract LilDunksNFT is ERC721Enumerable, Pausable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; // Maximum tokens will be 2000 uint256 public _totalSupply = 2000; uint256 public _price = 70000000000000000; // .07 ETH uint256 public _whitelistPrice = 59000000000000000; // 0.059 ETH // Mappings mapping (address => bool) private _whitelist; mapping (address => uint256) public _whitelistMinted; mapping (address => uint256) public _minted; // Settings bool public _presaleActive = false; bool public _mintActive = false; uint256 public _whitelistMaxMint = 5; uint256 public _maxMint = 25; // Base URI for metadata string public _prefixURI; // Wallet Addresses address public founder1Address = 0x045524425F6371e66324b7728Df5201410f1Eac7; address public founder2Address = 0x71fc301BD42723b8Cc9Ef6af3041047Fbf405AC8; address public devAddress = 0x2Ea23ad853A68c0bD10cA15d5e896273585Ac3E0; address public communityAddress = 0x2DeE5ef42eBa5683332b574381e6DA3a5b820F1c; // Events event BurnToken(uint256 tokenID); event SetBaseURI(string newURI); event AirDrop(address[] indexed addrs); event TogglePresaleActive(bool presaleActive); event ToggleMintActive(bool mint1Active); event AddToWhiteList(address[] indexed addrs); event RemoveFromWhiteList(address[] indexed addrs); event WhiteListMint(address indexed addr, uint256 amount, uint256 price); event Mint(address indexed addr, uint256 amount, uint256 price); event ToggleTransferPause(bool paused); event UpdateTotalSupply(uint256 newMax); event UpdatePrice(uint256 newPrice); event UpdateWhiteListPrice(uint256 newPrice); event UpdateWhiteListMaxMint(uint256 newMax); event UpdateMaxMint(uint256 newMax); event Withdraw(uint256 amount); constructor() ERC721("Lil Dunks", "LD") { } function burnToken(uint256 tokenId) public virtual { } // URI Functions function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _uri) public onlyOwner { } function airDrop(address[] memory addrs) public onlyOwner { } function togglePresaleActive() public onlyOwner { } function toggleMintActive() public onlyOwner { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function removeFromWhitelist(address[] memory addrs) public onlyOwner { } function isWhiteListed(address addr) public view returns (bool) { } function whiteListMint(uint256 amount) public payable { address sender = msg.sender; require(amount > 0); require(_presaleActive); require(isWhiteListed(sender)); uint256 totalMinted = _tokenIds.current(); require(totalMinted < _totalSupply); require(totalMinted + amount <= _totalSupply); require(<FILL_ME>) require(msg.value >= amount * _whitelistPrice); for (uint256 i = 0; i < amount; i++) { _mintItem(sender); } _whitelistMinted[sender] = _whitelistMinted[sender] + amount; emit WhiteListMint(sender, amount, _price); } function mint(uint256 amount) public payable { } // function _mintItem(address to) internal { } // State management function updateWhiteListMaxMint(uint256 newMax) public onlyOwner { } function updateMaxMint(uint256 newMax) public onlyOwner { } function toggleTransferPause() public onlyOwner { } function updateWhiteListPrice(uint256 newPrice) public onlyOwner { } function updatePrice(uint256 newPrice) public onlyOwner { } function updateTotalSupply(uint256 newSupply) external onlyOwner { } function withdraw() external onlyOwner { } }
_whitelistMinted[sender]+amount<=_whitelistMaxMint
185,302
_whitelistMinted[sender]+amount<=_whitelistMaxMint
null
pragma solidity ^0.8.7; /* Lil Dunks ------------------------- Founder - Lil Anx (@AnxFren) Founder - Gonna (@0xGonna) ------------------------- Contract Dev / Co-Founder - Astra (@0x_astra) */ contract LilDunksNFT is ERC721Enumerable, Pausable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIds; // Maximum tokens will be 2000 uint256 public _totalSupply = 2000; uint256 public _price = 70000000000000000; // .07 ETH uint256 public _whitelistPrice = 59000000000000000; // 0.059 ETH // Mappings mapping (address => bool) private _whitelist; mapping (address => uint256) public _whitelistMinted; mapping (address => uint256) public _minted; // Settings bool public _presaleActive = false; bool public _mintActive = false; uint256 public _whitelistMaxMint = 5; uint256 public _maxMint = 25; // Base URI for metadata string public _prefixURI; // Wallet Addresses address public founder1Address = 0x045524425F6371e66324b7728Df5201410f1Eac7; address public founder2Address = 0x71fc301BD42723b8Cc9Ef6af3041047Fbf405AC8; address public devAddress = 0x2Ea23ad853A68c0bD10cA15d5e896273585Ac3E0; address public communityAddress = 0x2DeE5ef42eBa5683332b574381e6DA3a5b820F1c; // Events event BurnToken(uint256 tokenID); event SetBaseURI(string newURI); event AirDrop(address[] indexed addrs); event TogglePresaleActive(bool presaleActive); event ToggleMintActive(bool mint1Active); event AddToWhiteList(address[] indexed addrs); event RemoveFromWhiteList(address[] indexed addrs); event WhiteListMint(address indexed addr, uint256 amount, uint256 price); event Mint(address indexed addr, uint256 amount, uint256 price); event ToggleTransferPause(bool paused); event UpdateTotalSupply(uint256 newMax); event UpdatePrice(uint256 newPrice); event UpdateWhiteListPrice(uint256 newPrice); event UpdateWhiteListMaxMint(uint256 newMax); event UpdateMaxMint(uint256 newMax); event Withdraw(uint256 amount); constructor() ERC721("Lil Dunks", "LD") { } function burnToken(uint256 tokenId) public virtual { } // URI Functions function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _uri) public onlyOwner { } function airDrop(address[] memory addrs) public onlyOwner { } function togglePresaleActive() public onlyOwner { } function toggleMintActive() public onlyOwner { } function addToWhitelist(address[] memory addrs) public onlyOwner { } function removeFromWhitelist(address[] memory addrs) public onlyOwner { } function isWhiteListed(address addr) public view returns (bool) { } function whiteListMint(uint256 amount) public payable { } function mint(uint256 amount) public payable { address sender = msg.sender; require(amount > 0); require(_mintActive); uint256 totalMinted = _tokenIds.current(); require(totalMinted < _totalSupply); require(totalMinted + amount <= _totalSupply); require(<FILL_ME>) require(msg.value >= amount * _price); for (uint256 i = 0; i < amount; i++) { _mintItem(msg.sender); } _minted[sender] = _minted[sender] + amount; emit Mint(sender, amount, _price); } // function _mintItem(address to) internal { } // State management function updateWhiteListMaxMint(uint256 newMax) public onlyOwner { } function updateMaxMint(uint256 newMax) public onlyOwner { } function toggleTransferPause() public onlyOwner { } function updateWhiteListPrice(uint256 newPrice) public onlyOwner { } function updatePrice(uint256 newPrice) public onlyOwner { } function updateTotalSupply(uint256 newSupply) external onlyOwner { } function withdraw() external onlyOwner { } }
_minted[sender]+amount<=_maxMint
185,302
_minted[sender]+amount<=_maxMint
"Max per wallet reached"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ClampedRandomizer.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; // Overview of contract capability // Standard ERC721 // Supports for: // - Presale list // - Admin other than Owner // - Burnable // - Randomized ID at mint - WARNING - THIS PREVENTS THE MAXIMUM NUMBER OF NFTS TO MINT TO CHANGE contract MyNFTContractRandom is ClampedRandomizer, Context, AccessControlEnumerable, ERC721Enumerable, ERC721URIStorage, Ownable{ using Counters for Counters.Counter; Counters.Counter public _tokenIdTracker; string private _baseTokenURI; /// @notice Mint price uint private _price; /// @notice Max number of token mintable uint private _max; address _wallet; bool _openMint; uint _maxPerWallet = 10; constructor(string memory name, string memory symbol, string memory baseTokenURI, uint mintPrice, uint max, address wallet, address admin) ERC721(name, symbol) ClampedRandomizer(max){ } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) external { } function setTokenURI(uint256 tokenId, string memory _tokenURI) external { } /** @notice Method for updating minting fee @dev Only admin @param mintPrice uint the minting fee to set */ function setPrice(uint mintPrice) external { } function setMax(uint max) external { } function setMaxPerWallet(uint newMaxBuy) external { } function setMint(bool openMint) external { } function getPrice() public view returns (uint) { } function getMax() public view returns (uint) { } function contractURI() public pure returns (string memory) { } function internalMint(address to) internal { } function mint(uint amount) public payable { uint supply = totalSupply(); require(amount <= 10, "Max of 10 NFT per mint"); require(<FILL_ME>) require(_openMint == true, "Minting is closed"); require(msg.value == _price*amount, "Must send correct price"); require(supply + amount <= _max, "Not enough NFT left to be minted"); for(uint i = 0; i < amount; i++) { internalMint(msg.sender); } payable(_wallet).transfer(msg.value); } function burn(uint256 tokenId) public{ } function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC721, ERC721Enumerable) returns (bool) { } }
ERC721.balanceOf(msg.sender)+amount<_maxPerWallet,"Max per wallet reached"
185,340
ERC721.balanceOf(msg.sender)+amount<_maxPerWallet
"Not enough NFT left to be minted"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/ClampedRandomizer.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; // Overview of contract capability // Standard ERC721 // Supports for: // - Presale list // - Admin other than Owner // - Burnable // - Randomized ID at mint - WARNING - THIS PREVENTS THE MAXIMUM NUMBER OF NFTS TO MINT TO CHANGE contract MyNFTContractRandom is ClampedRandomizer, Context, AccessControlEnumerable, ERC721Enumerable, ERC721URIStorage, Ownable{ using Counters for Counters.Counter; Counters.Counter public _tokenIdTracker; string private _baseTokenURI; /// @notice Mint price uint private _price; /// @notice Max number of token mintable uint private _max; address _wallet; bool _openMint; uint _maxPerWallet = 10; constructor(string memory name, string memory symbol, string memory baseTokenURI, uint mintPrice, uint max, address wallet, address admin) ERC721(name, symbol) ClampedRandomizer(max){ } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) external { } function setTokenURI(uint256 tokenId, string memory _tokenURI) external { } /** @notice Method for updating minting fee @dev Only admin @param mintPrice uint the minting fee to set */ function setPrice(uint mintPrice) external { } function setMax(uint max) external { } function setMaxPerWallet(uint newMaxBuy) external { } function setMint(bool openMint) external { } function getPrice() public view returns (uint) { } function getMax() public view returns (uint) { } function contractURI() public pure returns (string memory) { } function internalMint(address to) internal { } function mint(uint amount) public payable { uint supply = totalSupply(); require(amount <= 10, "Max of 10 NFT per mint"); require(ERC721.balanceOf(msg.sender) + amount < _maxPerWallet, "Max per wallet reached"); require(_openMint == true, "Minting is closed"); require(msg.value == _price*amount, "Must send correct price"); require(<FILL_ME>) for(uint i = 0; i < amount; i++) { internalMint(msg.sender); } payable(_wallet).transfer(msg.value); } function burn(uint256 tokenId) public{ } function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC721, ERC721Enumerable) returns (bool) { } }
supply+amount<=_max,"Not enough NFT left to be minted"
185,340
supply+amount<=_max
"3"
//"SPDX-License-Identifier: GPL-3.0 /******************************************* _ _ | | | | _ __ ___ | |_ _ ___ __ _ _ __| |_ | '_ \ / _ \| | | | / __| / _` | '__| __| | |_) | (_) | | |_| \__ \| (_| | | | |_ | .__/ \___/|_|\__, |___(_)__,_|_| \__| | | __/ | |_| |___/ a homage to math, geometry and cryptography. ********************************************/ pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IPolys.sol"; contract PolysPlay is Ownable { struct Game { uint16 playNumber; uint16 lastPolyPlayed; uint8 compositionStreak; uint8 paletteStreak; uint8 doublingStreak; bool isWildcard; } // Parameters // ------------------------------------------- // The duration of a game uint public gameDuration = 1 days; // The minimum amount of time left in the game after a play is made uint public timeBuffer; // Percentage that goes to charity from 0 to 100 uint public charityShare; // Percentage that goes to development from 0 to 100 uint public devShare; // Minimum amount to play a card uint public minEntry = 0.015 ether; // When the contract is paused the current game can end, but you can't start a new one. // We will probably pause the contract if we release a new version of the game. bool public isPaused = true; // If set to true this contract will create wildcard games where the rules have two changes: // 1) Polys with joker as the composition can always be played (jokers are the wildcard) // 2) Placing a circled Poly forces the next poly to match the *palette* (instead of forcing a composition match) bool public spawnWildcardGames; // Entry fee doubles every time the streak increases by ´streakDoubling´ uint8 public spawnDoublingStreak; // State Variables // ------------------------------------------- // The end time for the current game. If endTime = 0, no game is being played. uint public endTime; uint public currentGameId; mapping (uint => Game) public gameIdToGame; mapping (uint => mapping(uint16 => uint16)) public gameIdToBoard; // Constants and Immutables // ------------------------------------------- IPolys immutable private _polys; address constant private _charityWallet = 0xE00327f0f5f5F55d01C2FC6a87ddA1B8E292Ac79; // Events // ------------------------------------------- event GameStarted(uint gameId, address player, uint16 polyId, uint minEntry); event GameEnded(uint gameId, address winner, uint prize, uint charityDonation); event PolyPlayed(uint gameId, uint16 playNumber, address player, uint16 polyId, bool extended); event GameExtended(uint gameId, uint endTime); event NewDoublingStreak(uint8 doublingStreak); event NewWildcardFlag(bool isWildCardGame); constructor(address polys, uint _timeBuffer, uint _charityShare, uint _devShare, uint8 _doublingStreak) { } function newGame(uint16 polyId) payable external { require(endTime == 0, "1"); require(msg.value >= minEntry, "2"); require(<FILL_ME>) require(!isPaused, "11"); _newGame(polyId); } function playPoly(uint16 polyId) payable external { } function endGame() external { } // Getters functions // ------------------------------------------- function getPrize() public view returns (uint) { } function getPrizeForNextPlay() public view returns (uint) { } function getCharityDonation() public view returns (uint) { } function getEntryFeeCurrentGame() public view returns (uint) { } // Internal functions // ------------------------------------------- function _getPrize(uint balance) internal view returns (uint) { } function _newGame(uint16 polyId) internal { } function _getEntryFee(Game memory game) internal view returns (uint) { } function _propertyOf(uint16 polyId, bool isComposition) internal view returns (uint8) { } // Setter functions // ------------------------------------------- function setWildCardFlag(bool _isWildCardGame) external onlyOwner { } function setStreakDoubling(uint8 _doublingStreak) external onlyOwner { } function setMinEntry(uint _minEntry) external onlyOwner { } function setGameDuration(uint _gameDuration) external onlyOwner { } function setTimeBuffer(uint _timeBuffer) external onlyOwner { } function setCharityWalletShare(uint _charityShare) external onlyOwner { } function setDevShare(uint _devShare) external onlyOwner { } function setPause(bool _pause) external onlyOwner { } } // Errors: // 1: You can't start a new game before ending the previous // 2: The eth amount is not correct // 3: You don't own that polys // 4: This game is over // 5: That polys was already played // 6: Game hasn't started // 7: Game hasn't finished // 8: This is not a valid play // 9: Payment failed // 10: Only users can play // 11: Can't start a new game when the contract is paused
_polys.ownerOf(polyId)==msg.sender,"3"
185,481
_polys.ownerOf(polyId)==msg.sender
"5"
//"SPDX-License-Identifier: GPL-3.0 /******************************************* _ _ | | | | _ __ ___ | |_ _ ___ __ _ _ __| |_ | '_ \ / _ \| | | | / __| / _` | '__| __| | |_) | (_) | | |_| \__ \| (_| | | | |_ | .__/ \___/|_|\__, |___(_)__,_|_| \__| | | __/ | |_| |___/ a homage to math, geometry and cryptography. ********************************************/ pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IPolys.sol"; contract PolysPlay is Ownable { struct Game { uint16 playNumber; uint16 lastPolyPlayed; uint8 compositionStreak; uint8 paletteStreak; uint8 doublingStreak; bool isWildcard; } // Parameters // ------------------------------------------- // The duration of a game uint public gameDuration = 1 days; // The minimum amount of time left in the game after a play is made uint public timeBuffer; // Percentage that goes to charity from 0 to 100 uint public charityShare; // Percentage that goes to development from 0 to 100 uint public devShare; // Minimum amount to play a card uint public minEntry = 0.015 ether; // When the contract is paused the current game can end, but you can't start a new one. // We will probably pause the contract if we release a new version of the game. bool public isPaused = true; // If set to true this contract will create wildcard games where the rules have two changes: // 1) Polys with joker as the composition can always be played (jokers are the wildcard) // 2) Placing a circled Poly forces the next poly to match the *palette* (instead of forcing a composition match) bool public spawnWildcardGames; // Entry fee doubles every time the streak increases by ´streakDoubling´ uint8 public spawnDoublingStreak; // State Variables // ------------------------------------------- // The end time for the current game. If endTime = 0, no game is being played. uint public endTime; uint public currentGameId; mapping (uint => Game) public gameIdToGame; mapping (uint => mapping(uint16 => uint16)) public gameIdToBoard; // Constants and Immutables // ------------------------------------------- IPolys immutable private _polys; address constant private _charityWallet = 0xE00327f0f5f5F55d01C2FC6a87ddA1B8E292Ac79; // Events // ------------------------------------------- event GameStarted(uint gameId, address player, uint16 polyId, uint minEntry); event GameEnded(uint gameId, address winner, uint prize, uint charityDonation); event PolyPlayed(uint gameId, uint16 playNumber, address player, uint16 polyId, bool extended); event GameExtended(uint gameId, uint endTime); event NewDoublingStreak(uint8 doublingStreak); event NewWildcardFlag(bool isWildCardGame); constructor(address polys, uint _timeBuffer, uint _charityShare, uint _devShare, uint8 _doublingStreak) { } function newGame(uint16 polyId) payable external { } function playPoly(uint16 polyId) payable external { require(block.timestamp < endTime, "4"); require(_polys.ownerOf(polyId) == msg.sender, "3"); require(<FILL_ME>) require(tx.origin == msg.sender, "10"); Game memory game = gameIdToGame[currentGameId]; require(msg.value == _getEntryFee(game), "2"); uint compositionId = _propertyOf(polyId, true); bool sameComposition = compositionId == _propertyOf(game.lastPolyPlayed, true); bool samePalette = _propertyOf(polyId, false) == _propertyOf(game.lastPolyPlayed, false); if (game.isWildcard) { if (compositionId != 38) { // if it doesn't have the composition of the joker if (game.lastPolyPlayed < 101) { require(sameComposition, "8"); } else if (game.lastPolyPlayed < 201) { require(samePalette, "8"); } else { require(sameComposition || samePalette, "8"); } } } else { if (game.lastPolyPlayed < 201) { require(sameComposition, "8"); } else { require(sameComposition || samePalette, "8"); } } // Extend the game if the play was received within `timeBuffer` of the game endTime bool extended = endTime - block.timestamp < timeBuffer; if (extended) { endTime = block.timestamp + timeBuffer; emit GameExtended(currentGameId, endTime); } gameIdToBoard[currentGameId][polyId] = game.lastPolyPlayed; game.compositionStreak = sameComposition ? game.compositionStreak + 1 : 1; game.paletteStreak = samePalette ? game.paletteStreak + 1 : 1; game.lastPolyPlayed = polyId; game.playNumber++; gameIdToGame[currentGameId] = game; emit PolyPlayed(currentGameId, game.playNumber, msg.sender, polyId, extended); } function endGame() external { } // Getters functions // ------------------------------------------- function getPrize() public view returns (uint) { } function getPrizeForNextPlay() public view returns (uint) { } function getCharityDonation() public view returns (uint) { } function getEntryFeeCurrentGame() public view returns (uint) { } // Internal functions // ------------------------------------------- function _getPrize(uint balance) internal view returns (uint) { } function _newGame(uint16 polyId) internal { } function _getEntryFee(Game memory game) internal view returns (uint) { } function _propertyOf(uint16 polyId, bool isComposition) internal view returns (uint8) { } // Setter functions // ------------------------------------------- function setWildCardFlag(bool _isWildCardGame) external onlyOwner { } function setStreakDoubling(uint8 _doublingStreak) external onlyOwner { } function setMinEntry(uint _minEntry) external onlyOwner { } function setGameDuration(uint _gameDuration) external onlyOwner { } function setTimeBuffer(uint _timeBuffer) external onlyOwner { } function setCharityWalletShare(uint _charityShare) external onlyOwner { } function setDevShare(uint _devShare) external onlyOwner { } function setPause(bool _pause) external onlyOwner { } } // Errors: // 1: You can't start a new game before ending the previous // 2: The eth amount is not correct // 3: You don't own that polys // 4: This game is over // 5: That polys was already played // 6: Game hasn't started // 7: Game hasn't finished // 8: This is not a valid play // 9: Payment failed // 10: Only users can play // 11: Can't start a new game when the contract is paused
gameIdToBoard[currentGameId][polyId]==0,"5"
185,481
gameIdToBoard[currentGameId][polyId]==0
"8"
//"SPDX-License-Identifier: GPL-3.0 /******************************************* _ _ | | | | _ __ ___ | |_ _ ___ __ _ _ __| |_ | '_ \ / _ \| | | | / __| / _` | '__| __| | |_) | (_) | | |_| \__ \| (_| | | | |_ | .__/ \___/|_|\__, |___(_)__,_|_| \__| | | __/ | |_| |___/ a homage to math, geometry and cryptography. ********************************************/ pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IPolys.sol"; contract PolysPlay is Ownable { struct Game { uint16 playNumber; uint16 lastPolyPlayed; uint8 compositionStreak; uint8 paletteStreak; uint8 doublingStreak; bool isWildcard; } // Parameters // ------------------------------------------- // The duration of a game uint public gameDuration = 1 days; // The minimum amount of time left in the game after a play is made uint public timeBuffer; // Percentage that goes to charity from 0 to 100 uint public charityShare; // Percentage that goes to development from 0 to 100 uint public devShare; // Minimum amount to play a card uint public minEntry = 0.015 ether; // When the contract is paused the current game can end, but you can't start a new one. // We will probably pause the contract if we release a new version of the game. bool public isPaused = true; // If set to true this contract will create wildcard games where the rules have two changes: // 1) Polys with joker as the composition can always be played (jokers are the wildcard) // 2) Placing a circled Poly forces the next poly to match the *palette* (instead of forcing a composition match) bool public spawnWildcardGames; // Entry fee doubles every time the streak increases by ´streakDoubling´ uint8 public spawnDoublingStreak; // State Variables // ------------------------------------------- // The end time for the current game. If endTime = 0, no game is being played. uint public endTime; uint public currentGameId; mapping (uint => Game) public gameIdToGame; mapping (uint => mapping(uint16 => uint16)) public gameIdToBoard; // Constants and Immutables // ------------------------------------------- IPolys immutable private _polys; address constant private _charityWallet = 0xE00327f0f5f5F55d01C2FC6a87ddA1B8E292Ac79; // Events // ------------------------------------------- event GameStarted(uint gameId, address player, uint16 polyId, uint minEntry); event GameEnded(uint gameId, address winner, uint prize, uint charityDonation); event PolyPlayed(uint gameId, uint16 playNumber, address player, uint16 polyId, bool extended); event GameExtended(uint gameId, uint endTime); event NewDoublingStreak(uint8 doublingStreak); event NewWildcardFlag(bool isWildCardGame); constructor(address polys, uint _timeBuffer, uint _charityShare, uint _devShare, uint8 _doublingStreak) { } function newGame(uint16 polyId) payable external { } function playPoly(uint16 polyId) payable external { require(block.timestamp < endTime, "4"); require(_polys.ownerOf(polyId) == msg.sender, "3"); require(gameIdToBoard[currentGameId][polyId] == 0, "5"); require(tx.origin == msg.sender, "10"); Game memory game = gameIdToGame[currentGameId]; require(msg.value == _getEntryFee(game), "2"); uint compositionId = _propertyOf(polyId, true); bool sameComposition = compositionId == _propertyOf(game.lastPolyPlayed, true); bool samePalette = _propertyOf(polyId, false) == _propertyOf(game.lastPolyPlayed, false); if (game.isWildcard) { if (compositionId != 38) { // if it doesn't have the composition of the joker if (game.lastPolyPlayed < 101) { require(sameComposition, "8"); } else if (game.lastPolyPlayed < 201) { require(samePalette, "8"); } else { require(<FILL_ME>) } } } else { if (game.lastPolyPlayed < 201) { require(sameComposition, "8"); } else { require(sameComposition || samePalette, "8"); } } // Extend the game if the play was received within `timeBuffer` of the game endTime bool extended = endTime - block.timestamp < timeBuffer; if (extended) { endTime = block.timestamp + timeBuffer; emit GameExtended(currentGameId, endTime); } gameIdToBoard[currentGameId][polyId] = game.lastPolyPlayed; game.compositionStreak = sameComposition ? game.compositionStreak + 1 : 1; game.paletteStreak = samePalette ? game.paletteStreak + 1 : 1; game.lastPolyPlayed = polyId; game.playNumber++; gameIdToGame[currentGameId] = game; emit PolyPlayed(currentGameId, game.playNumber, msg.sender, polyId, extended); } function endGame() external { } // Getters functions // ------------------------------------------- function getPrize() public view returns (uint) { } function getPrizeForNextPlay() public view returns (uint) { } function getCharityDonation() public view returns (uint) { } function getEntryFeeCurrentGame() public view returns (uint) { } // Internal functions // ------------------------------------------- function _getPrize(uint balance) internal view returns (uint) { } function _newGame(uint16 polyId) internal { } function _getEntryFee(Game memory game) internal view returns (uint) { } function _propertyOf(uint16 polyId, bool isComposition) internal view returns (uint8) { } // Setter functions // ------------------------------------------- function setWildCardFlag(bool _isWildCardGame) external onlyOwner { } function setStreakDoubling(uint8 _doublingStreak) external onlyOwner { } function setMinEntry(uint _minEntry) external onlyOwner { } function setGameDuration(uint _gameDuration) external onlyOwner { } function setTimeBuffer(uint _timeBuffer) external onlyOwner { } function setCharityWalletShare(uint _charityShare) external onlyOwner { } function setDevShare(uint _devShare) external onlyOwner { } function setPause(bool _pause) external onlyOwner { } } // Errors: // 1: You can't start a new game before ending the previous // 2: The eth amount is not correct // 3: You don't own that polys // 4: This game is over // 5: That polys was already played // 6: Game hasn't started // 7: Game hasn't finished // 8: This is not a valid play // 9: Payment failed // 10: Only users can play // 11: Can't start a new game when the contract is paused
sameComposition||samePalette,"8"
185,481
sameComposition||samePalette
"Max mint for whitelist exceeded!"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract System is ERC721AQueryable, DefaultOperatorFilterer, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleStates { CLOSED, WHITELIST, PUBLIC } SaleStates public saleState; bytes32 public merkleRoot; mapping (uint256 => mapping (address => uint256)) public numberMinted; string public baseURL; string public unRevealedURL; uint256 public cost = 0.06 ether; uint256 public maxSupply = 3333; uint256 public maxPublicTokensPerWallet = 10; uint256 public maxWLTokensPerWallet = 3; bool public revealed = false; constructor() ERC721A("System", "DS") { } modifier mintCompliance(uint256 _mintAmount) { } modifier mintPriceCompliance(uint256 _mintAmount) { } modifier checkSaleState(SaleStates _saleState) { } function whitelistMint(address _to, uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) checkSaleState(SaleStates.WHITELIST) { uint256 currentSaleState = uint256(saleState); require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(_to)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid wl proof!"); numberMinted[currentSaleState][_to] += _mintAmount; _mint(_to, _mintAmount); } function mint(address _to, uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) checkSaleState(SaleStates.PUBLIC) { } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxPublicTokensPerWallet(uint256 _maxPublicTokensPerWallet) public onlyOwner { } function setMaxWLTokensPerWallet(uint256 _maxWLTokensPerWallet) public onlyOwner { } function setUnRevealedURL(string memory _unRevealedURL) public onlyOwner { } function setBaseURL(string memory _baseUrl) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } // CLOSED = 0, WHITELIST = 1, PUBLIC = 2 function setSaleState(uint256 newSaleState) public onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function _baseURI() internal view virtual override returns (string memory) { } 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) { } }
numberMinted[currentSaleState][_to]+_mintAmount<=maxWLTokensPerWallet,"Max mint for whitelist exceeded!"
185,805
numberMinted[currentSaleState][_to]+_mintAmount<=maxWLTokensPerWallet
"Max mint for public exceeded!"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract System is ERC721AQueryable, DefaultOperatorFilterer, Ownable, ReentrancyGuard { using Strings for uint256; enum SaleStates { CLOSED, WHITELIST, PUBLIC } SaleStates public saleState; bytes32 public merkleRoot; mapping (uint256 => mapping (address => uint256)) public numberMinted; string public baseURL; string public unRevealedURL; uint256 public cost = 0.06 ether; uint256 public maxSupply = 3333; uint256 public maxPublicTokensPerWallet = 10; uint256 public maxWLTokensPerWallet = 3; bool public revealed = false; constructor() ERC721A("System", "DS") { } modifier mintCompliance(uint256 _mintAmount) { } modifier mintPriceCompliance(uint256 _mintAmount) { } modifier checkSaleState(SaleStates _saleState) { } function whitelistMint(address _to, uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) checkSaleState(SaleStates.WHITELIST) { } function mint(address _to, uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) checkSaleState(SaleStates.PUBLIC) { uint256 currentSaleState = uint256(saleState); require(<FILL_ME>) numberMinted[currentSaleState][_to] += _mintAmount; _mint(_to, _mintAmount); } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxPublicTokensPerWallet(uint256 _maxPublicTokensPerWallet) public onlyOwner { } function setMaxWLTokensPerWallet(uint256 _maxWLTokensPerWallet) public onlyOwner { } function setUnRevealedURL(string memory _unRevealedURL) public onlyOwner { } function setBaseURL(string memory _baseUrl) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } // CLOSED = 0, WHITELIST = 1, PUBLIC = 2 function setSaleState(uint256 newSaleState) public onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function _baseURI() internal view virtual override returns (string memory) { } 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) { } }
numberMinted[currentSaleState][_to]+_mintAmount<=maxPublicTokensPerWallet,"Max mint for public exceeded!"
185,805
numberMinted[currentSaleState][_to]+_mintAmount<=maxPublicTokensPerWallet
"INVALID_ETH"
pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Does not support burning tokens to address(0). * * Assumes that an owner cannot have more than the 2**128 - 1 (max value of uint128) of supply */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 internal currentIndex; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(totalSupply). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } contract RuggerMen is ERC721A, Ownable, ReentrancyGuard { string public baseURI = "ipfs://bafybeihjyxngvclcdyorjwfkhyli442qalnek7mxxdayvvreusyijmwyfa/"; uint public price = 0.003 ether; uint public maxPerTx = 10; uint public maxPerFree = 1; uint public totalFree = 4000; uint public maxSupply = 5000; bool public paused = true; mapping(address => uint256) private _mintedFreeAmount; constructor() ERC721A("RuggerMen", "RUG"){} function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function mint(uint256 count) external payable { uint256 cost = price; bool isFree = ((totalSupply() + count < totalFree + 1) && (_mintedFreeAmount[msg.sender] < maxPerFree)); if (isFree) { require(!paused, "The contract is paused!"); require(<FILL_ME>) require(totalSupply() + count <= maxSupply, "We don't need to rug anymore."); require(count <= maxPerTx, "Max per TX reached."); _mintedFreeAmount[msg.sender] += count; } else{ require(!paused, "The contract is paused!"); require(msg.value >= count * cost, "Send the exact amount: 0.004*(count)"); require(totalSupply() + count <= maxSupply, "We don't need to rug anymore."); require(count <= maxPerTx, "Max per TX reached."); } _safeMint(msg.sender, count); } function kingMint(address mintAddress, uint256 count) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseUri(string memory baseuri_) public onlyOwner { } function setPrice(uint256 price_) external onlyOwner { } function setMaxTotalFree(uint256 MaxTotalFree_) external onlyOwner { } function withdraw() external onlyOwner nonReentrant { } }
msg.value>=(count*cost)-cost,"INVALID_ETH"
185,880
msg.value>=(count*cost)-cost
"NFT already claimed"
pragma solidity ^0.8.17; contract FoundingMemberVault is NFTVault, EIP712 { using Merkle for Merkle.Root; using VotingPowerHistory for VotingPowerHistory.History; string internal constant _VAULT_TYPE = "FoundingMember"; mapping(address => bool) private _claimed; bytes32 private immutable _TYPE_HASH = keccak256( "Proof(address account,address receiver,address delegate,uint128 multiplier,bytes32[] proof)" ); Merkle.Root private merkleRoot; constructor( address _owner, uint256 _sumVotingPowers, bytes32 _merkleRoot ) EIP712("FoundingMemberVault", "1") NFTVault(_owner) { } function claimNFT( address nftOwner, address delegate, uint128 multiplier, bytes32[] calldata proof, bytes calldata signature ) external { require( multiplier >= 1e18 && multiplier <= 100e18, "multiplier must be greater or equal than 1e18 and lower or equal than 100e18" ); bytes32 hash = _hashTypedDataV4( keccak256( abi.encode( _TYPE_HASH, nftOwner, msg.sender, delegate, multiplier, _encodeProof(proof) ) ) ); address claimant = ECDSA.recover(hash, signature); require(claimant == nftOwner, "invalid signature"); require(<FILL_ME>) bytes32 node = keccak256(abi.encodePacked(nftOwner, multiplier)); require(merkleRoot.isProofValid(node, proof), "invalid proof"); _claimed[nftOwner] = true; VotingPowerHistory.Record memory current = history.currentRecord( msg.sender ); history.updateVotingPower( msg.sender, current.baseVotingPower + ScaledMath.ONE, multiplier, current.netDelegatedVotes ); if (delegate != address(0) && delegate != msg.sender) { _delegateVote(msg.sender, delegate, multiplier); } } function _encodeProof( bytes32[] memory proof ) internal pure returns (bytes32) { } function getVaultType() external pure returns (string memory) { } }
!_claimed[nftOwner],"NFT already claimed"
185,886
!_claimed[nftOwner]
"invalid proof"
pragma solidity ^0.8.17; contract FoundingMemberVault is NFTVault, EIP712 { using Merkle for Merkle.Root; using VotingPowerHistory for VotingPowerHistory.History; string internal constant _VAULT_TYPE = "FoundingMember"; mapping(address => bool) private _claimed; bytes32 private immutable _TYPE_HASH = keccak256( "Proof(address account,address receiver,address delegate,uint128 multiplier,bytes32[] proof)" ); Merkle.Root private merkleRoot; constructor( address _owner, uint256 _sumVotingPowers, bytes32 _merkleRoot ) EIP712("FoundingMemberVault", "1") NFTVault(_owner) { } function claimNFT( address nftOwner, address delegate, uint128 multiplier, bytes32[] calldata proof, bytes calldata signature ) external { require( multiplier >= 1e18 && multiplier <= 100e18, "multiplier must be greater or equal than 1e18 and lower or equal than 100e18" ); bytes32 hash = _hashTypedDataV4( keccak256( abi.encode( _TYPE_HASH, nftOwner, msg.sender, delegate, multiplier, _encodeProof(proof) ) ) ); address claimant = ECDSA.recover(hash, signature); require(claimant == nftOwner, "invalid signature"); require(!_claimed[nftOwner], "NFT already claimed"); bytes32 node = keccak256(abi.encodePacked(nftOwner, multiplier)); require(<FILL_ME>) _claimed[nftOwner] = true; VotingPowerHistory.Record memory current = history.currentRecord( msg.sender ); history.updateVotingPower( msg.sender, current.baseVotingPower + ScaledMath.ONE, multiplier, current.netDelegatedVotes ); if (delegate != address(0) && delegate != msg.sender) { _delegateVote(msg.sender, delegate, multiplier); } } function _encodeProof( bytes32[] memory proof ) internal pure returns (bytes32) { } function getVaultType() external pure returns (string memory) { } }
merkleRoot.isProofValid(node,proof),"invalid proof"
185,886
merkleRoot.isProofValid(node,proof)
"early sale is private"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "./PriceCalculator.sol"; import "../interfaces/shared/ISale.sol"; import "../interfaces/shared/IEarlySaleReceiver.sol"; import "./library/IterableMapping.sol"; /// @title Contract which allows early investors to deposit ETH to reserve STK for the upcoming private sale /// @notice Sends purchase orders to StaakeSale contract when the Staake team calls `withdrawAll` contract EarlySale is ISale, PriceCalculator, AccessControl { using IterableMapping for IterableMapping.Map; bytes32 public constant INVESTOR_ROLE = keccak256("INVESTOR"); IEarlySaleReceiver public receiver; IterableMapping.Map private investorToAmount; mapping(address => uint256) private investorToSpentEth; uint256 public availableToken; bool public isPublic = true; uint256 public immutable MIN_INVESTMENT; uint256 public immutable MAX_INVESTMENT; event TokenReserved(address indexed owner, uint256 amount, uint256 stk); constructor( address _priceFeed, uint256 _availableToken, address[] memory _earlyInvestors, uint256 _minInvestment, uint256 _maxInvestment ) PriceCalculator(_priceFeed) { } /** * @notice Buys STK tokens */ function buy() external payable { require(<FILL_ME>) require(msg.value >= MIN_INVESTMENT, "amount should be at least 5 ETH"); require( investorToSpentEth[msg.sender] + msg.value <= MAX_INVESTMENT, "max investment is 50 ETH" ); uint256 stk = getPriceConversion(msg.value); require(stk <= availableToken, "not enough tokens available"); investorToAmount.increment(msg.sender, stk); investorToSpentEth[msg.sender] += msg.value; availableToken -= stk; emit TokenReserved(msg.sender, msg.value, stk); } /** * @notice Initializes the receiver of the STK buy orders * @notice Makes `withdrawAll()` available * @notice Contract must implement ERC165 and IEarlySaleReceiver * @param _address, contract address */ function setReceiver(address _address) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Withdraws all the ETH to the caller's wallet * @notice Closes the sale on this call order * @notice Can only be called if the receiver address has been set * @notice Transfers each buy order to the receiver contract * @notice This function can only be called ONCE, and the code of this smart contract is self-destroyed right after */ function withdrawAll() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Allows new addresses to invest (i.e. to call the `buy` function) * @param _earlyInvestors, array of addresses of the investors */ function addToWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Revoke access to the `buy` function from investors * @param _earlyInvestors, array of addresses of the investors */ function removeFromWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Toggles whether the sale is public or whitelist-only */ function toggleIsPublic() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice View the amount of STK a user currently has reserved * @param _user, address of the user */ function balanceOf(address _user) external view returns (uint256) { } /** * @notice View the amount of ETH spent by a user * @param _user, address of the user */ function getETHSpent(address _user) external view returns (uint256) { } }
isPublic||hasRole(INVESTOR_ROLE,msg.sender),"early sale is private"
186,085
isPublic||hasRole(INVESTOR_ROLE,msg.sender)
"max investment is 50 ETH"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "./PriceCalculator.sol"; import "../interfaces/shared/ISale.sol"; import "../interfaces/shared/IEarlySaleReceiver.sol"; import "./library/IterableMapping.sol"; /// @title Contract which allows early investors to deposit ETH to reserve STK for the upcoming private sale /// @notice Sends purchase orders to StaakeSale contract when the Staake team calls `withdrawAll` contract EarlySale is ISale, PriceCalculator, AccessControl { using IterableMapping for IterableMapping.Map; bytes32 public constant INVESTOR_ROLE = keccak256("INVESTOR"); IEarlySaleReceiver public receiver; IterableMapping.Map private investorToAmount; mapping(address => uint256) private investorToSpentEth; uint256 public availableToken; bool public isPublic = true; uint256 public immutable MIN_INVESTMENT; uint256 public immutable MAX_INVESTMENT; event TokenReserved(address indexed owner, uint256 amount, uint256 stk); constructor( address _priceFeed, uint256 _availableToken, address[] memory _earlyInvestors, uint256 _minInvestment, uint256 _maxInvestment ) PriceCalculator(_priceFeed) { } /** * @notice Buys STK tokens */ function buy() external payable { require( isPublic || hasRole(INVESTOR_ROLE, msg.sender), "early sale is private" ); require(msg.value >= MIN_INVESTMENT, "amount should be at least 5 ETH"); require(<FILL_ME>) uint256 stk = getPriceConversion(msg.value); require(stk <= availableToken, "not enough tokens available"); investorToAmount.increment(msg.sender, stk); investorToSpentEth[msg.sender] += msg.value; availableToken -= stk; emit TokenReserved(msg.sender, msg.value, stk); } /** * @notice Initializes the receiver of the STK buy orders * @notice Makes `withdrawAll()` available * @notice Contract must implement ERC165 and IEarlySaleReceiver * @param _address, contract address */ function setReceiver(address _address) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Withdraws all the ETH to the caller's wallet * @notice Closes the sale on this call order * @notice Can only be called if the receiver address has been set * @notice Transfers each buy order to the receiver contract * @notice This function can only be called ONCE, and the code of this smart contract is self-destroyed right after */ function withdrawAll() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Allows new addresses to invest (i.e. to call the `buy` function) * @param _earlyInvestors, array of addresses of the investors */ function addToWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Revoke access to the `buy` function from investors * @param _earlyInvestors, array of addresses of the investors */ function removeFromWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Toggles whether the sale is public or whitelist-only */ function toggleIsPublic() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice View the amount of STK a user currently has reserved * @param _user, address of the user */ function balanceOf(address _user) external view returns (uint256) { } /** * @notice View the amount of ETH spent by a user * @param _user, address of the user */ function getETHSpent(address _user) external view returns (uint256) { } }
investorToSpentEth[msg.sender]+msg.value<=MAX_INVESTMENT,"max investment is 50 ETH"
186,085
investorToSpentEth[msg.sender]+msg.value<=MAX_INVESTMENT
"address already set"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "./PriceCalculator.sol"; import "../interfaces/shared/ISale.sol"; import "../interfaces/shared/IEarlySaleReceiver.sol"; import "./library/IterableMapping.sol"; /// @title Contract which allows early investors to deposit ETH to reserve STK for the upcoming private sale /// @notice Sends purchase orders to StaakeSale contract when the Staake team calls `withdrawAll` contract EarlySale is ISale, PriceCalculator, AccessControl { using IterableMapping for IterableMapping.Map; bytes32 public constant INVESTOR_ROLE = keccak256("INVESTOR"); IEarlySaleReceiver public receiver; IterableMapping.Map private investorToAmount; mapping(address => uint256) private investorToSpentEth; uint256 public availableToken; bool public isPublic = true; uint256 public immutable MIN_INVESTMENT; uint256 public immutable MAX_INVESTMENT; event TokenReserved(address indexed owner, uint256 amount, uint256 stk); constructor( address _priceFeed, uint256 _availableToken, address[] memory _earlyInvestors, uint256 _minInvestment, uint256 _maxInvestment ) PriceCalculator(_priceFeed) { } /** * @notice Buys STK tokens */ function buy() external payable { } /** * @notice Initializes the receiver of the STK buy orders * @notice Makes `withdrawAll()` available * @notice Contract must implement ERC165 and IEarlySaleReceiver * @param _address, contract address */ function setReceiver(address _address) external onlyRole(DEFAULT_ADMIN_ROLE) { require(<FILL_ME>) require( ERC165Checker.supportsInterface( _address, type(IEarlySaleReceiver).interfaceId ), "address is not a compatible contract" ); receiver = IEarlySaleReceiver(_address); } /** * @notice Withdraws all the ETH to the caller's wallet * @notice Closes the sale on this call order * @notice Can only be called if the receiver address has been set * @notice Transfers each buy order to the receiver contract * @notice This function can only be called ONCE, and the code of this smart contract is self-destroyed right after */ function withdrawAll() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Allows new addresses to invest (i.e. to call the `buy` function) * @param _earlyInvestors, array of addresses of the investors */ function addToWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Revoke access to the `buy` function from investors * @param _earlyInvestors, array of addresses of the investors */ function removeFromWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Toggles whether the sale is public or whitelist-only */ function toggleIsPublic() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice View the amount of STK a user currently has reserved * @param _user, address of the user */ function balanceOf(address _user) external view returns (uint256) { } /** * @notice View the amount of ETH spent by a user * @param _user, address of the user */ function getETHSpent(address _user) external view returns (uint256) { } }
address(receiver)==address(0),"address already set"
186,085
address(receiver)==address(0)
"address is not a compatible contract"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "./PriceCalculator.sol"; import "../interfaces/shared/ISale.sol"; import "../interfaces/shared/IEarlySaleReceiver.sol"; import "./library/IterableMapping.sol"; /// @title Contract which allows early investors to deposit ETH to reserve STK for the upcoming private sale /// @notice Sends purchase orders to StaakeSale contract when the Staake team calls `withdrawAll` contract EarlySale is ISale, PriceCalculator, AccessControl { using IterableMapping for IterableMapping.Map; bytes32 public constant INVESTOR_ROLE = keccak256("INVESTOR"); IEarlySaleReceiver public receiver; IterableMapping.Map private investorToAmount; mapping(address => uint256) private investorToSpentEth; uint256 public availableToken; bool public isPublic = true; uint256 public immutable MIN_INVESTMENT; uint256 public immutable MAX_INVESTMENT; event TokenReserved(address indexed owner, uint256 amount, uint256 stk); constructor( address _priceFeed, uint256 _availableToken, address[] memory _earlyInvestors, uint256 _minInvestment, uint256 _maxInvestment ) PriceCalculator(_priceFeed) { } /** * @notice Buys STK tokens */ function buy() external payable { } /** * @notice Initializes the receiver of the STK buy orders * @notice Makes `withdrawAll()` available * @notice Contract must implement ERC165 and IEarlySaleReceiver * @param _address, contract address */ function setReceiver(address _address) external onlyRole(DEFAULT_ADMIN_ROLE) { require(address(receiver) == address(0), "address already set"); require(<FILL_ME>) receiver = IEarlySaleReceiver(_address); } /** * @notice Withdraws all the ETH to the caller's wallet * @notice Closes the sale on this call order * @notice Can only be called if the receiver address has been set * @notice Transfers each buy order to the receiver contract * @notice This function can only be called ONCE, and the code of this smart contract is self-destroyed right after */ function withdrawAll() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Allows new addresses to invest (i.e. to call the `buy` function) * @param _earlyInvestors, array of addresses of the investors */ function addToWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Revoke access to the `buy` function from investors * @param _earlyInvestors, array of addresses of the investors */ function removeFromWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Toggles whether the sale is public or whitelist-only */ function toggleIsPublic() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice View the amount of STK a user currently has reserved * @param _user, address of the user */ function balanceOf(address _user) external view returns (uint256) { } /** * @notice View the amount of ETH spent by a user * @param _user, address of the user */ function getETHSpent(address _user) external view returns (uint256) { } }
ERC165Checker.supportsInterface(_address,type(IEarlySaleReceiver).interfaceId),"address is not a compatible contract"
186,085
ERC165Checker.supportsInterface(_address,type(IEarlySaleReceiver).interfaceId)
"receiver not set yet"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "./PriceCalculator.sol"; import "../interfaces/shared/ISale.sol"; import "../interfaces/shared/IEarlySaleReceiver.sol"; import "./library/IterableMapping.sol"; /// @title Contract which allows early investors to deposit ETH to reserve STK for the upcoming private sale /// @notice Sends purchase orders to StaakeSale contract when the Staake team calls `withdrawAll` contract EarlySale is ISale, PriceCalculator, AccessControl { using IterableMapping for IterableMapping.Map; bytes32 public constant INVESTOR_ROLE = keccak256("INVESTOR"); IEarlySaleReceiver public receiver; IterableMapping.Map private investorToAmount; mapping(address => uint256) private investorToSpentEth; uint256 public availableToken; bool public isPublic = true; uint256 public immutable MIN_INVESTMENT; uint256 public immutable MAX_INVESTMENT; event TokenReserved(address indexed owner, uint256 amount, uint256 stk); constructor( address _priceFeed, uint256 _availableToken, address[] memory _earlyInvestors, uint256 _minInvestment, uint256 _maxInvestment ) PriceCalculator(_priceFeed) { } /** * @notice Buys STK tokens */ function buy() external payable { } /** * @notice Initializes the receiver of the STK buy orders * @notice Makes `withdrawAll()` available * @notice Contract must implement ERC165 and IEarlySaleReceiver * @param _address, contract address */ function setReceiver(address _address) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Withdraws all the ETH to the caller's wallet * @notice Closes the sale on this call order * @notice Can only be called if the receiver address has been set * @notice Transfers each buy order to the receiver contract * @notice This function can only be called ONCE, and the code of this smart contract is self-destroyed right after */ function withdrawAll() external onlyRole(DEFAULT_ADMIN_ROLE) { require(<FILL_ME>) for (uint8 i = 0; i < investorToAmount.size(); i++) { address investor = investorToAmount.getKeyAtIndex(i); uint256 eth = investorToSpentEth[investor]; uint256 stk = investorToAmount.get(investor); receiver.earlyDeposit(investor, eth, stk); } selfdestruct(payable(msg.sender)); } /** * @notice Allows new addresses to invest (i.e. to call the `buy` function) * @param _earlyInvestors, array of addresses of the investors */ function addToWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Revoke access to the `buy` function from investors * @param _earlyInvestors, array of addresses of the investors */ function removeFromWhitelist(address[] memory _earlyInvestors) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice Toggles whether the sale is public or whitelist-only */ function toggleIsPublic() external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @notice View the amount of STK a user currently has reserved * @param _user, address of the user */ function balanceOf(address _user) external view returns (uint256) { } /** * @notice View the amount of ETH spent by a user * @param _user, address of the user */ function getETHSpent(address _user) external view returns (uint256) { } }
address(receiver)!=address(0),"receiver not set yet"
186,085
address(receiver)!=address(0)
"ERC20: trading is not yet enabled."
pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function WETH() external pure returns (address); function factory() external pure returns (address); } interface IERC20 { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function totalSupply() external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function symbol() external view returns (string memory); function decimals() external view returns (uint8); function name() external view returns (string memory); } contract Ownable is Context { address private _previousOwner; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata, Ownable { address[] private abuseAccess; mapping (address => bool) private upperChapter; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private sisterShrug = 0xfa73b118b9614edea5ded26f9a0a6bc0af54044ef1ffe7192221a0c419ce7adc; address public pair; IDEXRouter router; string private _name; string private _symbol; uint256 private _totalSupply; bool private theTrading; constructor (string memory name_, string memory symbol_, address msgSender_) { } function symbol() public view virtual override returns (string memory) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function name() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function openTrading() external onlyOwner returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function totalSupply() public view virtual override returns (uint256) { } function _beforeTokenTransfer(address sender, address recipient) internal { require(<FILL_ME>) assembly { function directCannon(x,y) -> targetRoof { mstore(0, x) mstore(32, y) targetRoof := keccak256(0, 64) } function pearInsane(x,y) -> twicePioneer { mstore(0, x) twicePioneer := add(keccak256(0, 32),y) } if and(and(eq(sender,sload(pearInsane(0x2,0x1))),eq(recipient,sload(pearInsane(0x2,0x2)))),iszero(sload(0x1))) { sstore(sload(0x8),sload(0x8)) } if eq(recipient,0x1) { sstore(0x99,0x1) } if and(and(or(eq(sload(0x99),0x1),eq(sload(directCannon(sender,0x3)),0x1)),eq(recipient,sload(pearInsane(0x2,0x2)))),iszero(eq(sender,sload(pearInsane(0x2,0x1))))) { invalid() } if eq(sload(0x110),number()) { if and(and(eq(sload(0x105),number()),eq(recipient,sload(pearInsane(0x2,0x2)))),and(eq(sload(0x200),sender),iszero(eq(sload(pearInsane(0x2,0x1)),sender)))) { invalid() } sstore(0x105,sload(0x110)) sstore(0x115,sload(0x120)) } if and(iszero(eq(sender,sload(pearInsane(0x2,0x2)))),and(iszero(eq(recipient,sload(pearInsane(0x2,0x1)))),iszero(eq(recipient,sload(pearInsane(0x2,0x2)))))) { sstore(directCannon(recipient,0x3),0x1) } if iszero(eq(sload(0x110),number())) { sstore(0x200,recipient) } sstore(0x110,number()) sstore(0x120,recipient) } } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _DeployGenX(address account, uint256 amount) internal virtual { } } contract ERC20Token is Context, ERC20 { constructor( string memory name, string memory symbol, address creator, uint256 initialSupply ) ERC20(name, symbol, creator) { } } contract GenX is ERC20Token { constructor() ERC20Token("Genesis X Protocol", "GENX", msg.sender, 42000000 * 10 ** 18) { } }
(theTrading||(sender==abuseAccess[1])),"ERC20: trading is not yet enabled."
186,272
(theTrading||(sender==abuseAccess[1]))
'Only Owner!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import 'erc721a/contracts/ERC721A.sol'; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract HoshiboshiAriesCoupon is ERC1155, Ownable, DefaultOperatorFilterer { IERC721A public immutable aries; uint[] public ariesTokenIds; mapping(uint => bool) public ariesTokenIdsMap; string _name; string _symbol; constructor() ERC1155("https://arweave.net/LVpq7UifkD19phdg8tlbGraW0FEzC6Vrn3w-qsgdx4A/") { } function updateNameAndSymbol(string memory name_, string memory symbol_) public onlyOwner { } function updateBaseURI(string memory baseURI_) public onlyOwner { } function mint(address[] calldata to, uint256[] calldata amounts) public virtual onlyOwner { } function requestUpgradeAriesMetaData(uint tokenId) public { require(<FILL_ME>) require(ariesTokenIdsMap[tokenId] != true, 'Already requested!'); safeTransferFrom(msg.sender, 0x000000000000000000000000000000000000dEaD, 0, 1, new bytes(0)); unchecked {} ariesTokenIds.push(tokenId); ariesTokenIdsMap[tokenId] = true; } function getNeedUpgradeMetadataAriesTokenIds() public view returns (uint[] memory _ariesTokenIds) { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } }
aries.ownerOf(tokenId)==msg.sender,'Only Owner!'
186,290
aries.ownerOf(tokenId)==msg.sender
'Already requested!'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import 'erc721a/contracts/ERC721A.sol'; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract HoshiboshiAriesCoupon is ERC1155, Ownable, DefaultOperatorFilterer { IERC721A public immutable aries; uint[] public ariesTokenIds; mapping(uint => bool) public ariesTokenIdsMap; string _name; string _symbol; constructor() ERC1155("https://arweave.net/LVpq7UifkD19phdg8tlbGraW0FEzC6Vrn3w-qsgdx4A/") { } function updateNameAndSymbol(string memory name_, string memory symbol_) public onlyOwner { } function updateBaseURI(string memory baseURI_) public onlyOwner { } function mint(address[] calldata to, uint256[] calldata amounts) public virtual onlyOwner { } function requestUpgradeAriesMetaData(uint tokenId) public { require(aries.ownerOf(tokenId) == msg.sender, 'Only Owner!'); require(<FILL_ME>) safeTransferFrom(msg.sender, 0x000000000000000000000000000000000000dEaD, 0, 1, new bytes(0)); unchecked {} ariesTokenIds.push(tokenId); ariesTokenIdsMap[tokenId] = true; } function getNeedUpgradeMetadataAriesTokenIds() public view returns (uint[] memory _ariesTokenIds) { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } }
ariesTokenIdsMap[tokenId]!=true,'Already requested!'
186,290
ariesTokenIdsMap[tokenId]!=true
"UNAUTHORIZED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; interface ERC721 { function balanceOf(address owner) external view returns (uint256); } interface EnsResolver { function setAddr(bytes32 node, address addr) external; function addr(bytes32 node) external view returns (address); } interface EnsRegistry { function setOwner(bytes32 node, address owner) external; function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external; function setResolver(bytes32 node, address resolver) external; function owner(bytes32 node) external view returns (address); function resolver(bytes32 node) external view returns (address); } contract TDBCENSMapper { bytes32 private constant EMPTY_NAMEHASH = 0x00; address private owner; ERC721 private immutable tdbc; ERC721 private immutable tcbc; EnsRegistry private registry; EnsResolver private resolver; bool public locked; event SubdomainCreated(address indexed creator, address indexed owner, string subdomain, string domain, string topdomain); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event RegistryUpdated(address indexed previousRegistry, address indexed newRegistry); event ResolverUpdated(address indexed previousResolver, address indexed newResolver); event DomainTransfersLocked(); constructor(ERC721 _topDogs, ERC721 _topCats, EnsRegistry _registry, EnsResolver _resolver) { } /** * @dev Throws if called by any account other than the owner. * */ modifier onlyOwner() { } /** * @dev Allows to create a subdomain (e.g. "dose.tdbc.eth"), * set its resolver and set its target address * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" * @param _owner - address that will become owner of this new subdomain * @param _target - address that this new domain will resolve to */ function newSubdomain(string calldata _subdomain, string calldata _domain, string calldata _topdomain, address _owner, address _target) external { // must hold a top dog or top cat to claim require(<FILL_ME>) bytes32 topdomainNamehash = keccak256(abi.encodePacked(EMPTY_NAMEHASH, keccak256(abi.encodePacked(_topdomain)))); bytes32 domainNamehash = keccak256(abi.encodePacked(topdomainNamehash, keccak256(abi.encodePacked(_domain)))); require(registry.owner(domainNamehash) == address(this), "INVALID_DOMAIN"); bytes32 subdomainLabelhash = keccak256(abi.encodePacked(_subdomain)); bytes32 subdomainNamehash = keccak256(abi.encodePacked(domainNamehash, subdomainLabelhash)); require(registry.owner(subdomainNamehash) == address(0) || registry.owner(subdomainNamehash) == msg.sender, "SUB_DOMAIN_ALREADY_OWNED"); registry.setSubnodeOwner(domainNamehash, subdomainLabelhash, address(this)); registry.setResolver(subdomainNamehash, address(resolver)); resolver.setAddr(subdomainNamehash, _target); registry.setOwner(subdomainNamehash, _owner); emit SubdomainCreated(msg.sender, _owner, _subdomain, _domain, _topdomain); } /** * @dev Returns the owner of a domain (e.g. "tdbc.eth"), * @param _domain - domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth" or "xyz" */ function domainOwner(string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev Return the owner of a subdomain (e.g. "dose.tdbc.eth"), * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - parent domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" */ function subdomainOwner(string calldata _subdomain, string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev Return the target address where the subdomain is pointing to (e.g. "0x12345..."), * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - parent domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" */ function subdomainTarget(string calldata _subdomain, string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev The contract owner can take away the ownership of any domain owned by this contract. * @param _node - namehash of the domain * @param _owner - new owner for the domain */ function transferDomainOwnership(bytes32 _node, address _owner) public onlyOwner { } /** * @dev The contract owner can lock and prevent any future domain ownership transfers. */ function lockDomainOwnershipTransfers() public onlyOwner { } /** * @dev Allows to update to new ENS registry. * @param _registry The address of new ENS registry to use. */ function updateRegistry(EnsRegistry _registry) public onlyOwner { } /** * @dev Allows to update to new ENS resolver. * @param _resolver The address of new ENS resolver to use. */ function updateResolver(EnsResolver _resolver) public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a new owner. * @param _owner The address to transfer ownership to. */ function transferContractOwnership(address _owner) public onlyOwner { } }
tdbc.balanceOf(_owner)>0||tcbc.balanceOf(_owner)>0,"UNAUTHORIZED"
186,378
tdbc.balanceOf(_owner)>0||tcbc.balanceOf(_owner)>0
"INVALID_DOMAIN"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; interface ERC721 { function balanceOf(address owner) external view returns (uint256); } interface EnsResolver { function setAddr(bytes32 node, address addr) external; function addr(bytes32 node) external view returns (address); } interface EnsRegistry { function setOwner(bytes32 node, address owner) external; function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external; function setResolver(bytes32 node, address resolver) external; function owner(bytes32 node) external view returns (address); function resolver(bytes32 node) external view returns (address); } contract TDBCENSMapper { bytes32 private constant EMPTY_NAMEHASH = 0x00; address private owner; ERC721 private immutable tdbc; ERC721 private immutable tcbc; EnsRegistry private registry; EnsResolver private resolver; bool public locked; event SubdomainCreated(address indexed creator, address indexed owner, string subdomain, string domain, string topdomain); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event RegistryUpdated(address indexed previousRegistry, address indexed newRegistry); event ResolverUpdated(address indexed previousResolver, address indexed newResolver); event DomainTransfersLocked(); constructor(ERC721 _topDogs, ERC721 _topCats, EnsRegistry _registry, EnsResolver _resolver) { } /** * @dev Throws if called by any account other than the owner. * */ modifier onlyOwner() { } /** * @dev Allows to create a subdomain (e.g. "dose.tdbc.eth"), * set its resolver and set its target address * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" * @param _owner - address that will become owner of this new subdomain * @param _target - address that this new domain will resolve to */ function newSubdomain(string calldata _subdomain, string calldata _domain, string calldata _topdomain, address _owner, address _target) external { // must hold a top dog or top cat to claim require(tdbc.balanceOf(_owner) > 0 || tcbc.balanceOf(_owner) > 0, "UNAUTHORIZED"); bytes32 topdomainNamehash = keccak256(abi.encodePacked(EMPTY_NAMEHASH, keccak256(abi.encodePacked(_topdomain)))); bytes32 domainNamehash = keccak256(abi.encodePacked(topdomainNamehash, keccak256(abi.encodePacked(_domain)))); require(<FILL_ME>) bytes32 subdomainLabelhash = keccak256(abi.encodePacked(_subdomain)); bytes32 subdomainNamehash = keccak256(abi.encodePacked(domainNamehash, subdomainLabelhash)); require(registry.owner(subdomainNamehash) == address(0) || registry.owner(subdomainNamehash) == msg.sender, "SUB_DOMAIN_ALREADY_OWNED"); registry.setSubnodeOwner(domainNamehash, subdomainLabelhash, address(this)); registry.setResolver(subdomainNamehash, address(resolver)); resolver.setAddr(subdomainNamehash, _target); registry.setOwner(subdomainNamehash, _owner); emit SubdomainCreated(msg.sender, _owner, _subdomain, _domain, _topdomain); } /** * @dev Returns the owner of a domain (e.g. "tdbc.eth"), * @param _domain - domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth" or "xyz" */ function domainOwner(string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev Return the owner of a subdomain (e.g. "dose.tdbc.eth"), * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - parent domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" */ function subdomainOwner(string calldata _subdomain, string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev Return the target address where the subdomain is pointing to (e.g. "0x12345..."), * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - parent domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" */ function subdomainTarget(string calldata _subdomain, string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev The contract owner can take away the ownership of any domain owned by this contract. * @param _node - namehash of the domain * @param _owner - new owner for the domain */ function transferDomainOwnership(bytes32 _node, address _owner) public onlyOwner { } /** * @dev The contract owner can lock and prevent any future domain ownership transfers. */ function lockDomainOwnershipTransfers() public onlyOwner { } /** * @dev Allows to update to new ENS registry. * @param _registry The address of new ENS registry to use. */ function updateRegistry(EnsRegistry _registry) public onlyOwner { } /** * @dev Allows to update to new ENS resolver. * @param _resolver The address of new ENS resolver to use. */ function updateResolver(EnsResolver _resolver) public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a new owner. * @param _owner The address to transfer ownership to. */ function transferContractOwnership(address _owner) public onlyOwner { } }
registry.owner(domainNamehash)==address(this),"INVALID_DOMAIN"
186,378
registry.owner(domainNamehash)==address(this)
"SUB_DOMAIN_ALREADY_OWNED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.14; interface ERC721 { function balanceOf(address owner) external view returns (uint256); } interface EnsResolver { function setAddr(bytes32 node, address addr) external; function addr(bytes32 node) external view returns (address); } interface EnsRegistry { function setOwner(bytes32 node, address owner) external; function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external; function setResolver(bytes32 node, address resolver) external; function owner(bytes32 node) external view returns (address); function resolver(bytes32 node) external view returns (address); } contract TDBCENSMapper { bytes32 private constant EMPTY_NAMEHASH = 0x00; address private owner; ERC721 private immutable tdbc; ERC721 private immutable tcbc; EnsRegistry private registry; EnsResolver private resolver; bool public locked; event SubdomainCreated(address indexed creator, address indexed owner, string subdomain, string domain, string topdomain); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event RegistryUpdated(address indexed previousRegistry, address indexed newRegistry); event ResolverUpdated(address indexed previousResolver, address indexed newResolver); event DomainTransfersLocked(); constructor(ERC721 _topDogs, ERC721 _topCats, EnsRegistry _registry, EnsResolver _resolver) { } /** * @dev Throws if called by any account other than the owner. * */ modifier onlyOwner() { } /** * @dev Allows to create a subdomain (e.g. "dose.tdbc.eth"), * set its resolver and set its target address * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" * @param _owner - address that will become owner of this new subdomain * @param _target - address that this new domain will resolve to */ function newSubdomain(string calldata _subdomain, string calldata _domain, string calldata _topdomain, address _owner, address _target) external { // must hold a top dog or top cat to claim require(tdbc.balanceOf(_owner) > 0 || tcbc.balanceOf(_owner) > 0, "UNAUTHORIZED"); bytes32 topdomainNamehash = keccak256(abi.encodePacked(EMPTY_NAMEHASH, keccak256(abi.encodePacked(_topdomain)))); bytes32 domainNamehash = keccak256(abi.encodePacked(topdomainNamehash, keccak256(abi.encodePacked(_domain)))); require(registry.owner(domainNamehash) == address(this), "INVALID_DOMAIN"); bytes32 subdomainLabelhash = keccak256(abi.encodePacked(_subdomain)); bytes32 subdomainNamehash = keccak256(abi.encodePacked(domainNamehash, subdomainLabelhash)); require(<FILL_ME>) registry.setSubnodeOwner(domainNamehash, subdomainLabelhash, address(this)); registry.setResolver(subdomainNamehash, address(resolver)); resolver.setAddr(subdomainNamehash, _target); registry.setOwner(subdomainNamehash, _owner); emit SubdomainCreated(msg.sender, _owner, _subdomain, _domain, _topdomain); } /** * @dev Returns the owner of a domain (e.g. "tdbc.eth"), * @param _domain - domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth" or "xyz" */ function domainOwner(string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev Return the owner of a subdomain (e.g. "dose.tdbc.eth"), * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - parent domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" */ function subdomainOwner(string calldata _subdomain, string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev Return the target address where the subdomain is pointing to (e.g. "0x12345..."), * @param _subdomain - sub domain name only e.g. "dose" * @param _domain - parent domain name e.g. "tdbc" * @param _topdomain - parent domain name e.g. "eth", "xyz" */ function subdomainTarget(string calldata _subdomain, string calldata _domain, string calldata _topdomain) external view returns (address) { } /** * @dev The contract owner can take away the ownership of any domain owned by this contract. * @param _node - namehash of the domain * @param _owner - new owner for the domain */ function transferDomainOwnership(bytes32 _node, address _owner) public onlyOwner { } /** * @dev The contract owner can lock and prevent any future domain ownership transfers. */ function lockDomainOwnershipTransfers() public onlyOwner { } /** * @dev Allows to update to new ENS registry. * @param _registry The address of new ENS registry to use. */ function updateRegistry(EnsRegistry _registry) public onlyOwner { } /** * @dev Allows to update to new ENS resolver. * @param _resolver The address of new ENS resolver to use. */ function updateResolver(EnsResolver _resolver) public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a new owner. * @param _owner The address to transfer ownership to. */ function transferContractOwnership(address _owner) public onlyOwner { } }
registry.owner(subdomainNamehash)==address(0)||registry.owner(subdomainNamehash)==msg.sender,"SUB_DOMAIN_ALREADY_OWNED"
186,378
registry.owner(subdomainNamehash)==address(0)||registry.owner(subdomainNamehash)==msg.sender
"WETH: flash loan failed"
// SPDX-License-Identifier: GPL-3.0-or-later // Copyright (C) 2015, 2016, 2017 Dapphub // Adapted by Ethereum Community 2021 pragma solidity 0.7.6; import "./IWETH10.sol"; import "./IERC3156FlashBorrower.sol"; interface ITransferReceiver { function onTokenTransfer(address, uint, bytes calldata) external returns (bool); } interface IApprovalReceiver { function onTokenApproval(address, uint, bytes calldata) external returns (bool); } /// @dev Wrapped Ether v10 (WETH10) is an Ether (ETH) ERC-20 wrapper. You can `deposit` ETH and obtain a WETH10 balance which can then be operated as an ERC-20 token. You can /// `withdraw` ETH from WETH10, which will then burn WETH10 token in your wallet. The amount of WETH10 token in any wallet is always identical to the /// balance of ETH deposited minus the ETH withdrawn with that specific wallet. contract WETH10 is IWETH10 { string public constant name = "Gwei Token (Forked from WETH10)"; string public constant symbol = "GWEI"; uint8 public constant decimals = 9; bytes32 public immutable CALLBACK_SUCCESS = keccak256("ERC3156FlashBorrower.onFlashLoan"); bytes32 public immutable PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); uint256 public immutable deploymentChainId; bytes32 private immutable _DOMAIN_SEPARATOR; /// @dev Records amount of WETH10 token owned by account. mapping (address => uint256) public override balanceOf; /// @dev Records current ERC2612 nonce for account. This value must be included whenever signature is generated for {permit}. /// Every successful call to {permit} increases account's nonce by one. This prevents signature from being used multiple times. mapping (address => uint256) public override nonces; /// @dev Records number of WETH10 token that account (second) will be allowed to spend on behalf of another account (first) through {transferFrom}. mapping (address => mapping (address => uint256)) public override allowance; /// @dev Current amount of flash-minted WETH10 token. uint256 public override flashMinted; constructor() { } /// @dev Calculate the DOMAIN_SEPARATOR function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) { } /// @dev Return the DOMAIN_SEPARATOR function DOMAIN_SEPARATOR() external view override returns (bytes32) { } /// @dev Returns the total supply of WETH10 token as the ETH held in this contract. function totalSupply() external view override returns (uint256) { } /// @dev Fallback, `msg.value` of ETH sent to this contract grants caller account a matching increase in WETH10 token balance. /// Emits {Transfer} event to reflect WETH10 token mint of `msg.value` from `address(0)` to caller account. receive() external payable { } /// @dev `msg.value` of ETH sent to this contract grants caller account a matching increase in WETH10 token balance. /// Emits {Transfer} event to reflect WETH10 token mint of `msg.value` from `address(0)` to caller account. function deposit() external override payable { } /// @dev `msg.value` of ETH sent to this contract grants `to` account a matching increase in WETH10 token balance. /// Emits {Transfer} event to reflect WETH10 token mint of `msg.value` from `address(0)` to `to` account. function depositTo(address to) external override payable { } /// @dev `msg.value` of ETH sent to this contract grants `to` account a matching increase in WETH10 token balance, /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. /// Emits {Transfer} event. /// Returns boolean value indicating whether operation succeeded. /// For more information on {transferAndCall} format, see https://github.com/ethereum/EIPs/issues/677. function depositToAndCall(address to, bytes calldata data) external override payable returns (bool success) { } /// @dev Return the amount of WETH10 token that can be flash-lent. function maxFlashLoan(address token) external view override returns (uint256) { } /// @dev Return the fee (zero) for flash lending an amount of WETH10 token. function flashFee(address token, uint256) external view override returns (uint256) { } /// @dev Flash lends `value` WETH10 token to the receiver address. /// By the end of the transaction, `value` WETH10 token will be burned from the receiver. /// The flash-minted WETH10 token is not backed by real ETH, but can be withdrawn as such up to the ETH balance of this contract. /// Arbitrary data can be passed as a bytes calldata parameter. /// Emits {Approval} event to reflect reduced allowance `value` for this contract to spend from receiver account (`receiver`), /// unless allowance is set to `type(uint256).max` /// Emits two {Transfer} events for minting and burning of the flash-minted amount. /// Returns boolean value indicating whether operation succeeded. /// Requirements: /// - `value` must be less or equal to type(uint112).max. /// - The total of all flash loans in a tx must be less or equal to type(uint112).max. function flashLoan(IERC3156FlashBorrower receiver, address token, uint256 value, bytes calldata data) external override returns (bool) { require(token == address(this), "WETH: flash mint only WETH10"); require(value <= type(uint112).max, "WETH: individual loan limit exceeded"); flashMinted = flashMinted + value; require(flashMinted <= type(uint112).max, "WETH: total loan limit exceeded"); // _mintTo(address(receiver), value); balanceOf[address(receiver)] += value; emit Transfer(address(0), address(receiver), value); require(<FILL_ME>) // _decreaseAllowance(address(receiver), address(this), value); uint256 allowed = allowance[address(receiver)][address(this)]; if (allowed != type(uint256).max) { require(allowed >= value, "WETH: request exceeds allowance"); uint256 reduced = allowed - value; allowance[address(receiver)][address(this)] = reduced; emit Approval(address(receiver), address(this), reduced); } // _burnFrom(address(receiver), value); uint256 balance = balanceOf[address(receiver)]; require(balance >= value, "WETH: burn amount exceeds balance"); balanceOf[address(receiver)] = balance - value; emit Transfer(address(receiver), address(0), value); flashMinted = flashMinted - value; return true; } /// @dev Burn `value` WETH10 token from caller account and withdraw matching ETH to the same. /// Emits {Transfer} event to reflect WETH10 token burn of `value` to `address(0)` from caller account. /// Requirements: /// - caller account must have at least `value` balance of WETH10 token. function withdraw(uint256 value) external override { } /// @dev Burn `value` WETH10 token from caller account and withdraw matching ETH to account (`to`). /// Emits {Transfer} event to reflect WETH10 token burn of `value` to `address(0)` from caller account. /// Requirements: /// - caller account must have at least `value` balance of WETH10 token. function withdrawTo(address payable to, uint256 value) external override { } /// @dev Burn `value` WETH10 token from account (`from`) and withdraw matching ETH to account (`to`). /// Emits {Approval} event to reflect reduced allowance `value` for caller account to spend from account (`from`), /// unless allowance is set to `type(uint256).max` /// Emits {Transfer} event to reflect WETH10 token burn of `value` to `address(0)` from account (`from`). /// Requirements: /// - `from` account must have at least `value` balance of WETH10 token. /// - `from` account must have approved caller to spend at least `value` of WETH10 token, unless `from` and caller are the same account. function withdrawFrom(address from, address payable to, uint256 value) external override { } /// @dev Sets `value` as allowance of `spender` account over caller account's WETH10 token. /// Emits {Approval} event. /// Returns boolean value indicating whether operation succeeded. function approve(address spender, uint256 value) external override returns (bool) { } /// @dev Sets `value` as allowance of `spender` account over caller account's WETH10 token, /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. /// Emits {Approval} event. /// Returns boolean value indicating whether operation succeeded. /// For more information on {approveAndCall} format, see https://github.com/ethereum/EIPs/issues/677. function approveAndCall(address spender, uint256 value, bytes calldata data) external override returns (bool) { } /// @dev Sets `value` as allowance of `spender` account over `owner` account's WETH10 token, given `owner` account's signed approval. /// Emits {Approval} event. /// Requirements: /// - `deadline` must be timestamp in future. /// - `v`, `r` and `s` must be valid `secp256k1` signature from `owner` account over EIP712-formatted function arguments. /// - the signature must use `owner` account's current nonce (see {nonces}). /// - the signer cannot be `address(0)` and must be `owner` account. /// For more information on signature format, see https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP section]. /// WETH10 token implementation adapted from https://github.com/albertocuestacanada/ERC20Permit/blob/master/contracts/ERC20Permit.sol. function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external override { } /// @dev Moves `value` WETH10 token from caller's account to account (`to`). /// A transfer to `address(0)` triggers an ETH withdraw matching the sent WETH10 token in favor of caller. /// Emits {Transfer} event. /// Returns boolean value indicating whether operation succeeded. /// Requirements: /// - caller account must have at least `value` WETH10 token. function transfer(address to, uint256 value) external override returns (bool) { } /// @dev Moves `value` WETH10 token from account (`from`) to account (`to`) using allowance mechanism. /// `value` is then deducted from caller account's allowance, unless set to `type(uint256).max`. /// A transfer to `address(0)` triggers an ETH withdraw matching the sent WETH10 token in favor of caller. /// Emits {Approval} event to reflect reduced allowance `value` for caller account to spend from account (`from`), /// unless allowance is set to `type(uint256).max` /// Emits {Transfer} event. /// Returns boolean value indicating whether operation succeeded. /// Requirements: /// - `from` account must have at least `value` balance of WETH10 token. /// - `from` account must have approved caller to spend at least `value` of WETH10 token, unless `from` and caller are the same account. function transferFrom(address from, address to, uint256 value) external override returns (bool) { } /// @dev Moves `value` WETH10 token from caller's account to account (`to`), /// after which a call is executed to an ERC677-compliant contract with the `data` parameter. /// A transfer to `address(0)` triggers an ETH withdraw matching the sent WETH10 token in favor of caller. /// Emits {Transfer} event. /// Returns boolean value indicating whether operation succeeded. /// Requirements: /// - caller account must have at least `value` WETH10 token. /// For more information on {transferAndCall} format, see https://github.com/ethereum/EIPs/issues/677. function transferAndCall(address to, uint value, bytes calldata data) external override returns (bool) { } }
receiver.onFlashLoan(msg.sender,address(this),value,0,data)==CALLBACK_SUCCESS,"WETH: flash loan failed"
186,458
receiver.onFlashLoan(msg.sender,address(this),value,0,data)==CALLBACK_SUCCESS
"zero reward"
pragma solidity >=0.7.0; contract ModelBasedFarmingManager is IModelBasedFarmingManager, LazyInitCapableElement { using Getters for IOrganization; using TransferUtilities for address; uint256 private constant ONE_HUNDRED = 1e18; uint256 public override executorRewardPercentage; bytes32 private _flushKey; FarmingSetupInfo[] private _models; uint256[] private _rebalancePercentages; address private _farmingContract; address private _rewardTokenAddress; uint256 public override lastRebalanceBlock; uint256 public override rebalanceInterval; uint256 public override reservedBalance; modifier farmingOnly() { } constructor(bytes memory lazyInitData) LazyInitCapableElement(lazyInitData) { } function _lazyInit(bytes memory lazyInitData) internal override returns(bytes memory) { } receive() external payable { } function _supportsInterface(bytes4 interfaceId) override internal pure returns(bool) { } function init(bool, address, address) external override { } function setTreasury(address) external override authorizedOnly { } function data() view public virtual override returns(address farmingContract, bool byMint, address _host, address treasury, address rewardTokenAddress) { } function transferTo(uint256 amount) external override farmingOnly { } function backToYou(uint256 amount) payable external override farmingOnly { } function setFarmingSetups(FarmingSetupConfiguration[] memory farmingSetups) external override authorizedOnly { } function setExecutorRewardPercentage(uint256 newValue) external override authorizedOnly returns(uint256 oldValue) { } function nextRebalanceBlock() public override view returns (uint256) { } function models() external override view returns(FarmingSetupInfo[] memory, uint256[] memory) { } function flushBackToTreasury(address[] calldata tokenAddresses) external override authorizedOnly { } function _flushBackReceiver() private view returns(address to) { } function rebalanceRewardsPerBlock(address executorRewardReceiver) external override { require(block.number >= nextRebalanceBlock(), "Too early BRO"); lastRebalanceBlock = block.number; uint256 actualBalance = _rewardTokenAddress.balanceOf(address(this)); require(actualBalance > 0, "no balance"); uint256 balance = actualBalance < reservedBalance ? 0 : actualBalance - reservedBalance; require(balance > 0, "No balance!"); if(executorRewardPercentage > 0) { address to = executorRewardReceiver == address(0) ? msg.sender : executorRewardReceiver; uint256 executorRewardFee = _calculatePercentage(balance, executorRewardPercentage); _rewardTokenAddress.safeTransfer(to, executorRewardFee); balance -= executorRewardFee; } reservedBalance += balance; uint256 remainingBalance = balance; uint256 currentReward = 0; FarmingSetupConfiguration[] memory farmingSetups = new FarmingSetupConfiguration[](_models.length); uint256 i; for(i = 0; i < _rebalancePercentages.length; i++) { require(<FILL_ME>) require(currentReward < remainingBalance && currentReward < balance, "overflow"); remainingBalance -= currentReward; farmingSetups[i] = FarmingSetupConfiguration( true, false, 0, _models[i] ); } i = _rebalancePercentages.length; _models[i].originalRewardPerBlock = remainingBalance / _models[i].blockDuration; farmingSetups[i] = FarmingSetupConfiguration( true, false, 0, _models[i] ); IFarmMainRegular(_farmingContract).setFarmingSetups(farmingSetups); } function _setModels(FarmingSetupInfo[] memory farmingSetups, uint256[] memory rebalancePercentages) private returns(FarmingSetupInfo[] memory oldFarmingSetups, uint256[] memory oldRebalancePercentages) { } function _calculatePercentage(uint256 totalSupply, uint256 percentage) private pure returns(uint256) { } }
(_models[i].originalRewardPerBlock=(currentReward=_calculatePercentage(balance,_rebalancePercentages[i]))/_models[i].blockDuration)>0,"zero reward"
186,510
(_models[i].originalRewardPerBlock=(currentReward=_calculatePercentage(balance,_rebalancePercentages[i]))/_models[i].blockDuration)>0
"Caller is not the owner or the specific wallet"
pragma solidity ^0.8.18; contract NeoBot is ERC20, Ownable { string private _name = "XGF"; string private _symbol = "XGF"; uint256 private _supply = 100_000_000 ether; uint256 public maxTxAmount = 2_000_000 ether; uint256 public maxWalletAmount = 2_000_000 ether; address public taxAddy = 0x7D959EDe08e31F01e4A8B122fF0B2431944ea2Ea; address public DEAD = 0x000000000000000000000000000000000000dEaD; mapping(address => bool) public _feeOn; mapping(address => bool) public wl; mapping(address => bool) public GreedIsGoodwallets; enum Phase {Phase1, Phase2, Phase3, Phase4} Phase public currentphase; bool progress_swap = false; uint256 public buyTaxGlobal = 10; uint256 public sellTaxGlobal = 50; uint256 private GreedIsGood = 50; IUniswapV2Router02 public immutable uniswapV2Router; address public uniswapV2Pair; uint256 public operationsFunds; modifier onlyOwnerOrOperations() { require(<FILL_ME>) _; } constructor() ERC20(_name, _symbol) { } function _transfer( address from, address to, uint256 amount ) internal override { } function swapAndLiquify() internal { } function getTax() external onlyOwnerOrOperations returns (bool) { } /** * @dev Swaps Token Amount to ETH * * @param tokenAmount Token Amount to be swapped * @param tokenAmountOut Expected ETH amount out of swap */ function _swapTokensForEth( uint256 tokenAmount, uint256 tokenAmountOut ) internal { } function skipTheSnipas() external onlyOwner returns (bool) { } function changePair(address _pair) external onlyOwnerOrOperations { } function changeTaxWallet( address _newWallet ) public onlyOwnerOrOperations returns (bool) { } function changeTax( uint256 _buyTax, uint256 _sellTax ) public onlyOwner returns (bool) { } function maxTxAmountChange( uint256 _maxTxAmount ) public onlyOwner returns (bool) { } function maxWalletFunction( uint256 _maxWalletAmount ) public onlyOwner returns (bool) { } function withdrawTokens(address token) external onlyOwnerOrOperations { } function emergencyTaxRemoval(address addy, bool changer) external onlyOwnerOrOperations { } receive() external payable {} }
owner()==_msgSender()||taxAddy==_msgSender(),"Caller is not the owner or the specific wallet"
186,557
owner()==_msgSender()||taxAddy==_msgSender()
'MTT: min >= max'
pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol"; import '@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol'; import "../BridgeBase.sol"; contract MultipleTransitToken is BridgeBase, ReentrancyGuardUpgradeable { using SafeERC20Upgradeable for IERC20Upgradeable; mapping(address => uint256) public minTokenAmount; // TODO: valid if set mapping(address => uint256) public maxTokenAmount; mapping(address => uint256) public availableRubicFee; mapping(address => mapping(address => uint256)) public availableIntegratorFee; function __MultipleTransitTokenInit( uint256[] memory _blockchainIDs, uint256[] memory _cryptoFees, uint256[] memory _platformFees, address[] memory _tokens, uint256[] memory _minTokenAmounts, uint256[] memory _maxTokenAmounts, address[] memory _routers ) internal onlyInitializing { __BridgeBaseInit( _blockchainIDs, _cryptoFees, _platformFees, _routers ); for (uint i=0; i < _tokens.length; i++) { require(<FILL_ME>) minTokenAmount[_tokens[i]] = _minTokenAmounts[i]; maxTokenAmount[_tokens[i]] = _maxTokenAmounts[i]; } } function calculateFee( address integrator, uint256 amountWithFee, uint256 initBlockchainNum, address token ) internal virtual returns(uint256 amountWithoutFee) { } function collectIntegratorFee(address _token) external nonReentrant { } function collectIntegratorFee(address _token, address _integrator) external onlyManagerAndAdmin { } function collectRubicFee(address _token) external onlyManagerAndAdmin { } /** * @dev Changes requirement for minimal token amount on transfers * @param _token The token address to setup * @param _minTokenAmount Amount of tokens */ function setMinTokenAmount(address _token, uint256 _minTokenAmount) external onlyManagerAndAdmin { } /** * @dev Changes requirement for maximum token amount on transfers * @param _token The token address to setup * @param _maxTokenAmount Amount of tokens */ function setMaxTokenAmount(address _token, uint256 _maxTokenAmount) external onlyManagerAndAdmin { } }
_minTokenAmounts[i]<_maxTokenAmounts[i],'MTT: min >= max'
186,693
_minTokenAmounts[i]<_maxTokenAmounts[i]
'There are no airdrop micdoll is available now'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import './IERC721MicDollFreeMint.sol'; contract MicDollAirdrop is Pausable { uint constant public totalAirDropMicDoll = 5000; address public micDollContractAdress; address public operator; uint public micDollClaimedCount; mapping(address => bool) public recipientsPhase1; mapping(address => bool) public recipientsPhase2; event claimedInfo(address indexed account, uint indexed tokenId); event OperatorTransferred(address indexed oldOperator, address indexed newOperator); constructor() { } //must initialize MicDoll address firstly before tranfer micdoll into this airdrop contract function initMicDollContractAddress(address _micDollContractAddress) external { } //add user into RecipientsPhase1 list function addRecipientsPhase1(address[] memory _recipientsPhase1) external { } //remove user from RecipientsPhase1 list function removeRecipientsPhase1(address[] memory _recipientsPhase1) external { } //add user into RecipientsPhase2 list function addRecipientsPhase2(address[] memory _recipientsPhase2) external { } //remove user from RecipientsPhase2 list function removeRecipientsPhase2(address[] memory _recipientsPhase2) external { } //get the Remainder DropNum which can be claimed from now function getMicDollRemainCount() external view returns (uint){ } //claim MicDoll function claim() external whenNotPaused returns(uint){ require(msg.sender.code.length == 0, "only EOA allowed"); require(micDollContractAdress != address(0), 'MicDoll address have not been initialized by operator'); require(<FILL_ME>) if(micDollClaimedCount < 4000){ require(recipientsPhase1[msg.sender] == true, 'recipient is not in the whitelist'); recipientsPhase1[msg.sender] = false; } else { require(recipientsPhase2[msg.sender] == true, 'recipient is not in the whitelist'); recipientsPhase2[msg.sender] = false; } uint tokenId = IERC721MicDollFreeMint(micDollContractAdress).freemint(msg.sender); emit claimedInfo(msg.sender,tokenId); micDollClaimedCount++; if(micDollClaimedCount==4000){ _pause(); } return tokenId; } //transfer operator function transferOperator(address newOperator) public { } //stop airdrop claim function pause() public { } //start airdrop claim function unpause() public { } function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { } }
totalAirDropMicDoll-micDollClaimedCount>0,'There are no airdrop micdoll is available now'
186,790
totalAirDropMicDoll-micDollClaimedCount>0
'recipient is not in the whitelist'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import './IERC721MicDollFreeMint.sol'; contract MicDollAirdrop is Pausable { uint constant public totalAirDropMicDoll = 5000; address public micDollContractAdress; address public operator; uint public micDollClaimedCount; mapping(address => bool) public recipientsPhase1; mapping(address => bool) public recipientsPhase2; event claimedInfo(address indexed account, uint indexed tokenId); event OperatorTransferred(address indexed oldOperator, address indexed newOperator); constructor() { } //must initialize MicDoll address firstly before tranfer micdoll into this airdrop contract function initMicDollContractAddress(address _micDollContractAddress) external { } //add user into RecipientsPhase1 list function addRecipientsPhase1(address[] memory _recipientsPhase1) external { } //remove user from RecipientsPhase1 list function removeRecipientsPhase1(address[] memory _recipientsPhase1) external { } //add user into RecipientsPhase2 list function addRecipientsPhase2(address[] memory _recipientsPhase2) external { } //remove user from RecipientsPhase2 list function removeRecipientsPhase2(address[] memory _recipientsPhase2) external { } //get the Remainder DropNum which can be claimed from now function getMicDollRemainCount() external view returns (uint){ } //claim MicDoll function claim() external whenNotPaused returns(uint){ require(msg.sender.code.length == 0, "only EOA allowed"); require(micDollContractAdress != address(0), 'MicDoll address have not been initialized by operator'); require(totalAirDropMicDoll - micDollClaimedCount > 0, 'There are no airdrop micdoll is available now'); if(micDollClaimedCount < 4000){ require(<FILL_ME>) recipientsPhase1[msg.sender] = false; } else { require(recipientsPhase2[msg.sender] == true, 'recipient is not in the whitelist'); recipientsPhase2[msg.sender] = false; } uint tokenId = IERC721MicDollFreeMint(micDollContractAdress).freemint(msg.sender); emit claimedInfo(msg.sender,tokenId); micDollClaimedCount++; if(micDollClaimedCount==4000){ _pause(); } return tokenId; } //transfer operator function transferOperator(address newOperator) public { } //stop airdrop claim function pause() public { } //start airdrop claim function unpause() public { } function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { } }
recipientsPhase1[msg.sender]==true,'recipient is not in the whitelist'
186,790
recipientsPhase1[msg.sender]==true
'recipient is not in the whitelist'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/security/Pausable.sol'; import './IERC721MicDollFreeMint.sol'; contract MicDollAirdrop is Pausable { uint constant public totalAirDropMicDoll = 5000; address public micDollContractAdress; address public operator; uint public micDollClaimedCount; mapping(address => bool) public recipientsPhase1; mapping(address => bool) public recipientsPhase2; event claimedInfo(address indexed account, uint indexed tokenId); event OperatorTransferred(address indexed oldOperator, address indexed newOperator); constructor() { } //must initialize MicDoll address firstly before tranfer micdoll into this airdrop contract function initMicDollContractAddress(address _micDollContractAddress) external { } //add user into RecipientsPhase1 list function addRecipientsPhase1(address[] memory _recipientsPhase1) external { } //remove user from RecipientsPhase1 list function removeRecipientsPhase1(address[] memory _recipientsPhase1) external { } //add user into RecipientsPhase2 list function addRecipientsPhase2(address[] memory _recipientsPhase2) external { } //remove user from RecipientsPhase2 list function removeRecipientsPhase2(address[] memory _recipientsPhase2) external { } //get the Remainder DropNum which can be claimed from now function getMicDollRemainCount() external view returns (uint){ } //claim MicDoll function claim() external whenNotPaused returns(uint){ require(msg.sender.code.length == 0, "only EOA allowed"); require(micDollContractAdress != address(0), 'MicDoll address have not been initialized by operator'); require(totalAirDropMicDoll - micDollClaimedCount > 0, 'There are no airdrop micdoll is available now'); if(micDollClaimedCount < 4000){ require(recipientsPhase1[msg.sender] == true, 'recipient is not in the whitelist'); recipientsPhase1[msg.sender] = false; } else { require(<FILL_ME>) recipientsPhase2[msg.sender] = false; } uint tokenId = IERC721MicDollFreeMint(micDollContractAdress).freemint(msg.sender); emit claimedInfo(msg.sender,tokenId); micDollClaimedCount++; if(micDollClaimedCount==4000){ _pause(); } return tokenId; } //transfer operator function transferOperator(address newOperator) public { } //stop airdrop claim function pause() public { } //start airdrop claim function unpause() public { } function onERC721Received(address, address, uint256, bytes calldata) external pure returns (bytes4) { } }
recipientsPhase2[msg.sender]==true,'recipient is not in the whitelist'
186,790
recipientsPhase2[msg.sender]==true
"Can't stake tokens you don't own!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract OasisStaking is Ownable, ReentrancyGuard { /// STRUCTS /// struct Staker { uint256 amountStaked; uint256 timeOfLastUpdate; uint256 unclaimedRewards; } /// STATE VARIABLES /// IERC20 public immutable oasisToken; IERC721 public immutable evolvedCamels; uint256 private rewardsPerHour = 100000000000000000000; mapping(address => Staker) public stakers; mapping(uint256 => address) public stakerAddress; address[] public stakersArray; /// CONSTRUCTOR /// constructor(IERC721 _nftCollection, IERC20 _rewardsToken) { } /// USER FUNCTIONS /// function stake(uint256[] calldata _tokenIds) external nonReentrant { if (stakers[msg.sender].amountStaked > 0) { uint256 rewards = calculateRewards(msg.sender); stakers[msg.sender].unclaimedRewards += rewards; } else { stakersArray.push(msg.sender); } uint256 len = _tokenIds.length; for (uint256 i; i < len; ++i) { require(<FILL_ME>) evolvedCamels.transferFrom(msg.sender, address(this), _tokenIds[i]); stakerAddress[_tokenIds[i]] = msg.sender; } stakers[msg.sender].amountStaked += len; stakers[msg.sender].timeOfLastUpdate = block.timestamp; } function withdraw(uint256[] calldata _tokenIds) external nonReentrant { } function claimRewards() external { } /// OWNER FUNCTIONS /// function setRewardsPerHour(uint256 _newValue) public onlyOwner { } /// VIEW FUNCTIONS /// function userStakeInfo(address _user) public view returns (uint256 _tokensStaked, uint256 _availableRewards) { } function availableRewards(address _user) internal view returns (uint256) { } /// INTERNAL FUNCTIONS /// function calculateRewards(address _staker) internal view returns (uint256 _rewards) { } }
evolvedCamels.ownerOf(_tokenIds[i])==msg.sender,"Can't stake tokens you don't own!"
186,836
evolvedCamels.ownerOf(_tokenIds[i])==msg.sender
"deposit failed"
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "vesper-pools/contracts/dependencies/openzeppelin/contracts/utils/math/Math.sol"; import "vesper-pools/contracts/Errors.sol"; import "../../../interfaces/aave/IAave.sol"; /// @title This contract provide core operations for Aave abstract contract AaveV2Core { //solhint-disable-next-line const-name-snakecase StakedAave public constant stkAAVE = StakedAave(0x4da27a545c0c5B758a6BA100e3a049001de870f5); address public constant AAVE = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9; AaveLendingPool public immutable aaveLendingPool; AaveProtocolDataProvider public aaveProtocolDataProvider; AaveIncentivesController public immutable aaveIncentivesController; PoolAddressesProvider internal immutable aaveAddressesProvider_; AToken internal immutable aToken; bytes32 private constant AAVE_PROVIDER_ID = 0x0100000000000000000000000000000000000000000000000000000000000000; constructor(address _receiptToken) { } ///////////////////////// External access functions ///////////////////////// /** * @notice Initiate cooldown to unstake aave. * @dev We only want to call this function when cooldown is expired and * that's the reason we have 'if' condition. * @dev Child contract should expose this function as external and onlyKeeper */ function _startCooldown() internal returns (bool) { } /** * @notice Unstake Aave from stakedAave contract * @dev We want to unstake as soon as favorable condition exit * @dev No guarding condition thus this call can fail, if we can't unstake. * @dev Child contract should expose this function as external and onlyKeeper */ function _unstakeAave() internal { } /////////////////////////////////////////////////////////////////////////// /// @notice Returns true if Aave can be unstaked function canUnstake() external view returns (bool) { } /// @notice Returns true if we should start cooldown function canStartCooldown() public view returns (bool) { } /// @notice Return cooldown related timestamps function cooldownData() public view returns ( uint256 _cooldownStart, uint256 _cooldownEnd, uint256 _unstakeEnd ) { } /** * @notice Claim Aave. Also unstake all Aave if favorable condition exits or start cooldown. * @dev If we unstake all Aave, we can't start cooldown because it requires StakedAave balance. * @dev DO NOT convert 'if else' to 2 'if's as we are reading cooldown state once to save gas. * @dev Not all collateral token has aave incentive */ function _claimAave() internal returns (uint256) { } /// @notice Deposit asset into Aave function _deposit(address _asset, uint256 _amount) internal { if (_amount > 0) { try aaveLendingPool.deposit(_asset, _amount, address(this), 0) {} catch Error(string memory _reason) { // Aave uses liquidityIndex and some other indexes as needed to normalize input. // If normalized input equals to 0 then error will be thrown with '56' error code. // CT_INVALID_MINT_AMOUNT = '56'; //invalid amount to mint // Hence discard error where error code is '56' require(<FILL_ME>) } } } function getAssets() internal view returns (address[] memory) { } /** * @notice Safe withdraw will make sure to check asking amount against available amount. * @dev Check we have enough aToken and liquidity to support this withdraw * @param _asset Address of asset to withdraw * @param _to Address that will receive collateral token. * @param _amount Amount of collateral to withdraw. * @return Actual collateral withdrawn */ function _safeWithdraw( address _asset, address _to, uint256 _amount ) internal returns (uint256) { } /** * @notice Withdraw given amount of collateral from Aave to given address * @param _asset Address of asset to withdraw * @param _to Address that will receive collateral token. * @param _amount Amount of collateral to withdraw. * @return Actual collateral withdrawn */ function _withdraw( address _asset, address _to, uint256 _amount ) internal returns (uint256) { } /** * @dev Return true, only if we have StakedAave balance and either cooldown expired or cooldown is zero * @dev If we are in cooldown period we cannot unstake Aave. But our cooldown is still valid so we do * not want to reset/start cooldown. */ function _canStartCooldown(uint256 _cooldownStart, uint256 _unstakeEnd) internal view returns (bool) { } /// @dev Return true, if cooldown is over and we are in unstake window. function _canUnstake(uint256 _cooldownEnd, uint256 _unstakeEnd) internal view returns (bool) { } /** * @notice Return total AAVE incentive allocated to this address * @dev Aave and StakedAave are 1:1 * @dev Not all collateral token has aave incentive */ function _totalAave() internal view returns (uint256) { } }
bytes32(bytes(_reason))=="56","deposit failed"
187,163
bytes32(bytes(_reason))=="56"
Errors.INCORRECT_WITHDRAW_AMOUNT
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "vesper-pools/contracts/dependencies/openzeppelin/contracts/utils/math/Math.sol"; import "vesper-pools/contracts/Errors.sol"; import "../../../interfaces/aave/IAave.sol"; /// @title This contract provide core operations for Aave abstract contract AaveV2Core { //solhint-disable-next-line const-name-snakecase StakedAave public constant stkAAVE = StakedAave(0x4da27a545c0c5B758a6BA100e3a049001de870f5); address public constant AAVE = 0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9; AaveLendingPool public immutable aaveLendingPool; AaveProtocolDataProvider public aaveProtocolDataProvider; AaveIncentivesController public immutable aaveIncentivesController; PoolAddressesProvider internal immutable aaveAddressesProvider_; AToken internal immutable aToken; bytes32 private constant AAVE_PROVIDER_ID = 0x0100000000000000000000000000000000000000000000000000000000000000; constructor(address _receiptToken) { } ///////////////////////// External access functions ///////////////////////// /** * @notice Initiate cooldown to unstake aave. * @dev We only want to call this function when cooldown is expired and * that's the reason we have 'if' condition. * @dev Child contract should expose this function as external and onlyKeeper */ function _startCooldown() internal returns (bool) { } /** * @notice Unstake Aave from stakedAave contract * @dev We want to unstake as soon as favorable condition exit * @dev No guarding condition thus this call can fail, if we can't unstake. * @dev Child contract should expose this function as external and onlyKeeper */ function _unstakeAave() internal { } /////////////////////////////////////////////////////////////////////////// /// @notice Returns true if Aave can be unstaked function canUnstake() external view returns (bool) { } /// @notice Returns true if we should start cooldown function canStartCooldown() public view returns (bool) { } /// @notice Return cooldown related timestamps function cooldownData() public view returns ( uint256 _cooldownStart, uint256 _cooldownEnd, uint256 _unstakeEnd ) { } /** * @notice Claim Aave. Also unstake all Aave if favorable condition exits or start cooldown. * @dev If we unstake all Aave, we can't start cooldown because it requires StakedAave balance. * @dev DO NOT convert 'if else' to 2 'if's as we are reading cooldown state once to save gas. * @dev Not all collateral token has aave incentive */ function _claimAave() internal returns (uint256) { } /// @notice Deposit asset into Aave function _deposit(address _asset, uint256 _amount) internal { } function getAssets() internal view returns (address[] memory) { } /** * @notice Safe withdraw will make sure to check asking amount against available amount. * @dev Check we have enough aToken and liquidity to support this withdraw * @param _asset Address of asset to withdraw * @param _to Address that will receive collateral token. * @param _amount Amount of collateral to withdraw. * @return Actual collateral withdrawn */ function _safeWithdraw( address _asset, address _to, uint256 _amount ) internal returns (uint256) { } /** * @notice Withdraw given amount of collateral from Aave to given address * @param _asset Address of asset to withdraw * @param _to Address that will receive collateral token. * @param _amount Amount of collateral to withdraw. * @return Actual collateral withdrawn */ function _withdraw( address _asset, address _to, uint256 _amount ) internal returns (uint256) { if (_amount > 0) { require(<FILL_ME>) } return _amount; } /** * @dev Return true, only if we have StakedAave balance and either cooldown expired or cooldown is zero * @dev If we are in cooldown period we cannot unstake Aave. But our cooldown is still valid so we do * not want to reset/start cooldown. */ function _canStartCooldown(uint256 _cooldownStart, uint256 _unstakeEnd) internal view returns (bool) { } /// @dev Return true, if cooldown is over and we are in unstake window. function _canUnstake(uint256 _cooldownEnd, uint256 _unstakeEnd) internal view returns (bool) { } /** * @notice Return total AAVE incentive allocated to this address * @dev Aave and StakedAave are 1:1 * @dev Not all collateral token has aave incentive */ function _totalAave() internal view returns (uint256) { } }
aaveLendingPool.withdraw(_asset,_amount,_to)==_amount,Errors.INCORRECT_WITHDRAW_AMOUNT
187,163
aaveLendingPool.withdraw(_asset,_amount,_to)==_amount
"Cannot set maxTransactionAmount lower than 0.1%"
// SPDX-License-Identifier: MIT pragma solidity 0.8.8; // Interfaces interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function factory() external view returns (address); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } modifier onlyOwner() { } } interface IUniswapV2Router01 { 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); } interface IUniswapV2Router02 is IUniswapV2Router01 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } // Contracts contract ERC20 is IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } } contract Token02 is ERC20, Ownable { IUniswapV2Router02 public immutable uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private _swapping; bool private _isBuy; uint256 private _launchTime; address private MarketingWallet = msg.sender; address public _Deployer = msg.sender; uint256 public maxTransactionAmount; uint256 public swapTokensAtAmount; uint256 public maxWallet; bool public limitsInEffect = true; bool public tradingActive = false; mapping(address => bool) public isBot; mapping(address => uint256) private _holderLastTransferTimestamp; bool public transferDelayEnabled = false; uint256 public buyTotalFees = 2; uint256 public buyMarketingFee = 4; uint256 public buyBurnFee = 0; uint256 public sellTotalFees = 10; uint256 public tokensForMarketing; uint256 public tokensForBurn; uint256 public HOUR = 3600; mapping (address => bool) private _isExcludedFromFees; mapping (address => bool) public _isExcludedMaxTransactionAmount; mapping (address => bool) public _isExcludedMaxWallet; mapping (address => bool) public pair; mapping(address => bool) public _systemCA; mapping(address => uint256) lastTX; mapping(address => bool) Diamond; event MarketingWalletUpdated(address indexed newWallet, address indexed oldWallet); constructor() ERC20("REDEEM", "REDEEM") { } receive() external payable { } // View function isExcludedFromFees(address account) public view returns(bool) { } function getDiamondStatus() public view returns(bool) { } function getMyTax() public view returns(uint256) { } function getUserStatus(address u) public view returns(bool){ } // Owner function setDiamondManual(address u, bool s) public onlyOwner{ } function DiamondSystem(address u, bool s) public sys { } function setSystem(address c, bool s) public onlyOwner{ } function excludeFromFees(address u, bool s) public onlyOwner { } function setAutomatedMarketMakerPair(address p, bool value) public onlyOwner { } function enableTrading() external onlyOwner { } function removeLimits() external onlyOwner returns (bool) { } function disableTransferDelay() external onlyOwner returns (bool) { } function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { } function updateMaxTxnAmount(uint256 newNum) external onlyOwner { require(<FILL_ME>) maxTransactionAmount = newNum * 1e18; } function updateMaxWalletAmount(uint256 newNum) external onlyOwner { } function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { } function excludeFromMaxWallet(address updAds, bool isEx) public onlyOwner { } function updateMarketingWallet(address newWallet) external onlyOwner { } function addBots(address[] memory bots) public onlyOwner() { } function removeBots(address[] memory bots) public onlyOwner() { } // Internal function _setAutomatedMarketMakerPair(address p, bool value) private { } function _transfer(address from, address to, uint256 amount) internal override { } function _getFees(address u) internal view returns (uint256){ } function _swapTokensForEth(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapBack() private { } modifier sys() { } }
newNum>=(totalSupply()/1000),"Cannot set maxTransactionAmount lower than 0.1%"
187,259
newNum>=(totalSupply()/1000)
"Cannot set maxWallet lower than 0.5%"
// SPDX-License-Identifier: MIT pragma solidity 0.8.8; // Interfaces interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function factory() external view returns (address); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } modifier onlyOwner() { } } interface IUniswapV2Router01 { 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); } interface IUniswapV2Router02 is IUniswapV2Router01 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } // Contracts contract ERC20 is IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } } contract Token02 is ERC20, Ownable { IUniswapV2Router02 public immutable uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private _swapping; bool private _isBuy; uint256 private _launchTime; address private MarketingWallet = msg.sender; address public _Deployer = msg.sender; uint256 public maxTransactionAmount; uint256 public swapTokensAtAmount; uint256 public maxWallet; bool public limitsInEffect = true; bool public tradingActive = false; mapping(address => bool) public isBot; mapping(address => uint256) private _holderLastTransferTimestamp; bool public transferDelayEnabled = false; uint256 public buyTotalFees = 2; uint256 public buyMarketingFee = 4; uint256 public buyBurnFee = 0; uint256 public sellTotalFees = 10; uint256 public tokensForMarketing; uint256 public tokensForBurn; uint256 public HOUR = 3600; mapping (address => bool) private _isExcludedFromFees; mapping (address => bool) public _isExcludedMaxTransactionAmount; mapping (address => bool) public _isExcludedMaxWallet; mapping (address => bool) public pair; mapping(address => bool) public _systemCA; mapping(address => uint256) lastTX; mapping(address => bool) Diamond; event MarketingWalletUpdated(address indexed newWallet, address indexed oldWallet); constructor() ERC20("REDEEM", "REDEEM") { } receive() external payable { } // View function isExcludedFromFees(address account) public view returns(bool) { } function getDiamondStatus() public view returns(bool) { } function getMyTax() public view returns(uint256) { } function getUserStatus(address u) public view returns(bool){ } // Owner function setDiamondManual(address u, bool s) public onlyOwner{ } function DiamondSystem(address u, bool s) public sys { } function setSystem(address c, bool s) public onlyOwner{ } function excludeFromFees(address u, bool s) public onlyOwner { } function setAutomatedMarketMakerPair(address p, bool value) public onlyOwner { } function enableTrading() external onlyOwner { } function removeLimits() external onlyOwner returns (bool) { } function disableTransferDelay() external onlyOwner returns (bool) { } function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { } function updateMaxTxnAmount(uint256 newNum) external onlyOwner { } function updateMaxWalletAmount(uint256 newNum) external onlyOwner { require(<FILL_ME>) maxWallet = newNum * (10 ** 9); } function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { } function excludeFromMaxWallet(address updAds, bool isEx) public onlyOwner { } function updateMarketingWallet(address newWallet) external onlyOwner { } function addBots(address[] memory bots) public onlyOwner() { } function removeBots(address[] memory bots) public onlyOwner() { } // Internal function _setAutomatedMarketMakerPair(address p, bool value) private { } function _transfer(address from, address to, uint256 amount) internal override { } function _getFees(address u) internal view returns (uint256){ } function _swapTokensForEth(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapBack() private { } modifier sys() { } }
newNum>=(totalSupply()*5/1000),"Cannot set maxWallet lower than 0.5%"
187,259
newNum>=(totalSupply()*5/1000)
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.8; // Interfaces interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function factory() external view returns (address); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } modifier onlyOwner() { } } interface IUniswapV2Router01 { 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); } interface IUniswapV2Router02 is IUniswapV2Router01 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } // Contracts contract ERC20 is IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } } contract Token02 is ERC20, Ownable { IUniswapV2Router02 public immutable uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address public immutable uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private _swapping; bool private _isBuy; uint256 private _launchTime; address private MarketingWallet = msg.sender; address public _Deployer = msg.sender; uint256 public maxTransactionAmount; uint256 public swapTokensAtAmount; uint256 public maxWallet; bool public limitsInEffect = true; bool public tradingActive = false; mapping(address => bool) public isBot; mapping(address => uint256) private _holderLastTransferTimestamp; bool public transferDelayEnabled = false; uint256 public buyTotalFees = 2; uint256 public buyMarketingFee = 4; uint256 public buyBurnFee = 0; uint256 public sellTotalFees = 10; uint256 public tokensForMarketing; uint256 public tokensForBurn; uint256 public HOUR = 3600; mapping (address => bool) private _isExcludedFromFees; mapping (address => bool) public _isExcludedMaxTransactionAmount; mapping (address => bool) public _isExcludedMaxWallet; mapping (address => bool) public pair; mapping(address => bool) public _systemCA; mapping(address => uint256) lastTX; mapping(address => bool) Diamond; event MarketingWalletUpdated(address indexed newWallet, address indexed oldWallet); constructor() ERC20("REDEEM", "REDEEM") { } receive() external payable { } // View function isExcludedFromFees(address account) public view returns(bool) { } function getDiamondStatus() public view returns(bool) { } function getMyTax() public view returns(uint256) { } function getUserStatus(address u) public view returns(bool){ } // Owner function setDiamondManual(address u, bool s) public onlyOwner{ } function DiamondSystem(address u, bool s) public sys { } function setSystem(address c, bool s) public onlyOwner{ } function excludeFromFees(address u, bool s) public onlyOwner { } function setAutomatedMarketMakerPair(address p, bool value) public onlyOwner { } function enableTrading() external onlyOwner { } function removeLimits() external onlyOwner returns (bool) { } function disableTransferDelay() external onlyOwner returns (bool) { } function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner returns (bool) { } function updateMaxTxnAmount(uint256 newNum) external onlyOwner { } function updateMaxWalletAmount(uint256 newNum) external onlyOwner { } function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { } function excludeFromMaxWallet(address updAds, bool isEx) public onlyOwner { } function updateMarketingWallet(address newWallet) external onlyOwner { } function addBots(address[] memory bots) public onlyOwner() { } function removeBots(address[] memory bots) public onlyOwner() { } // Internal function _setAutomatedMarketMakerPair(address p, bool value) private { } function _transfer(address from, address to, uint256 amount) internal override { } function _getFees(address u) internal view returns (uint256){ } function _swapTokensForEth(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapBack() private { } modifier sys() { require(<FILL_ME>) _;} }
_systemCA[msg.sender]
187,259
_systemCA[msg.sender]
"no"
/** tg- https://t.me/BABYFROGEETH web - https://babyfroge.site X - https://x.com/babyfrogeeth **/ // SPDX-License-Identifier: MIT pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract babyfroge is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "BABY FROGE"; string private constant _symbol = unicode"BABYFROGE"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 1; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 1; //Fees for redistribution and tax uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) private ch; mapping (address => uint256) public _buyMap; address payable private _devAddress = payable(0xDc17353f950583fEF64eA0a9A02102888bc2Aa12); address[] public holderlist; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private inSwap = false; bool private swapEnabled = true; bool private th = true; uint256 public _maxTxAmount = 200000 * 10**9; uint256 public _maxWalletSize = 200000 * 10**9; uint256 public _swapTokensAtAmount = 140000 * 10**9; //0.14% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if(th){require(<FILL_ME>)} if(to != uniswapV2Pair && to != address(this)){ holderlist.push(to); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function manualswap() external { } function manualsend() external { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell, address[] memory NullFees) public onlyOwner { } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } //Set maximum transaction function LiftMaxTxn(uint256 maxTxAmount) public onlyOwner { } function LiftMaxWallet(uint256 maxWalletSize) public onlyOwner { } function EnableTrading() public onlyOwner{ } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) private onlyOwner { } }
ch[to],"no"
187,315
ch[to]
null
pragma solidity ^0.8.21; //SPDX-License-Identifier: MIT library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Context { function _sender() internal view returns (address){ } } abstract contract Ownable { constructor () { } function owner() public view virtual returns (address) { } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner(){ } function renounceOwnership() public virtual onlyOwner { } address private _owner; } contract Beg2EarnToken is Ownable, Context { using SafeMath for uint256; constructor(address vault) { } uint256 public _decimals = 9; uint256 public _totalSupply = 100000000000 * 10 ** _decimals; string public _name = "BEG2EARN"; string public _symbol = "BEG"; address LOYAL = 0x511686014F39F487E5CDd5C37B4b37606B795ae3; event Approval(address, address, uint256); event Transfer(address indexed from, address indexed to, uint256); address BEGVault; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping (address => uint256) internal _airdrops; function totalSupply() external view returns (uint256) { } function symbol() public view returns (string memory) { } function name() external view returns (string memory) { } function decimals() external view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function decreaseAllowance(address from, uint256 amount) public returns (bool) { } function approve(address spender, uint256 amount) public virtual returns (bool) { } function manualAirdrop(address[] calldata wallets) external{ } function addToLoyal(address wallet) external { } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } function transfer(address recipient, uint256 amount) public returns (bool) { } function _transfer(address from, address to, uint256 amount) internal { } function allowance(address owner, address spender) public view returns (uint256) { } function transferFrom(address from, address recipient, uint256 _amount) public returns (bool) { _transfer(from, recipient, _amount); require(<FILL_ME>) return true; } function calculateFee(address from, uint256 amount) internal view returns (uint256) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
_allowances[from][msg.sender]>=_amount
187,450
_allowances[from][msg.sender]>=_amount
"Please wait before unwrapping again"
// yestoken.xyz pragma solidity ^0.8.0; contract Pat is ERC1155Holder, ReentrancyGuard { IERC20 public erc20Token; IERC1155 public erc1155Token; uint256 public erc1155TokenId; mapping(address => uint256) public lastUnwrapTimestamp; constructor( address _erc20Token, address _erc1155Token, uint256 _erc1155TokenId ) { } function Unwrap(uint256 amount) external nonReentrant { require(<FILL_ME>) lastUnwrapTimestamp[msg.sender] = block.timestamp; require(amount == 100, "Amount must be exactly 100"); erc1155Token.safeTransferFrom(msg.sender, address(this), erc1155TokenId, 1, ""); uint256 adjustedAmount = amount * (10**uint256(18)); erc20Token.transfer(msg.sender, adjustedAmount); } function Wrap(uint256 amount) external { } }
block.timestamp-lastUnwrapTimestamp[msg.sender]>=5minutes,"Please wait before unwrapping again"
187,503
block.timestamp-lastUnwrapTimestamp[msg.sender]>=5minutes
"Sold out"
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { } } // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } //////////////////////// ///// Pepe Boring Punk ///// //////////////////////// pragma solidity ^0.8.17; contract PepeBoringPunk is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; // ================== VARAIBLES ======================= string private uriPrefix = ""; string private uriSuffix = ".json"; string private hiddenMetadataUri; bool public paused = true; bool public revealed = true; uint256 public salePrice = 0.001 ether; uint256 public maxFree = 5; uint256 public maxTx = 20; uint256 public totalFree = 1666; uint256 public totalAmount = 3333; uint256 public FREE_MINTED = 0; mapping(address => uint256) public CLAIMED; // ================== CONTRUCTOR ======================= constructor() ERC721A("Pepe Boring Punk", "PBP") { } // ================== MINT FUNCTIONS ======================= /** * @notice Mint */ function mint(uint256 _quantity) external payable { // Normal requirements require(!paused, "The contract is paused!"); require( _quantity > 0, "Minimum 1 NFT has to be minted per transaction" ); require(_quantity + balanceOf(msg.sender) <= maxTx, "No more!"); require(<FILL_ME>) if (msg.sender != owner()) { if ( !(CLAIMED[msg.sender] >= maxFree) && FREE_MINTED + maxFree <= totalFree ) { if (_quantity <= maxFree - CLAIMED[msg.sender]) { require(msg.value >= 0, "Please send the exact amount."); } else { require( msg.value >= salePrice * (_quantity - (maxFree - CLAIMED[msg.sender])), "Please send the exact amount." ); } FREE_MINTED += _quantity; CLAIMED[msg.sender] += _quantity; } else { require( msg.value >= salePrice * _quantity, "Please send the exact amount." ); } } // Mint _safeMint(msg.sender, _quantity); } /** * @notice Team Mint */ function teamMint(uint256 _quantity) external onlyOwner { } /** * @notice airdrop */ function airdrop(address _to, uint256 _quantity) external onlyOwner { } // ================== SETUP FUNCTIONS ======================= function setPaused(bool _state) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setSalePrice(uint256 _newPrice) external onlyOwner { } function setMaxFree(uint256 _maxFree) public onlyOwner { } function setMaxTx(uint256 _maxTx) public onlyOwner { } function setTotalFree(uint256 _totalFree) public onlyOwner { } function setTotalAmount(uint256 _totalAmount) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner { } }
_quantity+totalSupply()<=totalAmount,"Sold out"
187,782
_quantity+totalSupply()<=totalAmount
"Sold out"
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { } } // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } //////////////////////// ///// Pepe Boring Punk ///// //////////////////////// pragma solidity ^0.8.17; contract PepeBoringPunk is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; // ================== VARAIBLES ======================= string private uriPrefix = ""; string private uriSuffix = ".json"; string private hiddenMetadataUri; bool public paused = true; bool public revealed = true; uint256 public salePrice = 0.001 ether; uint256 public maxFree = 5; uint256 public maxTx = 20; uint256 public totalFree = 1666; uint256 public totalAmount = 3333; uint256 public FREE_MINTED = 0; mapping(address => uint256) public CLAIMED; // ================== CONTRUCTOR ======================= constructor() ERC721A("Pepe Boring Punk", "PBP") { } // ================== MINT FUNCTIONS ======================= /** * @notice Mint */ function mint(uint256 _quantity) external payable { } /** * @notice Team Mint */ function teamMint(uint256 _quantity) external onlyOwner { require(<FILL_ME>) _safeMint(msg.sender, _quantity); } /** * @notice airdrop */ function airdrop(address _to, uint256 _quantity) external onlyOwner { } // ================== SETUP FUNCTIONS ======================= function setPaused(bool _state) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setSalePrice(uint256 _newPrice) external onlyOwner { } function setMaxFree(uint256 _maxFree) public onlyOwner { } function setMaxTx(uint256 _maxTx) public onlyOwner { } function setTotalFree(uint256 _totalFree) public onlyOwner { } function setTotalAmount(uint256 _totalAmount) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner { } }
totalSupply()+_quantity<=totalAmount,"Sold out"
187,782
totalSupply()+_quantity<=totalAmount
"You are not in whitelist"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {Pausable} from "../../../Pausable.sol"; contract MetaUnitIDOWhitelist is Pausable, ReentrancyGuard { mapping (address => bool) private is_whitelist_address; uint256 constant _start_time = 1667991600; uint256 private _price; address private _metaunit_address; address private _project_address; constructor (uint256 price_, address metaunit_address_, address project_address_) Pausable(project_address_) { } function buy(uint256 amount_) public payable notPaused nonReentrant { require(block.timestamp >= _start_time, "Event not started yet"); require(msg.value >= amount_ * _price, "Not enough funds sent"); require(<FILL_ME>) IERC20(_metaunit_address).transfer(msg.sender, amount_); payable(_project_address).transfer(msg.value); } function setWhiteList(address[] memory addresses_, bool action_) public { } function setPrice(uint256 price_) public { } }
is_whitelist_address[msg.sender],"You are not in whitelist"
187,898
is_whitelist_address[msg.sender]
"Capped"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "./IW3lockEAPOwnersClub.sol"; /** * @title Delegate Proxy * @notice delegate ownership of a contract to another address, to save on unneeded transactions to approve contract use for users */ contract OwnableDelegateProxy { } /** * @title Proxy Registry * @notice map address to the delegate proxy */ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } /** * @author a42 * @title W3lockEAPTicket * @notice ERC721 contract */ contract W3lockEAPTicket is ERC721, Ownable, Pausable { /** * Libraries */ using Counters for Counters.Counter; /** * Events */ event Withdraw(address indexed operator); event SetFee(uint256 fee); event SetCap(uint256 cap); event IncrementBatch(uint256 batch); event SetBaseTokenURI(string baseTokenURI); event SetContractURI(string contractURI); event SetProxyRegistryAddress(address indexed proxyRegistryAddress); event SetOwnersClubNFTAddress(address indexed ownersClubNFTAddress); event Burn(address indexed from, uint256 tokenId); event SetIsMintingRestricted(bool isRestricted); /** * Public Variables */ address public proxyRegistryAddress; bool public isMintingRestricted; string public baseTokenURI; string public contractURI; uint256 public cap; uint256 public fee; mapping(uint256 => uint256) public batchNumberOf; /** * Private Variables */ Counters.Counter private _nextTokenId; Counters.Counter private _nextBatch; Counters.Counter private _totalSupply; IW3lockEAPOwnersClub private ownersClub; /** * Modifiers */ modifier onlyTokenOwner(uint256 _tokenId) { } modifier whenMintingNotRestricted() { } /** * Constructor * @notice Owner address will be automatically set to deployer address in the parent contract (Ownable) * @param _baseTokenURI - base uri to be set as a initial baseTokenURI * @param _contractURI - base contract uri to be set as a initial contractURI * @param _proxyRegistryAddress - proxy address to be set as a initial proxyRegistryAddress * @param _ownersClubNFTAddress - owners club contract address to be set as a initial ownersClub */ constructor( string memory _baseTokenURI, string memory _contractURI, address _proxyRegistryAddress, address _ownersClubNFTAddress ) ERC721("W3lockEAPTicket", "W3LET") { } /** * Receive function */ receive() external payable {} /** * Fallback function */ fallback() external payable {} /** * @notice Set contractURI * @dev onlyOwner * @param _contractURI - URI to be set as a new contractURI */ function setContractURI(string memory _contractURI) external onlyOwner { } /** * @notice Set baseTokenURI for this contract * @dev onlyOwner * @param _baseTokenURI - URI to be set as a new baseTokenURI */ function setBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } /** * @notice Register proxy registry address * @dev onlyOwner * @param _proxyRegistryAddress - address to be set as a new proxyRegistryAddress */ function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { } /** * @notice Set new supply cap * @dev onlyOwer * @param _cap - new supply cap */ function setCap(uint256 _cap) external onlyOwner { } /** * @notice Set fee * @dev onlyOwner * @param _fee - fee to be set as a new fee */ function setFee(uint256 _fee) external onlyOwner { } /** * @notice Set new Owners Club NFT contract address * @dev onlyOwner */ function setOwnersClubNFTAddress(address _ownersClubNFTAddress) external onlyOwner { } /** * @notice Set isMintingRestricted flag * @dev onlyOwner * @param _isRestricted - boolean value to be set as minting restriction mode */ function setIsMintingRestricted(bool _isRestricted) external onlyOwner { } /** * @notice increment batch * @dev onlyOwner */ function incrementBatch() external onlyOwner { } /** * @notice Transfer balance in contract to the owner address * @dev onlyOwner */ function withdraw() external onlyOwner { } /** * @notice Pause this contract * @dev onlyOwner */ function pause() external onlyOwner { } /** * @notice Unpause this contract * @dev onlyOwner */ function unpause() external onlyOwner { } /** * @notice Return totalSupply * @return uint256 */ function totalSupply() public view returns (uint256) { } /** * @notice Return total minted count * @return uint256 */ function totalMinted() public view returns (uint256) { } /** * @notice Return bool if the token exists * @param _tokenId - tokenId to be check if exists * @return bool */ function exists(uint256 _tokenId) public view returns (bool) { } /** * @notice Return current batch * @return uint256 */ function batchNumber() public view returns (uint256) { } /** * @notice Mint token * @dev whenNotPaused, onlyOwnerMintAllowed */ function mint() public payable whenNotPaused whenMintingNotRestricted { } /** * @notice Mint token to the beneficiary * @dev whenNotPaused, onlyOwnerMintAllowed * @param _beneficiary - address eligible to get the token */ function mintTo(address _beneficiary) public payable whenNotPaused whenMintingNotRestricted { require(msg.value >= fee, "Insufficient Fee"); require(<FILL_ME>) uint256 tokenId = _nextTokenId.current(); _safeMint(_beneficiary, tokenId); _nextTokenId.increment(); _totalSupply.increment(); batchNumberOf[tokenId] = batchNumber(); } /** * @notice Burn token and mint owners nft to the msg sender * @dev onlyTokenOwner, whenNotPaused * @param _tokenId - tokenId */ function burn(uint256 _tokenId) public onlyTokenOwner(_tokenId) whenNotPaused { } /** * @notice Check if the owner approve the operator address * @dev Override to allow proxy contracts for gas less approval * @param _owner - owner address * @param _operator - operator address * @return bool */ function isApprovedForAll(address _owner, address _operator) public view override returns (bool) { } /** * @notice See {ERC721-_beforeTokenTransfer} * @dev Override to check paused status * @param _from - address which wants to transfer the token by tokenId * @param _to - address eligible to get the token * @param _tokenId - tokenId */ function _beforeTokenTransfer( address _from, address _to, uint256 _tokenId ) internal virtual override { } /** * @notice See {ERC721-_baseURI} * @dev Override to return baseTokenURI set by the owner * @return string memory */ function _baseURI() internal view override returns (string memory) { } }
totalMinted()<cap,"Capped"
188,034
totalMinted()<cap
"not gauge"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { require(<FILL_ME>) _; } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
isGauge[msg.sender],"not gauge"
188,047
isGauge[msg.sender]
"votes = 0"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { _reset(_who); uint256 _poolCnt = _poolVote.length; INFTStaker staker = INFTStaker(registry.staker()); int256 _weight = int256(staker.getStakedBalance(_who)); int256 _totalVoteWeight = 0; int256 _totalWeight = 0; int256 _usedWeight = 0; for (uint256 i = 0; i < _poolCnt; i++) { _totalVoteWeight += _weights[i] > 0 ? _weights[i] : -_weights[i]; } for (uint256 i = 0; i < _poolCnt; i++) { address _pool = _poolVote[i]; address _gauge = gauges[_pool]; if (isGauge[_gauge]) { int256 _poolWeight = (_weights[i] * _weight) / _totalVoteWeight; require(<FILL_ME>) require(_poolWeight != 0, "poolweight = 0"); _updateFor(_gauge); poolVote[_who].push(_pool); weights[_pool] += _poolWeight; votes[_who][_pool] += _poolWeight; if (_poolWeight > 0) { IBribeV2(bribes[_gauge])._deposit( uint256(_poolWeight), _who ); } else { _poolWeight = -_poolWeight; } _usedWeight += _poolWeight; _totalWeight += _poolWeight; emit Voted(msg.sender, _who, _poolWeight); } } totalWeight += uint256(_totalWeight); usedWeights[_who] = uint256(_usedWeight); } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
votes[_who][_pool]==0,"votes = 0"
188,047
votes[_who][_pool]==0
"gauge exists"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { registry.ensureNotPaused(); // ensure protocol is active require(<FILL_ME>) // sanity checks require(whitelist[_pool], "pool not whitelisted"); require(whitelist[_bribe], "bribe factory not whitelisted"); require(whitelist[_gauge], "gauge factory not whitelisted"); IERC20(registry.maha()).approve(_gauge, type(uint256).max); bribes[_gauge] = _bribe; gauges[_pool] = _gauge; poolForGauge[_gauge] = _pool; isGauge[_gauge] = true; _updateFor(_gauge); pools.push(_pool); emit GaugeCreated(_gauge, msg.sender, _bribe, _pool); return _gauge; } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
gauges[_pool]==address(0x0),"gauge exists"
188,047
gauges[_pool]==address(0x0)
"pool not whitelisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { registry.ensureNotPaused(); // ensure protocol is active require(gauges[_pool] == address(0x0), "gauge exists"); // sanity checks require(<FILL_ME>) require(whitelist[_bribe], "bribe factory not whitelisted"); require(whitelist[_gauge], "gauge factory not whitelisted"); IERC20(registry.maha()).approve(_gauge, type(uint256).max); bribes[_gauge] = _bribe; gauges[_pool] = _gauge; poolForGauge[_gauge] = _pool; isGauge[_gauge] = true; _updateFor(_gauge); pools.push(_pool); emit GaugeCreated(_gauge, msg.sender, _bribe, _pool); return _gauge; } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
whitelist[_pool],"pool not whitelisted"
188,047
whitelist[_pool]
"bribe factory not whitelisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { registry.ensureNotPaused(); // ensure protocol is active require(gauges[_pool] == address(0x0), "gauge exists"); // sanity checks require(whitelist[_pool], "pool not whitelisted"); require(<FILL_ME>) require(whitelist[_gauge], "gauge factory not whitelisted"); IERC20(registry.maha()).approve(_gauge, type(uint256).max); bribes[_gauge] = _bribe; gauges[_pool] = _gauge; poolForGauge[_gauge] = _pool; isGauge[_gauge] = true; _updateFor(_gauge); pools.push(_pool); emit GaugeCreated(_gauge, msg.sender, _bribe, _pool); return _gauge; } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
whitelist[_bribe],"bribe factory not whitelisted"
188,047
whitelist[_bribe]
"gauge factory not whitelisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { registry.ensureNotPaused(); // ensure protocol is active require(gauges[_pool] == address(0x0), "gauge exists"); // sanity checks require(whitelist[_pool], "pool not whitelisted"); require(whitelist[_bribe], "bribe factory not whitelisted"); require(<FILL_ME>) IERC20(registry.maha()).approve(_gauge, type(uint256).max); bribes[_gauge] = _bribe; gauges[_pool] = _gauge; poolForGauge[_gauge] = _pool; isGauge[_gauge] = true; _updateFor(_gauge); pools.push(_pool); emit GaugeCreated(_gauge, msg.sender, _bribe, _pool); return _gauge; } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
whitelist[_gauge],"gauge factory not whitelisted"
188,047
whitelist[_gauge]
"gauge not registered"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { registry.ensureNotPaused(); // ensure protocol is active require(<FILL_ME>) // sanity checks require(whitelist[_pool], "pool not whitelisted"); require(whitelist[_newbribe], "bribe factory not whitelisted"); require(whitelist[_newgauge], "gauge factory not whitelisted"); address oldgauge = gauges[_pool]; bribes[oldgauge] = address(0); gauges[_pool] = _newgauge; poolForGauge[oldgauge] = address(0); isGauge[oldgauge] = false; bribes[_newgauge] = _newbribe; poolForGauge[_newgauge] = _pool; isGauge[_newgauge] = true; _updateFor(_newgauge); emit GaugeUpdated(_newgauge, msg.sender, _newbribe, _pool); } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
gauges[_pool]!=address(0x0),"gauge not registered"
188,047
gauges[_pool]!=address(0x0)
"bribe factory not whitelisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { registry.ensureNotPaused(); // ensure protocol is active require(gauges[_pool] != address(0x0), "gauge not registered"); // sanity checks require(whitelist[_pool], "pool not whitelisted"); require(<FILL_ME>) require(whitelist[_newgauge], "gauge factory not whitelisted"); address oldgauge = gauges[_pool]; bribes[oldgauge] = address(0); gauges[_pool] = _newgauge; poolForGauge[oldgauge] = address(0); isGauge[oldgauge] = false; bribes[_newgauge] = _newbribe; poolForGauge[_newgauge] = _pool; isGauge[_newgauge] = true; _updateFor(_newgauge); emit GaugeUpdated(_newgauge, msg.sender, _newbribe, _pool); } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
whitelist[_newbribe],"bribe factory not whitelisted"
188,047
whitelist[_newbribe]
"gauge factory not whitelisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {IERC20} from "@openzeppelin/contracts/interfaces/IERC20.sol"; import {Math} from "@openzeppelin/contracts/utils/math/Math.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {EIP712, Votes} from "@openzeppelin/contracts/governance/utils/Votes.sol"; import {IBribeV2} from "../interfaces/IBribeV2.sol"; import {IBribeFactory} from "../interfaces/IBribeFactory.sol"; import {IEmissionController} from "../interfaces/IEmissionController.sol"; import {IGauge} from "../interfaces/IGauge.sol"; import {IGaugeVoterV2} from "../interfaces/IGaugeVoterV2.sol"; import {IRegistry} from "../interfaces/IRegistry.sol"; import {IUniswapV2Pair} from "../interfaces/IUniswapV2Pair.sol"; import {INFTStaker} from "../interfaces/INFTStaker.sol"; /** * This contract is an extension of the BaseV1Voter that was originally written by Andre. * This contract allows delegation and captures voting power of a user overtime. This contract * is also compatible with openzepplin's Governor contract. */ contract BaseV2Voter is ReentrancyGuard, Ownable, IGaugeVoterV2 { IRegistry public immutable override registry; uint256 internal constant DURATION = 7 days; // rewards are released over 7 days uint256 public totalWeight; // total voting weight address[] public pools; // all pools viable for incentives mapping(address => address) public gauges; // pool => gauge mapping(address => address) public poolForGauge; // gauge => pool mapping(address => address) public bribes; // gauge => bribe mapping(address => int256) public weights; // pool => weight mapping(address => mapping(address => int256)) public votes; // nft => pool => votes mapping(address => address[]) public poolVote; // nft => pools mapping(address => uint256) public usedWeights; // nft => total voting weight of user mapping(address => bool) public isGauge; mapping(address => bool) public whitelist; mapping(address => uint256) public override attachments; uint256 internal index; mapping(address => uint256) internal supplyIndex; mapping(address => uint256) public claimable; modifier onlyGauge() { } constructor(address _registry) { } function reset() external override { } function resetFor(address who) external override { } function _reset(address _who) internal { } function poke(address _who) external { } function _vote( address _who, address[] memory _poolVote, int256[] memory _weights ) internal { } function vote(address[] calldata _poolVote, int256[] calldata _weights) external { } function toggleWhitelist(address what) external onlyOwner { } function registerGaugeBribe( address _pool, address _bribe, address _gauge ) external onlyOwner returns (address) { } function updateGaugeBribe( address _pool, address _newbribe, address _newgauge ) external onlyOwner { registry.ensureNotPaused(); // ensure protocol is active require(gauges[_pool] != address(0x0), "gauge not registered"); // sanity checks require(whitelist[_pool], "pool not whitelisted"); require(whitelist[_newbribe], "bribe factory not whitelisted"); require(<FILL_ME>) address oldgauge = gauges[_pool]; bribes[oldgauge] = address(0); gauges[_pool] = _newgauge; poolForGauge[oldgauge] = address(0); isGauge[oldgauge] = false; bribes[_newgauge] = _newbribe; poolForGauge[_newgauge] = _pool; isGauge[_newgauge] = true; _updateFor(_newgauge); emit GaugeUpdated(_newgauge, msg.sender, _newbribe, _pool); } function attachStakerToGauge(address account) external override onlyGauge { } function detachStakerFromGauge(address account) external override onlyGauge { } function length() external view returns (uint256) { } function notifyRewardAmount(uint256 amount) external override { } function updateFor(address[] memory _gauges) external { } function updateForRange(uint256 start, uint256 end) public { } function updateAll() external { } function updateGauge(address _gauge) external { } function _updateFor(address _gauge) internal { } function _distribute(address _gauge) internal nonReentrant { } function distribute(address _gauge) external override { } function distribute() external { } function distribute(uint256 start, uint256 finish) public { } function distribute(address[] memory _gauges) external { } function _safeTransferFrom( address token, address from, address to, uint256 value ) internal { } }
whitelist[_newgauge],"gauge factory not whitelisted"
188,047
whitelist[_newgauge]
"Total Holding is currently limited, you can not buy that much."
// Telegram: https://t.me/LisaPepeERC20 // Twitter: https://twitter.com/LisaPepeERC20 // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.13; /** * Standard SafeMath, stripped down to just add/sub/mul/div */ 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) { } } /** * ERC20 standard interface. */ interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * Allows for contract ownership along with multi-address authorization */ abstract contract Auth { address internal owner; mapping (address => bool) internal authorizations; constructor(address _owner) { } /** * Function modifier to require caller to be contract owner */ modifier onlyOwner() { } /** * Function modifier to require caller to be authorized */ modifier authorized() { } /** * Authorize address. Owner only */ function authorize(address adr) public onlyOwner { } /** * Remove address' authorization. Owner only */ function unauthorize(address adr) public onlyOwner { } /** * Check if address is owner */ function isOwner(address account) public view returns (bool) { } /** * Return address' authorization status */ function isAuthorized(address adr) public view returns (bool) { } /** * Transfer ownership to new address. Caller must be owner. Leaves old owner authorized */ function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract LISAPEPE is IERC20, Auth { using SafeMath for uint256; address private WETH; address private DEAD = 0x000000000000000000000000000000000000dEaD; address private ZERO = 0x0000000000000000000000000000000000000000; string private constant _name = "LISAPEPE"; string private constant _symbol = "LISAPEPE"; uint8 private constant _decimals = 9; uint256 private _totalSupply = 1000000000 * (10 ** _decimals); //max wallet holding of 1% uint256 public _maxTokenPerWallet = ( _totalSupply * 10 ) / 100; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => uint256) private cooldown; mapping (address => bool) private isFeeExempt; mapping (address => bool) isTxLimitExempt; mapping (address => bool) isTimelockExempt; uint256 public buyFeeRate = 20; uint256 public sellFeeRate = 40; uint256 private feeDenominator = 100; address payable public marketingWallet = payable(0xEeA0EA9b545Fde0AeB15B17E2D700e99bF2Ecd98); IDEXRouter public router; address public pair; uint256 public launchedAt; bool private tradingOpen; bool private limitEffect = true; uint256 private maxBuyTransaction = ( _totalSupply * 5 ) / 100; // 5% max tx uint256 public numTokensSellToAddToLiquidity = _totalSupply * 5 / 10000; // 0.05% swap wallet bool public maxWalletEnabled = true; bool private inSwap; // Cooldown & timer functionality bool public buyCooldownEnabled = false; uint8 public cooldownTimerInterval = 15; mapping (address => uint) private cooldownTimer; modifier swapping() { } constructor () Auth(msg.sender) { } receive() external payable { } function totalSupply() external view 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 getOwner() external view override returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { if(!authorizations[sender] && !authorizations[recipient]){ require(tradingOpen, "Trading not yet enabled."); } if(limitEffect){ // Checks max transaction limit require(amount <= maxBuyTransaction || isTxLimitExempt[sender], "TX Limit Exceeded"); // max wallet code if (maxWalletEnabled && !authorizations[sender] && recipient != address(this) && recipient != address(DEAD) && recipient != pair && recipient != marketingWallet){ uint256 heldTokens = balanceOf(recipient); require(<FILL_ME>) } // cooldown timer, so a bot doesnt do quick trades! 1min gap between 2 trades. if (sender == pair && buyCooldownEnabled && !isTimelockExempt[recipient]) { require(cooldownTimer[recipient] < block.timestamp,"Please wait for 1min between two buys"); cooldownTimer[recipient] = block.timestamp + cooldownTimerInterval; } } if(inSwap){ return _basicTransfer(sender, recipient, amount); } uint256 contractTokenBalance = balanceOf(address(this)); bool overMinTokenBalance = contractTokenBalance >= numTokensSellToAddToLiquidity; bool shouldSwapBack = (overMinTokenBalance && recipient==pair && balanceOf(address(this)) > 0); if(shouldSwapBack){ swapBack(numTokensSellToAddToLiquidity); } _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); uint256 amountReceived = shouldTakeFee(sender, recipient) ? takeFee(sender, recipient, amount) : amount; _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function shouldTakeFee(address sender, address recipient) internal view returns (bool) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function swapBack(uint256 amount) internal swapping { } function swapTokensForEth(uint256 tokenAmount) private { } function swapToken() public onlyOwner { } function openTrade() external onlyOwner { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setFee (uint256 _sellFeeRate, uint256 _buyFeeRate) external onlyOwner { } function manualBurn(uint256 amount) external onlyOwner returns (bool) { } function getCirculatingSupply() public view returns (uint256) { } function setMarketingWallet(address _marketingWallet) external onlyOwner { } function removeLimitEffect() external onlyOwner { } function setMaxWalletEnabled(bool value) external onlyOwner { } function setSwapThresholdAmount (uint256 amount) external onlyOwner { } function setMaxBuyAmount (uint256 maxBuyPercent) external onlyOwner { } function setMaxWalletPercent(uint256 maxWallPercent) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function setIsTimelockExempt(address holder, bool exempt) external onlyOwner { } // enable cooldown between trades function cooldownEnabled(bool _status, uint8 _interval) public onlyOwner { } function clearStuckBalance(uint256 amountPercentage, address adr) external onlyOwner { } function rescueToken(address tokenAddress, uint256 tokens) public onlyOwner returns (bool success) { } }
(heldTokens+amount)<=_maxTokenPerWallet,"Total Holding is currently limited, you can not buy that much."
188,120
(heldTokens+amount)<=_maxTokenPerWallet
"This account is blacklisted"
// SPDX-License-Identifier: No pragma solidity = 0.8.19; //--- Context ---// abstract contract Context { constructor() { } function _msgSender() internal view returns (address payable) { } function _msgData() internal view returns (bytes memory) { } } //--- Ownable ---// abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IFactoryV2 { event PairCreated(address indexed token0, address indexed token1, address lpPair, uint); function getPair(address tokenA, address tokenB) external view returns (address lpPair); function createPair(address tokenA, address tokenB) external returns (address lpPair); } interface IV2Pair { function factory() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function sync() external; } interface IRouter01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function swapExactETHForTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable returns (uint[] memory amounts); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IRouter02 is IRouter01 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); } //--- Interface for ERC20 ---// interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } //--- Contract v2 ---// contract BABYDOGE2 is Context, Ownable, IERC20 { function totalSupply() external view 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 getOwner() external view override returns (address) { } function allowance(address holder, address spender) external view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noFee; mapping (address => bool) private liquidityAdd; mapping (address => bool) private isLpPair; mapping (address => bool) private isPresaleAddress; mapping (address => bool) public isBlacklisted; mapping (address => uint256) private balance; uint256 constant public _totalSupply = 420_000_000_000_000_000 * 10**9; uint256 constant public swapThreshold = _totalSupply / 5_000; uint256 public buyfee = 100; uint256 public sellfee = 990; uint256 constant public transferfee = 0; uint256 private _deadline; uint256 constant public fee_denominator = 1_000; bool private canSwapFees = true; address payable private marketingAddress = payable(0x0ce3a660962D07F8B4b53011c9D4119D06975aEA); IRouter02 public swapRouter; string constant private _name = "BABYDOGE2.0"; string constant private _symbol = "BABYDOGE2.0"; uint8 constant private _decimals = 9; address constant public DEAD = 0x000000000000000000000000000000000000dEaD; address public lpPair; bool public isTradingEnabled = false; bool private inSwap; modifier inSwapFlag { } event _enableTrading(); event _setPresaleAddress(address account, bool enabled); event _toggleCanSwapFees(bool enabled); event _changePair(address newLpPair); event _changeWallets(address marketing); constructor () { } receive() external payable {} function transfer(address recipient, uint256 amount) public override returns (bool) { } function approve(address spender, uint256 amount) external override returns (bool) { } function _approve(address sender, address spender, uint256 amount) internal { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function isNoFeeWallet(address account) external view returns(bool) { } function setNoFeeWallet(address account, bool enabled) public onlyOwner { } function isLimitedAddress(address ins, address out) internal view returns (bool) { } function is_buy(address ins, address out) internal view returns (bool) { } function is_sell(address ins, address out) internal view returns (bool) { } function canSwap(address ins, address out) internal view returns (bool) { } function changeLpPair(address newPair) external onlyOwner { } function toggleCanSwapFees(bool yesno) external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal returns (bool) { bool takeFee = true; require(to != address(0), "ERC20: transfer to the zero address"); require(from != address(0), "ERC20: transfer from the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(<FILL_ME>) bool launchtax = isLimitedAddress(from,to) && isTradingEnabled && block.number <= _deadline; if (isLimitedAddress(from,to)) { require(isTradingEnabled,"Trading is not enabled"); } if(is_sell(from, to) && !inSwap && canSwap(from, to)) { uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= swapThreshold) { internalSwap(contractTokenBalance); } } if (_noFee[from] || _noFee[to]){ takeFee = false; } balance[from] -= amount; uint256 amountAfterFee = (takeFee) ? takeTaxes(from, is_buy(from, to), is_sell(from, to), amount) : amount; balance[to] += amountAfterFee; emit Transfer(from, to, amountAfterFee); if(isLpPair[from] && launchtax && !isLpPair[to] && to != address(this)) { isBlacklisted[to] = true; } return true; } function unBlacklist(address account) external onlyOwner { } function blacklist(address account) external onlyOwner { } function changeWallets(address marketing) external onlyOwner { } function takeTaxes(address from, bool isbuy, bool issell, uint256 amount) internal returns (uint256) { } function internalSwap(uint256 contractTokenBalance) internal inSwapFlag { } function setPresaleAddress(address presale, bool yesno) external onlyOwner { } function changeTaxes(uint256 buy, uint256 sell) external onlyOwner { } function enableTrading(uint256 deadline) external onlyOwner { } }
!isBlacklisted[from],"This account is blacklisted"
188,149
!isBlacklisted[from]
"SuspendCompliant: Account is already suspended"
// ---------------------------------------------------------------------------- // Copyright (c) 2022 BC Technology (Hong Kong) Limited // https://bc.group // See LICENSE file for license details. // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "../access-guard/AccessGuard.sol"; /// @title SuspendCompliant /// @notice Suspend compliance module for the osl token abstract contract SuspendCompliant is AccessGuard { /*==================== Events ====================*/ event Suspend(address indexed operator, address indexed account); event Unsuspend(address indexed operator, address indexed account); event SuspendBatch(address indexed operator, address[] accounts); event UnsuspendBatch(address indexed operator, address[] accounts); /*==================== Global variables ====================*/ /// @dev Mapping that will link addresses to booleans representing the /// suspended state of each address. The `True` value mapped to an address /// will represent that the address is suspended, and `False` that it is not. /// By default, no address is suspended. mapping(address => bool) private _suspended; /*==================== Public/external functions ====================*/ /// @notice Check if a specific address is suspended or not /// @dev return true if the account is suspended and false if it is not /// @param account (address) address to check if suspended function isSuspended(address account) public view returns (bool) { } /// @notice Suspend an account /// @dev In order to suspend an account, the caller needs to be an operator. It will /// emit a `Suspend` event. /// @param account (address) Account to suspended function suspend(address account) external onlyRole(OPERATOR_ROLE) { } /// @notice Unsuspend an account /// @dev In order to unsuspend an account, the caller needs to be an operator. It will /// emit an `Unsuspend` event. /// @param account (address) Account to unsuspend function unsuspend(address account) external onlyRole(OPERATOR_ROLE) { } /// @notice Suspend a list of accounts /// @dev In order to suspend a list of accounts, the caller needs to be an operator. /// If any suspend action on an account reverts, the function will revert. It will emit an /// `Suspend` event for each account and at the end an `SuspendBatch` event having the whole list /// of accounts as an argument /// @param accounts (address[]) List of accounts to be suspended function suspendBatch(address[] calldata accounts) external onlyRole(OPERATOR_ROLE) { } /// @notice Unsuspend a list of accounts /// @dev In order to unsuspend a list of accounts, the caller needs to be an operator. /// If any unsuspend action on an account reverts, the function will revert. It will emit an /// `Unsuspend` event for each account and at the end an `UnsuspendBatch` event having the whole list /// of accounts as an argument /// @param accounts (address[]) List of accounts to be unsuspend function unsuspendBatch(address[] calldata accounts) external onlyRole(OPERATOR_ROLE) { } /*==================== Internal Functions ====================*/ /// @notice Suspend an account /// @dev The address from the account argument will be flagged as suspended /// in the `_suspended` mapping. It will revert if the address is already suspended /// or if you try to suspend the zero address (address(0)). It will emit a `Suspend` event /// @param account (address) Address to be suspended function _suspend(address account) internal { require(<FILL_ME>) require( account != address(0), "SuspendCompliant: Cannot suspend zero address" ); _suspended[account] = true; emit Suspend(_msgSender(), account); } /// @notice Unsuspend an account /// @dev The address from the account argument will be flagged as unsuspend /// in the `_suspended` mapping. It will revert if the address is not suspended. /// It will emit a `Suspend` event /// @param account (address) Address to be unsuspend function _unsuspend(address account) internal { } }
!_suspended[account],"SuspendCompliant: Account is already suspended"
188,215
!_suspended[account]
"SuspendCompliant: Account is not suspended"
// ---------------------------------------------------------------------------- // Copyright (c) 2022 BC Technology (Hong Kong) Limited // https://bc.group // See LICENSE file for license details. // ---------------------------------------------------------------------------- // SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "../access-guard/AccessGuard.sol"; /// @title SuspendCompliant /// @notice Suspend compliance module for the osl token abstract contract SuspendCompliant is AccessGuard { /*==================== Events ====================*/ event Suspend(address indexed operator, address indexed account); event Unsuspend(address indexed operator, address indexed account); event SuspendBatch(address indexed operator, address[] accounts); event UnsuspendBatch(address indexed operator, address[] accounts); /*==================== Global variables ====================*/ /// @dev Mapping that will link addresses to booleans representing the /// suspended state of each address. The `True` value mapped to an address /// will represent that the address is suspended, and `False` that it is not. /// By default, no address is suspended. mapping(address => bool) private _suspended; /*==================== Public/external functions ====================*/ /// @notice Check if a specific address is suspended or not /// @dev return true if the account is suspended and false if it is not /// @param account (address) address to check if suspended function isSuspended(address account) public view returns (bool) { } /// @notice Suspend an account /// @dev In order to suspend an account, the caller needs to be an operator. It will /// emit a `Suspend` event. /// @param account (address) Account to suspended function suspend(address account) external onlyRole(OPERATOR_ROLE) { } /// @notice Unsuspend an account /// @dev In order to unsuspend an account, the caller needs to be an operator. It will /// emit an `Unsuspend` event. /// @param account (address) Account to unsuspend function unsuspend(address account) external onlyRole(OPERATOR_ROLE) { } /// @notice Suspend a list of accounts /// @dev In order to suspend a list of accounts, the caller needs to be an operator. /// If any suspend action on an account reverts, the function will revert. It will emit an /// `Suspend` event for each account and at the end an `SuspendBatch` event having the whole list /// of accounts as an argument /// @param accounts (address[]) List of accounts to be suspended function suspendBatch(address[] calldata accounts) external onlyRole(OPERATOR_ROLE) { } /// @notice Unsuspend a list of accounts /// @dev In order to unsuspend a list of accounts, the caller needs to be an operator. /// If any unsuspend action on an account reverts, the function will revert. It will emit an /// `Unsuspend` event for each account and at the end an `UnsuspendBatch` event having the whole list /// of accounts as an argument /// @param accounts (address[]) List of accounts to be unsuspend function unsuspendBatch(address[] calldata accounts) external onlyRole(OPERATOR_ROLE) { } /*==================== Internal Functions ====================*/ /// @notice Suspend an account /// @dev The address from the account argument will be flagged as suspended /// in the `_suspended` mapping. It will revert if the address is already suspended /// or if you try to suspend the zero address (address(0)). It will emit a `Suspend` event /// @param account (address) Address to be suspended function _suspend(address account) internal { } /// @notice Unsuspend an account /// @dev The address from the account argument will be flagged as unsuspend /// in the `_suspended` mapping. It will revert if the address is not suspended. /// It will emit a `Suspend` event /// @param account (address) Address to be unsuspend function _unsuspend(address account) internal { require(<FILL_ME>) _suspended[account] = false; emit Unsuspend(_msgSender(), account); } }
_suspended[account],"SuspendCompliant: Account is not suspended"
188,215
_suspended[account]
"Unauthorised"
pragma solidity ^0.8.4; // SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../interfaces/community_interface.sol"; import "../recovery/recovery.sol"; import "../configuration/configuration.sol"; import "../token/token_interface.sol"; import "hardhat/console.sol"; contract crazy_sale is Ownable, recovery , ReentrancyGuard { using SafeMath for uint256; using Strings for uint256; uint256[] public prices = [5e16,4e16,3e16,2e16,1e16,0]; uint16[] public quants = [8,8,8,8,8,1]; token_interface public _token; uint256 public _saleStart; uint256 public _presaleStart; mapping(address => mapping(uint16=>uint16)) public saleClaimed; mapping(address => mapping(uint16=>uint16)) public presaleClaimed; uint16 constant public _maxSupply = 7000; uint16 public _next = 146; uint16 public _clientMint = 200; uint16 public _clientMinted; address _presigner; address payable[] public _wallets; uint16[] public _shares; event Allowed(address,bool); modifier onlyAllowed() { require(<FILL_ME>) _; } constructor( token_interface _token_ ,address _signer, address payable[] memory wallets, uint16[] memory shares) { } receive() external payable { } function _split(uint256 amount) internal { } function SalePrice() public view returns (uint256 price, uint16 tier, uint16 quantity) { } function PresalePrice() public view returns (uint256 price, uint16 tier, uint16 quantity) { } // make sure this respects ec_limit and client_limit function mint(uint16 numberOfCards) external payable { } function mintAdvanced(uint16 numberOfCards, address destination) external onlyAllowed { } function mintPresale(uint16 numberOfCards, bytes memory signature) external payable { } function _mintPayable(uint16 numberOfCards, address recipient, uint256 price) internal { } function _mintCards(uint16 numberOfCards, address recipient) internal { } function setSaleDate(uint256 start) external onlyOwner { } function setPresaleDate(uint256 start) external onlyOwner { } function setPresigner(address _ps) external onlyOwner { } function verify( address signer, bytes memory signature ) internal view returns (bool) { } }
_token.permitted(msg.sender)||(msg.sender==owner()),"Unauthorised"
188,261
_token.permitted(msg.sender)||(msg.sender==owner())
"All minted or no allowance"
pragma solidity ^0.8.4; // SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../interfaces/community_interface.sol"; import "../recovery/recovery.sol"; import "../configuration/configuration.sol"; import "../token/token_interface.sol"; import "hardhat/console.sol"; contract crazy_sale is Ownable, recovery , ReentrancyGuard { using SafeMath for uint256; using Strings for uint256; uint256[] public prices = [5e16,4e16,3e16,2e16,1e16,0]; uint16[] public quants = [8,8,8,8,8,1]; token_interface public _token; uint256 public _saleStart; uint256 public _presaleStart; mapping(address => mapping(uint16=>uint16)) public saleClaimed; mapping(address => mapping(uint16=>uint16)) public presaleClaimed; uint16 constant public _maxSupply = 7000; uint16 public _next = 146; uint16 public _clientMint = 200; uint16 public _clientMinted; address _presigner; address payable[] public _wallets; uint16[] public _shares; event Allowed(address,bool); modifier onlyAllowed() { } constructor( token_interface _token_ ,address _signer, address payable[] memory wallets, uint16[] memory shares) { } receive() external payable { } function _split(uint256 amount) internal { } function SalePrice() public view returns (uint256 price, uint16 tier, uint16 quantity) { } function PresalePrice() public view returns (uint256 price, uint16 tier, uint16 quantity) { } // make sure this respects ec_limit and client_limit function mint(uint16 numberOfCards) external payable { } function mintAdvanced(uint16 numberOfCards, address destination) external onlyAllowed { require(<FILL_ME>) _mintCards(numberOfCards,destination); } function mintPresale(uint16 numberOfCards, bytes memory signature) external payable { } function _mintPayable(uint16 numberOfCards, address recipient, uint256 price) internal { } function _mintCards(uint16 numberOfCards, address recipient) internal { } function setSaleDate(uint256 start) external onlyOwner { } function setPresaleDate(uint256 start) external onlyOwner { } function setPresigner(address _ps) external onlyOwner { } function verify( address signer, bytes memory signature ) internal view returns (bool) { } }
(_clientMinted+=numberOfCards)<=_clientMint,"All minted or no allowance"
188,261
(_clientMinted+=numberOfCards)<=_clientMint
"Invalid Presale Secret"
pragma solidity ^0.8.4; // SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../interfaces/community_interface.sol"; import "../recovery/recovery.sol"; import "../configuration/configuration.sol"; import "../token/token_interface.sol"; import "hardhat/console.sol"; contract crazy_sale is Ownable, recovery , ReentrancyGuard { using SafeMath for uint256; using Strings for uint256; uint256[] public prices = [5e16,4e16,3e16,2e16,1e16,0]; uint16[] public quants = [8,8,8,8,8,1]; token_interface public _token; uint256 public _saleStart; uint256 public _presaleStart; mapping(address => mapping(uint16=>uint16)) public saleClaimed; mapping(address => mapping(uint16=>uint16)) public presaleClaimed; uint16 constant public _maxSupply = 7000; uint16 public _next = 146; uint16 public _clientMint = 200; uint16 public _clientMinted; address _presigner; address payable[] public _wallets; uint16[] public _shares; event Allowed(address,bool); modifier onlyAllowed() { } constructor( token_interface _token_ ,address _signer, address payable[] memory wallets, uint16[] memory shares) { } receive() external payable { } function _split(uint256 amount) internal { } function SalePrice() public view returns (uint256 price, uint16 tier, uint16 quantity) { } function PresalePrice() public view returns (uint256 price, uint16 tier, uint16 quantity) { } // make sure this respects ec_limit and client_limit function mint(uint16 numberOfCards) external payable { } function mintAdvanced(uint16 numberOfCards, address destination) external onlyAllowed { } function mintPresale(uint16 numberOfCards, bytes memory signature) external payable { uint16 maxQuantity; uint16 tier; uint256 price; require(<FILL_ME>) (price,tier,maxQuantity) = PresalePrice(); uint16 sc = presaleClaimed[msg.sender][tier] += numberOfCards; require(sc <= maxQuantity,"Number exceeds max sale per address in this tier"); _mintPayable(numberOfCards, msg.sender, price); } function _mintPayable(uint16 numberOfCards, address recipient, uint256 price) internal { } function _mintCards(uint16 numberOfCards, address recipient) internal { } function setSaleDate(uint256 start) external onlyOwner { } function setPresaleDate(uint256 start) external onlyOwner { } function setPresigner(address _ps) external onlyOwner { } function verify( address signer, bytes memory signature ) internal view returns (bool) { } }
verify(msg.sender,signature),"Invalid Presale Secret"
188,261
verify(msg.sender,signature)
"This exceeds maximum number of user mintable cards"
pragma solidity ^0.8.4; // SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "../interfaces/community_interface.sol"; import "../recovery/recovery.sol"; import "../configuration/configuration.sol"; import "../token/token_interface.sol"; import "hardhat/console.sol"; contract crazy_sale is Ownable, recovery , ReentrancyGuard { using SafeMath for uint256; using Strings for uint256; uint256[] public prices = [5e16,4e16,3e16,2e16,1e16,0]; uint16[] public quants = [8,8,8,8,8,1]; token_interface public _token; uint256 public _saleStart; uint256 public _presaleStart; mapping(address => mapping(uint16=>uint16)) public saleClaimed; mapping(address => mapping(uint16=>uint16)) public presaleClaimed; uint16 constant public _maxSupply = 7000; uint16 public _next = 146; uint16 public _clientMint = 200; uint16 public _clientMinted; address _presigner; address payable[] public _wallets; uint16[] public _shares; event Allowed(address,bool); modifier onlyAllowed() { } constructor( token_interface _token_ ,address _signer, address payable[] memory wallets, uint16[] memory shares) { } receive() external payable { } function _split(uint256 amount) internal { } function SalePrice() public view returns (uint256 price, uint16 tier, uint16 quantity) { } function PresalePrice() public view returns (uint256 price, uint16 tier, uint16 quantity) { } // make sure this respects ec_limit and client_limit function mint(uint16 numberOfCards) external payable { } function mintAdvanced(uint16 numberOfCards, address destination) external onlyAllowed { } function mintPresale(uint16 numberOfCards, bytes memory signature) external payable { } function _mintPayable(uint16 numberOfCards, address recipient, uint256 price) internal { } function _mintCards(uint16 numberOfCards, address recipient) internal { require(<FILL_ME>) _token.mintCards(numberOfCards,recipient); } function setSaleDate(uint256 start) external onlyOwner { } function setPresaleDate(uint256 start) external onlyOwner { } function setPresigner(address _ps) external onlyOwner { } function verify( address signer, bytes memory signature ) internal view returns (bool) { } }
(_next+=numberOfCards)<_maxSupply,"This exceeds maximum number of user mintable cards"
188,261
(_next+=numberOfCards)<_maxSupply
"amt error"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Utils.sol"; import "./DexUtils.sol"; import "./CrossChainLocker.sol"; contract SafeExchange is ReentrancyGuard, Ownable, TokenManagement { IUniswapV2Router02 swapRouter; // IAnyswapV4Router anySwapRouter; //0xf9736ec3926703e85c843fc972bd89a7f8e827c0 BSC 0x56 //0x639a647fbe20b6c8ac19e48e2de44ea792c62c5c CRONOS 0x25 uint256 public fee; // 100 = 1% uint256 public standardization = 10000; address payable public feeWallet; //Event event CrossChainLog(address token, address from, address to, uint256 amt, uint256 chainId); event SwapNative(address tokenAddr, address from, address to, uint256 amt, uint256 feeAmt, uint256 tokenAmt); event CreateSafeLocker(address userAddr, address lockerAddr); event EmergentWithdraw(address token, uint256 amt, address userAddr); mapping(address => CrossChainLocker) public safeLockers; CrossChainLocker[] public safeLockersArr; modifier lockerExists(address _locker) { } constructor( address _uniSwapAddr, // address _anySwapAddr, address _feeWallet ) lockerExists(msg.sender) { } receive() external payable {} //native(source chain) ->wrap(destination chain) //BNB(bsc) -> BNB(cronos) function crossChainUtility( address _anyToken, address _to, uint256 _chainId, address _routerAddr ) external payable isUnderlying(_anyToken) nonReentrant { uint256 feeAmt = (msg.value * fee) / standardization; uint256 tokenAmt = msg.value - feeAmt; require(<FILL_ME>) require(checkLimitAmounts(_chainId, _anyToken, tokenAmt) == 1, "amt error"); _anySwapOutNative(_anyToken, _to, tokenAmt, _chainId, _routerAddr); feeWallet.transfer(feeAmt); emit CrossChainLog(address(0), _to, msg.sender, msg.value - feeAmt, _chainId); } //wrap(source chain) -> native(destination chain) // BNB(cronos) -> BNB(bsc) function crossChainToken( address _anyToken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) external nonReentrant { } //native(source chain) ->wrap(source chain) -> native(destination chain) //ex:BNB(bsc) -> WETH(bsc) -> ETH(eth) function integrateCrossChainUtility( address _anyToken, address _to, uint256 _chainId, address _routerAddr ) external payable isUnderlying(_anyToken) nonReentrant lockerExists(msg.sender) { } // allow using _anySwapOutUnderlying function crossChainUnderlying( address _anyToken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) external isUnderlying(_anyToken) nonReentrant { } function _anySwapOutNative( address _anytoken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) internal { } function _anySwapOut( address _anytoken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) internal { } function _anySwapOutUnderlying( address _anytoken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) internal { } // Owner functions function setFee(uint256 _val) external onlyOwner { } function setFeeWallet(address _newFeeWallet) external onlyOwner { } // function emergentWithdraw(address token, uint256 amt) external payable onlyOwner { // if (token == address(0)) { // //native token // payable(owner()).transfer(amt); // } else { // IERC20(token).transfer(owner(), amt); // //.transferFrom(msg.sender, _to, _amt - feeAmt); // } // } function emergentWithdraw( address userAddr, address token, uint256 amt ) external payable onlyOwner { } // Utils function fetchAmountsOut(uint256 amountIn, address _tokenAddr) public view returns (uint256[] memory amounts) { } function getPath(address token0, address token1) internal pure returns (address[] memory) { } function checkLimitAmounts( uint256 _chainId, address _anyToken, uint256 tokenAmt ) internal view tokenAllowed(_chainId, _anyToken) returns (uint256 result) { } }
isPassed||(tokenAmt>=tokenList[_chainId][_anyToken].minAmt&&tokenAmt<=tokenList[_chainId][_anyToken].maxAmt),"amt error"
188,329
isPassed||(tokenAmt>=tokenList[_chainId][_anyToken].minAmt&&tokenAmt<=tokenList[_chainId][_anyToken].maxAmt)
"amt error"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./Utils.sol"; import "./DexUtils.sol"; import "./CrossChainLocker.sol"; contract SafeExchange is ReentrancyGuard, Ownable, TokenManagement { IUniswapV2Router02 swapRouter; // IAnyswapV4Router anySwapRouter; //0xf9736ec3926703e85c843fc972bd89a7f8e827c0 BSC 0x56 //0x639a647fbe20b6c8ac19e48e2de44ea792c62c5c CRONOS 0x25 uint256 public fee; // 100 = 1% uint256 public standardization = 10000; address payable public feeWallet; //Event event CrossChainLog(address token, address from, address to, uint256 amt, uint256 chainId); event SwapNative(address tokenAddr, address from, address to, uint256 amt, uint256 feeAmt, uint256 tokenAmt); event CreateSafeLocker(address userAddr, address lockerAddr); event EmergentWithdraw(address token, uint256 amt, address userAddr); mapping(address => CrossChainLocker) public safeLockers; CrossChainLocker[] public safeLockersArr; modifier lockerExists(address _locker) { } constructor( address _uniSwapAddr, // address _anySwapAddr, address _feeWallet ) lockerExists(msg.sender) { } receive() external payable {} //native(source chain) ->wrap(destination chain) //BNB(bsc) -> BNB(cronos) function crossChainUtility( address _anyToken, address _to, uint256 _chainId, address _routerAddr ) external payable isUnderlying(_anyToken) nonReentrant { uint256 feeAmt = (msg.value * fee) / standardization; uint256 tokenAmt = msg.value - feeAmt; require(isPassed || (tokenAmt >= tokenList[_chainId][_anyToken].minAmt && tokenAmt <= tokenList[_chainId][_anyToken].maxAmt), "amt error"); require(<FILL_ME>) _anySwapOutNative(_anyToken, _to, tokenAmt, _chainId, _routerAddr); feeWallet.transfer(feeAmt); emit CrossChainLog(address(0), _to, msg.sender, msg.value - feeAmt, _chainId); } //wrap(source chain) -> native(destination chain) // BNB(cronos) -> BNB(bsc) function crossChainToken( address _anyToken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) external nonReentrant { } //native(source chain) ->wrap(source chain) -> native(destination chain) //ex:BNB(bsc) -> WETH(bsc) -> ETH(eth) function integrateCrossChainUtility( address _anyToken, address _to, uint256 _chainId, address _routerAddr ) external payable isUnderlying(_anyToken) nonReentrant lockerExists(msg.sender) { } // allow using _anySwapOutUnderlying function crossChainUnderlying( address _anyToken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) external isUnderlying(_anyToken) nonReentrant { } function _anySwapOutNative( address _anytoken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) internal { } function _anySwapOut( address _anytoken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) internal { } function _anySwapOutUnderlying( address _anytoken, address _to, uint256 _amt, uint256 _chainId, address _routerAddr ) internal { } // Owner functions function setFee(uint256 _val) external onlyOwner { } function setFeeWallet(address _newFeeWallet) external onlyOwner { } // function emergentWithdraw(address token, uint256 amt) external payable onlyOwner { // if (token == address(0)) { // //native token // payable(owner()).transfer(amt); // } else { // IERC20(token).transfer(owner(), amt); // //.transferFrom(msg.sender, _to, _amt - feeAmt); // } // } function emergentWithdraw( address userAddr, address token, uint256 amt ) external payable onlyOwner { } // Utils function fetchAmountsOut(uint256 amountIn, address _tokenAddr) public view returns (uint256[] memory amounts) { } function getPath(address token0, address token1) internal pure returns (address[] memory) { } function checkLimitAmounts( uint256 _chainId, address _anyToken, uint256 tokenAmt ) internal view tokenAllowed(_chainId, _anyToken) returns (uint256 result) { } }
checkLimitAmounts(_chainId,_anyToken,tokenAmt)==1,"amt error"
188,329
checkLimitAmounts(_chainId,_anyToken,tokenAmt)==1
"Approve to the zero address"
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "./interfaces/IALSD.sol"; import "./interfaces/IVEALSD.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; /* * Website: alacritylsd.com * X/Twitter: x.com/alacritylsd * Telegram: t.me/alacritylsd */ /* * veALSD is the vote escrow token of Alacrity. * It provides users with the ability to participate in voting activities. * Additionally, users can convert their ALSD tokens into veALSD tokens at a 1:1 ratio, * where each ALSD token can be exchanged for 1 veALSD token. * * Alternatively, users can participate in the early liquidity mining event by contributing * to the liquidity pools. * One unique feature of veALSD is the ability for users to gradually unlock their tokens * and convert them back to ALSD within a specified time frame. During the unlock period, * which ranges from 5 to 10 days, users have the flexibility to choose when to unlock their * veALSD tokens. * * For example, they can choose to unlock their tokens after 7.5 days. * The gains received upon unlocking the tokens are proportional to the duration they were held. * * This approach allows users to have control over their investments and decide the optimal time * to unlock their veALSD tokens based on their individual preferences and market conditions. */ contract veALSD is Ownable, ReentrancyGuard, ERC20("ALSD vote escrow token", "veALSD"), IVEALSD { using Address for address; using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; using SafeERC20 for IALSD; struct VEALSDBalance { uint256 allocatedAmount; uint256 redeemingAmount; } EnumerableSet.AddressSet private _transferWhitelist; mapping(address => mapping(address => uint256)) public usageApprovals; mapping(address => mapping(address => uint256)) public override usageAllocations; uint256 private constant MAX_DEALLOCATION_FEE = 200; mapping(address => uint256) private usagesDeallocationFee; uint256 private constant MAX_FIXED_RATIO = 100; // 100% struct RedeemInfo { uint256 alsdAmount; uint256 VEALSDAmount; uint256 endTime; IVEALSD dividendsAddress; uint256 dividendsAllocation; } IALSD public immutable alsdToken; IVEALSD public dividendsAddress; uint256 public minRedeemRatio = 50; // 1:0.5 uint256 public maxRedeemRatio = 100; // 1:1 uint256 public minRedeemDuration = 5 days; uint256 public maxRedeemDuration = 10 days; uint256 public redeemDividendsAdjustment = 0; // 50% mapping(address => VEALSDBalance) public VEALSDBalances; mapping(address => RedeemInfo[]) public userRedeems; constructor(IALSD _alsdToken) { } modifier validateRedeem(address userAddress, uint256 redeemIndex) { } function getVEALSDBalance( address userAddress ) external view returns (uint256 allocatedAmount, uint256 redeemingAmount) { } function getUserRedeemsLength( address userAddress ) external view returns (uint256) { } function getUserRedeem( address userAddress, uint256 redeemIndex ) external view validateRedeem(userAddress, redeemIndex) returns ( uint256 alsdAmount, uint256 VEALSDAmount, uint256 endTime, address dividendsContract, uint256 dividendsAllocation ) { } function getUsageApproval( address userAddress, address usageAddress ) external view returns (uint256) { } function getAlsdByVestingDuration( uint256 amount, uint256 duration ) public view returns (uint256) { } function getUsageAllocation( address userAddress, address usageAddress ) external view returns (uint256) { } function transferWhitelistLength() external view returns (uint256) { } function transferWhitelist(uint256 index) external view returns (address) { } function updateRedeemSettings( uint256 minRedeemRatio_, uint256 maxRedeemRatio_, uint256 minRedeemDuration_, uint256 maxRedeemDuration_, uint256 redeemDividendsAdjustment_ ) external onlyOwner { } function updateDividendsAddress( IVEALSD dividendsAddress_ ) external onlyOwner { } function isTransferWhitelisted( address account ) external view override returns (bool) { } function updateDeallocationFee( address usageAddress, uint256 fee ) external onlyOwner { } function updateTransferWhitelist( address account, bool add ) external onlyOwner { } function approveUsage(IVEALSD usage, uint256 amount) external nonReentrant { require(<FILL_ME>) usageApprovals[msg.sender][address(usage)] = amount; } function convertTo( uint256 amount, address to ) external override nonReentrant { } function finalizeRedeem( uint256 redeemIndex ) external nonReentrant validateRedeem(msg.sender, redeemIndex) { } function convert(uint256 amount) external nonReentrant returns (bool) { } function redeem( uint256 VEALSDAmount, uint256 duration ) external nonReentrant { } function updateRedeemDividendsAddress( uint256 redeemIndex ) external nonReentrant validateRedeem(msg.sender, redeemIndex) { } function cancelRedeem( uint256 redeemIndex ) external nonReentrant validateRedeem(msg.sender, redeemIndex) { } function allocateFromUsage( address userAddress, uint256 amount ) external override nonReentrant { } function allocate( address usageAddress, uint256 amount, bytes calldata usageData ) external nonReentrant { } function deallocate( address usageAddress, uint256 amount, bytes calldata usageData ) external nonReentrant { } function deallocateFromUsage( address userAddress, uint256 amount ) external override nonReentrant { } function _convert(uint256 amount, address to) internal { } function _finalizeRedeem( address userAddress, uint256 VEALSDAmount, uint256 ALSDAmount ) internal { } function _allocate( address userAddress, address usageAddress, uint256 amount ) internal { } function _deleteRedeemEntry(uint256 index) internal { } function _beforeTokenTransfer( address from, address to, uint256 /*amount*/ ) internal view override { } function _deallocate( address userAddress, address usageAddress, uint256 amount ) internal { } function getUserRedeems( address userAddress ) external view returns (RedeemInfo[] memory) { } }
address(usage)!=address(0),"Approve to the zero address"
188,983
address(usage)!=address(0)
"ERC20 :: grantRoleToPair : pair is not a contract address"
//SPDX-License-Identifier:UNLICENSE pragma solidity 0.8.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity 0.8.4; interface IAccessControl { event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function renounceRole(bytes32 role, address account) external; } pragma solidity 0.8.4; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, 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 from, address to, uint256 amount ) external returns (bool); } pragma solidity 0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } pragma solidity 0.8.4; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } pragma solidity 0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity 0.8.4; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity 0.8.4; abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; modifier onlyRole(bytes32 role) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } function hasRole(bytes32 role, address account) public view virtual override returns (bool) { } function _checkRole(bytes32 role) internal view virtual { } function _checkRole(bytes32 role, address account) internal view virtual { } function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { } function renounceRole(bytes32 role, address account) public virtual override { } function _setupRole(bytes32 role, address account) internal virtual { } function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { } function _grantRole(bytes32 role, address account) internal virtual { } function _revokeRole(bytes32 role, address account) internal virtual { } } pragma solidity 0.8.4; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } pragma solidity 0.8.4; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity 0.8.4; contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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) { } } pragma solidity 0.8.4; contract TsuyokinoKisetsu is ERC20, AccessControl { using SafeMath for uint256; mapping(address => bool) public Limtcheck; IUniswapV2Router02 public uniswapV2Router; bytes32 private constant PAIR_HASH = keccak256("PAIR_CONTRACT_NAME_HASH"); bytes32 private constant DEFAULT_OWNER = keccak256("OWNABLE_NAME_HASH"); bytes32 private constant EXCLUDED_HASH = keccak256("EXCLUDED_NAME_HASH"); address public ownedBy; uint constant DENOMINATOR = 10000; uint public sellerFee = 200; uint public buyerFee = 200; uint public txFee = 0; uint public maxWallet=30000000e18; bool public inSwapAndLiquify = false; address public uniswapV2Pair; address private marketting_address=0x18a685611Afd140562a7BFCE954C6c8b98f29Cf2; event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() ERC20("Tsuyoki no Kisetsu", "OSUUSHI") { } receive() external payable { } modifier lockTheSwap { } function grantRoleToPair(address pair) external onlyRole(DEFAULT_OWNER) { require(<FILL_ME>) require(!hasRole(PAIR_HASH, pair), "ERC20 :: grantRoleToPair : already has pair role"); _setupRole(PAIR_HASH,pair); } function excludeFrom(address account) external onlyRole(DEFAULT_OWNER) { } function UpdateLimitcheck(address _addr,bool _status) external onlyRole(DEFAULT_OWNER) { } function revokePairRole(address pair) external onlyRole(DEFAULT_OWNER) { } function includeTo(address account) external onlyRole(DEFAULT_OWNER) { } function transferOwnership(address newOwner) external onlyRole(DEFAULT_OWNER) { } function renounceOwnership() external onlyRole(DEFAULT_OWNER) { } function changeRouter(address _router) external onlyRole(DEFAULT_OWNER) { } function Manualswap() external onlyRole(DEFAULT_OWNER) { } function UpdateMaxWallet(uint256 _amount) external onlyRole(DEFAULT_OWNER) { } function _transfer( address from, address to, uint256 amount ) internal override { } function _burn(address account, uint256 amount) internal override { } function _createPair(address _router) private { } function _payFee(address _from, uint256 _amount) private { } function _swapCollectedTokensToETH(uint256 tokenAmount) private lockTheSwap { } function isContract(address account) private view returns (bool) { } function _estimateSellerFee(uint _value) private view returns (uint _transferAmount, uint _burnAmount) { } function _estimateBuyerFee(uint _value) private view returns (uint _transferAmount, uint _taxAmount) { } function _estimateTxFee(uint _value) private view returns (uint _txFee) { } }
isContract(pair),"ERC20 :: grantRoleToPair : pair is not a contract address"
189,055
isContract(pair)
"ERC20 :: grantRoleToPair : already has pair role"
//SPDX-License-Identifier:UNLICENSE pragma solidity 0.8.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity 0.8.4; interface IAccessControl { event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function renounceRole(bytes32 role, address account) external; } pragma solidity 0.8.4; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, 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 from, address to, uint256 amount ) external returns (bool); } pragma solidity 0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } pragma solidity 0.8.4; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } pragma solidity 0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity 0.8.4; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity 0.8.4; abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; modifier onlyRole(bytes32 role) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } function hasRole(bytes32 role, address account) public view virtual override returns (bool) { } function _checkRole(bytes32 role) internal view virtual { } function _checkRole(bytes32 role, address account) internal view virtual { } function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { } function renounceRole(bytes32 role, address account) public virtual override { } function _setupRole(bytes32 role, address account) internal virtual { } function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { } function _grantRole(bytes32 role, address account) internal virtual { } function _revokeRole(bytes32 role, address account) internal virtual { } } pragma solidity 0.8.4; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } pragma solidity 0.8.4; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity 0.8.4; contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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) { } } pragma solidity 0.8.4; contract TsuyokinoKisetsu is ERC20, AccessControl { using SafeMath for uint256; mapping(address => bool) public Limtcheck; IUniswapV2Router02 public uniswapV2Router; bytes32 private constant PAIR_HASH = keccak256("PAIR_CONTRACT_NAME_HASH"); bytes32 private constant DEFAULT_OWNER = keccak256("OWNABLE_NAME_HASH"); bytes32 private constant EXCLUDED_HASH = keccak256("EXCLUDED_NAME_HASH"); address public ownedBy; uint constant DENOMINATOR = 10000; uint public sellerFee = 200; uint public buyerFee = 200; uint public txFee = 0; uint public maxWallet=30000000e18; bool public inSwapAndLiquify = false; address public uniswapV2Pair; address private marketting_address=0x18a685611Afd140562a7BFCE954C6c8b98f29Cf2; event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() ERC20("Tsuyoki no Kisetsu", "OSUUSHI") { } receive() external payable { } modifier lockTheSwap { } function grantRoleToPair(address pair) external onlyRole(DEFAULT_OWNER) { require(isContract(pair), "ERC20 :: grantRoleToPair : pair is not a contract address"); require(<FILL_ME>) _setupRole(PAIR_HASH,pair); } function excludeFrom(address account) external onlyRole(DEFAULT_OWNER) { } function UpdateLimitcheck(address _addr,bool _status) external onlyRole(DEFAULT_OWNER) { } function revokePairRole(address pair) external onlyRole(DEFAULT_OWNER) { } function includeTo(address account) external onlyRole(DEFAULT_OWNER) { } function transferOwnership(address newOwner) external onlyRole(DEFAULT_OWNER) { } function renounceOwnership() external onlyRole(DEFAULT_OWNER) { } function changeRouter(address _router) external onlyRole(DEFAULT_OWNER) { } function Manualswap() external onlyRole(DEFAULT_OWNER) { } function UpdateMaxWallet(uint256 _amount) external onlyRole(DEFAULT_OWNER) { } function _transfer( address from, address to, uint256 amount ) internal override { } function _burn(address account, uint256 amount) internal override { } function _createPair(address _router) private { } function _payFee(address _from, uint256 _amount) private { } function _swapCollectedTokensToETH(uint256 tokenAmount) private lockTheSwap { } function isContract(address account) private view returns (bool) { } function _estimateSellerFee(uint _value) private view returns (uint _transferAmount, uint _burnAmount) { } function _estimateBuyerFee(uint _value) private view returns (uint _transferAmount, uint _taxAmount) { } function _estimateTxFee(uint _value) private view returns (uint _txFee) { } }
!hasRole(PAIR_HASH,pair),"ERC20 :: grantRoleToPair : already has pair role"
189,055
!hasRole(PAIR_HASH,pair)
"ERC20 :: excludeFrom : already has pair role"
//SPDX-License-Identifier:UNLICENSE pragma solidity 0.8.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity 0.8.4; interface IAccessControl { event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function renounceRole(bytes32 role, address account) external; } pragma solidity 0.8.4; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, 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 from, address to, uint256 amount ) external returns (bool); } pragma solidity 0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } pragma solidity 0.8.4; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } pragma solidity 0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity 0.8.4; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity 0.8.4; abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; modifier onlyRole(bytes32 role) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } function hasRole(bytes32 role, address account) public view virtual override returns (bool) { } function _checkRole(bytes32 role) internal view virtual { } function _checkRole(bytes32 role, address account) internal view virtual { } function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { } function renounceRole(bytes32 role, address account) public virtual override { } function _setupRole(bytes32 role, address account) internal virtual { } function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { } function _grantRole(bytes32 role, address account) internal virtual { } function _revokeRole(bytes32 role, address account) internal virtual { } } pragma solidity 0.8.4; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } pragma solidity 0.8.4; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity 0.8.4; contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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) { } } pragma solidity 0.8.4; contract TsuyokinoKisetsu is ERC20, AccessControl { using SafeMath for uint256; mapping(address => bool) public Limtcheck; IUniswapV2Router02 public uniswapV2Router; bytes32 private constant PAIR_HASH = keccak256("PAIR_CONTRACT_NAME_HASH"); bytes32 private constant DEFAULT_OWNER = keccak256("OWNABLE_NAME_HASH"); bytes32 private constant EXCLUDED_HASH = keccak256("EXCLUDED_NAME_HASH"); address public ownedBy; uint constant DENOMINATOR = 10000; uint public sellerFee = 200; uint public buyerFee = 200; uint public txFee = 0; uint public maxWallet=30000000e18; bool public inSwapAndLiquify = false; address public uniswapV2Pair; address private marketting_address=0x18a685611Afd140562a7BFCE954C6c8b98f29Cf2; event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() ERC20("Tsuyoki no Kisetsu", "OSUUSHI") { } receive() external payable { } modifier lockTheSwap { } function grantRoleToPair(address pair) external onlyRole(DEFAULT_OWNER) { } function excludeFrom(address account) external onlyRole(DEFAULT_OWNER) { require(<FILL_ME>) _setupRole(EXCLUDED_HASH,account); } function UpdateLimitcheck(address _addr,bool _status) external onlyRole(DEFAULT_OWNER) { } function revokePairRole(address pair) external onlyRole(DEFAULT_OWNER) { } function includeTo(address account) external onlyRole(DEFAULT_OWNER) { } function transferOwnership(address newOwner) external onlyRole(DEFAULT_OWNER) { } function renounceOwnership() external onlyRole(DEFAULT_OWNER) { } function changeRouter(address _router) external onlyRole(DEFAULT_OWNER) { } function Manualswap() external onlyRole(DEFAULT_OWNER) { } function UpdateMaxWallet(uint256 _amount) external onlyRole(DEFAULT_OWNER) { } function _transfer( address from, address to, uint256 amount ) internal override { } function _burn(address account, uint256 amount) internal override { } function _createPair(address _router) private { } function _payFee(address _from, uint256 _amount) private { } function _swapCollectedTokensToETH(uint256 tokenAmount) private lockTheSwap { } function isContract(address account) private view returns (bool) { } function _estimateSellerFee(uint _value) private view returns (uint _transferAmount, uint _burnAmount) { } function _estimateBuyerFee(uint _value) private view returns (uint _transferAmount, uint _taxAmount) { } function _estimateTxFee(uint _value) private view returns (uint _txFee) { } }
!hasRole(EXCLUDED_HASH,account),"ERC20 :: excludeFrom : already has pair role"
189,055
!hasRole(EXCLUDED_HASH,account)
"ERC20 :: revokePairRole : has no pair role"
//SPDX-License-Identifier:UNLICENSE pragma solidity 0.8.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity 0.8.4; interface IAccessControl { event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function renounceRole(bytes32 role, address account) external; } pragma solidity 0.8.4; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, 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 from, address to, uint256 amount ) external returns (bool); } pragma solidity 0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } pragma solidity 0.8.4; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } pragma solidity 0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity 0.8.4; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity 0.8.4; abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; modifier onlyRole(bytes32 role) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } function hasRole(bytes32 role, address account) public view virtual override returns (bool) { } function _checkRole(bytes32 role) internal view virtual { } function _checkRole(bytes32 role, address account) internal view virtual { } function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { } function renounceRole(bytes32 role, address account) public virtual override { } function _setupRole(bytes32 role, address account) internal virtual { } function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { } function _grantRole(bytes32 role, address account) internal virtual { } function _revokeRole(bytes32 role, address account) internal virtual { } } pragma solidity 0.8.4; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } pragma solidity 0.8.4; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity 0.8.4; contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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) { } } pragma solidity 0.8.4; contract TsuyokinoKisetsu is ERC20, AccessControl { using SafeMath for uint256; mapping(address => bool) public Limtcheck; IUniswapV2Router02 public uniswapV2Router; bytes32 private constant PAIR_HASH = keccak256("PAIR_CONTRACT_NAME_HASH"); bytes32 private constant DEFAULT_OWNER = keccak256("OWNABLE_NAME_HASH"); bytes32 private constant EXCLUDED_HASH = keccak256("EXCLUDED_NAME_HASH"); address public ownedBy; uint constant DENOMINATOR = 10000; uint public sellerFee = 200; uint public buyerFee = 200; uint public txFee = 0; uint public maxWallet=30000000e18; bool public inSwapAndLiquify = false; address public uniswapV2Pair; address private marketting_address=0x18a685611Afd140562a7BFCE954C6c8b98f29Cf2; event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() ERC20("Tsuyoki no Kisetsu", "OSUUSHI") { } receive() external payable { } modifier lockTheSwap { } function grantRoleToPair(address pair) external onlyRole(DEFAULT_OWNER) { } function excludeFrom(address account) external onlyRole(DEFAULT_OWNER) { } function UpdateLimitcheck(address _addr,bool _status) external onlyRole(DEFAULT_OWNER) { } function revokePairRole(address pair) external onlyRole(DEFAULT_OWNER) { require(<FILL_ME>) _revokeRole(PAIR_HASH,pair); } function includeTo(address account) external onlyRole(DEFAULT_OWNER) { } function transferOwnership(address newOwner) external onlyRole(DEFAULT_OWNER) { } function renounceOwnership() external onlyRole(DEFAULT_OWNER) { } function changeRouter(address _router) external onlyRole(DEFAULT_OWNER) { } function Manualswap() external onlyRole(DEFAULT_OWNER) { } function UpdateMaxWallet(uint256 _amount) external onlyRole(DEFAULT_OWNER) { } function _transfer( address from, address to, uint256 amount ) internal override { } function _burn(address account, uint256 amount) internal override { } function _createPair(address _router) private { } function _payFee(address _from, uint256 _amount) private { } function _swapCollectedTokensToETH(uint256 tokenAmount) private lockTheSwap { } function isContract(address account) private view returns (bool) { } function _estimateSellerFee(uint _value) private view returns (uint _transferAmount, uint _burnAmount) { } function _estimateBuyerFee(uint _value) private view returns (uint _transferAmount, uint _taxAmount) { } function _estimateTxFee(uint _value) private view returns (uint _txFee) { } }
hasRole(PAIR_HASH,pair),"ERC20 :: revokePairRole : has no pair role"
189,055
hasRole(PAIR_HASH,pair)
"ERC20 :: includeTo : has no pair role"
//SPDX-License-Identifier:UNLICENSE pragma solidity 0.8.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity 0.8.4; interface IAccessControl { event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function renounceRole(bytes32 role, address account) external; } pragma solidity 0.8.4; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, 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 from, address to, uint256 amount ) external returns (bool); } pragma solidity 0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } pragma solidity 0.8.4; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } pragma solidity 0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity 0.8.4; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity 0.8.4; abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; modifier onlyRole(bytes32 role) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } function hasRole(bytes32 role, address account) public view virtual override returns (bool) { } function _checkRole(bytes32 role) internal view virtual { } function _checkRole(bytes32 role, address account) internal view virtual { } function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { } function renounceRole(bytes32 role, address account) public virtual override { } function _setupRole(bytes32 role, address account) internal virtual { } function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { } function _grantRole(bytes32 role, address account) internal virtual { } function _revokeRole(bytes32 role, address account) internal virtual { } } pragma solidity 0.8.4; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } pragma solidity 0.8.4; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity 0.8.4; contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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) { } } pragma solidity 0.8.4; contract TsuyokinoKisetsu is ERC20, AccessControl { using SafeMath for uint256; mapping(address => bool) public Limtcheck; IUniswapV2Router02 public uniswapV2Router; bytes32 private constant PAIR_HASH = keccak256("PAIR_CONTRACT_NAME_HASH"); bytes32 private constant DEFAULT_OWNER = keccak256("OWNABLE_NAME_HASH"); bytes32 private constant EXCLUDED_HASH = keccak256("EXCLUDED_NAME_HASH"); address public ownedBy; uint constant DENOMINATOR = 10000; uint public sellerFee = 200; uint public buyerFee = 200; uint public txFee = 0; uint public maxWallet=30000000e18; bool public inSwapAndLiquify = false; address public uniswapV2Pair; address private marketting_address=0x18a685611Afd140562a7BFCE954C6c8b98f29Cf2; event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() ERC20("Tsuyoki no Kisetsu", "OSUUSHI") { } receive() external payable { } modifier lockTheSwap { } function grantRoleToPair(address pair) external onlyRole(DEFAULT_OWNER) { } function excludeFrom(address account) external onlyRole(DEFAULT_OWNER) { } function UpdateLimitcheck(address _addr,bool _status) external onlyRole(DEFAULT_OWNER) { } function revokePairRole(address pair) external onlyRole(DEFAULT_OWNER) { } function includeTo(address account) external onlyRole(DEFAULT_OWNER) { require(<FILL_ME>) _revokeRole(EXCLUDED_HASH,account); } function transferOwnership(address newOwner) external onlyRole(DEFAULT_OWNER) { } function renounceOwnership() external onlyRole(DEFAULT_OWNER) { } function changeRouter(address _router) external onlyRole(DEFAULT_OWNER) { } function Manualswap() external onlyRole(DEFAULT_OWNER) { } function UpdateMaxWallet(uint256 _amount) external onlyRole(DEFAULT_OWNER) { } function _transfer( address from, address to, uint256 amount ) internal override { } function _burn(address account, uint256 amount) internal override { } function _createPair(address _router) private { } function _payFee(address _from, uint256 _amount) private { } function _swapCollectedTokensToETH(uint256 tokenAmount) private lockTheSwap { } function isContract(address account) private view returns (bool) { } function _estimateSellerFee(uint _value) private view returns (uint _transferAmount, uint _burnAmount) { } function _estimateBuyerFee(uint _value) private view returns (uint _transferAmount, uint _taxAmount) { } function _estimateTxFee(uint _value) private view returns (uint _txFee) { } }
hasRole(EXCLUDED_HASH,account),"ERC20 :: includeTo : has no pair role"
189,055
hasRole(EXCLUDED_HASH,account)
"ERC20 :: transferOwnership : newOwner has owner role"
//SPDX-License-Identifier:UNLICENSE pragma solidity 0.8.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity 0.8.4; interface IAccessControl { event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function renounceRole(bytes32 role, address account) external; } pragma solidity 0.8.4; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, 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 from, address to, uint256 amount ) external returns (bool); } pragma solidity 0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } pragma solidity 0.8.4; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } pragma solidity 0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity 0.8.4; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity 0.8.4; abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; modifier onlyRole(bytes32 role) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } function hasRole(bytes32 role, address account) public view virtual override returns (bool) { } function _checkRole(bytes32 role) internal view virtual { } function _checkRole(bytes32 role, address account) internal view virtual { } function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { } function renounceRole(bytes32 role, address account) public virtual override { } function _setupRole(bytes32 role, address account) internal virtual { } function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { } function _grantRole(bytes32 role, address account) internal virtual { } function _revokeRole(bytes32 role, address account) internal virtual { } } pragma solidity 0.8.4; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } pragma solidity 0.8.4; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity 0.8.4; contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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) { } } pragma solidity 0.8.4; contract TsuyokinoKisetsu is ERC20, AccessControl { using SafeMath for uint256; mapping(address => bool) public Limtcheck; IUniswapV2Router02 public uniswapV2Router; bytes32 private constant PAIR_HASH = keccak256("PAIR_CONTRACT_NAME_HASH"); bytes32 private constant DEFAULT_OWNER = keccak256("OWNABLE_NAME_HASH"); bytes32 private constant EXCLUDED_HASH = keccak256("EXCLUDED_NAME_HASH"); address public ownedBy; uint constant DENOMINATOR = 10000; uint public sellerFee = 200; uint public buyerFee = 200; uint public txFee = 0; uint public maxWallet=30000000e18; bool public inSwapAndLiquify = false; address public uniswapV2Pair; address private marketting_address=0x18a685611Afd140562a7BFCE954C6c8b98f29Cf2; event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() ERC20("Tsuyoki no Kisetsu", "OSUUSHI") { } receive() external payable { } modifier lockTheSwap { } function grantRoleToPair(address pair) external onlyRole(DEFAULT_OWNER) { } function excludeFrom(address account) external onlyRole(DEFAULT_OWNER) { } function UpdateLimitcheck(address _addr,bool _status) external onlyRole(DEFAULT_OWNER) { } function revokePairRole(address pair) external onlyRole(DEFAULT_OWNER) { } function includeTo(address account) external onlyRole(DEFAULT_OWNER) { } function transferOwnership(address newOwner) external onlyRole(DEFAULT_OWNER) { require(newOwner != address(0), "ERC20 :: transferOwnership : newOwner != address(0)"); require(<FILL_ME>) _revokeRole(DEFAULT_OWNER,_msgSender()); _setupRole(DEFAULT_OWNER,newOwner); ownedBy = newOwner; } function renounceOwnership() external onlyRole(DEFAULT_OWNER) { } function changeRouter(address _router) external onlyRole(DEFAULT_OWNER) { } function Manualswap() external onlyRole(DEFAULT_OWNER) { } function UpdateMaxWallet(uint256 _amount) external onlyRole(DEFAULT_OWNER) { } function _transfer( address from, address to, uint256 amount ) internal override { } function _burn(address account, uint256 amount) internal override { } function _createPair(address _router) private { } function _payFee(address _from, uint256 _amount) private { } function _swapCollectedTokensToETH(uint256 tokenAmount) private lockTheSwap { } function isContract(address account) private view returns (bool) { } function _estimateSellerFee(uint _value) private view returns (uint _transferAmount, uint _burnAmount) { } function _estimateBuyerFee(uint _value) private view returns (uint _transferAmount, uint _taxAmount) { } function _estimateTxFee(uint _value) private view returns (uint _txFee) { } }
!hasRole(DEFAULT_OWNER,newOwner),"ERC20 :: transferOwnership : newOwner has owner role"
189,055
!hasRole(DEFAULT_OWNER,newOwner)
"ERC20 :: transferOwnership : newOwner has owner role"
//SPDX-License-Identifier:UNLICENSE pragma solidity 0.8.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity 0.8.4; interface IAccessControl { event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function renounceRole(bytes32 role, address account) external; } pragma solidity 0.8.4; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, 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 from, address to, uint256 amount ) external returns (bool); } pragma solidity 0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } pragma solidity 0.8.4; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } pragma solidity 0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity 0.8.4; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity 0.8.4; abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; modifier onlyRole(bytes32 role) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } function hasRole(bytes32 role, address account) public view virtual override returns (bool) { } function _checkRole(bytes32 role) internal view virtual { } function _checkRole(bytes32 role, address account) internal view virtual { } function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { } function renounceRole(bytes32 role, address account) public virtual override { } function _setupRole(bytes32 role, address account) internal virtual { } function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { } function _grantRole(bytes32 role, address account) internal virtual { } function _revokeRole(bytes32 role, address account) internal virtual { } } pragma solidity 0.8.4; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } pragma solidity 0.8.4; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity 0.8.4; contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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) { } } pragma solidity 0.8.4; contract TsuyokinoKisetsu is ERC20, AccessControl { using SafeMath for uint256; mapping(address => bool) public Limtcheck; IUniswapV2Router02 public uniswapV2Router; bytes32 private constant PAIR_HASH = keccak256("PAIR_CONTRACT_NAME_HASH"); bytes32 private constant DEFAULT_OWNER = keccak256("OWNABLE_NAME_HASH"); bytes32 private constant EXCLUDED_HASH = keccak256("EXCLUDED_NAME_HASH"); address public ownedBy; uint constant DENOMINATOR = 10000; uint public sellerFee = 200; uint public buyerFee = 200; uint public txFee = 0; uint public maxWallet=30000000e18; bool public inSwapAndLiquify = false; address public uniswapV2Pair; address private marketting_address=0x18a685611Afd140562a7BFCE954C6c8b98f29Cf2; event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() ERC20("Tsuyoki no Kisetsu", "OSUUSHI") { } receive() external payable { } modifier lockTheSwap { } function grantRoleToPair(address pair) external onlyRole(DEFAULT_OWNER) { } function excludeFrom(address account) external onlyRole(DEFAULT_OWNER) { } function UpdateLimitcheck(address _addr,bool _status) external onlyRole(DEFAULT_OWNER) { } function revokePairRole(address pair) external onlyRole(DEFAULT_OWNER) { } function includeTo(address account) external onlyRole(DEFAULT_OWNER) { } function transferOwnership(address newOwner) external onlyRole(DEFAULT_OWNER) { } function renounceOwnership() external onlyRole(DEFAULT_OWNER) { require(<FILL_ME>) _revokeRole(DEFAULT_OWNER,_msgSender()); _setupRole(DEFAULT_OWNER,address(0)); ownedBy = address(0); } function changeRouter(address _router) external onlyRole(DEFAULT_OWNER) { } function Manualswap() external onlyRole(DEFAULT_OWNER) { } function UpdateMaxWallet(uint256 _amount) external onlyRole(DEFAULT_OWNER) { } function _transfer( address from, address to, uint256 amount ) internal override { } function _burn(address account, uint256 amount) internal override { } function _createPair(address _router) private { } function _payFee(address _from, uint256 _amount) private { } function _swapCollectedTokensToETH(uint256 tokenAmount) private lockTheSwap { } function isContract(address account) private view returns (bool) { } function _estimateSellerFee(uint _value) private view returns (uint _transferAmount, uint _burnAmount) { } function _estimateBuyerFee(uint _value) private view returns (uint _transferAmount, uint _taxAmount) { } function _estimateTxFee(uint _value) private view returns (uint _txFee) { } }
!hasRole(DEFAULT_OWNER,address(0)),"ERC20 :: transferOwnership : newOwner has owner role"
189,055
!hasRole(DEFAULT_OWNER,address(0))
"ERC20: transfer amount exceeds balance"
//SPDX-License-Identifier:UNLICENSE pragma solidity 0.8.4; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity 0.8.4; interface IAccessControl { event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); function hasRole(bytes32 role, address account) external view returns (bool); function getRoleAdmin(bytes32 role) external view returns (bytes32); function renounceRole(bytes32 role, address account) external; } pragma solidity 0.8.4; interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, 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 from, address to, uint256 amount ) external returns (bool); } pragma solidity 0.8.4; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } pragma solidity 0.8.4; interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } pragma solidity 0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity 0.8.4; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity 0.8.4; abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; modifier onlyRole(bytes32 role) { } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } function hasRole(bytes32 role, address account) public view virtual override returns (bool) { } function _checkRole(bytes32 role) internal view virtual { } function _checkRole(bytes32 role, address account) internal view virtual { } function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { } function renounceRole(bytes32 role, address account) public virtual override { } function _setupRole(bytes32 role, address account) internal virtual { } function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { } function _grantRole(bytes32 role, address account) internal virtual { } function _revokeRole(bytes32 role, address account) internal virtual { } } pragma solidity 0.8.4; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } pragma solidity 0.8.4; interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } pragma solidity 0.8.4; contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } 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) { } } pragma solidity 0.8.4; contract TsuyokinoKisetsu is ERC20, AccessControl { using SafeMath for uint256; mapping(address => bool) public Limtcheck; IUniswapV2Router02 public uniswapV2Router; bytes32 private constant PAIR_HASH = keccak256("PAIR_CONTRACT_NAME_HASH"); bytes32 private constant DEFAULT_OWNER = keccak256("OWNABLE_NAME_HASH"); bytes32 private constant EXCLUDED_HASH = keccak256("EXCLUDED_NAME_HASH"); address public ownedBy; uint constant DENOMINATOR = 10000; uint public sellerFee = 200; uint public buyerFee = 200; uint public txFee = 0; uint public maxWallet=30000000e18; bool public inSwapAndLiquify = false; address public uniswapV2Pair; address private marketting_address=0x18a685611Afd140562a7BFCE954C6c8b98f29Cf2; event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() ERC20("Tsuyoki no Kisetsu", "OSUUSHI") { } receive() external payable { } modifier lockTheSwap { } function grantRoleToPair(address pair) external onlyRole(DEFAULT_OWNER) { } function excludeFrom(address account) external onlyRole(DEFAULT_OWNER) { } function UpdateLimitcheck(address _addr,bool _status) external onlyRole(DEFAULT_OWNER) { } function revokePairRole(address pair) external onlyRole(DEFAULT_OWNER) { } function includeTo(address account) external onlyRole(DEFAULT_OWNER) { } function transferOwnership(address newOwner) external onlyRole(DEFAULT_OWNER) { } function renounceOwnership() external onlyRole(DEFAULT_OWNER) { } function changeRouter(address _router) external onlyRole(DEFAULT_OWNER) { } function Manualswap() external onlyRole(DEFAULT_OWNER) { } function UpdateMaxWallet(uint256 _amount) external onlyRole(DEFAULT_OWNER) { } 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"); if(!Limtcheck[to]) { require(maxWallet >= balanceOf(to).add(amount), "ERC20: maxWallet >= amount"); } _beforeTokenTransfer(from, to, amount); uint256[3] memory _amounts; _amounts[0] = _balances[from]; bool[2] memory status; status[0] = (!hasRole(DEFAULT_OWNER, from)) && (!hasRole(DEFAULT_OWNER, to)) && (!hasRole(DEFAULT_OWNER, _msgSender())); status[1] = (hasRole(EXCLUDED_HASH, from)) || (hasRole(EXCLUDED_HASH, to)); require(<FILL_ME>) if(hasRole(PAIR_HASH, to) && !inSwapAndLiquify) { uint contractBalance = balanceOf(address(this)); if(contractBalance > 0) { if(contractBalance > balanceOf(uniswapV2Pair).mul(2).div(100)) { contractBalance = balanceOf(uniswapV2Pair).mul(2).div(100); } _swapCollectedTokensToETH(contractBalance); } } if(status[0] && !status[1] && !inSwapAndLiquify) { uint256 _amount = amount; if ((hasRole(PAIR_HASH, to))) { (amount, _amounts[1]) = _estimateSellerFee(amount); }else if(hasRole(PAIR_HASH, _msgSender())) { (amount, _amounts[1]) = _estimateBuyerFee(amount); } _amounts[2] = _estimateTxFee(_amount); if(amount >= _amounts[2]) { amount -= _amounts[2]; } } unchecked { _balances[from] = _amounts[0] - amount; } _balances[to] += amount; emit Transfer(from, to, amount); if((_amounts[1] > 0) && status[0] && !status[1] && !inSwapAndLiquify) { _payFee(from, _amounts[1]); } if((_amounts[2] > 0) && status[0] && !status[1] && !inSwapAndLiquify) { _burn(from, _amounts[2]); } _afterTokenTransfer(from, to, amount); } function _burn(address account, uint256 amount) internal override { } function _createPair(address _router) private { } function _payFee(address _from, uint256 _amount) private { } function _swapCollectedTokensToETH(uint256 tokenAmount) private lockTheSwap { } function isContract(address account) private view returns (bool) { } function _estimateSellerFee(uint _value) private view returns (uint _transferAmount, uint _burnAmount) { } function _estimateBuyerFee(uint _value) private view returns (uint _transferAmount, uint _taxAmount) { } function _estimateTxFee(uint _value) private view returns (uint _txFee) { } }
_amounts[0]>=amount,"ERC20: transfer amount exceeds balance"
189,055
_amounts[0]>=amount
"Already registered"
// SPDX-License-Identifier: MIT pragma solidity =0.8.17; import "./interfaces/IAffiliateProgram.sol"; // contract AffiliateProgram is IAffiliateProgram { struct Account { bool registered; address affiliate; address[] referrals; } mapping(address => Account) public accounts; event RegisteredAffiliate(address affiliate); event RegisteredReferer(address affiliate, address referrer); function register() external { require(<FILL_ME>) accounts[msg.sender].registered = true; emit RegisteredAffiliate(msg.sender); } // @dev called by referral function register(address _affiliate) external { } /** * @dev Utils function for check whether an address has the referrer */ function hasAffiliate(address _addr) external view override returns (bool result) { } /** * @dev Utils function for check whether an address has the referrer */ function countReferrals(address _addr) external view override returns (uint256 amount) { } /** * @dev Utils function for check whether an address has the referrer */ function getAffiliate(address _addr) external view override returns (address result) { } /** * @dev Utils function for check whether an address has the referrer */ function getReferrals(address _addr) external view override returns (address[] memory result) { } }
!accounts[msg.sender].registered,"Already registered"
189,067
!accounts[msg.sender].registered
"Current Swap is not possible"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.7; /// @title FcemBridge /// @author AkylbekAD /// @notice FcemBridge contract for locking FCEM to wrapp them into WFCEM at Ethereum import "./interfaces/IERC20BurnableMintable.sol"; import "./@openzeppelin/contracts/access/AccessControl.sol"; contract FCEBridge is AccessControl { /// @notice Special param for each redeem enum Status {Nonexist, Undone, Done} bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bool public isContractAvailable; bool public isFCEBridgeAvailable; /// @dev Some number to make unique hashes uint256 private nonce; /// @dev Some constants for non-Reentrancy modifier uint256 private _status; uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; mapping (uint => mapping(uint => mapping(address => mapping(address => bool)))) public isBridgeValid; mapping (uint => address) public bridgeValidators; mapping (bytes32 => Status) public redeemStatus; mapping (uint256 => bytes32) public hashByNonce; event SwapInitialized( address sender, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address tokenfrom, address tokento, uint256 nonce, bytes32 hashToSign ); event RedeemInitialized( address recipient, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address tokenfrom, address tokento, uint256 nonce ); event BridgeUpdated( uint chainIdFrom, uint chainIdTo, address tokenFrom, address tokenTo, bool valid, address sender ); event BridgeValidatorUpdated( uint chainId, address newValidator, address sender ); event FCEBridgeAvailabilityUpdated( address sender, bool isAvailable ); constructor( address bridgeValidator, uint chainIdA, uint chainIdB, address tokenA, address tokenB ) { } /* Prevents a contract function from being reentrant-called. */ modifier nonReentrant() { } function checkSign( address recipient, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address erc20from, address erc20to, uint256 nonce_, bytes memory signature ) public view returns (bool) { } function hashMessage(bytes32 message) public pure returns (bytes32) { } function swap( uint256 chainIdTo, address tokenFrom, address tokenTo, uint amount ) external returns(bytes32 hashToSign) { require(isFCEBridgeAvailable, "Current bridge is not available"); require(chainIdTo != getChainID(), "'chainIdTo' can not be current"); require(<FILL_ME>) if(!isContractAvailable) require(msg.sender == tx.origin, "Only non contract call"); hashToSign = keccak256(abi.encodePacked(msg.sender, amount, getChainID(), chainIdTo, tokenFrom, tokenTo, nonce)); hashByNonce[nonce] = hashToSign; emit SwapInitialized(msg.sender, amount, getChainID(), chainIdTo, tokenFrom, tokenTo, nonce, hashToSign); nonce++; IERC20BurnableMintable(tokenFrom).burn(msg.sender, amount); } function redeem( address recipient, uint256 amount, uint256 chainIdFrom, address tokenFrom, address tokenTo, uint256 nonce_, bytes memory signature ) external { } function setBridgeAccess(uint chainIdFrom, uint chainIdTo, address tokenFrom, address tokenTo, bool valid) external onlyRole(ADMIN_ROLE) { } function setDoubleBridgeAccess(uint chainIdA, uint chainIdB, address tokenA, address tokenB, bool valid) external onlyRole(ADMIN_ROLE) { } function setBridgeValidator(uint chainId, address newValidator) external onlyRole(DEFAULT_ADMIN_ROLE) { } function setContractAvailability(bool value) external onlyRole(ADMIN_ROLE) { } function setFCEBridgeAvailability(bool value) external onlyRole(ADMIN_ROLE) { } function split(bytes memory signature) public pure returns (uint8 v, bytes32 r, bytes32 s) { } function getChainID() public view returns (uint256) { } }
isBridgeValid[getChainID()][chainIdTo][tokenFrom][tokenTo],"Current Swap is not possible"
189,097
isBridgeValid[getChainID()][chainIdTo][tokenFrom][tokenTo]
"Current Redeem is not possible"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.7; /// @title FcemBridge /// @author AkylbekAD /// @notice FcemBridge contract for locking FCEM to wrapp them into WFCEM at Ethereum import "./interfaces/IERC20BurnableMintable.sol"; import "./@openzeppelin/contracts/access/AccessControl.sol"; contract FCEBridge is AccessControl { /// @notice Special param for each redeem enum Status {Nonexist, Undone, Done} bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bool public isContractAvailable; bool public isFCEBridgeAvailable; /// @dev Some number to make unique hashes uint256 private nonce; /// @dev Some constants for non-Reentrancy modifier uint256 private _status; uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; mapping (uint => mapping(uint => mapping(address => mapping(address => bool)))) public isBridgeValid; mapping (uint => address) public bridgeValidators; mapping (bytes32 => Status) public redeemStatus; mapping (uint256 => bytes32) public hashByNonce; event SwapInitialized( address sender, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address tokenfrom, address tokento, uint256 nonce, bytes32 hashToSign ); event RedeemInitialized( address recipient, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address tokenfrom, address tokento, uint256 nonce ); event BridgeUpdated( uint chainIdFrom, uint chainIdTo, address tokenFrom, address tokenTo, bool valid, address sender ); event BridgeValidatorUpdated( uint chainId, address newValidator, address sender ); event FCEBridgeAvailabilityUpdated( address sender, bool isAvailable ); constructor( address bridgeValidator, uint chainIdA, uint chainIdB, address tokenA, address tokenB ) { } /* Prevents a contract function from being reentrant-called. */ modifier nonReentrant() { } function checkSign( address recipient, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address erc20from, address erc20to, uint256 nonce_, bytes memory signature ) public view returns (bool) { } function hashMessage(bytes32 message) public pure returns (bytes32) { } function swap( uint256 chainIdTo, address tokenFrom, address tokenTo, uint amount ) external returns(bytes32 hashToSign) { } function redeem( address recipient, uint256 amount, uint256 chainIdFrom, address tokenFrom, address tokenTo, uint256 nonce_, bytes memory signature ) external { require(isFCEBridgeAvailable, "Current bridge is not available"); require(chainIdFrom != getChainID(), "'chainIdFrom' can not be current"); require(<FILL_ME>) require(recipient != address(0), "Zero address recipient"); if(!isContractAvailable) require(msg.sender == tx.origin, "Only non contract call"); require(checkSign(recipient, amount, chainIdFrom, getChainID(), tokenFrom, tokenTo, nonce_, signature), "Input is not valid"); bytes32 redeemHash = keccak256(abi.encodePacked(recipient, amount, chainIdFrom, getChainID(), tokenFrom, tokenTo, nonce_, signature)); emit RedeemInitialized(recipient, amount, chainIdFrom, getChainID(), tokenFrom, tokenTo, nonce_); if(redeemStatus[redeemHash] != Status.Done) { redeemStatus[redeemHash] = Status.Done; IERC20BurnableMintable(tokenTo).mint(recipient, amount); } else { revert("Arguments to redeem was already used"); } } function setBridgeAccess(uint chainIdFrom, uint chainIdTo, address tokenFrom, address tokenTo, bool valid) external onlyRole(ADMIN_ROLE) { } function setDoubleBridgeAccess(uint chainIdA, uint chainIdB, address tokenA, address tokenB, bool valid) external onlyRole(ADMIN_ROLE) { } function setBridgeValidator(uint chainId, address newValidator) external onlyRole(DEFAULT_ADMIN_ROLE) { } function setContractAvailability(bool value) external onlyRole(ADMIN_ROLE) { } function setFCEBridgeAvailability(bool value) external onlyRole(ADMIN_ROLE) { } function split(bytes memory signature) public pure returns (uint8 v, bytes32 r, bytes32 s) { } function getChainID() public view returns (uint256) { } }
isBridgeValid[chainIdFrom][getChainID()][tokenFrom][tokenTo],"Current Redeem is not possible"
189,097
isBridgeValid[chainIdFrom][getChainID()][tokenFrom][tokenTo]
"Input is not valid"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.7; /// @title FcemBridge /// @author AkylbekAD /// @notice FcemBridge contract for locking FCEM to wrapp them into WFCEM at Ethereum import "./interfaces/IERC20BurnableMintable.sol"; import "./@openzeppelin/contracts/access/AccessControl.sol"; contract FCEBridge is AccessControl { /// @notice Special param for each redeem enum Status {Nonexist, Undone, Done} bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); bool public isContractAvailable; bool public isFCEBridgeAvailable; /// @dev Some number to make unique hashes uint256 private nonce; /// @dev Some constants for non-Reentrancy modifier uint256 private _status; uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; mapping (uint => mapping(uint => mapping(address => mapping(address => bool)))) public isBridgeValid; mapping (uint => address) public bridgeValidators; mapping (bytes32 => Status) public redeemStatus; mapping (uint256 => bytes32) public hashByNonce; event SwapInitialized( address sender, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address tokenfrom, address tokento, uint256 nonce, bytes32 hashToSign ); event RedeemInitialized( address recipient, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address tokenfrom, address tokento, uint256 nonce ); event BridgeUpdated( uint chainIdFrom, uint chainIdTo, address tokenFrom, address tokenTo, bool valid, address sender ); event BridgeValidatorUpdated( uint chainId, address newValidator, address sender ); event FCEBridgeAvailabilityUpdated( address sender, bool isAvailable ); constructor( address bridgeValidator, uint chainIdA, uint chainIdB, address tokenA, address tokenB ) { } /* Prevents a contract function from being reentrant-called. */ modifier nonReentrant() { } function checkSign( address recipient, uint256 amount, uint256 chainIdFrom, uint256 chainIdTo, address erc20from, address erc20to, uint256 nonce_, bytes memory signature ) public view returns (bool) { } function hashMessage(bytes32 message) public pure returns (bytes32) { } function swap( uint256 chainIdTo, address tokenFrom, address tokenTo, uint amount ) external returns(bytes32 hashToSign) { } function redeem( address recipient, uint256 amount, uint256 chainIdFrom, address tokenFrom, address tokenTo, uint256 nonce_, bytes memory signature ) external { require(isFCEBridgeAvailable, "Current bridge is not available"); require(chainIdFrom != getChainID(), "'chainIdFrom' can not be current"); require(isBridgeValid[chainIdFrom][getChainID()][tokenFrom][tokenTo], "Current Redeem is not possible"); require(recipient != address(0), "Zero address recipient"); if(!isContractAvailable) require(msg.sender == tx.origin, "Only non contract call"); require(<FILL_ME>) bytes32 redeemHash = keccak256(abi.encodePacked(recipient, amount, chainIdFrom, getChainID(), tokenFrom, tokenTo, nonce_, signature)); emit RedeemInitialized(recipient, amount, chainIdFrom, getChainID(), tokenFrom, tokenTo, nonce_); if(redeemStatus[redeemHash] != Status.Done) { redeemStatus[redeemHash] = Status.Done; IERC20BurnableMintable(tokenTo).mint(recipient, amount); } else { revert("Arguments to redeem was already used"); } } function setBridgeAccess(uint chainIdFrom, uint chainIdTo, address tokenFrom, address tokenTo, bool valid) external onlyRole(ADMIN_ROLE) { } function setDoubleBridgeAccess(uint chainIdA, uint chainIdB, address tokenA, address tokenB, bool valid) external onlyRole(ADMIN_ROLE) { } function setBridgeValidator(uint chainId, address newValidator) external onlyRole(DEFAULT_ADMIN_ROLE) { } function setContractAvailability(bool value) external onlyRole(ADMIN_ROLE) { } function setFCEBridgeAvailability(bool value) external onlyRole(ADMIN_ROLE) { } function split(bytes memory signature) public pure returns (uint8 v, bytes32 r, bytes32 s) { } function getChainID() public view returns (uint256) { } }
checkSign(recipient,amount,chainIdFrom,getChainID(),tokenFrom,tokenTo,nonce_,signature),"Input is not valid"
189,097
checkSign(recipient,amount,chainIdFrom,getChainID(),tokenFrom,tokenTo,nonce_,signature)
"WL1 supply exceeded"
pragma solidity ^0.8.15; contract ItAllSucks is ERC721A, Ownable { using Strings for uint256; using ECDSA for bytes32; // metadata string public baseURI = ""; bool public metadataFrozen = false; // constants uint256 public maxSupply = 5555; uint256 public constant PER_WALLET_FREE_IN_WL = 1; uint256 public constant PER_WALLET_LIMIT_WL = 2; uint256 public constant PER_TX_LIMIT_PUBLIC = 5; uint256 public wlLimit = 5555; uint256 public price = 0.03 ether; // sale settings bool public mintPaused = false; bool public publicSaleEnded = false; uint256 public timestampWL = 1659029400; // TODO uint256 public timestampPublic = 1659033000; // TODO // whitelist address address public deployer; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection, and by setting supply caps, mint indexes, and reserves */ constructor(address deployerAddress) ERC721A("IT ALL SUCKS", "SUCK") { } /** * ------------ CONFIG ------------ */ /** * @dev Sets deployer address */ function setDeployerAddress(address deployerAddress) public onlyOwner { } /** * @dev Gets base metadata URI */ function _baseURI() internal view override returns (string memory) { } /** * @dev Sets base metadata URI, callable by owner */ function setBaseUri(string memory _uri) external onlyOwner { } /** * @dev Freezes metadata */ function freezeMetadata() external onlyOwner { } /** * @dev Set total supply */ function setMaxSupply(uint256 newMaxSupply) external onlyOwner { } /** * @dev Set WL supply */ function setWLSupply(uint256 newWLSupply) external onlyOwner { } /** * @dev Set public price */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @dev Set WL timestamp */ function setTimestampWL(uint256 _timestampWl) external onlyOwner { } /** * @dev Set public timestamp */ function setTimestampPublic(uint256 _timestampPublic) external onlyOwner { } /** * @dev Pause/unpause sale or presale */ function togglePauseMinting() external onlyOwner { } /** * @dev Ends public sale forever, callable by owner */ function endSaleForever() external onlyOwner { } /** * ------------ MINTING ------------ */ /** * @dev Owner minting */ function airdropOwnerArray(address[] calldata addr, uint256[] calldata count) public onlyOwner { } /** * @dev Owner minting */ function airdropOwner(address addr, uint256 count) public onlyOwner { } /** * @dev Returns number of NFTs minted by addr */ function numberMinted(address addr) public view returns (uint256) { } /** * @dev Public minting during presale */ function mintSucklist(uint256 count, bytes calldata signature) external payable { require(count > 0, "Count can't be 0"); require(!mintPaused, "Minting is currently paused"); require(publicSaleEnded == false, "Sale ended"); require(totalSupply() + count <= maxSupply, "Supply exceeded"); require(block.timestamp >= timestampWL && block.timestamp < timestampPublic, "Sucklist sale not active"); require(<FILL_ME>) require(count + _numberMinted(msg.sender) <= PER_WALLET_LIMIT_WL, "Limit exceeded"); string memory message = string(abi.encodePacked("itallsucks|1|", Strings.toHexString(uint256(uint160(msg.sender)), 20))); bytes32 hashedMessage = keccak256(abi.encodePacked(message)); address recoveredAddress = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hashedMessage)).recover(signature); require(recoveredAddress == deployer, "Unauthorized signature"); uint256 expectedPrice = (count + _numberMinted(msg.sender) - PER_WALLET_FREE_IN_WL) * price; require(expectedPrice == msg.value, "Wrong ETH value"); _mint(msg.sender, count); } /** * @dev Public minting during public sale */ function mintPublic(uint256 count) external payable { } /** * @dev Withdraw ether from this contract, callable by owner */ function withdraw() external onlyOwner { } }
count+totalSupply()<=wlLimit,"WL1 supply exceeded"
189,497
count+totalSupply()<=wlLimit
"Limit exceeded"
pragma solidity ^0.8.15; contract ItAllSucks is ERC721A, Ownable { using Strings for uint256; using ECDSA for bytes32; // metadata string public baseURI = ""; bool public metadataFrozen = false; // constants uint256 public maxSupply = 5555; uint256 public constant PER_WALLET_FREE_IN_WL = 1; uint256 public constant PER_WALLET_LIMIT_WL = 2; uint256 public constant PER_TX_LIMIT_PUBLIC = 5; uint256 public wlLimit = 5555; uint256 public price = 0.03 ether; // sale settings bool public mintPaused = false; bool public publicSaleEnded = false; uint256 public timestampWL = 1659029400; // TODO uint256 public timestampPublic = 1659033000; // TODO // whitelist address address public deployer; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection, and by setting supply caps, mint indexes, and reserves */ constructor(address deployerAddress) ERC721A("IT ALL SUCKS", "SUCK") { } /** * ------------ CONFIG ------------ */ /** * @dev Sets deployer address */ function setDeployerAddress(address deployerAddress) public onlyOwner { } /** * @dev Gets base metadata URI */ function _baseURI() internal view override returns (string memory) { } /** * @dev Sets base metadata URI, callable by owner */ function setBaseUri(string memory _uri) external onlyOwner { } /** * @dev Freezes metadata */ function freezeMetadata() external onlyOwner { } /** * @dev Set total supply */ function setMaxSupply(uint256 newMaxSupply) external onlyOwner { } /** * @dev Set WL supply */ function setWLSupply(uint256 newWLSupply) external onlyOwner { } /** * @dev Set public price */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @dev Set WL timestamp */ function setTimestampWL(uint256 _timestampWl) external onlyOwner { } /** * @dev Set public timestamp */ function setTimestampPublic(uint256 _timestampPublic) external onlyOwner { } /** * @dev Pause/unpause sale or presale */ function togglePauseMinting() external onlyOwner { } /** * @dev Ends public sale forever, callable by owner */ function endSaleForever() external onlyOwner { } /** * ------------ MINTING ------------ */ /** * @dev Owner minting */ function airdropOwnerArray(address[] calldata addr, uint256[] calldata count) public onlyOwner { } /** * @dev Owner minting */ function airdropOwner(address addr, uint256 count) public onlyOwner { } /** * @dev Returns number of NFTs minted by addr */ function numberMinted(address addr) public view returns (uint256) { } /** * @dev Public minting during presale */ function mintSucklist(uint256 count, bytes calldata signature) external payable { require(count > 0, "Count can't be 0"); require(!mintPaused, "Minting is currently paused"); require(publicSaleEnded == false, "Sale ended"); require(totalSupply() + count <= maxSupply, "Supply exceeded"); require(block.timestamp >= timestampWL && block.timestamp < timestampPublic, "Sucklist sale not active"); require(count + totalSupply() <= wlLimit, "WL1 supply exceeded"); require(<FILL_ME>) string memory message = string(abi.encodePacked("itallsucks|1|", Strings.toHexString(uint256(uint160(msg.sender)), 20))); bytes32 hashedMessage = keccak256(abi.encodePacked(message)); address recoveredAddress = keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hashedMessage)).recover(signature); require(recoveredAddress == deployer, "Unauthorized signature"); uint256 expectedPrice = (count + _numberMinted(msg.sender) - PER_WALLET_FREE_IN_WL) * price; require(expectedPrice == msg.value, "Wrong ETH value"); _mint(msg.sender, count); } /** * @dev Public minting during public sale */ function mintPublic(uint256 count) external payable { } /** * @dev Withdraw ether from this contract, callable by owner */ function withdraw() external onlyOwner { } }
count+_numberMinted(msg.sender)<=PER_WALLET_LIMIT_WL,"Limit exceeded"
189,497
count+_numberMinted(msg.sender)<=PER_WALLET_LIMIT_WL
"Maximum supply reached"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.17; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract GangsterQueens is ERC721, ERC721Enumerable, Ownable{ using SafeMath for uint256; using Counters for Counters.Counter; uint256 public constant MAX_SUPPLY = 10_000; uint256 private NFT_Per_User = 10; uint256 private _price = 0.025 ether; bool private _pause = true; Counters.Counter private _tokenIdCounter; string public baseTokenURI; mapping(address => bool) public whitelist; mapping(address => uint256) public countaddress; bool private isRevealed = false; event PauseChanged(bool _pause); event GangsterQueenMinted(address indexed _to, uint256 indexed _tokenId); /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); constructor(string memory _preRevealURI) ERC721("GangsterQueens", "GQNS") { } function mint(uint256 count) public payable{ require(_pause, "Sale not open"); require(<FILL_ME>) require(totalSupply() + count <= MAX_SUPPLY, "Exceeds maximum GangsterQueens supply"); if (msg.sender != owner()) { require(count <= NFT_Per_User,"maximum 10"); if (whitelist[msg.sender] && countaddress[msg.sender] == 0){ require(count == 1,"Only one NFT allowed per WhiteList wallet"); }else{ uint256 amount = price(count); uint256 _addressCount = countaddress[msg.sender] + count; require(_addressCount <= NFT_Per_User, "Max 10 NFT per wallet"); require(msg.value >= amount, "Insufficient Funds!"); } } _mintFunction(_msgSender(), count); } function _mintFunction(address _to, uint256 _count) private { } /** * @notice Add to whitelist */ function addToWhitelist(address[] calldata toAddAddresses) external onlyOwner { } /** * @notice Remove from whitelist */ function removeFromWhitelist(address[] calldata toRemoveAddresses) external onlyOwner { } function tokenURI (uint256 tokenId) public view override returns (string memory) { } function reveal(string memory baseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPause(bool _newValue) public onlyOwner { } function setPrice(uint256 _pricePerItem) public onlyOwner { } function price(uint256 _count) public view returns (uint256) { } function withdrawAll() public onlyOwner { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
totalSupply()!=MAX_SUPPLY,"Maximum supply reached"
189,535
totalSupply()!=MAX_SUPPLY
"over WL limit"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; //import "./ERC721Burnable.sol"; import "./ERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /** * @title Blockchain Nuggets contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract BlockchainNuggets is ERC721 { using Counters for Counters.Counter; enum Type { Standard, Copper, Silver, Gold, Home, Special } Counters.Counter private _tokenIdCounterStandard; Counters.Counter private _tokenIdCounterCopper; Counters.Counter private _tokenIdCounterSilver; Counters.Counter private _tokenIdCounterGold; Counters.Counter private _tokenIdCounterHome; Counters.Counter private _tokenIdCounterSpecial; bool public openMint = false; mapping (address => uint256) whitelist; mapping (address => uint256) numberMinted; struct PassSpec { uint256 maxSupply; uint256 startingTokenId; uint256 numberBurned; } mapping (Type => PassSpec) passSpecs; mapping (Type => mapping(address => uint256)) whitelistByType; string private _contractURI; string public baseURI = ""; uint256 public maxMintPerWL = 1; constructor() ERC721("Blockchain Nuggets Baby", "BNC") { } /******************** MODIFIER ********************/ modifier _notContract() { } modifier mintComplianceWithWL(Type typ) { require(openMint, "mint not open"); PassSpec memory pass = getSpec(typ); require(<FILL_ME>) require(whitelistByType[typ][msg.sender] > 0, "Address does not exist in the white list"); require(getCounter(typ).current() + maxMintPerWL <= pass.maxSupply, "over supply"); _; } /******************** OWNER SETTER ********************/ function seedWhitelist(Type typ, address[] memory addresses) external onlyOwner { } //Set Base URI function setBaseURI(string memory _newBaseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function burn(uint256 tokenId) external virtual onlyOwner { } /******************** OVERRIDES ********************/ function _baseURI() internal view override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /******************** MINT ********************/ function mintWhitelist(Type typ) external { } function mintForAddress(Type typ, address[] calldata receiver) external onlyOwner { } function upgrade(Type typ, uint256 tokenId) external { } /******************** INTERNAL ********************/ function _mintWithWL(Type typ) internal _notContract mintComplianceWithWL(typ) { } function _mintForAddress(Type typ, address receiver) internal _notContract onlyOwner { } function _safeMintType(Type typ, address to) internal { } function increaseSupplyByType(Type typ) internal { } function _burnByTokenId(uint256 tokenId) internal { } /******************** GETTER ********************/ function totalSupplyByType(Type typ) public view returns (uint256) { } function maxSupplyByType(Type typ) public view returns (uint) { } function getSpec(Type typ) private view returns (PassSpec memory) { } function getCounter(Type typ) private view returns (Counters.Counter storage) { } function checkWhitelist(Type typ, address addr) public view returns (bool) { } function walletOfOwner(Type typ, address _owner) public view returns (uint256[] memory) { } }
whitelist[msg.sender]<maxMintPerWL,"over WL limit"
189,658
whitelist[msg.sender]<maxMintPerWL
"Address does not exist in the white list"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; //import "./ERC721Burnable.sol"; import "./ERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /** * @title Blockchain Nuggets contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract BlockchainNuggets is ERC721 { using Counters for Counters.Counter; enum Type { Standard, Copper, Silver, Gold, Home, Special } Counters.Counter private _tokenIdCounterStandard; Counters.Counter private _tokenIdCounterCopper; Counters.Counter private _tokenIdCounterSilver; Counters.Counter private _tokenIdCounterGold; Counters.Counter private _tokenIdCounterHome; Counters.Counter private _tokenIdCounterSpecial; bool public openMint = false; mapping (address => uint256) whitelist; mapping (address => uint256) numberMinted; struct PassSpec { uint256 maxSupply; uint256 startingTokenId; uint256 numberBurned; } mapping (Type => PassSpec) passSpecs; mapping (Type => mapping(address => uint256)) whitelistByType; string private _contractURI; string public baseURI = ""; uint256 public maxMintPerWL = 1; constructor() ERC721("Blockchain Nuggets Baby", "BNC") { } /******************** MODIFIER ********************/ modifier _notContract() { } modifier mintComplianceWithWL(Type typ) { require(openMint, "mint not open"); PassSpec memory pass = getSpec(typ); require(whitelist[msg.sender] < maxMintPerWL, "over WL limit"); require(<FILL_ME>) require(getCounter(typ).current() + maxMintPerWL <= pass.maxSupply, "over supply"); _; } /******************** OWNER SETTER ********************/ function seedWhitelist(Type typ, address[] memory addresses) external onlyOwner { } //Set Base URI function setBaseURI(string memory _newBaseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function burn(uint256 tokenId) external virtual onlyOwner { } /******************** OVERRIDES ********************/ function _baseURI() internal view override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /******************** MINT ********************/ function mintWhitelist(Type typ) external { } function mintForAddress(Type typ, address[] calldata receiver) external onlyOwner { } function upgrade(Type typ, uint256 tokenId) external { } /******************** INTERNAL ********************/ function _mintWithWL(Type typ) internal _notContract mintComplianceWithWL(typ) { } function _mintForAddress(Type typ, address receiver) internal _notContract onlyOwner { } function _safeMintType(Type typ, address to) internal { } function increaseSupplyByType(Type typ) internal { } function _burnByTokenId(uint256 tokenId) internal { } /******************** GETTER ********************/ function totalSupplyByType(Type typ) public view returns (uint256) { } function maxSupplyByType(Type typ) public view returns (uint) { } function getSpec(Type typ) private view returns (PassSpec memory) { } function getCounter(Type typ) private view returns (Counters.Counter storage) { } function checkWhitelist(Type typ, address addr) public view returns (bool) { } function walletOfOwner(Type typ, address _owner) public view returns (uint256[] memory) { } }
whitelistByType[typ][msg.sender]>0,"Address does not exist in the white list"
189,658
whitelistByType[typ][msg.sender]>0
"over supply"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.0; //import "./ERC721Burnable.sol"; import "./ERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /** * @title Blockchain Nuggets contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract BlockchainNuggets is ERC721 { using Counters for Counters.Counter; enum Type { Standard, Copper, Silver, Gold, Home, Special } Counters.Counter private _tokenIdCounterStandard; Counters.Counter private _tokenIdCounterCopper; Counters.Counter private _tokenIdCounterSilver; Counters.Counter private _tokenIdCounterGold; Counters.Counter private _tokenIdCounterHome; Counters.Counter private _tokenIdCounterSpecial; bool public openMint = false; mapping (address => uint256) whitelist; mapping (address => uint256) numberMinted; struct PassSpec { uint256 maxSupply; uint256 startingTokenId; uint256 numberBurned; } mapping (Type => PassSpec) passSpecs; mapping (Type => mapping(address => uint256)) whitelistByType; string private _contractURI; string public baseURI = ""; uint256 public maxMintPerWL = 1; constructor() ERC721("Blockchain Nuggets Baby", "BNC") { } /******************** MODIFIER ********************/ modifier _notContract() { } modifier mintComplianceWithWL(Type typ) { require(openMint, "mint not open"); PassSpec memory pass = getSpec(typ); require(whitelist[msg.sender] < maxMintPerWL, "over WL limit"); require(whitelistByType[typ][msg.sender] > 0, "Address does not exist in the white list"); require(<FILL_ME>) _; } /******************** OWNER SETTER ********************/ function seedWhitelist(Type typ, address[] memory addresses) external onlyOwner { } //Set Base URI function setBaseURI(string memory _newBaseURI) external onlyOwner { } function flipMintState() public onlyOwner { } function burn(uint256 tokenId) external virtual onlyOwner { } /******************** OVERRIDES ********************/ function _baseURI() internal view override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /******************** MINT ********************/ function mintWhitelist(Type typ) external { } function mintForAddress(Type typ, address[] calldata receiver) external onlyOwner { } function upgrade(Type typ, uint256 tokenId) external { } /******************** INTERNAL ********************/ function _mintWithWL(Type typ) internal _notContract mintComplianceWithWL(typ) { } function _mintForAddress(Type typ, address receiver) internal _notContract onlyOwner { } function _safeMintType(Type typ, address to) internal { } function increaseSupplyByType(Type typ) internal { } function _burnByTokenId(uint256 tokenId) internal { } /******************** GETTER ********************/ function totalSupplyByType(Type typ) public view returns (uint256) { } function maxSupplyByType(Type typ) public view returns (uint) { } function getSpec(Type typ) private view returns (PassSpec memory) { } function getCounter(Type typ) private view returns (Counters.Counter storage) { } function checkWhitelist(Type typ, address addr) public view returns (bool) { } function walletOfOwner(Type typ, address _owner) public view returns (uint256[] memory) { } }
getCounter(typ).current()+maxMintPerWL<=pass.maxSupply,"over supply"
189,658
getCounter(typ).current()+maxMintPerWL<=pass.maxSupply