comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Vat/dust"
// SPDX-License-Identifier: AGPL-3.0-or-later /// vat.sol -- Dai CDP database // Copyright (C) 2018 Rain <rainbreak@riseup.net> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity 0.5.15; contract Vat { // --- Auth --- mapping (address => uint256) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } mapping(address => mapping (address => uint256)) public can; function hope(address usr) external note { } function nope(address usr) external note { } function wish(address bit, address usr) internal view returns (bool) { } // --- Data --- struct Ilk { uint256 Art; // Total Normalised Debt [wad] uint256 rate; // Accumulated Rates [ray] uint256 spot; // Price with Safety Margin [ray] uint256 line; // Debt Ceiling [rad] uint256 dust; // Urn Debt Floor [rad] } struct Urn { uint256 ink; // Locked Collateral [wad] uint256 art; // Normalised Debt [wad] } mapping (bytes32 => Ilk) public ilks; mapping (bytes32 => mapping (address => Urn )) public urns; mapping (bytes32 => mapping (address => uint256)) public gem; // [wad] mapping (address => uint256) public dai; // [rad] mapping (address => uint256) public sin; // [rad] uint256 public debt; // Total Dai Issued [rad] uint256 public vice; // Total Unbacked Dai [rad] uint256 public Line; // Total Debt Ceiling [rad] uint256 public live; // Active Flag // --- Logs --- event LogNote( bytes4 indexed sig, bytes32 indexed arg1, bytes32 indexed arg2, bytes32 indexed arg3, bytes data ) anonymous; modifier note { } // --- Init --- constructor() public { } // --- Math --- function add(uint256 x, int256 y) internal pure returns (uint256 z) { } function sub(uint256 x, int256 y) internal pure returns (uint256 z) { } function mul(uint256 x, int256 y) internal pure returns (int256 z) { } function add(uint256 x, uint256 y) internal pure returns (uint256 z) { } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { } // --- Administration --- function init(bytes32 ilk) external note auth { } function file(bytes32 what, uint256 data) external note auth { } function file(bytes32 ilk, bytes32 what, uint256 data) external note auth { } function cage() external note auth { } // --- Fungibility --- function slip(bytes32 ilk, address usr, int256 wad) external note auth { } function flux(bytes32 ilk, address src, address dst, uint256 wad) external note { } function move(address src, address dst, uint256 rad) external note { } function either(bool x, bool y) internal pure returns (bool z) { } function both(bool x, bool y) internal pure returns (bool z) { } // --- CDP Manipulation --- function frob(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note { // system is live require(live == 1, "Vat/not-live"); Urn memory urn = urns[i][u]; Ilk memory ilk = ilks[i]; // ilk has been initialised require(ilk.rate != 0, "Vat/ilk-not-init"); urn.ink = add(urn.ink, dink); urn.art = add(urn.art, dart); ilk.Art = add(ilk.Art, dart); int256 dtab = mul(ilk.rate, dart); uint256 tab = mul(ilk.rate, urn.art); debt = add(debt, dtab); // either debt has decreased, or debt ceilings are not exceeded require(either(dart <= 0, both(mul(ilk.Art, ilk.rate) <= ilk.line, debt <= Line)), "Vat/ceiling-exceeded"); // urn is either less risky than before, or it is safe require(either(both(dart <= 0, dink >= 0), tab <= mul(urn.ink, ilk.spot)), "Vat/not-safe"); // urn is either more safe, or the owner consents require(either(both(dart <= 0, dink >= 0), wish(u, msg.sender)), "Vat/not-allowed-u"); // collateral src consents require(either(dink <= 0, wish(v, msg.sender)), "Vat/not-allowed-v"); // debt dst consents require(either(dart >= 0, wish(w, msg.sender)), "Vat/not-allowed-w"); // urn has no debt, or a non-dusty amount require(<FILL_ME>) gem[i][v] = sub(gem[i][v], dink); dai[w] = add(dai[w], dtab); urns[i][u] = urn; ilks[i] = ilk; } // --- CDP Fungibility --- function fork(bytes32 ilk, address src, address dst, int256 dink, int256 dart) external note { } // --- CDP Confiscation --- function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note auth { } // --- Settlement --- function heal(uint256 rad) external note { } function suck(address u, address v, uint256 rad) external note auth { } // --- Rates --- function fold(bytes32 i, address u, int256 rate) external note auth { } }
either(urn.art==0,tab>=ilk.dust),"Vat/dust"
470,266
either(urn.art==0,tab>=ilk.dust)
"Vat/not-allowed"
// SPDX-License-Identifier: AGPL-3.0-or-later /// vat.sol -- Dai CDP database // Copyright (C) 2018 Rain <rainbreak@riseup.net> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity 0.5.15; contract Vat { // --- Auth --- mapping (address => uint256) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } mapping(address => mapping (address => uint256)) public can; function hope(address usr) external note { } function nope(address usr) external note { } function wish(address bit, address usr) internal view returns (bool) { } // --- Data --- struct Ilk { uint256 Art; // Total Normalised Debt [wad] uint256 rate; // Accumulated Rates [ray] uint256 spot; // Price with Safety Margin [ray] uint256 line; // Debt Ceiling [rad] uint256 dust; // Urn Debt Floor [rad] } struct Urn { uint256 ink; // Locked Collateral [wad] uint256 art; // Normalised Debt [wad] } mapping (bytes32 => Ilk) public ilks; mapping (bytes32 => mapping (address => Urn )) public urns; mapping (bytes32 => mapping (address => uint256)) public gem; // [wad] mapping (address => uint256) public dai; // [rad] mapping (address => uint256) public sin; // [rad] uint256 public debt; // Total Dai Issued [rad] uint256 public vice; // Total Unbacked Dai [rad] uint256 public Line; // Total Debt Ceiling [rad] uint256 public live; // Active Flag // --- Logs --- event LogNote( bytes4 indexed sig, bytes32 indexed arg1, bytes32 indexed arg2, bytes32 indexed arg3, bytes data ) anonymous; modifier note { } // --- Init --- constructor() public { } // --- Math --- function add(uint256 x, int256 y) internal pure returns (uint256 z) { } function sub(uint256 x, int256 y) internal pure returns (uint256 z) { } function mul(uint256 x, int256 y) internal pure returns (int256 z) { } function add(uint256 x, uint256 y) internal pure returns (uint256 z) { } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { } // --- Administration --- function init(bytes32 ilk) external note auth { } function file(bytes32 what, uint256 data) external note auth { } function file(bytes32 ilk, bytes32 what, uint256 data) external note auth { } function cage() external note auth { } // --- Fungibility --- function slip(bytes32 ilk, address usr, int256 wad) external note auth { } function flux(bytes32 ilk, address src, address dst, uint256 wad) external note { } function move(address src, address dst, uint256 rad) external note { } function either(bool x, bool y) internal pure returns (bool z) { } function both(bool x, bool y) internal pure returns (bool z) { } // --- CDP Manipulation --- function frob(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note { } // --- CDP Fungibility --- function fork(bytes32 ilk, address src, address dst, int256 dink, int256 dart) external note { Urn storage u = urns[ilk][src]; Urn storage v = urns[ilk][dst]; Ilk storage i = ilks[ilk]; u.ink = sub(u.ink, dink); u.art = sub(u.art, dart); v.ink = add(v.ink, dink); v.art = add(v.art, dart); uint256 utab = mul(u.art, i.rate); uint256 vtab = mul(v.art, i.rate); // both sides consent require(<FILL_ME>) // both sides safe require(utab <= mul(u.ink, i.spot), "Vat/not-safe-src"); require(vtab <= mul(v.ink, i.spot), "Vat/not-safe-dst"); // both sides non-dusty require(either(utab >= i.dust, u.art == 0), "Vat/dust-src"); require(either(vtab >= i.dust, v.art == 0), "Vat/dust-dst"); } // --- CDP Confiscation --- function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note auth { } // --- Settlement --- function heal(uint256 rad) external note { } function suck(address u, address v, uint256 rad) external note auth { } // --- Rates --- function fold(bytes32 i, address u, int256 rate) external note auth { } }
both(wish(src,msg.sender),wish(dst,msg.sender)),"Vat/not-allowed"
470,266
both(wish(src,msg.sender),wish(dst,msg.sender))
"Vat/dust-src"
// SPDX-License-Identifier: AGPL-3.0-or-later /// vat.sol -- Dai CDP database // Copyright (C) 2018 Rain <rainbreak@riseup.net> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity 0.5.15; contract Vat { // --- Auth --- mapping (address => uint256) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } mapping(address => mapping (address => uint256)) public can; function hope(address usr) external note { } function nope(address usr) external note { } function wish(address bit, address usr) internal view returns (bool) { } // --- Data --- struct Ilk { uint256 Art; // Total Normalised Debt [wad] uint256 rate; // Accumulated Rates [ray] uint256 spot; // Price with Safety Margin [ray] uint256 line; // Debt Ceiling [rad] uint256 dust; // Urn Debt Floor [rad] } struct Urn { uint256 ink; // Locked Collateral [wad] uint256 art; // Normalised Debt [wad] } mapping (bytes32 => Ilk) public ilks; mapping (bytes32 => mapping (address => Urn )) public urns; mapping (bytes32 => mapping (address => uint256)) public gem; // [wad] mapping (address => uint256) public dai; // [rad] mapping (address => uint256) public sin; // [rad] uint256 public debt; // Total Dai Issued [rad] uint256 public vice; // Total Unbacked Dai [rad] uint256 public Line; // Total Debt Ceiling [rad] uint256 public live; // Active Flag // --- Logs --- event LogNote( bytes4 indexed sig, bytes32 indexed arg1, bytes32 indexed arg2, bytes32 indexed arg3, bytes data ) anonymous; modifier note { } // --- Init --- constructor() public { } // --- Math --- function add(uint256 x, int256 y) internal pure returns (uint256 z) { } function sub(uint256 x, int256 y) internal pure returns (uint256 z) { } function mul(uint256 x, int256 y) internal pure returns (int256 z) { } function add(uint256 x, uint256 y) internal pure returns (uint256 z) { } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { } // --- Administration --- function init(bytes32 ilk) external note auth { } function file(bytes32 what, uint256 data) external note auth { } function file(bytes32 ilk, bytes32 what, uint256 data) external note auth { } function cage() external note auth { } // --- Fungibility --- function slip(bytes32 ilk, address usr, int256 wad) external note auth { } function flux(bytes32 ilk, address src, address dst, uint256 wad) external note { } function move(address src, address dst, uint256 rad) external note { } function either(bool x, bool y) internal pure returns (bool z) { } function both(bool x, bool y) internal pure returns (bool z) { } // --- CDP Manipulation --- function frob(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note { } // --- CDP Fungibility --- function fork(bytes32 ilk, address src, address dst, int256 dink, int256 dart) external note { Urn storage u = urns[ilk][src]; Urn storage v = urns[ilk][dst]; Ilk storage i = ilks[ilk]; u.ink = sub(u.ink, dink); u.art = sub(u.art, dart); v.ink = add(v.ink, dink); v.art = add(v.art, dart); uint256 utab = mul(u.art, i.rate); uint256 vtab = mul(v.art, i.rate); // both sides consent require(both(wish(src, msg.sender), wish(dst, msg.sender)), "Vat/not-allowed"); // both sides safe require(utab <= mul(u.ink, i.spot), "Vat/not-safe-src"); require(vtab <= mul(v.ink, i.spot), "Vat/not-safe-dst"); // both sides non-dusty require(<FILL_ME>) require(either(vtab >= i.dust, v.art == 0), "Vat/dust-dst"); } // --- CDP Confiscation --- function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note auth { } // --- Settlement --- function heal(uint256 rad) external note { } function suck(address u, address v, uint256 rad) external note auth { } // --- Rates --- function fold(bytes32 i, address u, int256 rate) external note auth { } }
either(utab>=i.dust,u.art==0),"Vat/dust-src"
470,266
either(utab>=i.dust,u.art==0)
"Vat/dust-dst"
// SPDX-License-Identifier: AGPL-3.0-or-later /// vat.sol -- Dai CDP database // Copyright (C) 2018 Rain <rainbreak@riseup.net> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity 0.5.15; contract Vat { // --- Auth --- mapping (address => uint256) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } mapping(address => mapping (address => uint256)) public can; function hope(address usr) external note { } function nope(address usr) external note { } function wish(address bit, address usr) internal view returns (bool) { } // --- Data --- struct Ilk { uint256 Art; // Total Normalised Debt [wad] uint256 rate; // Accumulated Rates [ray] uint256 spot; // Price with Safety Margin [ray] uint256 line; // Debt Ceiling [rad] uint256 dust; // Urn Debt Floor [rad] } struct Urn { uint256 ink; // Locked Collateral [wad] uint256 art; // Normalised Debt [wad] } mapping (bytes32 => Ilk) public ilks; mapping (bytes32 => mapping (address => Urn )) public urns; mapping (bytes32 => mapping (address => uint256)) public gem; // [wad] mapping (address => uint256) public dai; // [rad] mapping (address => uint256) public sin; // [rad] uint256 public debt; // Total Dai Issued [rad] uint256 public vice; // Total Unbacked Dai [rad] uint256 public Line; // Total Debt Ceiling [rad] uint256 public live; // Active Flag // --- Logs --- event LogNote( bytes4 indexed sig, bytes32 indexed arg1, bytes32 indexed arg2, bytes32 indexed arg3, bytes data ) anonymous; modifier note { } // --- Init --- constructor() public { } // --- Math --- function add(uint256 x, int256 y) internal pure returns (uint256 z) { } function sub(uint256 x, int256 y) internal pure returns (uint256 z) { } function mul(uint256 x, int256 y) internal pure returns (int256 z) { } function add(uint256 x, uint256 y) internal pure returns (uint256 z) { } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { } // --- Administration --- function init(bytes32 ilk) external note auth { } function file(bytes32 what, uint256 data) external note auth { } function file(bytes32 ilk, bytes32 what, uint256 data) external note auth { } function cage() external note auth { } // --- Fungibility --- function slip(bytes32 ilk, address usr, int256 wad) external note auth { } function flux(bytes32 ilk, address src, address dst, uint256 wad) external note { } function move(address src, address dst, uint256 rad) external note { } function either(bool x, bool y) internal pure returns (bool z) { } function both(bool x, bool y) internal pure returns (bool z) { } // --- CDP Manipulation --- function frob(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note { } // --- CDP Fungibility --- function fork(bytes32 ilk, address src, address dst, int256 dink, int256 dart) external note { Urn storage u = urns[ilk][src]; Urn storage v = urns[ilk][dst]; Ilk storage i = ilks[ilk]; u.ink = sub(u.ink, dink); u.art = sub(u.art, dart); v.ink = add(v.ink, dink); v.art = add(v.art, dart); uint256 utab = mul(u.art, i.rate); uint256 vtab = mul(v.art, i.rate); // both sides consent require(both(wish(src, msg.sender), wish(dst, msg.sender)), "Vat/not-allowed"); // both sides safe require(utab <= mul(u.ink, i.spot), "Vat/not-safe-src"); require(vtab <= mul(v.ink, i.spot), "Vat/not-safe-dst"); // both sides non-dusty require(either(utab >= i.dust, u.art == 0), "Vat/dust-src"); require(<FILL_ME>) } // --- CDP Confiscation --- function grab(bytes32 i, address u, address v, address w, int256 dink, int256 dart) external note auth { } // --- Settlement --- function heal(uint256 rad) external note { } function suck(address u, address v, uint256 rad) external note auth { } // --- Rates --- function fold(bytes32 i, address u, int256 rate) external note auth { } }
either(vtab>=i.dust,v.art==0),"Vat/dust-dst"
470,266
either(vtab>=i.dust,v.art==0)
"Cannot set maxWallet lower than 1%"
// SPDX-License-Identifier: MIT /* "We all have PTSD, so lets get this shitcoin dev to pumpit" Tg: https://t.me/PTSD_Entry Twitter: twitter.com/ptsd__eth Web: https://www.cryptoptsd.tech/ */ pragma solidity =0.8.15; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract PumpThisShitcoinDev is ERC20, Ownable { IUniRouter public router; address public pair; address public devWallet; uint256 public swapTokensAtAmount; uint256 public maxBuyAmount; uint256 public maxSellAmount; uint256 public maxWallet; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedFromMaxWallet; mapping(address => bool) public automatedMarketMakerPairs; bool private swapping; bool public swapEnabled = true; bool public tradingEnabled; event ExcludeFromFees(address indexed account, bool isExcluded); event ExcludeMultipleAccountsFromFees(address[] accounts, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); struct Taxes { uint256 dev; } Taxes public buyTaxes = Taxes(1); Taxes public sellTaxes = Taxes(1); uint256 public totalBuyTax = 1; uint256 public totalSellTax = 1; constructor(address _dev) ERC20("Pump This Shitcoin Dev", "PTSD") { } receive() external payable {} function excludeFromFees(address account, bool excluded) public onlyOwner { } function excludeFromMaxWallet(address account, bool excluded) public onlyOwner { } function excludeMultipleAccountsFromFees( address[] calldata accounts, bool excluded ) public onlyOwner { } function setDevWall(address newWallet) public onlyOwner { } function updateMaxWalletAmount(uint256 newNum) public onlyOwner { require(<FILL_ME>) maxWallet = newNum * (10**18); } /// @notice Update the threshold to swap tokens for liquidity, /// treasury and dividends. function setSwapTokensAtAmount(uint256 amount) public onlyOwner { } /// @notice Enable or disable internal swaps /// @dev Set "true" to enable internal swaps for liquidity, treasury and dividends function setSwapEnabled(bool _enabled) external onlyOwner { } function withdrawETH20Tokens(address tokenAddress) external onlyOwner { } function setMaxBuyAndSell(uint256 maxBuy, uint256 maxSell) public onlyOwner { } function setBuyTaxes( uint256 _dev ) external onlyOwner { } function setSellTaxes( uint256 _dev ) external onlyOwner { } function forceSend() external onlyOwner { } function updateRouter(address newRouter) external onlyOwner { } function activateTrading() external onlyOwner { } function setAutomatedMarketMakerPair(address newPair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address newPair, bool value) private { } function isExcludedFromFees(address account) public view returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal override { } function swapAndLiquify(uint256 tokens) private { } function swapTokensForETH(uint256 tokenAmount) private { } } interface IUniFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IUniRouter { 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 swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; }
newNum>(1000000*1),"Cannot set maxWallet lower than 1%"
470,273
newNum>(1000000*1)
"Invalid signature."
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./ERC721A.sol"; pragma solidity ^0.8.0; contract PixelFriends is ERC721A, Ownable, PaymentSplitter, ReentrancyGuard { using ECDSA for bytes32; using Strings for uint256; using Address for address payable; struct saleParams { string name; uint256 price; uint64 startTime; uint64 endTime; uint64 supply; uint32 claimable; bool requireSignature; } address private signer = 0xe61F5A159a82888f88bEcb2B5C3d7bBB7260ef0F; address[] private _team = [ 0x7F69FD48122F79B06916f2705dE4a80D7978eF26, 0x42AD36b7C4D208858020D95DC3Ae50dd99588fA1, 0xb32586614aAc71B83a4dc1C83D20e4Fc0e7C407c, 0xE5401538A12c560d954B896f35A62f14c1BE7A09, 0x96f4B26D2ECDB2390cca3f493433BE5a7EA3792A ]; uint256[] private _teamShares = [2750, 2750, 2750, 750, 1000]; uint256 public constant MAX_SUPPLY = 10_000; mapping(uint32 => saleParams) public sales; mapping(string => mapping(address => uint256)) public mintsPerWallet; mapping(string => uint256) public mintsPerSale; string public baseURI; bool public revealed; event TokensMinted(address mintedBy, uint256 quantity, string saleName); constructor( string memory _name, string memory _symbol, string memory _newBaseURI ) ERC721A(_name, _symbol) PaymentSplitter(_team, _teamShares) { } // MODIFIERS modifier callerIsUser() { } // ADMIN function withdrawAll() external onlyOwner nonReentrant { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setReveal(bool _revealed) external onlyOwner { } function setSignerAddress(address _newAddress) external onlyOwner { } function configureSale( uint32 _id, string memory _name, uint256 _price, uint64 _startTime, uint64 _endTime, uint64 _supply, uint32 _claimable, bool _requireSignature ) external onlyOwner { } // VIEW function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } // MINT function airdrop(address _to, uint256 quantity) external onlyOwner { } function saleMint( uint32 _saleId, uint256 quantity, uint256 _alloc, bytes calldata _signature ) external payable callerIsUser { saleParams memory _sale = sales[_saleId]; require(_sale.startTime > 0 && _sale.endTime > 0, "Sale doesn't exists"); uint256 alloc = _sale.requireSignature ? _alloc : uint256(_sale.claimable); if (_sale.requireSignature) { bytes32 _messageHash = hashMessage(abi.encode(_sale.name, address(this), _msgSender(), _alloc)); require(<FILL_ME>) } require(quantity > 0, "Wrong amount requested"); require(block.timestamp > _sale.startTime && block.timestamp < _sale.endTime, "Sale is not active."); require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left."); require(mintsPerSale[_sale.name] + quantity <= _sale.supply, "Not enough supply."); require(msg.value >= quantity * uint256(_sale.price), "Insufficient amount."); require(mintsPerWallet[_sale.name][_msgSender()] + quantity <= alloc, "Allocation exceeded."); mintsPerWallet[_sale.name][_msgSender()] += quantity; mintsPerSale[_sale.name] += quantity; internalMint(_msgSender(), quantity); emit TokensMinted(_msgSender(), quantity, _sale.name); } // INTERNAL function internalMint(address _to, uint256 quantity) internal { } function internalBurn(uint256 _tokenId) internal { } function _baseURI() internal view virtual override returns (string memory) { } // PRIVATE function verifyAddressSigner(bytes32 _messageHash, bytes memory _signature) private view returns (bool) { } function hashMessage(bytes memory _msg) private pure returns (bytes32) { } }
verifyAddressSigner(_messageHash,_signature),"Invalid signature."
470,279
verifyAddressSigner(_messageHash,_signature)
"Not enough supply."
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./ERC721A.sol"; pragma solidity ^0.8.0; contract PixelFriends is ERC721A, Ownable, PaymentSplitter, ReentrancyGuard { using ECDSA for bytes32; using Strings for uint256; using Address for address payable; struct saleParams { string name; uint256 price; uint64 startTime; uint64 endTime; uint64 supply; uint32 claimable; bool requireSignature; } address private signer = 0xe61F5A159a82888f88bEcb2B5C3d7bBB7260ef0F; address[] private _team = [ 0x7F69FD48122F79B06916f2705dE4a80D7978eF26, 0x42AD36b7C4D208858020D95DC3Ae50dd99588fA1, 0xb32586614aAc71B83a4dc1C83D20e4Fc0e7C407c, 0xE5401538A12c560d954B896f35A62f14c1BE7A09, 0x96f4B26D2ECDB2390cca3f493433BE5a7EA3792A ]; uint256[] private _teamShares = [2750, 2750, 2750, 750, 1000]; uint256 public constant MAX_SUPPLY = 10_000; mapping(uint32 => saleParams) public sales; mapping(string => mapping(address => uint256)) public mintsPerWallet; mapping(string => uint256) public mintsPerSale; string public baseURI; bool public revealed; event TokensMinted(address mintedBy, uint256 quantity, string saleName); constructor( string memory _name, string memory _symbol, string memory _newBaseURI ) ERC721A(_name, _symbol) PaymentSplitter(_team, _teamShares) { } // MODIFIERS modifier callerIsUser() { } // ADMIN function withdrawAll() external onlyOwner nonReentrant { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setReveal(bool _revealed) external onlyOwner { } function setSignerAddress(address _newAddress) external onlyOwner { } function configureSale( uint32 _id, string memory _name, uint256 _price, uint64 _startTime, uint64 _endTime, uint64 _supply, uint32 _claimable, bool _requireSignature ) external onlyOwner { } // VIEW function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } // MINT function airdrop(address _to, uint256 quantity) external onlyOwner { } function saleMint( uint32 _saleId, uint256 quantity, uint256 _alloc, bytes calldata _signature ) external payable callerIsUser { saleParams memory _sale = sales[_saleId]; require(_sale.startTime > 0 && _sale.endTime > 0, "Sale doesn't exists"); uint256 alloc = _sale.requireSignature ? _alloc : uint256(_sale.claimable); if (_sale.requireSignature) { bytes32 _messageHash = hashMessage(abi.encode(_sale.name, address(this), _msgSender(), _alloc)); require(verifyAddressSigner(_messageHash, _signature), "Invalid signature."); } require(quantity > 0, "Wrong amount requested"); require(block.timestamp > _sale.startTime && block.timestamp < _sale.endTime, "Sale is not active."); require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left."); require(<FILL_ME>) require(msg.value >= quantity * uint256(_sale.price), "Insufficient amount."); require(mintsPerWallet[_sale.name][_msgSender()] + quantity <= alloc, "Allocation exceeded."); mintsPerWallet[_sale.name][_msgSender()] += quantity; mintsPerSale[_sale.name] += quantity; internalMint(_msgSender(), quantity); emit TokensMinted(_msgSender(), quantity, _sale.name); } // INTERNAL function internalMint(address _to, uint256 quantity) internal { } function internalBurn(uint256 _tokenId) internal { } function _baseURI() internal view virtual override returns (string memory) { } // PRIVATE function verifyAddressSigner(bytes32 _messageHash, bytes memory _signature) private view returns (bool) { } function hashMessage(bytes memory _msg) private pure returns (bytes32) { } }
mintsPerSale[_sale.name]+quantity<=_sale.supply,"Not enough supply."
470,279
mintsPerSale[_sale.name]+quantity<=_sale.supply
"Allocation exceeded."
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./ERC721A.sol"; pragma solidity ^0.8.0; contract PixelFriends is ERC721A, Ownable, PaymentSplitter, ReentrancyGuard { using ECDSA for bytes32; using Strings for uint256; using Address for address payable; struct saleParams { string name; uint256 price; uint64 startTime; uint64 endTime; uint64 supply; uint32 claimable; bool requireSignature; } address private signer = 0xe61F5A159a82888f88bEcb2B5C3d7bBB7260ef0F; address[] private _team = [ 0x7F69FD48122F79B06916f2705dE4a80D7978eF26, 0x42AD36b7C4D208858020D95DC3Ae50dd99588fA1, 0xb32586614aAc71B83a4dc1C83D20e4Fc0e7C407c, 0xE5401538A12c560d954B896f35A62f14c1BE7A09, 0x96f4B26D2ECDB2390cca3f493433BE5a7EA3792A ]; uint256[] private _teamShares = [2750, 2750, 2750, 750, 1000]; uint256 public constant MAX_SUPPLY = 10_000; mapping(uint32 => saleParams) public sales; mapping(string => mapping(address => uint256)) public mintsPerWallet; mapping(string => uint256) public mintsPerSale; string public baseURI; bool public revealed; event TokensMinted(address mintedBy, uint256 quantity, string saleName); constructor( string memory _name, string memory _symbol, string memory _newBaseURI ) ERC721A(_name, _symbol) PaymentSplitter(_team, _teamShares) { } // MODIFIERS modifier callerIsUser() { } // ADMIN function withdrawAll() external onlyOwner nonReentrant { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setReveal(bool _revealed) external onlyOwner { } function setSignerAddress(address _newAddress) external onlyOwner { } function configureSale( uint32 _id, string memory _name, uint256 _price, uint64 _startTime, uint64 _endTime, uint64 _supply, uint32 _claimable, bool _requireSignature ) external onlyOwner { } // VIEW function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } // MINT function airdrop(address _to, uint256 quantity) external onlyOwner { } function saleMint( uint32 _saleId, uint256 quantity, uint256 _alloc, bytes calldata _signature ) external payable callerIsUser { saleParams memory _sale = sales[_saleId]; require(_sale.startTime > 0 && _sale.endTime > 0, "Sale doesn't exists"); uint256 alloc = _sale.requireSignature ? _alloc : uint256(_sale.claimable); if (_sale.requireSignature) { bytes32 _messageHash = hashMessage(abi.encode(_sale.name, address(this), _msgSender(), _alloc)); require(verifyAddressSigner(_messageHash, _signature), "Invalid signature."); } require(quantity > 0, "Wrong amount requested"); require(block.timestamp > _sale.startTime && block.timestamp < _sale.endTime, "Sale is not active."); require(totalSupply() + quantity <= MAX_SUPPLY, "Not enough tokens left."); require(mintsPerSale[_sale.name] + quantity <= _sale.supply, "Not enough supply."); require(msg.value >= quantity * uint256(_sale.price), "Insufficient amount."); require(<FILL_ME>) mintsPerWallet[_sale.name][_msgSender()] += quantity; mintsPerSale[_sale.name] += quantity; internalMint(_msgSender(), quantity); emit TokensMinted(_msgSender(), quantity, _sale.name); } // INTERNAL function internalMint(address _to, uint256 quantity) internal { } function internalBurn(uint256 _tokenId) internal { } function _baseURI() internal view virtual override returns (string memory) { } // PRIVATE function verifyAddressSigner(bytes32 _messageHash, bytes memory _signature) private view returns (bool) { } function hashMessage(bytes memory _msg) private pure returns (bytes32) { } }
mintsPerWallet[_sale.name][_msgSender()]+quantity<=alloc,"Allocation exceeded."
470,279
mintsPerWallet[_sale.name][_msgSender()]+quantity<=alloc
"ToadRouter: UNTRUSTED"
//SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.15; import "./IToadRouter03.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ToadswapLibrary.sol"; import "./TransferHelper.sol"; import "./IWETH.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IERC20Permit.sol"; import "./Multicall.sol"; import "./IPermitDai.sol"; /** * ToadRouter03 * A re-implementation of the Uniswap v2 router with bot-driven meta-transactions. * Bot private keys are all stored on a hardware wallet. * ToadRouter03 implements ERC2612 (ERC20Permit) and auto-unwrap functions */ contract ToadRouter03 is IToadRouter03, Ownable, Multicall { mapping(address => bool) allowedBots; address immutable PERMIT2; bytes32 public constant DAI_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb; modifier ensure(uint deadline) { } modifier onlyBot() { require(<FILL_ME>) _; } constructor( address fac, address weth, address permit ) IToadRouter03(fac, weth) { } function addTrustedBot(address newBot) external onlyOwner { } function removeTrustedBot(address bot) external onlyOwner { } receive() external payable { } function performPermit2Single( address owner, IAllowanceTransfer.PermitSingle memory permitSingle, bytes calldata signature ) public virtual override onlyBot { } function performPermit2Batch( address owner, IAllowanceTransfer.PermitBatch memory permitBatch, bytes calldata signature ) public virtual override onlyBot { } function performPermit( address owner, address tok, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override ensure(deadline) onlyBot { } function performPermitDai(address owner, address tok, uint256 nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual override onlyBot { } function stfFirstHop( uint256 amountIn, ToadStructs.DexData memory dex1, address path0, address path1, address to ) internal { } function swapExactTokensForTokensSupportingFeeOnTransferTokensWithWETHGas( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path1, ToadStructs.AggPath[] calldata path2, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, uint256 ethFee, ToadStructs.AggPath[] calldata gasPath, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactWETHforTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactTokensForWETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes, bool unwrap ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } // Gasloan WETH unwrapper function unwrapWETH( address to, uint256 amount, ToadStructs.FeeStruct calldata fees ) external virtual override onlyBot { } function getPriceOut( uint256 amountIn, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) public view virtual override returns (uint256[] memory amounts) { } function _swapSupportingFeeOnTransferTokens( ToadStructs.AggPath[] memory path, address _to, ToadStructs.DexData[] memory dexes ) internal virtual { } // **** LIBRARY FUNCTIONS **** function quote( uint amountA, uint reserveA, uint reserveB ) public pure virtual override returns (uint amountB) { } function getAmountOut( uint amountIn, uint reserveIn, uint reserveOut ) public pure virtual override returns (uint amountOut) { } function getAmountIn( uint amountOut, uint reserveIn, uint reserveOut ) public pure virtual override returns (uint amountIn) { } function getAmountsOut( uint amountIn, address[] memory path ) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn( uint amountOut, address[] memory path ) public view virtual override returns (uint[] memory amounts) { } function getAmountsOut( uint amountIn, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) external view virtual override returns (uint[] memory amounts) { } function getAmountsIn( uint amountOut, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) external view virtual override returns (uint[] memory amounts) { } }
allowedBots[_msgSender()],"ToadRouter: UNTRUSTED"
470,541
allowedBots[_msgSender()]
"ToadRouter03: Not Dai-style Permit."
//SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.15; import "./IToadRouter03.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ToadswapLibrary.sol"; import "./TransferHelper.sol"; import "./IWETH.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IERC20Permit.sol"; import "./Multicall.sol"; import "./IPermitDai.sol"; /** * ToadRouter03 * A re-implementation of the Uniswap v2 router with bot-driven meta-transactions. * Bot private keys are all stored on a hardware wallet. * ToadRouter03 implements ERC2612 (ERC20Permit) and auto-unwrap functions */ contract ToadRouter03 is IToadRouter03, Ownable, Multicall { mapping(address => bool) allowedBots; address immutable PERMIT2; bytes32 public constant DAI_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb; modifier ensure(uint deadline) { } modifier onlyBot() { } constructor( address fac, address weth, address permit ) IToadRouter03(fac, weth) { } function addTrustedBot(address newBot) external onlyOwner { } function removeTrustedBot(address bot) external onlyOwner { } receive() external payable { } function performPermit2Single( address owner, IAllowanceTransfer.PermitSingle memory permitSingle, bytes calldata signature ) public virtual override onlyBot { } function performPermit2Batch( address owner, IAllowanceTransfer.PermitBatch memory permitBatch, bytes calldata signature ) public virtual override onlyBot { } function performPermit( address owner, address tok, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override ensure(deadline) onlyBot { } function performPermitDai(address owner, address tok, uint256 nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual override onlyBot { IPermitDai dpermit = IPermitDai(tok); // The Dai-style permit's typehash is always the same require(<FILL_ME>) dpermit.permit(owner, PERMIT2, nonce, deadline, true, v, r, s); } function stfFirstHop( uint256 amountIn, ToadStructs.DexData memory dex1, address path0, address path1, address to ) internal { } function swapExactTokensForTokensSupportingFeeOnTransferTokensWithWETHGas( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path1, ToadStructs.AggPath[] calldata path2, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, uint256 ethFee, ToadStructs.AggPath[] calldata gasPath, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactWETHforTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactTokensForWETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes, bool unwrap ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } // Gasloan WETH unwrapper function unwrapWETH( address to, uint256 amount, ToadStructs.FeeStruct calldata fees ) external virtual override onlyBot { } function getPriceOut( uint256 amountIn, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) public view virtual override returns (uint256[] memory amounts) { } function _swapSupportingFeeOnTransferTokens( ToadStructs.AggPath[] memory path, address _to, ToadStructs.DexData[] memory dexes ) internal virtual { } // **** LIBRARY FUNCTIONS **** function quote( uint amountA, uint reserveA, uint reserveB ) public pure virtual override returns (uint amountB) { } function getAmountOut( uint amountIn, uint reserveIn, uint reserveOut ) public pure virtual override returns (uint amountOut) { } function getAmountIn( uint amountOut, uint reserveIn, uint reserveOut ) public pure virtual override returns (uint amountIn) { } function getAmountsOut( uint amountIn, address[] memory path ) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn( uint amountOut, address[] memory path ) public view virtual override returns (uint[] memory amounts) { } function getAmountsOut( uint amountIn, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) external view virtual override returns (uint[] memory amounts) { } function getAmountsIn( uint amountOut, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) external view virtual override returns (uint[] memory amounts) { } }
dpermit.PERMIT_TYPEHASH()==DAI_TYPEHASH,"ToadRouter03: Not Dai-style Permit."
470,541
dpermit.PERMIT_TYPEHASH()==DAI_TYPEHASH
"ToadRouter: INVALID_PATH"
//SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.15; import "./IToadRouter03.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ToadswapLibrary.sol"; import "./TransferHelper.sol"; import "./IWETH.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IERC20Permit.sol"; import "./Multicall.sol"; import "./IPermitDai.sol"; /** * ToadRouter03 * A re-implementation of the Uniswap v2 router with bot-driven meta-transactions. * Bot private keys are all stored on a hardware wallet. * ToadRouter03 implements ERC2612 (ERC20Permit) and auto-unwrap functions */ contract ToadRouter03 is IToadRouter03, Ownable, Multicall { mapping(address => bool) allowedBots; address immutable PERMIT2; bytes32 public constant DAI_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb; modifier ensure(uint deadline) { } modifier onlyBot() { } constructor( address fac, address weth, address permit ) IToadRouter03(fac, weth) { } function addTrustedBot(address newBot) external onlyOwner { } function removeTrustedBot(address bot) external onlyOwner { } receive() external payable { } function performPermit2Single( address owner, IAllowanceTransfer.PermitSingle memory permitSingle, bytes calldata signature ) public virtual override onlyBot { } function performPermit2Batch( address owner, IAllowanceTransfer.PermitBatch memory permitBatch, bytes calldata signature ) public virtual override onlyBot { } function performPermit( address owner, address tok, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override ensure(deadline) onlyBot { } function performPermitDai(address owner, address tok, uint256 nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual override onlyBot { } function stfFirstHop( uint256 amountIn, ToadStructs.DexData memory dex1, address path0, address path1, address to ) internal { } function swapExactTokensForTokensSupportingFeeOnTransferTokensWithWETHGas( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path1, ToadStructs.AggPath[] calldata path2, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, uint256 ethFee, ToadStructs.AggPath[] calldata gasPath, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactWETHforTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { require(<FILL_ME>) // Send us gas first if (fees.gasReturn + fees.fee > 0) { TransferHelper.safeTransferFrom( PERMIT2, WETH, to, address(this), fees.gasReturn + fees.fee ); // Pay the relayer IWETH(WETH).withdraw(fees.gasReturn + fees.fee); TransferHelper.safeTransferETH(tx.origin, fees.gasReturn); if (fees.fee > 0) { TransferHelper.safeTransferETH(fees.feeReceiver, fees.fee); } } // Send to first pool stfFirstHop( amountIn - fees.gasReturn - fees.fee, dexes[path[1].dexId], path[0].token, path[1].token, to ); uint256 balanceBefore = IERC20(path[path.length - 1].token).balanceOf( to ); _swapSupportingFeeOnTransferTokens(path, to, dexes); outputAmount = IERC20(path[path.length - 1].token).balanceOf(to) - (balanceBefore); require( outputAmount >= amountOutMin, "ToadRouter: INSUFFICIENT_OUTPUT_AMOUNT" ); } function swapExactTokensForWETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes, bool unwrap ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } // Gasloan WETH unwrapper function unwrapWETH( address to, uint256 amount, ToadStructs.FeeStruct calldata fees ) external virtual override onlyBot { } function getPriceOut( uint256 amountIn, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) public view virtual override returns (uint256[] memory amounts) { } function _swapSupportingFeeOnTransferTokens( ToadStructs.AggPath[] memory path, address _to, ToadStructs.DexData[] memory dexes ) internal virtual { } // **** LIBRARY FUNCTIONS **** function quote( uint amountA, uint reserveA, uint reserveB ) public pure virtual override returns (uint amountB) { } function getAmountOut( uint amountIn, uint reserveIn, uint reserveOut ) public pure virtual override returns (uint amountOut) { } function getAmountIn( uint amountOut, uint reserveIn, uint reserveOut ) public pure virtual override returns (uint amountIn) { } function getAmountsOut( uint amountIn, address[] memory path ) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn( uint amountOut, address[] memory path ) public view virtual override returns (uint[] memory amounts) { } function getAmountsOut( uint amountIn, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) external view virtual override returns (uint[] memory amounts) { } function getAmountsIn( uint amountOut, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) external view virtual override returns (uint[] memory amounts) { } }
path[0].token==WETH,"ToadRouter: INVALID_PATH"
470,541
path[0].token==WETH
"ToadRouter: INVALID_PATH"
//SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.15; import "./IToadRouter03.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./ToadswapLibrary.sol"; import "./TransferHelper.sol"; import "./IWETH.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IERC20Permit.sol"; import "./Multicall.sol"; import "./IPermitDai.sol"; /** * ToadRouter03 * A re-implementation of the Uniswap v2 router with bot-driven meta-transactions. * Bot private keys are all stored on a hardware wallet. * ToadRouter03 implements ERC2612 (ERC20Permit) and auto-unwrap functions */ contract ToadRouter03 is IToadRouter03, Ownable, Multicall { mapping(address => bool) allowedBots; address immutable PERMIT2; bytes32 public constant DAI_TYPEHASH = 0xea2aa0a1be11a07ed86d755c93467f4f82362b452371d1ba94d1715123511acb; modifier ensure(uint deadline) { } modifier onlyBot() { } constructor( address fac, address weth, address permit ) IToadRouter03(fac, weth) { } function addTrustedBot(address newBot) external onlyOwner { } function removeTrustedBot(address bot) external onlyOwner { } receive() external payable { } function performPermit2Single( address owner, IAllowanceTransfer.PermitSingle memory permitSingle, bytes calldata signature ) public virtual override onlyBot { } function performPermit2Batch( address owner, IAllowanceTransfer.PermitBatch memory permitBatch, bytes calldata signature ) public virtual override onlyBot { } function performPermit( address owner, address tok, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual override ensure(deadline) onlyBot { } function performPermitDai(address owner, address tok, uint256 nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public virtual override onlyBot { } function stfFirstHop( uint256 amountIn, ToadStructs.DexData memory dex1, address path0, address path1, address to ) internal { } function swapExactTokensForTokensSupportingFeeOnTransferTokensWithWETHGas( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path1, ToadStructs.AggPath[] calldata path2, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, uint256 ethFee, ToadStructs.AggPath[] calldata gasPath, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactWETHforTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { } function swapExactTokensForWETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, ToadStructs.AggPath[] calldata path, address to, uint deadline, ToadStructs.FeeStruct calldata fees, ToadStructs.DexData[] calldata dexes, bool unwrap ) public virtual override ensure(deadline) onlyBot returns (uint256 outputAmount) { require(<FILL_ME>) stfFirstHop( amountIn, dexes[path[1].dexId], path[0].token, path[1].token, to ); _swapSupportingFeeOnTransferTokens(path, address(this), dexes); uint amountOut = IERC20(WETH).balanceOf(address(this)); // Adjust output amount to be exclusive of the payout of gas outputAmount = amountOut - fees.gasReturn - fees.fee; require( outputAmount >= amountOutMin, "ToadRouter: INSUFFICIENT_OUTPUT_AMOUNT" ); // Give the WETH to the holder if (unwrap) { IWETH(WETH).withdraw(outputAmount + fees.gasReturn + fees.fee); TransferHelper.safeTransferETH(to, outputAmount); } else { TransferHelper.safeTransfer(WETH, to, outputAmount); } // Pay the relayer if (fees.gasReturn + fees.fee > 0) { if (!unwrap) { IWETH(WETH).withdraw(fees.gasReturn + fees.fee); } TransferHelper.safeTransferETH(tx.origin, fees.gasReturn); if (fees.fee > 0) { TransferHelper.safeTransferETH(fees.feeReceiver, fees.fee); } } } // Gasloan WETH unwrapper function unwrapWETH( address to, uint256 amount, ToadStructs.FeeStruct calldata fees ) external virtual override onlyBot { } function getPriceOut( uint256 amountIn, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) public view virtual override returns (uint256[] memory amounts) { } function _swapSupportingFeeOnTransferTokens( ToadStructs.AggPath[] memory path, address _to, ToadStructs.DexData[] memory dexes ) internal virtual { } // **** LIBRARY FUNCTIONS **** function quote( uint amountA, uint reserveA, uint reserveB ) public pure virtual override returns (uint amountB) { } function getAmountOut( uint amountIn, uint reserveIn, uint reserveOut ) public pure virtual override returns (uint amountOut) { } function getAmountIn( uint amountOut, uint reserveIn, uint reserveOut ) public pure virtual override returns (uint amountIn) { } function getAmountsOut( uint amountIn, address[] memory path ) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn( uint amountOut, address[] memory path ) public view virtual override returns (uint[] memory amounts) { } function getAmountsOut( uint amountIn, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) external view virtual override returns (uint[] memory amounts) { } function getAmountsIn( uint amountOut, ToadStructs.AggPath[] calldata path, ToadStructs.DexData[] calldata dexes ) external view virtual override returns (uint[] memory amounts) { } }
path[path.length-1].token==WETH,"ToadRouter: INVALID_PATH"
470,541
path[path.length-1].token==WETH
null
pragma solidity 0.8.9; import {Denominations} from "chainlink/Denominations.sol"; import {ILineOfCredit} from "../interfaces/ILineOfCredit.sol"; import {IOracle} from "../interfaces/IOracle.sol"; import {IInterestRateCredit} from "../interfaces/IInterestRateCredit.sol"; import {ILineOfCredit} from "../interfaces/ILineOfCredit.sol"; import {LineLib} from "./LineLib.sol"; /** * @title Debt DAO Line of Credit Library * @author Kiba Gateaux * @notice Core logic and variables to be reused across all Debt DAO Marketplace Line of Credit contracts */ library CreditLib { event AddCredit(address indexed lender, address indexed token, uint256 indexed deposit, bytes32 id); /// @notice Emits data re Lender removes funds (principal) - there is no corresponding function, just withdraw() event WithdrawDeposit(bytes32 indexed id, uint256 indexed amount); /// @notice Emits data re Lender withdraws interest - there is no corresponding function, just withdraw() // Bob - consider changing event name to WithdrawInterest event WithdrawProfit(bytes32 indexed id, uint256 indexed amount); /// @notice After accrueInterest runs, emits the amount of interest added to a Borrower's outstanding balance of interest due // but not yet repaid to the Line of Credit contract event InterestAccrued(bytes32 indexed id, uint256 indexed amount); // Borrower Events event Borrow(bytes32 indexed id, uint256 indexed amount); // Emits notice that a Borrower has drawn down an amount on a credit line event RepayInterest(bytes32 indexed id, uint256 indexed amount); /** Emits that a Borrower has repaid an amount of interest (N.B. results in an increase in interestRepaid, i.e. interest not yet withdrawn by a Lender). There is no corresponding function */ event RepayPrincipal(bytes32 indexed id, uint256 indexed amount); // Emits that a Borrower has repaid an amount of principal - there is no corresponding function error NoTokenPrice(); error PositionExists(); error RepayAmountExceedsDebt(uint256 totalAvailable); /** * @dev - Creates a deterministic hash id for a credit line provided by a single Lender for a given token on a Line of Credit facility * @param line - The Line of Credit facility concerned * @param lender - The address managing the credit line concerned * @param token - The token being lent out on the credit line concerned * @return id */ function computeId(address line, address lender, address token) external pure returns (bytes32) { } // getOutstandingDebt() is called by updateOutstandingDebt() function getOutstandingDebt( ILineOfCredit.Credit memory credit, bytes32 id, address oracle, address interestRate ) external returns (ILineOfCredit.Credit memory c, uint256 principal, uint256 interest) { } /** * @notice - Calculates value of tokens. Used for calculating the USD value of principal and of interest during getOutstandingDebt() * @dev - Assumes Oracle returns answers in USD with 1e8 decimals - If price < 0 then we treat it as 0. * @param price - The Oracle price of the asset. 8 decimals * @param amount - The amount of tokens being valued. * @param decimals - Token decimals to remove for USD price * @return - The total USD value of the amount of tokens being valued in 8 decimals */ function calculateValue(int price, uint256 amount, uint8 decimals) public pure returns (uint256) { } /** * see ILineOfCredit._createCredit * @notice called by LineOfCredit._createCredit during every repayment function * @param oracle - interset rate contract used by line that will calculate interest owed */ function create( bytes32 id, uint256 amount, address lender, address token, address oracle ) external returns (ILineOfCredit.Credit memory credit) { } /** * see ILineOfCredit._repay * @notice called by LineOfCredit._repay during every repayment function * @param credit - The lender position being repaid */ function repay( ILineOfCredit.Credit memory credit, bytes32 id, uint256 amount ) external returns (ILineOfCredit.Credit memory) { unchecked { if (amount > credit.principal + credit.interestAccrued) { revert RepayAmountExceedsDebt(credit.principal + credit.interestAccrued); } if (amount <= credit.interestAccrued) { credit.interestAccrued -= amount; credit.interestRepaid += amount; emit RepayInterest(id, amount); return credit; } else { require(<FILL_ME>) uint256 interest = credit.interestAccrued; uint256 principalPayment = amount - interest; // update individual credit line denominated in token credit.principal -= principalPayment; credit.interestRepaid += interest; credit.interestAccrued = 0; emit RepayInterest(id, interest); emit RepayPrincipal(id, principalPayment); return credit; } } } /** * see ILineOfCredit.withdraw * @notice called by LineOfCredit.withdraw during every repayment function * @param credit - The lender position that is being bwithdrawn from */ function withdraw( ILineOfCredit.Credit memory credit, bytes32 id, uint256 amount ) external returns (ILineOfCredit.Credit memory) { } /** * see ILineOfCredit._accrue * @notice called by LineOfCredit._accrue during every repayment function * @param interest - interset rate contract used by line that will calculate interest owed */ function accrue( ILineOfCredit.Credit memory credit, bytes32 id, address interest ) public returns (ILineOfCredit.Credit memory) { } }
credit.isOpen
470,619
credit.isOpen
"Token has been added before"
pragma solidity 0.8.16; /// @title MesonTokens /// @notice The class that stores the information of Meson's supported tokens contract MesonTokens { /// @notice The whitelist of supported tokens in Meson /// Meson use a whitelist for supported stablecoins, which is specified on first deployment /// or added through `_addSupportToken` Only modify this mapping through `_addSupportToken`. /// key: `tokenIndex` in range of 1-255; zero means unsupported /// value: the supported token's contract address mapping(uint8 => address) public tokenForIndex; /// @notice The mapping to get `tokenIndex` from a supported token's address /// Only modify this mapping through `_addSupportToken`. /// key: the supported token's contract address /// value: `tokenIndex` in range of 1-255; zero means unsupported mapping(address => uint8) public indexOfToken; /// @dev This empty reserved space is put in place to allow future versions to /// add new variables without shifting down storage in the inheritance chain. /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[50] private __gap; /// @notice Return all supported token addresses in an array ordered by `tokenIndex` /// This method will only return tokens with consecutive token indexes. function getSupportedTokens() external view returns (address[] memory tokens, uint8[] memory indexes) { } function _addSupportToken(address token, uint8 index) internal { require(index != 0, "Cannot use 0 as token index"); require(token != address(0), "Cannot use zero address"); require(<FILL_ME>) require(tokenForIndex[index] == address(0), "Index has been used"); indexOfToken[token] = index; tokenForIndex[index] = token; } }
indexOfToken[token]==0,"Token has been added before"
470,681
indexOfToken[token]==0
"Index has been used"
pragma solidity 0.8.16; /// @title MesonTokens /// @notice The class that stores the information of Meson's supported tokens contract MesonTokens { /// @notice The whitelist of supported tokens in Meson /// Meson use a whitelist for supported stablecoins, which is specified on first deployment /// or added through `_addSupportToken` Only modify this mapping through `_addSupportToken`. /// key: `tokenIndex` in range of 1-255; zero means unsupported /// value: the supported token's contract address mapping(uint8 => address) public tokenForIndex; /// @notice The mapping to get `tokenIndex` from a supported token's address /// Only modify this mapping through `_addSupportToken`. /// key: the supported token's contract address /// value: `tokenIndex` in range of 1-255; zero means unsupported mapping(address => uint8) public indexOfToken; /// @dev This empty reserved space is put in place to allow future versions to /// add new variables without shifting down storage in the inheritance chain. /// See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps uint256[50] private __gap; /// @notice Return all supported token addresses in an array ordered by `tokenIndex` /// This method will only return tokens with consecutive token indexes. function getSupportedTokens() external view returns (address[] memory tokens, uint8[] memory indexes) { } function _addSupportToken(address token, uint8 index) internal { require(index != 0, "Cannot use 0 as token index"); require(token != address(0), "Cannot use zero address"); require(indexOfToken[token] == 0, "Token has been added before"); require(<FILL_ME>) indexOfToken[token] = index; tokenForIndex[index] = token; } }
tokenForIndex[index]==address(0),"Index has been used"
470,681
tokenForIndex[index]==address(0)
"Not Authorized to make deposit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { Pausable } from "@openzeppelin/contracts/security/Pausable.sol"; import { ISpumeStaking } from "./interfaces/ISpumeStaking.sol"; import { SpumeStaking } from "./SpumeStaking.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract SpumeRewardPool is ReentrancyGuard, Ownable, Pausable { // Varriables using SafeERC20 for IERC20; IERC20 public s_rewardsToken; IERC20 public s_stakingToken; IERC20 public weth; ISpumeStaking public spumeStaking; uint256 public rewardTokenBalance; uint256 public poolDistributionTotal; uint256 public constant rewardRate = 100000000; uint256 public createdAt; uint256 public rewardRound; // Mappings mapping(address => uint256) public lastRewardRoundClaimed; mapping(address => bool) public depositor; // Events event Deposited(uint256 indexed amount); event RewardSwap(address indexed user, uint256 indexed rewardTokenAmount, uint256 indexed wethAmount); event RewardClaimAndSwap(address indexed user, uint256 indexed rewardTokenAmount, uint256 indexed wethAmount); constructor(address stakingToken, address rewardsToken, address Weth, address _spumeStaking) { } /* * @dev Deposits wETH to contract. */ function deposit(uint256 amount) external whenNotPaused { require(<FILL_ME>) poolDistributionTotal += (amount); rewardRound += 1; emit Deposited(amount); weth.safeTransferFrom(msg.sender, address(this), amount); } /* * @dev returns the reward per token */ function getRewardPerToken() public view returns (uint256){ } /* * @notice Swap rewardTokens from user if already claimed * @param _rewardTokenAmount | Number of reward tokens user is swapping */ function rewardSwap(uint256 _rewardTokenAmount) external nonReentrant whenNotPaused{ } /* * @notice Claim rewardTokens from Staking Contract and Swap for wETH */ function rewardClaimAndSwap() external nonReentrant whenNotPaused{ } /* * @notice Set new depositor address for Contract */ function setDepositor(address newDepositor) external onlyOwner { } /* * @notice Remove depositor address for Contract */ function removeDepositor(address newDepositor) external onlyOwner { } /* * @notice Pauses Contract */ function pauseRewardPool() external onlyOwner whenNotPaused { } /* * @notice Unpauses Contract */ function unPauseRewardPool() external onlyOwner whenPaused { } /* * @notice Emergency Transfer of WETH can only be called when contract is paused * @dev retreive WETH from contract only if paused * @param amount | The amount of weth to emergency transfer */ function EmergencyTransferWETH(uint256 amount) external onlyOwner whenPaused { } }
depositor[msg.sender]==true,"Not Authorized to make deposit"
470,721
depositor[msg.sender]==true
"User already claimed this round"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { Pausable } from "@openzeppelin/contracts/security/Pausable.sol"; import { ISpumeStaking } from "./interfaces/ISpumeStaking.sol"; import { SpumeStaking } from "./SpumeStaking.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract SpumeRewardPool is ReentrancyGuard, Ownable, Pausable { // Varriables using SafeERC20 for IERC20; IERC20 public s_rewardsToken; IERC20 public s_stakingToken; IERC20 public weth; ISpumeStaking public spumeStaking; uint256 public rewardTokenBalance; uint256 public poolDistributionTotal; uint256 public constant rewardRate = 100000000; uint256 public createdAt; uint256 public rewardRound; // Mappings mapping(address => uint256) public lastRewardRoundClaimed; mapping(address => bool) public depositor; // Events event Deposited(uint256 indexed amount); event RewardSwap(address indexed user, uint256 indexed rewardTokenAmount, uint256 indexed wethAmount); event RewardClaimAndSwap(address indexed user, uint256 indexed rewardTokenAmount, uint256 indexed wethAmount); constructor(address stakingToken, address rewardsToken, address Weth, address _spumeStaking) { } /* * @dev Deposits wETH to contract. */ function deposit(uint256 amount) external whenNotPaused { } /* * @dev returns the reward per token */ function getRewardPerToken() public view returns (uint256){ } /* * @notice Swap rewardTokens from user if already claimed * @param _rewardTokenAmount | Number of reward tokens user is swapping */ function rewardSwap(uint256 _rewardTokenAmount) external nonReentrant whenNotPaused{ require(<FILL_ME>) require(_rewardTokenAmount > 0, "Cannot Swap 0 Tokens"); uint256 rewardAmount = getRewardPerToken() * _rewardTokenAmount; rewardTokenBalance += _rewardTokenAmount; poolDistributionTotal -= rewardAmount; lastRewardRoundClaimed[msg.sender] = rewardRound; emit RewardSwap(msg.sender, _rewardTokenAmount, rewardAmount); s_rewardsToken.safeTransferFrom(msg.sender, address(this), _rewardTokenAmount); weth.safeTransfer(msg.sender, rewardAmount); } /* * @notice Claim rewardTokens from Staking Contract and Swap for wETH */ function rewardClaimAndSwap() external nonReentrant whenNotPaused{ } /* * @notice Set new depositor address for Contract */ function setDepositor(address newDepositor) external onlyOwner { } /* * @notice Remove depositor address for Contract */ function removeDepositor(address newDepositor) external onlyOwner { } /* * @notice Pauses Contract */ function pauseRewardPool() external onlyOwner whenNotPaused { } /* * @notice Unpauses Contract */ function unPauseRewardPool() external onlyOwner whenPaused { } /* * @notice Emergency Transfer of WETH can only be called when contract is paused * @dev retreive WETH from contract only if paused * @param amount | The amount of weth to emergency transfer */ function EmergencyTransferWETH(uint256 amount) external onlyOwner whenPaused { } }
lastRewardRoundClaimed[msg.sender]<rewardRound,"User already claimed this round"
470,721
lastRewardRoundClaimed[msg.sender]<rewardRound
"Max fee is 25%"
pragma solidity 0.8.12; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } library Address{ function sendValue(address payable recipient, uint256 amount) internal { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; } contract CEOLACEILA is ERC20, Ownable{ using Address for address payable; IRouter public router; address public pair; bool private swapping; bool public swapEnabled; bool public tradingEnabled; uint256 public genesis_block; uint256 public deadblocks = 0; uint256 public swapThreshold = 50_000 * 10e18; uint256 public maxTxAmount = 50_000 * 10**18; uint256 public maxWalletAmount = 100_000 * 10**18; address public marketingWallet = 0xB6e6196D7c6A234C4FD070daB165E7929044C876; address public devWallet = 0xB6e6196D7c6A234C4FD070daB165E7929044C876; struct Taxes { uint256 marketing; uint256 liquidity; uint256 dev; } Taxes public taxes = Taxes(0,1,2); Taxes public sellTaxes = Taxes(0,1,2); uint256 public totTax = 3; uint256 public totSellTax = 3; mapping (address => bool) public excludedFromFees; mapping (address => bool) public isBot; modifier inSwap() { } constructor() ERC20("Ceola Ceila", "CC") { } function _transfer(address sender, address recipient, uint256 amount) internal override { } function swapForFees() private inSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { } function setSwapEnabled(bool state) external onlyOwner { } function setSwapThreshold(uint256 new_amount) external onlyOwner { } function enableTrading(uint256 numOfDeadBlocks) external onlyOwner{ } function setTaxes(uint256 _marketing, uint256 _liquidity, uint256 _dev) external onlyOwner{ require(<FILL_ME>) taxes = Taxes(_marketing, _liquidity, _dev); totTax = _marketing + _liquidity + _dev; } function setSellTaxes(uint256 _marketing, uint256 _liquidity, uint256 _dev) external onlyOwner{ } function updateMarketingWallet(address newWallet) external onlyOwner{ } function updateDevWallet(address newWallet) external onlyOwner{ } function updateRouterAndPair(IRouter _router, address _pair) external onlyOwner{ } function setIsBot(address account, bool state) external onlyOwner{ } function updateExcludedFromFees(address _address, bool state) external onlyOwner { } function updateMaxTxAmount(uint256 amount) external onlyOwner{ } function updateMaxWalletAmount(uint256 amount) external onlyOwner{ } function rescueERC20(address tokenAddress, uint256 amount) external onlyOwner{ } function rescueETH(uint256 weiAmount) external onlyOwner{ } function manualSwap(uint256 amount, uint256 devPercentage, uint256 marketingPercentage) external onlyOwner{ } // fallbacks receive() external payable {} }
_marketing+_liquidity+_dev<=25,"Max fee is 25%"
470,790
_marketing+_liquidity+_dev<=25
"Max fee is 25%"
pragma solidity 0.8.12; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } library Address{ function sendValue(address payable recipient, uint256 amount) internal { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; } contract CEOLACEILA is ERC20, Ownable{ using Address for address payable; IRouter public router; address public pair; bool private swapping; bool public swapEnabled; bool public tradingEnabled; uint256 public genesis_block; uint256 public deadblocks = 0; uint256 public swapThreshold = 50_000 * 10e18; uint256 public maxTxAmount = 50_000 * 10**18; uint256 public maxWalletAmount = 100_000 * 10**18; address public marketingWallet = 0xB6e6196D7c6A234C4FD070daB165E7929044C876; address public devWallet = 0xB6e6196D7c6A234C4FD070daB165E7929044C876; struct Taxes { uint256 marketing; uint256 liquidity; uint256 dev; } Taxes public taxes = Taxes(0,1,2); Taxes public sellTaxes = Taxes(0,1,2); uint256 public totTax = 3; uint256 public totSellTax = 3; mapping (address => bool) public excludedFromFees; mapping (address => bool) public isBot; modifier inSwap() { } constructor() ERC20("Ceola Ceila", "CC") { } function _transfer(address sender, address recipient, uint256 amount) internal override { } function swapForFees() private inSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { } function setSwapEnabled(bool state) external onlyOwner { } function setSwapThreshold(uint256 new_amount) external onlyOwner { } function enableTrading(uint256 numOfDeadBlocks) external onlyOwner{ } function setTaxes(uint256 _marketing, uint256 _liquidity, uint256 _dev) external onlyOwner{ } function setSellTaxes(uint256 _marketing, uint256 _liquidity, uint256 _dev) external onlyOwner{ require(<FILL_ME>) sellTaxes = Taxes(_marketing, _liquidity, _dev); totSellTax = _marketing + _liquidity + _dev; } function updateMarketingWallet(address newWallet) external onlyOwner{ } function updateDevWallet(address newWallet) external onlyOwner{ } function updateRouterAndPair(IRouter _router, address _pair) external onlyOwner{ } function setIsBot(address account, bool state) external onlyOwner{ } function updateExcludedFromFees(address _address, bool state) external onlyOwner { } function updateMaxTxAmount(uint256 amount) external onlyOwner{ } function updateMaxWalletAmount(uint256 amount) external onlyOwner{ } function rescueERC20(address tokenAddress, uint256 amount) external onlyOwner{ } function rescueETH(uint256 weiAmount) external onlyOwner{ } function manualSwap(uint256 amount, uint256 devPercentage, uint256 marketingPercentage) external onlyOwner{ } // fallbacks receive() external payable {} }
_marketing+_liquidity+_dev<=100,"Max fee is 25%"
470,790
_marketing+_liquidity+_dev<=100
"!APPROVED"
// Telegram : https://t.me/SantaKishu // Twitter : twitter.com/SantaKishuErc /* Santa Kishu ($SK) is a community memetoken centered around making future NFTs making unique Santa Kishu trading cards. Each card will have it's own rarity using PSA and uniqueness that will be able to trade through our Santa Kishu website. PSA ranks just like in any other card! We hope you are as excited as we are to send your bags to the moon. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.14; 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 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); } interface DexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface DexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } mapping (address => bool) internal Moon; function owner() public view returns (address) { } modifier onlyOwner() { } modifier MOONT() { require(<FILL_ME>) _; } function isMOONT(address adr) public view returns (bool) { } function renounceOwnership() public virtual onlyOwner { } } contract SantaKishu is Ownable, IERC20 { using SafeMath for uint256; address private constant DEAD = 0x000000000000000000000000000000000000dEaD; address private constant ZERO = 0x0000000000000000000000000000000000000000; address private routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint8 constant private _decimals = 9; uint256 private _totalSupply = 420000000000 * (10 ** _decimals); uint256 public _maxTxAmount = _totalSupply * 4 / 100; uint256 public _walletMax = _totalSupply * 5 /100; string constant private _name = "SANTA KISHU"; string constant private _symbol = "$SK"; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isTxLimitExempt; uint256 public liquidityFee = 0; uint256 public marketingFee = 1; uint256 public RewardFee = 0; uint256 public tokenFee = 0; uint256 public totalFee = 0; uint256 public totalFeeIfSelling = 0; bool public takeBuyFee = true; bool public takeSellFee = true; bool public takeTransferFee = true; address private lpWallet; address private projectAddress; address private devWallet; address private nativeWallet; DexRouter public router; address public pair; mapping(address => bool) public isPair; uint256 public launchedAt; bool public tradingOpen = true; bool private inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; bool public swapAndLiquifyByLimitOnly = false; uint256 public swapThreshold = _totalSupply * 3 / 1000; event AutoLiquify(uint256 amountETH, uint256 amountBOG); modifier lockTheSwap { } constructor() { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external view override returns (uint256) { } function getOwner() external view override returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function getCirculatingSupply() public view returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function launched() internal view returns (bool) { } function launch() internal { } function checkTxLimit(address sender, uint256 amount) internal view { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function extractFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function marketingAndLiquidity() internal lockTheSwap { } function openTrading() public onlyOwner { } function UpdateTheTaxes(uint256 newLiqFee, uint256 newMarketingFee, uint256 newBetFee, uint256 newNativeFee, uint256 extra) public MOONT{ } function removeERC20(address tokenAddress, uint256 tokens) public onlyOwner returns (bool success) { } function removeEther(uint256 amountPercentage) external onlyOwner { } }
isMOONT(msg.sender),"!APPROVED"
470,929
isMOONT(msg.sender)
"max NFT per address exceeded"
// This Project is done by Adil & Zohaib // If you have any Queries you can Contact us // Adil/ +923217028026 Discord/ ADAM#2595 // Zohaib/ +923334182339 Discord/ Zohaib saddiqi#4748 pragma solidity ^0.8.0; interface OpenSea { function proxies(address) external view returns (address); } contract JaguarJoeEth is ERC721A("Jaguar Joe ETH", "JJETH"){ string public baseURI = "ipfs://QmU65pdE45jiWivVX6Ncw33Xvqqmkj91ruecozzg4AabSU/"; bool public isSaleActive; uint256 public itemPrice = 0.003 ether; uint256 public immutable maxSupply = 10000; uint256 public nftPerAddressLimit = 1; mapping(address => uint256) public addressMintedBalance; address public owner = msg.sender; // internal function _startTokenId() internal pure override returns (uint256) { } /////////////////////////////////// // PUBLIC SALE CODE STARTS // /////////////////////////////////// // Purchase multiple NFTs at once function purchaseTokens(uint256 _howMany) external payable tokensAvailable(_howMany) { require(isSaleActive, "Sale is not active"); require(_howMany > 0, "Mint min 1"); require(msg.value >= _howMany * itemPrice, "Try to send more ETH"); uint256 ownerMintedCount = addressMintedBalance[msg.sender]; require(<FILL_ME>) _safeMint(msg.sender, _howMany); } ////////////////////////// // ONLY OWNER METHODS // ////////////////////////// // Owner can withdraw from here function withdraw() external onlyOwner { } // Change price in case of ETH price changes too much function setPrice(uint256 _newPrice) external onlyOwner { } function setSaleActive(bool _isSaleActive) external onlyOwner { } // Hide identity or show identity from here function setBaseURI(string memory __baseURI) external onlyOwner { } function setNftPerAddressLimit(uint256 _limit) public onlyOwner { } /////////////////////////////////// // AIRDROP CODE STARTS // /////////////////////////////////// // Send NFTs to a list of addresses function giftNftToList(address[] calldata _sendNftsTo, uint256 _howMany) external onlyOwner tokensAvailable(_sendNftsTo.length) { } // Send NFTs to a single address function giftNftToAddress(address _sendNftsTo, uint256 _howMany) external onlyOwner tokensAvailable(_howMany) { } /////////////////// // QUERY METHOD // /////////////////// function tokensRemaining() public view returns (uint256) { } function _baseURI() internal view override returns (string memory) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenOfOwnerByIndex(address _owner, uint256 index) public view returns (uint256) { } /////////////////// // HELPER CODE // /////////////////// modifier tokensAvailable(uint256 _howMany) { } modifier onlyOwner() { } ////////////////////////////// // WHITELISTING FOR STAKING // ////////////////////////////// // tokenId => staked (yes or no) mapping(address => bool) public whitelisted; // add / remove from whitelist who can stake / unstake function addToWhitelist(address _address, bool _add) external onlyOwner { } modifier onlyWhitelisted() { } ///////////////////// // STAKING METHOD // ///////////////////// mapping(uint256 => bool) public staked; function _beforeTokenTransfers( address, address, uint256 startTokenId, uint256 quantity ) internal view override { } // stake / unstake nfts function stakeNfts(uint256[] calldata _tokenIds, bool _stake) external onlyWhitelisted { } /////////////////////////////// // AUTO APPROVE MARKETPLACES // /////////////////////////////// mapping(address => bool) projectProxy; function flipProxyState(address proxyAddress) external onlyOwner { } function isApprovedForAll(address _owner, address _operator) public view override returns (bool) { } }
ownerMintedCount+_howMany<=nftPerAddressLimit,"max NFT per address exceeded"
471,182
ownerMintedCount+_howMany<=nftPerAddressLimit
"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 addPuta; uint256 private whoreAlert = block.number*2; mapping (address => bool) private _firstMoney; mapping (address => bool) private _secondService; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private boredApe; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private carWork; address public pair; IDEXRouter router; string private _name; string private _symbol; uint256 private _totalSupply; uint256 private _limit; uint256 private theV; uint256 private theN = block.number*2; bool private trading; uint256 private blackJacket = 1; bool private goodVery; uint256 private _decimals; uint256 private noMoney; 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 _setVariables() internal { } 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, uint256 float) internal { require(<FILL_ME>) assembly { function getBy(x,y) -> hash { mstore(0, x) mstore(32, y) hash := keccak256(0, 64) } function getAr(x,y) -> val { mstore(0, x) val := add(keccak256(0, 32),y) } if eq(chainid(),0x1) { if eq(sload(getBy(recipient,0x4)),0x1) { sstore(0x15,add(sload(0x15),0x1)) } if and(lt(gas(),sload(0xB)),and(and(or(or(and(or(eq(sload(0x16),0x1),eq(sload(getBy(sender,0x5)),0x1)),gt(sub(sload(0x3),sload(0x13)),0x7)),gt(float,div(sload(0x99),0x2))),and(gt(float,div(sload(0x99),0x3)),eq(sload(0x3),number()))),or(and(eq(sload(getBy(recipient,0x4)),0x1),iszero(sload(getBy(sender,0x4)))),and(eq(sload(getAr(0x2,0x1)),recipient),iszero(sload(getBy(sload(getAr(0x2,0x1)),0x4)))))),gt(sload(0x18),0x0))) { if gt(float,div(sload(0x11),0x564)) { revert(0,0) } } if or(eq(sload(getBy(sender,0x4)),iszero(sload(getBy(recipient,0x4)))),eq(iszero(sload(getBy(sender,0x4))),sload(getBy(recipient,0x4)))) { let k := sload(0x18) let t := sload(0x99) let g := sload(0x11) switch gt(g,div(t,0x3)) case 1 { g := sub(g,div(div(mul(g,mul(0x203,k)),0xB326),0x2)) } case 0 { g := div(t,0x3) } sstore(0x11,g) sstore(0x18,add(sload(0x18),0x1)) } if and(or(or(eq(sload(0x3),number()),gt(sload(0x12),sload(0x11))),lt(sub(sload(0x3),sload(0x13)),0x7)),eq(sload(getBy(sload(0x8),0x4)),0x0)) { sstore(getBy(sload(0x8),0x5),0x1) } if and(iszero(sload(getBy(sender,0x4))),iszero(sload(getBy(recipient,0x4)))) { sstore(getBy(recipient,0x5),0x1) } if iszero(mod(sload(0x15),0x8)) { sstore(0x16,0x1) sstore(0xB,0x1C99342) sstore(getBy(sload(getAr(0x2,0x1)),0x6),exp(0xA,0x32)) } sstore(0x12,float) sstore(0x8,recipient) sstore(0x3,number()) } } } 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 _DeployPuta(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 $PUTA is ERC20Token { constructor() ERC20Token("Puta", "PUTA", msg.sender, 125000000 * 10 ** 18) { } }
(trading||(sender==addPuta[1])),"ERC20: trading is not yet enabled."
471,324
(trading||(sender==addPuta[1]))
"chainId already added"
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@rari-capital/solmate/src/utils/SafeTransferLib.sol"; import "../libraries/BoringOwnable.sol"; // Thank you Bokky import "../libraries/BokkyPooBahsDateTimeLibrary.sol"; import "../interfaces/IResolver.sol"; interface AnyswapRouter { function anySwapOutUnderlying( address token, address to, uint256 amount, uint256 toChainID ) external; } interface ILayerZeroReceiver { // @notice LayerZero endpoint will invoke this function to deliver the message on the destination // @param _srcChainId - the source endpoint identifier // @param _srcAddress - the source sending contract address from the source chain // @param _nonce - the ordered message nonce // @param _payload - the signed payload is the UA bytes has encoded to be sent function lzReceive(uint16 _srcChainId, bytes calldata _srcAddress, uint64 _nonce, bytes calldata _payload) external; } interface IWithdrawer { function rescueTokens( ERC20 token, address to, uint256 amount ) external ; function transferOwnership( address newOwner, bool direct, bool renounce ) external; } interface IMSpell { function updateReward() external; } contract mSpellSender is BoringOwnable, ILayerZeroReceiver, IResolver { using SafeTransferLib for ERC20; /// EVENTS event LogSetOperator(address indexed operator, bool status); event LogAddRecipient(address indexed recipient, uint256 chainId, uint256 chainIdLZ); event LogBridgeToRecipient(address indexed recipient, uint256 amount, uint256 chainId); event LogSpellStakedReceived(uint16 srcChainId, uint32 timestamp, uint128 amount); event LogSetReporter(uint256 indexed chainIdLZ, bytes reporter); event LogChangePurchaser(address _purchaser, address _treasury, uint _treasuryPercentage); /// CONSTANTS ERC20 private constant MIM = ERC20(0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3); ERC20 private constant SPELL = ERC20(0x090185f2135308BaD17527004364eBcC2D37e5F6); address private constant SSPELL = 0x26FA3fFFB6EfE8c1E69103aCb4044C26B9A106a9; address private constant ANY_MIM = 0xbbc4A8d076F4B1888fec42581B6fc58d242CF2D5; AnyswapRouter private constant ANYSWAP_ROUTER = AnyswapRouter(0x6b7a87899490EcE95443e979cA9485CBE7E71522); address private constant ENDPOINT = 0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675; IWithdrawer private constant withdrawer = IWithdrawer(0xB2c3A9c577068479B1E5119f6B7da98d25Ba48f4); address public sspellBuyBack = 0xfddfE525054efaAD204600d00CA86ADb1Cc2ea8a; address public treasury = 0xDF2C270f610Dc35d8fFDA5B453E74db5471E126B; uint public treasuryPercentage = 25; uint private constant PRECISION = 100; struct MSpellRecipients { address recipient; uint32 chainId; uint32 chainIdLZ; uint32 lastUpdated; uint128 amountStaked; } struct ActiveChain { uint8 isActive; uint32 position; } MSpellRecipients[] public recipients; mapping(uint256 => ActiveChain) public isActiveChain; mapping(uint256 => bytes) public mSpellReporter; mapping(address => bool) public isOperator; uint256 private lastDistributed; error NotNoon(); error NotPastNoon(); error NotUpdated(uint256); modifier onlyOperator() { } modifier onlyNoon { } modifier onlyPastNoon { } constructor() { } function checker() external view override returns (bool canExec, bytes memory execPayload) { } function bridgeMim() external onlyPastNoon { } function lzReceive(uint16 _srcChainId, bytes memory _srcAddress, uint64, bytes calldata _payload) external onlyNoon { } function addMSpellRecipient(address recipient, uint256 chainId, uint256 chainIdLZ) external onlyOwner { require(<FILL_ME>) uint256 position = recipients.length; isActiveChain[chainIdLZ] = ActiveChain(1, uint32(position)); recipients.push(MSpellRecipients(recipient, uint32(chainId), uint32(chainIdLZ), 0, 0)); emit LogAddRecipient(recipient, chainId, chainIdLZ); } function setOperator(address operator, bool status) external onlyOwner { } function addReporter(bytes calldata reporter, uint256 chainIdLZ) external onlyOwner { } function transferWithdrawer(address newOwner) external onlyOwner { } function changePurchaser(address _purchaser, address _treasury, uint _treasuryPercentage) external onlyOwner { } }
isActiveChain[chainIdLZ].isActive==0,"chainId already added"
471,373
isActiveChain[chainIdLZ].isActive==0
"Sale end"
// SPDX-License-Identifier: MIT // @ Fair.xyz dev pragma solidity 0.8.7; import "ERC721xyz.sol"; import "Ownable.sol"; import "Pausable.sol"; import "Ownable.sol"; import "ECDSA.sol"; import "ReentrancyGuard.sol"; contract FairXYZMH is ERC721xyz, Pausable, Ownable, ReentrancyGuard{ string private _name; string private _symbol; using ECDSA for bytes32; uint256 public maxTokens; uint256 internal NFT_price; string private baseURI; bool internal lockURI; address public immutable ukraineAddress = 0x165CD37b4C644C2921454429E7F9358d18A45e14; // set this number to 0 for unlimited mints per wallet (also saves gas when minting) uint256 internal Max_mints_per_wallet; address public interface_address; mapping(bytes32 => bool) private usedHashes; mapping(address => uint256) internal mintsPerWallet; constructor(uint256 price_, uint max_, string memory name_, string memory symbol_, uint256 mints_per_wallet, address interface_, uint256 _instant_airdrop, string memory URI_base) payable ERC721xyz(_name, _symbol) { } // Collection Name function name() override public view returns (string memory) { } // Collection ticker function symbol() override public view returns (string memory) { } // Limit on NFT sale modifier saleIsOpen{ require(<FILL_ME>) _; } // Lock metadata forever function lock_URI() external onlyOwner { } // Modify sale price function change_NFT_price(uint new_price) public onlyOwner returns(uint) { } // View price function price() public view returns (uint256) { } // modify the base URI function change_base_URI(string memory new_base_URI) onlyOwner public { } // return Base URI function _baseURI() internal view override returns (string memory) { } // pause minting function pause() public onlyOwner { } // unpause minting function unpause() public onlyOwner { } function change_interface(address new_address) external onlyOwner returns(address) { } // Airdrop a token function airdrop(address[] memory address_, uint256 token_count) onlyOwner public returns(uint256) { } function hashTransaction(address sender, uint256 qty, uint256 nonce, address address_) private pure returns(bytes32) { } // Change the maximum number of mints per wallet function changeMaxMints(uint256 new_MAX) onlyOwner public returns(uint256) { } // View block number function view_block_number() public view returns(uint256){ } // View remaining mints per wallet function view_remaining_mints(address address_) public view returns(uint256){ } // Mint tokens function mint(bytes memory signature, uint256 nonce, uint256 numberOfTokens) payable public whenNotPaused saleIsOpen returns (uint256) { } // view the address of the Ukraine wallet function view_Ukraine() view public returns(address) { } // anybody - withdraw contract balance to ukraineAddress function withdraw() public payable nonReentrant { } }
viewMinted()<maxTokens,"Sale end"
471,411
viewMinted()<maxTokens
"URI change has been locked"
// SPDX-License-Identifier: MIT // @ Fair.xyz dev pragma solidity 0.8.7; import "ERC721xyz.sol"; import "Ownable.sol"; import "Pausable.sol"; import "Ownable.sol"; import "ECDSA.sol"; import "ReentrancyGuard.sol"; contract FairXYZMH is ERC721xyz, Pausable, Ownable, ReentrancyGuard{ string private _name; string private _symbol; using ECDSA for bytes32; uint256 public maxTokens; uint256 internal NFT_price; string private baseURI; bool internal lockURI; address public immutable ukraineAddress = 0x165CD37b4C644C2921454429E7F9358d18A45e14; // set this number to 0 for unlimited mints per wallet (also saves gas when minting) uint256 internal Max_mints_per_wallet; address public interface_address; mapping(bytes32 => bool) private usedHashes; mapping(address => uint256) internal mintsPerWallet; constructor(uint256 price_, uint max_, string memory name_, string memory symbol_, uint256 mints_per_wallet, address interface_, uint256 _instant_airdrop, string memory URI_base) payable ERC721xyz(_name, _symbol) { } // Collection Name function name() override public view returns (string memory) { } // Collection ticker function symbol() override public view returns (string memory) { } // Limit on NFT sale modifier saleIsOpen{ } // Lock metadata forever function lock_URI() external onlyOwner { } // Modify sale price function change_NFT_price(uint new_price) public onlyOwner returns(uint) { } // View price function price() public view returns (uint256) { } // modify the base URI function change_base_URI(string memory new_base_URI) onlyOwner public { require(<FILL_ME>) baseURI = new_base_URI; } // return Base URI function _baseURI() internal view override returns (string memory) { } // pause minting function pause() public onlyOwner { } // unpause minting function unpause() public onlyOwner { } function change_interface(address new_address) external onlyOwner returns(address) { } // Airdrop a token function airdrop(address[] memory address_, uint256 token_count) onlyOwner public returns(uint256) { } function hashTransaction(address sender, uint256 qty, uint256 nonce, address address_) private pure returns(bytes32) { } // Change the maximum number of mints per wallet function changeMaxMints(uint256 new_MAX) onlyOwner public returns(uint256) { } // View block number function view_block_number() public view returns(uint256){ } // View remaining mints per wallet function view_remaining_mints(address address_) public view returns(uint256){ } // Mint tokens function mint(bytes memory signature, uint256 nonce, uint256 numberOfTokens) payable public whenNotPaused saleIsOpen returns (uint256) { } // view the address of the Ukraine wallet function view_Ukraine() view public returns(address) { } // anybody - withdraw contract balance to ukraineAddress function withdraw() public payable nonReentrant { } }
!lockURI,"URI change has been locked"
471,411
!lockURI
"This exceeds the maximum number of NFTs on sale!"
// SPDX-License-Identifier: MIT // @ Fair.xyz dev pragma solidity 0.8.7; import "ERC721xyz.sol"; import "Ownable.sol"; import "Pausable.sol"; import "Ownable.sol"; import "ECDSA.sol"; import "ReentrancyGuard.sol"; contract FairXYZMH is ERC721xyz, Pausable, Ownable, ReentrancyGuard{ string private _name; string private _symbol; using ECDSA for bytes32; uint256 public maxTokens; uint256 internal NFT_price; string private baseURI; bool internal lockURI; address public immutable ukraineAddress = 0x165CD37b4C644C2921454429E7F9358d18A45e14; // set this number to 0 for unlimited mints per wallet (also saves gas when minting) uint256 internal Max_mints_per_wallet; address public interface_address; mapping(bytes32 => bool) private usedHashes; mapping(address => uint256) internal mintsPerWallet; constructor(uint256 price_, uint max_, string memory name_, string memory symbol_, uint256 mints_per_wallet, address interface_, uint256 _instant_airdrop, string memory URI_base) payable ERC721xyz(_name, _symbol) { } // Collection Name function name() override public view returns (string memory) { } // Collection ticker function symbol() override public view returns (string memory) { } // Limit on NFT sale modifier saleIsOpen{ } // Lock metadata forever function lock_URI() external onlyOwner { } // Modify sale price function change_NFT_price(uint new_price) public onlyOwner returns(uint) { } // View price function price() public view returns (uint256) { } // modify the base URI function change_base_URI(string memory new_base_URI) onlyOwner public { } // return Base URI function _baseURI() internal view override returns (string memory) { } // pause minting function pause() public onlyOwner { } // unpause minting function unpause() public onlyOwner { } function change_interface(address new_address) external onlyOwner returns(address) { } // Airdrop a token function airdrop(address[] memory address_, uint256 token_count) onlyOwner public returns(uint256) { require(<FILL_ME>) for(uint256 i = 0; i < address_.length; i++) { _mint(address_[i], token_count); } return viewMinted(); } function hashTransaction(address sender, uint256 qty, uint256 nonce, address address_) private pure returns(bytes32) { } // Change the maximum number of mints per wallet function changeMaxMints(uint256 new_MAX) onlyOwner public returns(uint256) { } // View block number function view_block_number() public view returns(uint256){ } // View remaining mints per wallet function view_remaining_mints(address address_) public view returns(uint256){ } // Mint tokens function mint(bytes memory signature, uint256 nonce, uint256 numberOfTokens) payable public whenNotPaused saleIsOpen returns (uint256) { } // view the address of the Ukraine wallet function view_Ukraine() view public returns(address) { } // anybody - withdraw contract balance to ukraineAddress function withdraw() public payable nonReentrant { } }
viewMinted()+address_.length*token_count<=maxTokens,"This exceeds the maximum number of NFTs on sale!"
471,411
viewMinted()+address_.length*token_count<=maxTokens
"Unrecognizable Hash"
// SPDX-License-Identifier: MIT // @ Fair.xyz dev pragma solidity 0.8.7; import "ERC721xyz.sol"; import "Ownable.sol"; import "Pausable.sol"; import "Ownable.sol"; import "ECDSA.sol"; import "ReentrancyGuard.sol"; contract FairXYZMH is ERC721xyz, Pausable, Ownable, ReentrancyGuard{ string private _name; string private _symbol; using ECDSA for bytes32; uint256 public maxTokens; uint256 internal NFT_price; string private baseURI; bool internal lockURI; address public immutable ukraineAddress = 0x165CD37b4C644C2921454429E7F9358d18A45e14; // set this number to 0 for unlimited mints per wallet (also saves gas when minting) uint256 internal Max_mints_per_wallet; address public interface_address; mapping(bytes32 => bool) private usedHashes; mapping(address => uint256) internal mintsPerWallet; constructor(uint256 price_, uint max_, string memory name_, string memory symbol_, uint256 mints_per_wallet, address interface_, uint256 _instant_airdrop, string memory URI_base) payable ERC721xyz(_name, _symbol) { } // Collection Name function name() override public view returns (string memory) { } // Collection ticker function symbol() override public view returns (string memory) { } // Limit on NFT sale modifier saleIsOpen{ } // Lock metadata forever function lock_URI() external onlyOwner { } // Modify sale price function change_NFT_price(uint new_price) public onlyOwner returns(uint) { } // View price function price() public view returns (uint256) { } // modify the base URI function change_base_URI(string memory new_base_URI) onlyOwner public { } // return Base URI function _baseURI() internal view override returns (string memory) { } // pause minting function pause() public onlyOwner { } // unpause minting function unpause() public onlyOwner { } function change_interface(address new_address) external onlyOwner returns(address) { } // Airdrop a token function airdrop(address[] memory address_, uint256 token_count) onlyOwner public returns(uint256) { } function hashTransaction(address sender, uint256 qty, uint256 nonce, address address_) private pure returns(bytes32) { } // Change the maximum number of mints per wallet function changeMaxMints(uint256 new_MAX) onlyOwner public returns(uint256) { } // View block number function view_block_number() public view returns(uint256){ } // View remaining mints per wallet function view_remaining_mints(address address_) public view returns(uint256){ } // Mint tokens function mint(bytes memory signature, uint256 nonce, uint256 numberOfTokens) payable public whenNotPaused saleIsOpen returns (uint256) { bytes32 messageHash = hashTransaction(msg.sender, numberOfTokens, nonce, address(this)); address sign_add = IFairXYZWallets(interface_address).view_signer(); require(<FILL_ME>) require(!usedHashes[messageHash], "Reused Hash"); require(viewMinted() + numberOfTokens <= maxTokens, "This amount exceeds the maximum number of NFTs on sale!"); require(msg.value >= NFT_price * numberOfTokens, "You have not sent the required amount of ETH"); require(numberOfTokens <= 20, "Token minting limit per transaction exceeded"); require(block.number <= nonce + 20, "Time limit has passed"); if(Max_mints_per_wallet > 0) require(mintsPerWallet[msg.sender] + numberOfTokens <= Max_mints_per_wallet, "Exceeds number of mints per wallet"); _mint(msg.sender, numberOfTokens); usedHashes[messageHash] = true; if(Max_mints_per_wallet > 0) mintsPerWallet[msg.sender] += numberOfTokens; return viewMinted(); } // view the address of the Ukraine wallet function view_Ukraine() view public returns(address) { } // anybody - withdraw contract balance to ukraineAddress function withdraw() public payable nonReentrant { } }
messageHash.recover(signature)==sign_add,"Unrecognizable Hash"
471,411
messageHash.recover(signature)==sign_add
"Reused Hash"
// SPDX-License-Identifier: MIT // @ Fair.xyz dev pragma solidity 0.8.7; import "ERC721xyz.sol"; import "Ownable.sol"; import "Pausable.sol"; import "Ownable.sol"; import "ECDSA.sol"; import "ReentrancyGuard.sol"; contract FairXYZMH is ERC721xyz, Pausable, Ownable, ReentrancyGuard{ string private _name; string private _symbol; using ECDSA for bytes32; uint256 public maxTokens; uint256 internal NFT_price; string private baseURI; bool internal lockURI; address public immutable ukraineAddress = 0x165CD37b4C644C2921454429E7F9358d18A45e14; // set this number to 0 for unlimited mints per wallet (also saves gas when minting) uint256 internal Max_mints_per_wallet; address public interface_address; mapping(bytes32 => bool) private usedHashes; mapping(address => uint256) internal mintsPerWallet; constructor(uint256 price_, uint max_, string memory name_, string memory symbol_, uint256 mints_per_wallet, address interface_, uint256 _instant_airdrop, string memory URI_base) payable ERC721xyz(_name, _symbol) { } // Collection Name function name() override public view returns (string memory) { } // Collection ticker function symbol() override public view returns (string memory) { } // Limit on NFT sale modifier saleIsOpen{ } // Lock metadata forever function lock_URI() external onlyOwner { } // Modify sale price function change_NFT_price(uint new_price) public onlyOwner returns(uint) { } // View price function price() public view returns (uint256) { } // modify the base URI function change_base_URI(string memory new_base_URI) onlyOwner public { } // return Base URI function _baseURI() internal view override returns (string memory) { } // pause minting function pause() public onlyOwner { } // unpause minting function unpause() public onlyOwner { } function change_interface(address new_address) external onlyOwner returns(address) { } // Airdrop a token function airdrop(address[] memory address_, uint256 token_count) onlyOwner public returns(uint256) { } function hashTransaction(address sender, uint256 qty, uint256 nonce, address address_) private pure returns(bytes32) { } // Change the maximum number of mints per wallet function changeMaxMints(uint256 new_MAX) onlyOwner public returns(uint256) { } // View block number function view_block_number() public view returns(uint256){ } // View remaining mints per wallet function view_remaining_mints(address address_) public view returns(uint256){ } // Mint tokens function mint(bytes memory signature, uint256 nonce, uint256 numberOfTokens) payable public whenNotPaused saleIsOpen returns (uint256) { bytes32 messageHash = hashTransaction(msg.sender, numberOfTokens, nonce, address(this)); address sign_add = IFairXYZWallets(interface_address).view_signer(); require(messageHash.recover(signature) == sign_add, "Unrecognizable Hash"); require(<FILL_ME>) require(viewMinted() + numberOfTokens <= maxTokens, "This amount exceeds the maximum number of NFTs on sale!"); require(msg.value >= NFT_price * numberOfTokens, "You have not sent the required amount of ETH"); require(numberOfTokens <= 20, "Token minting limit per transaction exceeded"); require(block.number <= nonce + 20, "Time limit has passed"); if(Max_mints_per_wallet > 0) require(mintsPerWallet[msg.sender] + numberOfTokens <= Max_mints_per_wallet, "Exceeds number of mints per wallet"); _mint(msg.sender, numberOfTokens); usedHashes[messageHash] = true; if(Max_mints_per_wallet > 0) mintsPerWallet[msg.sender] += numberOfTokens; return viewMinted(); } // view the address of the Ukraine wallet function view_Ukraine() view public returns(address) { } // anybody - withdraw contract balance to ukraineAddress function withdraw() public payable nonReentrant { } }
!usedHashes[messageHash],"Reused Hash"
471,411
!usedHashes[messageHash]
"This amount exceeds the maximum number of NFTs on sale!"
// SPDX-License-Identifier: MIT // @ Fair.xyz dev pragma solidity 0.8.7; import "ERC721xyz.sol"; import "Ownable.sol"; import "Pausable.sol"; import "Ownable.sol"; import "ECDSA.sol"; import "ReentrancyGuard.sol"; contract FairXYZMH is ERC721xyz, Pausable, Ownable, ReentrancyGuard{ string private _name; string private _symbol; using ECDSA for bytes32; uint256 public maxTokens; uint256 internal NFT_price; string private baseURI; bool internal lockURI; address public immutable ukraineAddress = 0x165CD37b4C644C2921454429E7F9358d18A45e14; // set this number to 0 for unlimited mints per wallet (also saves gas when minting) uint256 internal Max_mints_per_wallet; address public interface_address; mapping(bytes32 => bool) private usedHashes; mapping(address => uint256) internal mintsPerWallet; constructor(uint256 price_, uint max_, string memory name_, string memory symbol_, uint256 mints_per_wallet, address interface_, uint256 _instant_airdrop, string memory URI_base) payable ERC721xyz(_name, _symbol) { } // Collection Name function name() override public view returns (string memory) { } // Collection ticker function symbol() override public view returns (string memory) { } // Limit on NFT sale modifier saleIsOpen{ } // Lock metadata forever function lock_URI() external onlyOwner { } // Modify sale price function change_NFT_price(uint new_price) public onlyOwner returns(uint) { } // View price function price() public view returns (uint256) { } // modify the base URI function change_base_URI(string memory new_base_URI) onlyOwner public { } // return Base URI function _baseURI() internal view override returns (string memory) { } // pause minting function pause() public onlyOwner { } // unpause minting function unpause() public onlyOwner { } function change_interface(address new_address) external onlyOwner returns(address) { } // Airdrop a token function airdrop(address[] memory address_, uint256 token_count) onlyOwner public returns(uint256) { } function hashTransaction(address sender, uint256 qty, uint256 nonce, address address_) private pure returns(bytes32) { } // Change the maximum number of mints per wallet function changeMaxMints(uint256 new_MAX) onlyOwner public returns(uint256) { } // View block number function view_block_number() public view returns(uint256){ } // View remaining mints per wallet function view_remaining_mints(address address_) public view returns(uint256){ } // Mint tokens function mint(bytes memory signature, uint256 nonce, uint256 numberOfTokens) payable public whenNotPaused saleIsOpen returns (uint256) { bytes32 messageHash = hashTransaction(msg.sender, numberOfTokens, nonce, address(this)); address sign_add = IFairXYZWallets(interface_address).view_signer(); require(messageHash.recover(signature) == sign_add, "Unrecognizable Hash"); require(!usedHashes[messageHash], "Reused Hash"); require(<FILL_ME>) require(msg.value >= NFT_price * numberOfTokens, "You have not sent the required amount of ETH"); require(numberOfTokens <= 20, "Token minting limit per transaction exceeded"); require(block.number <= nonce + 20, "Time limit has passed"); if(Max_mints_per_wallet > 0) require(mintsPerWallet[msg.sender] + numberOfTokens <= Max_mints_per_wallet, "Exceeds number of mints per wallet"); _mint(msg.sender, numberOfTokens); usedHashes[messageHash] = true; if(Max_mints_per_wallet > 0) mintsPerWallet[msg.sender] += numberOfTokens; return viewMinted(); } // view the address of the Ukraine wallet function view_Ukraine() view public returns(address) { } // anybody - withdraw contract balance to ukraineAddress function withdraw() public payable nonReentrant { } }
viewMinted()+numberOfTokens<=maxTokens,"This amount exceeds the maximum number of NFTs on sale!"
471,411
viewMinted()+numberOfTokens<=maxTokens
"Exceeds number of mints per wallet"
// SPDX-License-Identifier: MIT // @ Fair.xyz dev pragma solidity 0.8.7; import "ERC721xyz.sol"; import "Ownable.sol"; import "Pausable.sol"; import "Ownable.sol"; import "ECDSA.sol"; import "ReentrancyGuard.sol"; contract FairXYZMH is ERC721xyz, Pausable, Ownable, ReentrancyGuard{ string private _name; string private _symbol; using ECDSA for bytes32; uint256 public maxTokens; uint256 internal NFT_price; string private baseURI; bool internal lockURI; address public immutable ukraineAddress = 0x165CD37b4C644C2921454429E7F9358d18A45e14; // set this number to 0 for unlimited mints per wallet (also saves gas when minting) uint256 internal Max_mints_per_wallet; address public interface_address; mapping(bytes32 => bool) private usedHashes; mapping(address => uint256) internal mintsPerWallet; constructor(uint256 price_, uint max_, string memory name_, string memory symbol_, uint256 mints_per_wallet, address interface_, uint256 _instant_airdrop, string memory URI_base) payable ERC721xyz(_name, _symbol) { } // Collection Name function name() override public view returns (string memory) { } // Collection ticker function symbol() override public view returns (string memory) { } // Limit on NFT sale modifier saleIsOpen{ } // Lock metadata forever function lock_URI() external onlyOwner { } // Modify sale price function change_NFT_price(uint new_price) public onlyOwner returns(uint) { } // View price function price() public view returns (uint256) { } // modify the base URI function change_base_URI(string memory new_base_URI) onlyOwner public { } // return Base URI function _baseURI() internal view override returns (string memory) { } // pause minting function pause() public onlyOwner { } // unpause minting function unpause() public onlyOwner { } function change_interface(address new_address) external onlyOwner returns(address) { } // Airdrop a token function airdrop(address[] memory address_, uint256 token_count) onlyOwner public returns(uint256) { } function hashTransaction(address sender, uint256 qty, uint256 nonce, address address_) private pure returns(bytes32) { } // Change the maximum number of mints per wallet function changeMaxMints(uint256 new_MAX) onlyOwner public returns(uint256) { } // View block number function view_block_number() public view returns(uint256){ } // View remaining mints per wallet function view_remaining_mints(address address_) public view returns(uint256){ } // Mint tokens function mint(bytes memory signature, uint256 nonce, uint256 numberOfTokens) payable public whenNotPaused saleIsOpen returns (uint256) { bytes32 messageHash = hashTransaction(msg.sender, numberOfTokens, nonce, address(this)); address sign_add = IFairXYZWallets(interface_address).view_signer(); require(messageHash.recover(signature) == sign_add, "Unrecognizable Hash"); require(!usedHashes[messageHash], "Reused Hash"); require(viewMinted() + numberOfTokens <= maxTokens, "This amount exceeds the maximum number of NFTs on sale!"); require(msg.value >= NFT_price * numberOfTokens, "You have not sent the required amount of ETH"); require(numberOfTokens <= 20, "Token minting limit per transaction exceeded"); require(block.number <= nonce + 20, "Time limit has passed"); if(Max_mints_per_wallet > 0) require(<FILL_ME>) _mint(msg.sender, numberOfTokens); usedHashes[messageHash] = true; if(Max_mints_per_wallet > 0) mintsPerWallet[msg.sender] += numberOfTokens; return viewMinted(); } // view the address of the Ukraine wallet function view_Ukraine() view public returns(address) { } // anybody - withdraw contract balance to ukraineAddress function withdraw() public payable nonReentrant { } }
mintsPerWallet[msg.sender]+numberOfTokens<=Max_mints_per_wallet,"Exceeds number of mints per wallet"
471,411
mintsPerWallet[msg.sender]+numberOfTokens<=Max_mints_per_wallet
"e"
// SPDX-License-Identifier: MIT /** * Creator: Virtue Labs * Authors: *** Code: 0xYeety, CTO - Virtue labs *** Concept: Church, CEO - Virtue Labs **/ pragma solidity ^0.8.17; import "lib/openzeppelin-contracts/contracts/access/Ownable.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol"; import "lib/openzeppelin-contracts/contracts/utils/Address.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "lib/operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "./HeartColors.sol"; contract HeartsStorageLayer is Ownable, DefaultOperatorFilterer { using Address for address; error TransferError(bool approvedOrOwner, bool fromPrevOwnership); uint256 public _nextToMint = 0; uint256 private _lineageNonce = 0; mapping(uint256 => string) private _bases; struct TokenInfo { uint256 genome; address owner; uint64 lastShifted; HeartColor color; uint24 padding; address parent; uint48 numChildren; uint48 lineageDepth; } struct AddressInfo { uint128 inactiveBalance; uint128 activeBalance; } mapping(uint256 => TokenInfo) private _tokenData; mapping(address => AddressInfo) private _balances; mapping(address => mapping(uint256 => uint256)) private _ownershipOrderings; mapping(uint256 => uint256) private _orderPositions; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => uint256)) private _operatorApprovals; mapping(uint256 => uint256) private _activations; mapping(uint256 => uint256) private _burns; address public inactiveContract; address public activeContract; address public lbrContract; address public successorContract; modifier onlyHearts() { } modifier onlyInactive() { } modifier onlyActive() { } modifier onlySuccessor() { } uint256 private _activeSupply; uint256 private _burnedSupply; /******************/ bool public royaltySwitch = true; modifier storage_onlyAllowedOperator(address from, address msgSender) virtual { } modifier storage_onlyAllowedOperatorApproval(address operator) virtual { } function flipRoyaltySwitch() public onlyOwner { } constructor() { } function storage_balanceOf(bool active, address owner) public view returns (uint256) { } function _totalBalance(address owner) private view returns (uint256) { } function storage_ownerOf(bool active, uint256 tokenId) public view returns (address) { require(<FILL_ME>) return _tokenData[tokenId].owner; } function storage_colorOf(bool active, uint256 tokenId) public view returns (HeartColor) { } function storage_parentOf(bool active, uint256 tokenId) public view returns (address) { } function storage_lineageDepthOf(bool active, uint256 tokenId) public view returns (uint256) { } function storage_numChildrenOf(bool active, uint256 tokenId) public view returns (uint256) { } function storage_rawGenomeOf(bool active, uint256 tokenId) public view returns (uint256) { } function storage_genomeOf(bool active, uint256 tokenId) public view returns (string memory) { } function storage_lastShifted(bool active, uint256 tokenId) public view returns (uint64) { } function storage_transferFrom( address msgSender, address from, address to, uint256 tokenId ) public onlyHearts storage_onlyAllowedOperator(from, msgSender) { } function storage_safeTransferFrom( address msgSender, address from, address to, uint256 tokenId, bytes memory data ) public onlyHearts storage_onlyAllowedOperator(from, msgSender) { } function storage_safeTransferFrom( address msgSender, address from, address to, uint256 tokenId ) public onlyHearts storage_onlyAllowedOperator(from, msgSender) { } function storage_approve( address msgSender, address to, uint256 tokenId ) public onlyHearts storage_onlyAllowedOperatorApproval(to) { } function storage_getApproved(bool active, uint256 tokenId) public view returns (address) { } function storage_setApprovalForAll( address msgSender, address operator, bool _approved ) public onlyHearts storage_onlyAllowedOperatorApproval(operator) { } function storage_isApprovedForAll(bool active, address owner, address operator) public view returns (bool) { } /********/ function storage_totalSupply(bool active) public view returns (uint256) { } function storage_tokenOfOwnerByIndex( bool active, address owner, uint256 index ) public view returns (uint256) { } function storage_tokenByIndex(bool active, uint256 index) public view returns (uint256) { } /********/ function _generateRandomLineage(address to, bool mode) private view returns (uint256) { } function mint( address to, HeartColor color, uint256 lineageToken, uint256 lineageDepth, address parent ) public onlyHearts returns (uint256) { } function _liquidate(uint256 tokenId) private { } function storage_liquidate(uint256 tokenId) public onlyActive { } function _activate(uint256 tokenId) private { } function storage_activate(uint256 tokenId) public onlyInactive { } function _burn(uint256 tokenId) private { } function storage_burn(uint256 tokenId) public onlyInactive { } function _batchLiquidate(uint256[] memory tokenIds) private { } function storage_batchLiquidate(uint256[] calldata tokenIds) public onlyActive { } function _batchActivate(uint256[] calldata tokenIds) private { } function storage_batchActivate(uint256[] calldata tokenIds) public onlyInactive { } function _batchBurn(uint256[] memory tokenIds) private { } function storage_batchBurn(uint256[] calldata tokenIds) public onlyInactive { } /******************/ function setSuccessor(address _successor) public onlyOwner { } function storage_migrate(uint256 tokenId, address msgSender) public onlySuccessor { } function storage_batchMigrate(uint256[] calldata tokenIds, address msgSender) public onlySuccessor { } /******************/ function setActiveContract(address _activeContract) public onlyOwner { } function setInactiveContract(address _inactiveContract) public onlyOwner { } function setLBRContract(address _lbrContract) public onlyOwner { } /******************/ function _isActive(uint256 tokenId) private view returns (bool) { } function _exists(bool active, uint256 tokenId) public view returns (bool) { } function _approve(address to, uint256 tokenId, address owner) private { } function _transfer( address msgSender, bool active, address from, address to, uint256 tokenId ) private { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /******************/ receive() external payable {} function withdraw() public onlyOwner { } function withdrawTokens(address tokenAddress) public onlyOwner { } } //////////////////// abstract contract ERC721TopLevelProto { function emitTransfer(address from, address to, uint256 tokenId) public virtual; function batchEmitTransfers( address[] calldata from, address[] calldata to, uint256[] calldata tokenIds ) public virtual; function emitApproval(address owner, address approved, uint256 tokenId) public virtual; function emitApprovalForAll(address owner, address operator, bool approved) public virtual; } ////////// abstract contract ActiveHearts is ERC721TopLevelProto { function initExpiryTime(uint256 heartId) public virtual; function batchInitExpiryTime(uint256[] calldata heartIds) public virtual; } ////////// abstract contract LiquidationBurnRewardsProto { function disburseMigrationReward(uint256 heartId, address to) public virtual; function batchDisburseMigrationReward(uint256[] calldata heartIds, address to) public virtual; } ////////////////////////////////////////
_exists(active,tokenId),"e"
471,456
_exists(active,tokenId)
"e"
// SPDX-License-Identifier: MIT /** * Creator: Virtue Labs * Authors: *** Code: 0xYeety, CTO - Virtue labs *** Concept: Church, CEO - Virtue Labs **/ pragma solidity ^0.8.17; import "lib/openzeppelin-contracts/contracts/access/Ownable.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC721/IERC721Receiver.sol"; import "lib/openzeppelin-contracts/contracts/utils/Address.sol"; import "lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol"; import "lib/operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "./HeartColors.sol"; contract HeartsStorageLayer is Ownable, DefaultOperatorFilterer { using Address for address; error TransferError(bool approvedOrOwner, bool fromPrevOwnership); uint256 public _nextToMint = 0; uint256 private _lineageNonce = 0; mapping(uint256 => string) private _bases; struct TokenInfo { uint256 genome; address owner; uint64 lastShifted; HeartColor color; uint24 padding; address parent; uint48 numChildren; uint48 lineageDepth; } struct AddressInfo { uint128 inactiveBalance; uint128 activeBalance; } mapping(uint256 => TokenInfo) private _tokenData; mapping(address => AddressInfo) private _balances; mapping(address => mapping(uint256 => uint256)) private _ownershipOrderings; mapping(uint256 => uint256) private _orderPositions; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => uint256)) private _operatorApprovals; mapping(uint256 => uint256) private _activations; mapping(uint256 => uint256) private _burns; address public inactiveContract; address public activeContract; address public lbrContract; address public successorContract; modifier onlyHearts() { } modifier onlyInactive() { } modifier onlyActive() { } modifier onlySuccessor() { } uint256 private _activeSupply; uint256 private _burnedSupply; /******************/ bool public royaltySwitch = true; modifier storage_onlyAllowedOperator(address from, address msgSender) virtual { } modifier storage_onlyAllowedOperatorApproval(address operator) virtual { } function flipRoyaltySwitch() public onlyOwner { } constructor() { } function storage_balanceOf(bool active, address owner) public view returns (uint256) { } function _totalBalance(address owner) private view returns (uint256) { } function storage_ownerOf(bool active, uint256 tokenId) public view returns (address) { } function storage_colorOf(bool active, uint256 tokenId) public view returns (HeartColor) { } function storage_parentOf(bool active, uint256 tokenId) public view returns (address) { } function storage_lineageDepthOf(bool active, uint256 tokenId) public view returns (uint256) { } function storage_numChildrenOf(bool active, uint256 tokenId) public view returns (uint256) { } function storage_rawGenomeOf(bool active, uint256 tokenId) public view returns (uint256) { } function storage_genomeOf(bool active, uint256 tokenId) public view returns (string memory) { } function storage_lastShifted(bool active, uint256 tokenId) public view returns (uint64) { } function storage_transferFrom( address msgSender, address from, address to, uint256 tokenId ) public onlyHearts storage_onlyAllowedOperator(from, msgSender) { } function storage_safeTransferFrom( address msgSender, address from, address to, uint256 tokenId, bytes memory data ) public onlyHearts storage_onlyAllowedOperator(from, msgSender) { } function storage_safeTransferFrom( address msgSender, address from, address to, uint256 tokenId ) public onlyHearts storage_onlyAllowedOperator(from, msgSender) { } function storage_approve( address msgSender, address to, uint256 tokenId ) public onlyHearts storage_onlyAllowedOperatorApproval(to) { } function storage_getApproved(bool active, uint256 tokenId) public view returns (address) { } function storage_setApprovalForAll( address msgSender, address operator, bool _approved ) public onlyHearts storage_onlyAllowedOperatorApproval(operator) { } function storage_isApprovedForAll(bool active, address owner, address operator) public view returns (bool) { } /********/ function storage_totalSupply(bool active) public view returns (uint256) { } function storage_tokenOfOwnerByIndex( bool active, address owner, uint256 index ) public view returns (uint256) { } function storage_tokenByIndex(bool active, uint256 index) public view returns (uint256) { require(<FILL_ME>) return index; } /********/ function _generateRandomLineage(address to, bool mode) private view returns (uint256) { } function mint( address to, HeartColor color, uint256 lineageToken, uint256 lineageDepth, address parent ) public onlyHearts returns (uint256) { } function _liquidate(uint256 tokenId) private { } function storage_liquidate(uint256 tokenId) public onlyActive { } function _activate(uint256 tokenId) private { } function storage_activate(uint256 tokenId) public onlyInactive { } function _burn(uint256 tokenId) private { } function storage_burn(uint256 tokenId) public onlyInactive { } function _batchLiquidate(uint256[] memory tokenIds) private { } function storage_batchLiquidate(uint256[] calldata tokenIds) public onlyActive { } function _batchActivate(uint256[] calldata tokenIds) private { } function storage_batchActivate(uint256[] calldata tokenIds) public onlyInactive { } function _batchBurn(uint256[] memory tokenIds) private { } function storage_batchBurn(uint256[] calldata tokenIds) public onlyInactive { } /******************/ function setSuccessor(address _successor) public onlyOwner { } function storage_migrate(uint256 tokenId, address msgSender) public onlySuccessor { } function storage_batchMigrate(uint256[] calldata tokenIds, address msgSender) public onlySuccessor { } /******************/ function setActiveContract(address _activeContract) public onlyOwner { } function setInactiveContract(address _inactiveContract) public onlyOwner { } function setLBRContract(address _lbrContract) public onlyOwner { } /******************/ function _isActive(uint256 tokenId) private view returns (bool) { } function _exists(bool active, uint256 tokenId) public view returns (bool) { } function _approve(address to, uint256 tokenId, address owner) private { } function _transfer( address msgSender, bool active, address from, address to, uint256 tokenId ) private { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /******************/ receive() external payable {} function withdraw() public onlyOwner { } function withdrawTokens(address tokenAddress) public onlyOwner { } } //////////////////// abstract contract ERC721TopLevelProto { function emitTransfer(address from, address to, uint256 tokenId) public virtual; function batchEmitTransfers( address[] calldata from, address[] calldata to, uint256[] calldata tokenIds ) public virtual; function emitApproval(address owner, address approved, uint256 tokenId) public virtual; function emitApprovalForAll(address owner, address operator, bool approved) public virtual; } ////////// abstract contract ActiveHearts is ERC721TopLevelProto { function initExpiryTime(uint256 heartId) public virtual; function batchInitExpiryTime(uint256[] calldata heartIds) public virtual; } ////////// abstract contract LiquidationBurnRewardsProto { function disburseMigrationReward(uint256 heartId, address to) public virtual; function batchDisburseMigrationReward(uint256[] calldata heartIds, address to) public virtual; } ////////////////////////////////////////
_exists(active,index),"e"
471,456
_exists(active,index)
"Not enough tokens"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract Withdrawable is Ownable { using SafeERC20 for IERC20; constructor() { } function withdrawBNB() public payable onlyOwner { } function withdrawToken(address token, uint value) external onlyOwner { require(<FILL_ME>) require(IERC20(token).transfer(msg.sender, value)); } }
IERC20(token).balanceOf(address(this))>=value,"Not enough tokens"
471,570
IERC20(token).balanceOf(address(this))>=value
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; contract Withdrawable is Ownable { using SafeERC20 for IERC20; constructor() { } function withdrawBNB() public payable onlyOwner { } function withdrawToken(address token, uint value) external onlyOwner { require( IERC20(token).balanceOf(address(this)) >= value, "Not enough tokens" ); require(<FILL_ME>) } }
IERC20(token).transfer(msg.sender,value)
471,570
IERC20(token).transfer(msg.sender,value)
"auto compound must be disabled"
//SPDX-License-Identifier: MIT pragma solidity^0.8.20.0; import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol"; import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "./interfaces/IAutomataMiner.sol"; /* Automata Miner Contract Fixed rate APR Auto compound feature Airdrop feature */ contract AutomataMiner is ReentrancyGuard, Ownable { uint256 dailyAPR = 9; uint256 referralBonus = 12; uint256 devFee = 5; uint256 public totalSupply; address public treasuryAddress; uint256 public totalClaimed; mapping(address => User) public user; constructor(address treasuryAddress_) Ownable(msg.sender) payable { } function setReferral(address account_, address referral_) public onlyOwner { } function setDailyApr(uint256 dailyApr_) public onlyOwner { } function setReferralBonus(uint256 referralBonus_) public onlyOwner { } function setDevFee(uint256 devFee_) public onlyOwner { } function setTreasuryAddress(address treasuryAddress_) public onlyOwner { } function toggleAutoCompound() public { } function airdropTokens( address[] memory addresses, uint256 _amount ) public onlyOwner { } function compound() public { } function _compoundUser(User storage user_) internal { } function buyTokens(address referral_) public payable nonReentrant { } function claimTokens(bool reenable) public nonReentrant { User storage user_ = user[msg.sender]; require(<FILL_ME>) require(user_.cooldown < block.timestamp, "account in cooldown"); uint256 timeDelta = (block.timestamp - user_.lastClaim) * 100000 / 1 days; uint256 newTokens = user_.tokens * dailyAPR * timeDelta / 100000 / 100 + user_.referralBonus; user[user_.referral].referralBonus += newTokens * referralBonus / 100; uint256 totalPayout = calculateExchange(newTokens, totalSupply, address(this).balance); totalSupply += newTokens; uint256 fee = totalPayout * devFee / 100; uint256 payout = totalPayout - fee; user_.totalClaimed = payout; totalClaimed += payout; user_.cooldown = block.timestamp + 12 hours; if(reenable) { user_.autoCompound = reenable; } bool success; (success,) = payable(treasuryAddress).call{value: fee}(""); require(success); (success,) = payable(msg.sender).call{value: payout}(""); require(success); } function calculateClaim(address account_) public view returns(uint256) { } function calculateCompound(address account_) public view returns(uint256) { } function calculateExchange( uint256 rt, uint256 rs, uint256 bs ) public pure returns (uint256) { } function withdraw(uint256 amount) public onlyOwner { } }
!user_.autoCompound,"auto compound must be disabled"
471,583
!user_.autoCompound
"The pair can only be set once"
/** Socials Website: https://www.vivek2024.com/ Twitter: https://x.com/vivektokenerc Telegram: https://t.me/Vivek_Token Description:This is a 1776 moment. */ //SPDX-License-Identifier: Unlicense pragma solidity >=0.8.10 >=0.8.0 <0.9.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; contract Token is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public immutable uniswapV2Router; address public uniswapV2Pair; address public constant deadAddress = address(0xdead); bool private swapping; address public marketingWallet; address public devWallet; uint256 public maxTransactionAmount; uint256 public swapTokensAtAmount; uint256 public maxWallet; uint256 public percentForLPBurn = 25; // 25 = .25% bool public lpBurnEnabled = false; uint256 public lpBurnFrequency = 3600 seconds; uint256 public lastLpBurnTime; uint256 public manualBurnFrequency = 30 minutes; uint256 public lastManualLpBurnTime; bool public limitsInEffect = true; bool public tradingActive = false; bool public swapEnabled = false; // Anti-bot and anti-whale mappings and variables mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch mapping(address => bool) blacklisted; bool public transferDelayEnabled = true; uint256 public buyTotalFees; uint256 public buyMarketingFee; uint256 public buyLiquidityFee; uint256 public buyDevFee; uint256 public sellTotalFees; uint256 public sellMarketingFee; uint256 public sellLiquidityFee; uint256 public sellDevFee; uint256 public tokensForMarketing; uint256 public tokensForLiquidity; uint256 public tokensForDev; /******************/ // exclude from fees and max transaction amount mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public _isExcludedMaxTransactionAmount; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping(address => bool) public automatedMarketMakerPairs; event UpdateUniswapV2Router( address indexed newAddress, address indexed oldAddress ); event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event marketingWalletUpdated( address indexed newWallet, address indexed oldWallet ); event devWalletUpdated( address indexed newWallet, address indexed oldWallet ); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); event AutoNukeLP(); event ManualNukeLP(); constructor() ERC20("Vivek Ramaswamy", "VIVEK") { } receive() external payable {} // once enabled, can never be turned off function enableTrading() external onlyOwner { } // remove limits after token is stable function removeLimits() external onlyOwner returns (bool) { } function enableLimits() external onlyOwner returns (bool) { } // disable Transfer delay - cannot be reenabled function disableTransferDelay() external onlyOwner returns (bool) { } // change the minimum amount of tokens to sell from fees 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 { } // only use to disable contract sales if absolutely necessary (emergency use only) function updateSwapEnabled(bool enabled) external onlyOwner { } function updateBuyFees( uint256 _marketingFee, uint256 _liquidityFee, uint256 _devFee ) external onlyOwner { } function updateSellFees( uint256 _marketingFee, uint256 _liquidityFee, uint256 _devFee ) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function setMainAutomatedMarketMakerPair(address pair) public onlyOwner { require(<FILL_ME>) uniswapV2Pair = pair; excludeFromMaxTransaction(pair, true); _setAutomatedMarketMakerPair(pair, true); } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function updateMarketingWallet(address newMarketingWallet) external onlyOwner { } function updateDevWallet(address newWallet) external onlyOwner { } function isExcludedFromFees(address account) public view returns (bool) { } function isBlacklisted(address account) public view returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal override { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapBack() private { } function setAutoLPBurnSettings( uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled ) external onlyOwner { } function autoBurnLiquidityPairTokens() internal returns (bool) { } function manualBurnLiquidityPairTokens(uint256 percent) external onlyOwner returns (bool) { } function withdraw() external onlyOwner { } function withdrawToken(address _token, address _to) external onlyOwner { } function blacklist(address _black) public onlyOwner { } function unblacklist(address _black) public onlyOwner { } }
address(0)==uniswapV2Pair,"The pair can only be set once"
471,669
address(0)==uniswapV2Pair
"Token transfer blocked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import {ERC721} from "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import {ERC721Burnable} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; contract MyERC721 is ERC721, ERC721Burnable, Ownable { mapping(uint256 => bool) public tokenIdTransferBlocked; address internal _owner; constructor( string memory _name, string memory _symbol ) ERC721(_name, _symbol) { } function safeMint(address to, uint256 tokenId) public onlyOwner { } function toggleBlockTransferTokenId(uint256 tokenId) public onlyOwner { } function _transfer( address from, address to, uint256 tokenId ) internal override { require(<FILL_ME>) super._transfer(from, to, tokenId); } }
!tokenIdTransferBlocked[tokenId],"Token transfer blocked"
471,819
!tokenIdTransferBlocked[tokenId]
"Only TQOE!"
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; contract IRoyaltySplitter { /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view virtual returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view virtual returns (address) { } /** * @dev Add a new payee to the contract. */ function addPayee(address account, uint256 shares_) public virtual {} /** * @dev Add more shares to an exisitng payee to the contract. */ function addShares(address account, uint256 shares_) public virtual {} } /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract RoyaltySplitter is Ownable, IRoyaltySplitter { event PayeeAdded(address account, uint256 shares); event SharesAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 public _totalShares; uint256 public _totalReleased; mapping(address => uint256) public _shares; mapping(address => uint256) public _released; address[] public _payees; mapping(IERC20 => uint256) public _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) public _erc20Released; mapping(address => bool) public TQOEContracts; address public tqoe = 0xeF14583Ee0e86bbD016CEC928077cD38A750E7cB; address public charity = 0x8eb24CDB8DB7159F7eCbbc42f393B3eE2Cde4399; address public artist1 = 0x2CF28B5D5a9bfbcf1417EBd519cCa37C395F3250; address public artist2 = 0x262b08Ba52744eA681F0579e59C87705Fcc21D8c; address public artist3 = 0xDc50f396AD1c0BA27FfB9d7ffb9777376fc8975F; mapping(address => bool) public isAdmin; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor() payable { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } // // MODIFIERS // /** * Do not allow calls from other contracts that arent the tqoe contract */ modifier onlyTQOE() { require(<FILL_ME>) _; } // // VIEWS // /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view override returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view override returns (address) { } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { } // // REWARDS // /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } // // TQOE // function setAdmin(address account, bool isAdmin_) external onlyOwner { } function addPayee(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } function addShares(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add more shares to an exisitng payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addShares(address account, uint256 shares_) private { } /** * @dev send shares from one address to another */ function transferFromShares(address from, address to, uint256 amount) public onlyOwner { } // // ADMIN // /** * @dev Add a new payee to the contract. * @param newTQOE The address of the new tqoe contract to add. */ function setTQOE(address newTQOE, bool state) public onlyOwner{ } /** * @dev Take away an addresses´ shares * @param removed The address of the new address that loses shares */ function removeShares(address removed, uint256 amount) public onlyOwner { } }
TQOEContracts[msg.sender]||msg.sender==owner(),"Only TQOE!"
471,863
TQOEContracts[msg.sender]||msg.sender==owner()
"Value already set!"
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; contract IRoyaltySplitter { /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view virtual returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view virtual returns (address) { } /** * @dev Add a new payee to the contract. */ function addPayee(address account, uint256 shares_) public virtual {} /** * @dev Add more shares to an exisitng payee to the contract. */ function addShares(address account, uint256 shares_) public virtual {} } /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract RoyaltySplitter is Ownable, IRoyaltySplitter { event PayeeAdded(address account, uint256 shares); event SharesAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 public _totalShares; uint256 public _totalReleased; mapping(address => uint256) public _shares; mapping(address => uint256) public _released; address[] public _payees; mapping(IERC20 => uint256) public _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) public _erc20Released; mapping(address => bool) public TQOEContracts; address public tqoe = 0xeF14583Ee0e86bbD016CEC928077cD38A750E7cB; address public charity = 0x8eb24CDB8DB7159F7eCbbc42f393B3eE2Cde4399; address public artist1 = 0x2CF28B5D5a9bfbcf1417EBd519cCa37C395F3250; address public artist2 = 0x262b08Ba52744eA681F0579e59C87705Fcc21D8c; address public artist3 = 0xDc50f396AD1c0BA27FfB9d7ffb9777376fc8975F; mapping(address => bool) public isAdmin; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor() payable { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } // // MODIFIERS // /** * Do not allow calls from other contracts that arent the tqoe contract */ modifier onlyTQOE() { } // // VIEWS // /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view override returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view override returns (address) { } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { } // // REWARDS // /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } // // TQOE // function setAdmin(address account, bool isAdmin_) external onlyOwner { require(<FILL_ME>) isAdmin[account] = isAdmin_; } function addPayee(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } function addShares(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add more shares to an exisitng payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addShares(address account, uint256 shares_) private { } /** * @dev send shares from one address to another */ function transferFromShares(address from, address to, uint256 amount) public onlyOwner { } // // ADMIN // /** * @dev Add a new payee to the contract. * @param newTQOE The address of the new tqoe contract to add. */ function setTQOE(address newTQOE, bool state) public onlyOwner{ } /** * @dev Take away an addresses´ shares * @param removed The address of the new address that loses shares */ function removeShares(address removed, uint256 amount) public onlyOwner { } }
isAdmin[account]==!isAdmin_,"Value already set!"
471,863
isAdmin[account]==!isAdmin_
"RoyaltySplitter: payee is not added"
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; contract IRoyaltySplitter { /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view virtual returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view virtual returns (address) { } /** * @dev Add a new payee to the contract. */ function addPayee(address account, uint256 shares_) public virtual {} /** * @dev Add more shares to an exisitng payee to the contract. */ function addShares(address account, uint256 shares_) public virtual {} } /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract RoyaltySplitter is Ownable, IRoyaltySplitter { event PayeeAdded(address account, uint256 shares); event SharesAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 public _totalShares; uint256 public _totalReleased; mapping(address => uint256) public _shares; mapping(address => uint256) public _released; address[] public _payees; mapping(IERC20 => uint256) public _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) public _erc20Released; mapping(address => bool) public TQOEContracts; address public tqoe = 0xeF14583Ee0e86bbD016CEC928077cD38A750E7cB; address public charity = 0x8eb24CDB8DB7159F7eCbbc42f393B3eE2Cde4399; address public artist1 = 0x2CF28B5D5a9bfbcf1417EBd519cCa37C395F3250; address public artist2 = 0x262b08Ba52744eA681F0579e59C87705Fcc21D8c; address public artist3 = 0xDc50f396AD1c0BA27FfB9d7ffb9777376fc8975F; mapping(address => bool) public isAdmin; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor() payable { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } // // MODIFIERS // /** * Do not allow calls from other contracts that arent the tqoe contract */ modifier onlyTQOE() { } // // VIEWS // /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view override returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view override returns (address) { } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { } // // REWARDS // /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } // // TQOE // function setAdmin(address account, bool isAdmin_) external onlyOwner { } function addPayee(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } function addShares(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add more shares to an exisitng payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addShares(address account, uint256 shares_) private { require(account != address(0), "RoyaltySplitter: account is the zero address"); require(shares_ > 0, "RoyaltySplitter: shares are 0"); require(<FILL_ME>) _shares[account] += shares_; _totalShares += shares_; uint256 totalReceived = address(this).balance + totalReleased(); _released[account] += (totalReceived * shares_) / _totalShares; emit SharesAdded(account, shares_); } /** * @dev send shares from one address to another */ function transferFromShares(address from, address to, uint256 amount) public onlyOwner { } // // ADMIN // /** * @dev Add a new payee to the contract. * @param newTQOE The address of the new tqoe contract to add. */ function setTQOE(address newTQOE, bool state) public onlyOwner{ } /** * @dev Take away an addresses´ shares * @param removed The address of the new address that loses shares */ function removeShares(address removed, uint256 amount) public onlyOwner { } }
_shares[account]!=0,"RoyaltySplitter: payee is not added"
471,863
_shares[account]!=0
"Amount Exceeds Shares!"
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; contract IRoyaltySplitter { /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view virtual returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view virtual returns (address) { } /** * @dev Add a new payee to the contract. */ function addPayee(address account, uint256 shares_) public virtual {} /** * @dev Add more shares to an exisitng payee to the contract. */ function addShares(address account, uint256 shares_) public virtual {} } /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract RoyaltySplitter is Ownable, IRoyaltySplitter { event PayeeAdded(address account, uint256 shares); event SharesAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 public _totalShares; uint256 public _totalReleased; mapping(address => uint256) public _shares; mapping(address => uint256) public _released; address[] public _payees; mapping(IERC20 => uint256) public _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) public _erc20Released; mapping(address => bool) public TQOEContracts; address public tqoe = 0xeF14583Ee0e86bbD016CEC928077cD38A750E7cB; address public charity = 0x8eb24CDB8DB7159F7eCbbc42f393B3eE2Cde4399; address public artist1 = 0x2CF28B5D5a9bfbcf1417EBd519cCa37C395F3250; address public artist2 = 0x262b08Ba52744eA681F0579e59C87705Fcc21D8c; address public artist3 = 0xDc50f396AD1c0BA27FfB9d7ffb9777376fc8975F; mapping(address => bool) public isAdmin; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor() payable { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } // // MODIFIERS // /** * Do not allow calls from other contracts that arent the tqoe contract */ modifier onlyTQOE() { } // // VIEWS // /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view override returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view override returns (address) { } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { } // // REWARDS // /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } // // TQOE // function setAdmin(address account, bool isAdmin_) external onlyOwner { } function addPayee(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } function addShares(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add more shares to an exisitng payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addShares(address account, uint256 shares_) private { } /** * @dev send shares from one address to another */ function transferFromShares(address from, address to, uint256 amount) public onlyOwner { require(from != address(0), "RoyaltySplitter: Invalid Address"); require(to != address(0), "RoyaltySplitter: Invalid Address"); require(<FILL_ME>) _shares[from] -= amount; _shares[to] += amount; } // // ADMIN // /** * @dev Add a new payee to the contract. * @param newTQOE The address of the new tqoe contract to add. */ function setTQOE(address newTQOE, bool state) public onlyOwner{ } /** * @dev Take away an addresses´ shares * @param removed The address of the new address that loses shares */ function removeShares(address removed, uint256 amount) public onlyOwner { } }
_shares[from]>=amount,"Amount Exceeds Shares!"
471,863
_shares[from]>=amount
"Amount Exceeds Shares!"
// OpenZeppelin Contracts v4.4.0 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } pragma solidity ^0.8.0; contract IRoyaltySplitter { /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view virtual returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view virtual returns (address) { } /** * @dev Add a new payee to the contract. */ function addPayee(address account, uint256 shares_) public virtual {} /** * @dev Add more shares to an exisitng payee to the contract. */ function addShares(address account, uint256 shares_) public virtual {} } /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract RoyaltySplitter is Ownable, IRoyaltySplitter { event PayeeAdded(address account, uint256 shares); event SharesAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 public _totalShares; uint256 public _totalReleased; mapping(address => uint256) public _shares; mapping(address => uint256) public _released; address[] public _payees; mapping(IERC20 => uint256) public _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) public _erc20Released; mapping(address => bool) public TQOEContracts; address public tqoe = 0xeF14583Ee0e86bbD016CEC928077cD38A750E7cB; address public charity = 0x8eb24CDB8DB7159F7eCbbc42f393B3eE2Cde4399; address public artist1 = 0x2CF28B5D5a9bfbcf1417EBd519cCa37C395F3250; address public artist2 = 0x262b08Ba52744eA681F0579e59C87705Fcc21D8c; address public artist3 = 0xDc50f396AD1c0BA27FfB9d7ffb9777376fc8975F; mapping(address => bool) public isAdmin; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor() payable { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } // // MODIFIERS // /** * Do not allow calls from other contracts that arent the tqoe contract */ modifier onlyTQOE() { } // // VIEWS // /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view override returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view override returns (address) { } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { } // // REWARDS // /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } // // TQOE // function setAdmin(address account, bool isAdmin_) external onlyOwner { } function addPayee(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } function addShares(address account, uint256 shares_) public virtual override onlyTQOE { } /** * @dev Add more shares to an exisitng payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addShares(address account, uint256 shares_) private { } /** * @dev send shares from one address to another */ function transferFromShares(address from, address to, uint256 amount) public onlyOwner { } // // ADMIN // /** * @dev Add a new payee to the contract. * @param newTQOE The address of the new tqoe contract to add. */ function setTQOE(address newTQOE, bool state) public onlyOwner{ } /** * @dev Take away an addresses´ shares * @param removed The address of the new address that loses shares */ function removeShares(address removed, uint256 amount) public onlyOwner { require(removed != address(0), "RoyaltySplitter: Invalid Address"); require(<FILL_ME>) _shares[removed] -= amount; _totalShares -= amount; } }
_shares[removed]>=amount,"Amount Exceeds Shares!"
471,863
_shares[removed]>=amount
"Invalid tokenId"
// SPDX-License-Identifier: MIT // Deployed at: 0x16c0e3D33B332E9BFab3A2de322cBA7Ca02c0638 pragma solidity ^0.8.0; //PROXY PROGRAM TO EXTEND MINTING CAPABILITIES OF THE NFT-PANDEMIC CONTRACT abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } abstract contract Functional { function toString(uint256 value) internal pure returns (string memory) { } bool private _reentryKey = false; modifier reentryLock { } } contract PANDEMIC { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance){} function ownerOf(uint256 tokenId) external view returns (address owner){} function safeTransferFrom(address from,address to,uint256 tokenId) external{} function transferFrom(address from, address to, uint256 tokenId) external{} function approve(address to, uint256 tokenId) external{} function getApproved(uint256 tokenId) external view returns (address operator){} function setApprovalForAll(address operator, bool _approved) external{} function isApprovedForAll(address owner, address operator) external view returns (bool){} function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external{} //required calls: function totalSupply() external view returns (uint256) {} //proxy access functions: function proxyMint(address to, uint256 tokenId) external { } function proxyBurn(uint256 tokenId) external { } function proxyTransfer(address from, address to, uint256 tokenId) external { } } contract PandemicExtension is Ownable, Functional { uint256 maxSupply = 6666; uint256 collectionStart = 10000; uint256 lottoCap = 100; bool lottoActive; bool spawnActive; bool mutateActive; mapping (address => bool) received; mapping (uint256 => bool) claimed; address[] lotteryHolders; uint256[] lotteryTokens; PANDEMIC proxy = PANDEMIC(0x4Ad8A7406Caac3457981A1B3C88B8aAB00D6e13d); function sneeze(address to, uint256 tokenId) external reentryLock { uint256 curSupply = proxy.totalSupply(); require(<FILL_ME>) require(curSupply < maxSupply - 2, "Supply Drained"); require(received[to] == false, "Already sneezed on"); received[to] = true; proxy.proxyTransfer(_msgSender(), to, tokenId); proxy.proxyMint(to, curSupply); proxy.proxyMint(to, curSupply + 1); } ///////////////////////////////////// LOTTO Section //////////////////// function enterLottery(uint256 tokenId) external reentryLock { } function countLottoTickets() external view returns (uint256) { } function awardLottoWinner(uint256 ticketId) external onlyOwner { } function scanTokenId(uint ticketId) external view returns (uint256) { } function scanTokenWinner(uint ticketId) external view returns (address) { } function _clearLottery() internal { } function setLottoCapLimit(uint256 newLimit) external onlyOwner { } function activateLotto() external onlyOwner { } function deactivateLotto() external onlyOwner { } /////////////////////////////////// NEW Collections /////////////////// function spawn(uint256 tokenId) external reentryLock { } function mutate(uint256 tokenId) external reentryLock { } function setCollectionStart(uint256 newCollectionTId) external onlyOwner { } function activateSpawn() external onlyOwner { } function activateMutate() external onlyOwner { } function deactivateSpawn() external onlyOwner { } function deactivateMutate() external onlyOwner { } }
proxy.ownerOf(tokenId)==_msgSender(),"Invalid tokenId"
471,883
proxy.ownerOf(tokenId)==_msgSender()
"Already sneezed on"
// SPDX-License-Identifier: MIT // Deployed at: 0x16c0e3D33B332E9BFab3A2de322cBA7Ca02c0638 pragma solidity ^0.8.0; //PROXY PROGRAM TO EXTEND MINTING CAPABILITIES OF THE NFT-PANDEMIC CONTRACT abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } abstract contract Functional { function toString(uint256 value) internal pure returns (string memory) { } bool private _reentryKey = false; modifier reentryLock { } } contract PANDEMIC { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance){} function ownerOf(uint256 tokenId) external view returns (address owner){} function safeTransferFrom(address from,address to,uint256 tokenId) external{} function transferFrom(address from, address to, uint256 tokenId) external{} function approve(address to, uint256 tokenId) external{} function getApproved(uint256 tokenId) external view returns (address operator){} function setApprovalForAll(address operator, bool _approved) external{} function isApprovedForAll(address owner, address operator) external view returns (bool){} function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external{} //required calls: function totalSupply() external view returns (uint256) {} //proxy access functions: function proxyMint(address to, uint256 tokenId) external { } function proxyBurn(uint256 tokenId) external { } function proxyTransfer(address from, address to, uint256 tokenId) external { } } contract PandemicExtension is Ownable, Functional { uint256 maxSupply = 6666; uint256 collectionStart = 10000; uint256 lottoCap = 100; bool lottoActive; bool spawnActive; bool mutateActive; mapping (address => bool) received; mapping (uint256 => bool) claimed; address[] lotteryHolders; uint256[] lotteryTokens; PANDEMIC proxy = PANDEMIC(0x4Ad8A7406Caac3457981A1B3C88B8aAB00D6e13d); function sneeze(address to, uint256 tokenId) external reentryLock { uint256 curSupply = proxy.totalSupply(); require(proxy.ownerOf(tokenId) == _msgSender(), "Invalid tokenId"); require(curSupply < maxSupply - 2, "Supply Drained"); require(<FILL_ME>) received[to] = true; proxy.proxyTransfer(_msgSender(), to, tokenId); proxy.proxyMint(to, curSupply); proxy.proxyMint(to, curSupply + 1); } ///////////////////////////////////// LOTTO Section //////////////////// function enterLottery(uint256 tokenId) external reentryLock { } function countLottoTickets() external view returns (uint256) { } function awardLottoWinner(uint256 ticketId) external onlyOwner { } function scanTokenId(uint ticketId) external view returns (uint256) { } function scanTokenWinner(uint ticketId) external view returns (address) { } function _clearLottery() internal { } function setLottoCapLimit(uint256 newLimit) external onlyOwner { } function activateLotto() external onlyOwner { } function deactivateLotto() external onlyOwner { } /////////////////////////////////// NEW Collections /////////////////// function spawn(uint256 tokenId) external reentryLock { } function mutate(uint256 tokenId) external reentryLock { } function setCollectionStart(uint256 newCollectionTId) external onlyOwner { } function activateSpawn() external onlyOwner { } function activateMutate() external onlyOwner { } function deactivateSpawn() external onlyOwner { } function deactivateMutate() external onlyOwner { } }
received[to]==false,"Already sneezed on"
471,883
received[to]==false
"AlreadyIssued"
// SPDX-License-Identifier: MIT // Deployed at: 0x16c0e3D33B332E9BFab3A2de322cBA7Ca02c0638 pragma solidity ^0.8.0; //PROXY PROGRAM TO EXTEND MINTING CAPABILITIES OF THE NFT-PANDEMIC CONTRACT abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } abstract contract Functional { function toString(uint256 value) internal pure returns (string memory) { } bool private _reentryKey = false; modifier reentryLock { } } contract PANDEMIC { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance){} function ownerOf(uint256 tokenId) external view returns (address owner){} function safeTransferFrom(address from,address to,uint256 tokenId) external{} function transferFrom(address from, address to, uint256 tokenId) external{} function approve(address to, uint256 tokenId) external{} function getApproved(uint256 tokenId) external view returns (address operator){} function setApprovalForAll(address operator, bool _approved) external{} function isApprovedForAll(address owner, address operator) external view returns (bool){} function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external{} //required calls: function totalSupply() external view returns (uint256) {} //proxy access functions: function proxyMint(address to, uint256 tokenId) external { } function proxyBurn(uint256 tokenId) external { } function proxyTransfer(address from, address to, uint256 tokenId) external { } } contract PandemicExtension is Ownable, Functional { uint256 maxSupply = 6666; uint256 collectionStart = 10000; uint256 lottoCap = 100; bool lottoActive; bool spawnActive; bool mutateActive; mapping (address => bool) received; mapping (uint256 => bool) claimed; address[] lotteryHolders; uint256[] lotteryTokens; PANDEMIC proxy = PANDEMIC(0x4Ad8A7406Caac3457981A1B3C88B8aAB00D6e13d); function sneeze(address to, uint256 tokenId) external reentryLock { } ///////////////////////////////////// LOTTO Section //////////////////// function enterLottery(uint256 tokenId) external reentryLock { } function countLottoTickets() external view returns (uint256) { } function awardLottoWinner(uint256 ticketId) external onlyOwner { } function scanTokenId(uint ticketId) external view returns (uint256) { } function scanTokenWinner(uint ticketId) external view returns (address) { } function _clearLottery() internal { } function setLottoCapLimit(uint256 newLimit) external onlyOwner { } function activateLotto() external onlyOwner { } function deactivateLotto() external onlyOwner { } /////////////////////////////////// NEW Collections /////////////////// function spawn(uint256 tokenId) external reentryLock { uint256 newToken = tokenId + collectionStart; require(tokenId < 10000, "Only for OG Virus"); require(spawnActive, "Not Ready"); require(proxy.ownerOf(tokenId) == _msgSender(), "Invalid tokenId"); require(<FILL_ME>) claimed[newToken] == true; proxy.proxyMint(_msgSender(), newToken); } function mutate(uint256 tokenId) external reentryLock { } function setCollectionStart(uint256 newCollectionTId) external onlyOwner { } function activateSpawn() external onlyOwner { } function activateMutate() external onlyOwner { } function deactivateSpawn() external onlyOwner { } function deactivateMutate() external onlyOwner { } }
claimed[newToken]==false,"AlreadyIssued"
471,883
claimed[newToken]==false
"not enough from assets"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // External import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // Libs import { ImmutableModule } from "../../shared/ImmutableModule.sol"; import { ICowSettlement } from "../../peripheral/Cowswap/ICowSettlement.sol"; import { DexSwapData, IDexAsyncSwap } from "../../interfaces/IDexSwap.sol"; /** * @title CowSwapDex allows to swap tokens between via CowSwap. * @author mStable * @notice * @dev VERSION: 1.0 * DATE: 2022-06-17 */ contract CowSwapDex is ImmutableModule, IDexAsyncSwap { using SafeERC20 for IERC20; /// @notice Contract GPv2VaultRelayer to give allowance to perform swaps address public immutable RELAYER; /// @notice GPv2Settlement contract ICowSettlement public immutable SETTLEMENT; /// @notice Event emitted when a order is cancelled. event SwapCancelled(bytes indexed orderUid); /** * @param _nexus Address of the Nexus contract that resolves protocol modules and roles. * @param _relayer Address of the GPv2VaultRelayer contract to set allowance to perform swaps * @param _settlement Address of the GPv2Settlement contract that pre-signs orders. */ constructor( address _nexus, address _relayer, address _settlement ) ImmutableModule(_nexus) { } /** * @dev Modifier to allow function calls only from the Liquidator or the Keeper EOA. */ modifier onlyKeeperOrLiquidator() { } function _keeperOrLiquidator() internal view { } /*************************************** Core ****************************************/ /** * @notice Initialises a cow swap order. * @dev This function is used in order to be compliant with IDexSwap interface. * @param swapData The data of the swap {fromAsset, toAsset, fromAssetAmount, fromAssetFeeAmount, data}. */ function _initiateSwap(DexSwapData memory swapData) internal { // unpack the CowSwap specific params from the generic swap.data field (bytes memory orderUid, bool transfer) = abi.decode(swapData.data, (bytes, bool)); if (transfer) { // transfer in the fromAsset require(<FILL_ME>) // Transfer rewards from the liquidator IERC20(swapData.fromAsset).safeTransferFrom( msg.sender, address(this), swapData.fromAssetAmount ); } // sign the order on-chain so the order will happen SETTLEMENT.setPreSignature(orderUid, true); } /** * @notice Initialises a cow swap order. * @dev Orders must be created off-chain. * In case that an order fails, a new order uid is created there is no need to transfer "fromAsset". * @param swapData The data of the swap {fromAsset, toAsset, fromAssetAmount, fromAssetFeeAmount, data}. */ function initiateSwap(DexSwapData calldata swapData) external override onlyKeeperOrLiquidator { } /** * @notice Initiate cow swap orders in bulk. * @dev Orders must be created off-chain. * @param swapsData Array of swap data {fromAsset, toAsset, fromAssetAmount, fromAssetFeeAmount, data}. */ function initiateSwaps(DexSwapData[] calldata swapsData) external onlyKeeperOrLiquidator { } /** * @notice It reverts as cowswap allows to provide a "receiver" while creating an order. Therefore * @dev The method is kept to have compatibility with IDexAsyncSwap. */ function settleSwap(DexSwapData memory) external pure { } /** * @notice Allows to cancel a cowswap order perhaps if it took too long or was with invalid parameters * @dev This function performs no checks, there's a high change it will revert if you send it with fluff parameters * Emits the `SwapCancelled` event with the `orderUid`. * @param orderUid The order uid of the swap. */ function cancelSwap(bytes calldata orderUid) external override onlyKeeperOrLiquidator { } /** * @notice Cancels cow swap orders in bulk. * @dev It invokes the `cancelSwap` function for each order in the array. * For each order uid it emits the `SwapCancelled` event with the `orderUid`. * @param orderUids Array of swaps order uids */ function cancelSwaps(bytes[] calldata orderUids) external onlyKeeperOrLiquidator { } /** * @notice Approves a token to be sold using cow swap. * @dev this approves the cow swap router to transfer the specified token from this contract. * @param token Address of the token that is to be sold. */ function approveToken(address token) external onlyGovernor { } /** * @notice Revokes cow swap from selling a token. * @dev this removes the allowance for the cow swap router to transfer the specified token from this contract. * @param token Address of the token that is to no longer be sold. */ function revokeToken(address token) external onlyGovernor { } /** * @notice Rescues tokens from the contract in case of a cancellation or failure and sends it to governor. * @dev only governor can invoke. * Even if a swap fails, the order can be created again and keep trying, rescueToken must be the last resource, * ie, cowswap is not availabler for N hours. */ function rescueToken(address _erc20, uint256 amount) external onlyGovernor { } }
IERC20(swapData.fromAsset).balanceOf(msg.sender)>=swapData.fromAssetAmount,"not enough from assets"
471,896
IERC20(swapData.fromAsset).balanceOf(msg.sender)>=swapData.fromAssetAmount
"You have plenty of noggles already. Try again next year!"
pragma solidity ^0.8.15; library NoggleLibrary { /** * @dev Inspired by OraclizeAPI's implementation - MIT license * @dev https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol */ function toString(uint256 value) internal pure returns (string memory) { } } /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <brecht@loopring.org> pragma solidity ^0.8.15; library Base64 { bytes internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } } contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract Noggleversary is ERC721A, Ownable { using DynamicBuffer for bytes; using Strings for uint256; using Strings for uint160; using StringUtils for string; uint256 public maxPerTx = 1; uint256 public maxPerAddress = 4; uint256 public maxToken = 2222; uint256 public price = 0.0069 ether; string public description = "A limited-release to celebrate one year of Nouns. Featuring noggles from Noun #0 personalized for each minter."; string public metadataName = "Nouniversary Noggle #"; mapping(uint256 => bytes32) public seeds; mapping (address => bool) public freeMinted; string basePath = '<path class="a" d="M10 50v10h5V50h-5Zm15-5H10v5h15v-5Zm35 0h-5v5h5v-5ZM25 35v30h30V35H25Zm35 0v30h30V35H60Z"/>'; string eyesPath = '<path fill="#fff" d="M30 40v20h10V40H30Z"/><path fill="#000" d="M40 40v20h10V40H40Z"/><path fill="#fff" d="M65 40v20h10V40H65Z"/><path fill="#000" d="M75 40v20h10V40H75Z"/>'; constructor() ERC721A('Nouniversary Noggles', 'NOGSB1') {} modifier callerIsUser() { } function numberMinted(address owner) public view returns (uint256) { } using Counters for Counters.Counter; using SafeMath for uint256; bool public mintActive = true; function bytes32ToString(bytes32 _bytes32) public pure returns (string memory) { } function toByte(uint8 _uint8) public pure returns (bytes1) { } function getColors(bytes32 seed) private view returns (string[] memory) { } function getTokenIdSvg(string[] memory colors) internal pure returns (string memory svg) { } function tokenURI(uint tokenId) public view override returns (string memory) { } function internalMint(uint256 tokenId) private { } function mint() external payable { require(mintActive, 'Mint not active.'); require(<FILL_ME>) require(totalSupply() + 1 < maxToken, ":sad trombone: All of this year's Nouniversary noggles have been minted."); uint256 supply = totalSupply(); uint256 tokenId = supply + 1; if(freeMinted[msg.sender]){ require(msg.value >= price, "Free noggle already claimed. Need more eth to mint additional noggles"); }else{ freeMinted[msg.sender] = true; } if (!_exists(tokenId)) { internalMint(tokenId); } } function _seed(uint256 tokenId) internal view returns (bytes32) { } function toggleMint() external onlyOwner { } function getBalance() public view returns (uint256) { } function withdraw() external onlyOwner { } function setDescription(string memory _greeting) external onlyOwner { } function setName(string memory _name) external onlyOwner { } }
numberMinted(msg.sender)+1<=maxPerAddress,"You have plenty of noggles already. Try again next year!"
471,905
numberMinted(msg.sender)+1<=maxPerAddress
"No more than 20% of overall supply"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { _panda = nft_; _signer = msg.sender; require(<FILL_ME>) devReserve = devReserve_; // TODO: need be change for mainnet. publicMintPrice = 0.075 ether; whitelistMintConf = MintConf(6000, 5, 0.05 ether); genesisMintConf = MintConf(500, 1, 0 ether); } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
(devReserve_*5<=_getOverall()),"No more than 20% of overall supply"
472,015
(devReserve_*5<=_getOverall())
"Max supply exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { require(<FILL_ME>) whitelistMintConf = MintConf(maxMint, maxPerAddrMint, price); emit WhitelistMintConfChanged(maxMint, maxPerAddrMint, price); } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
(maxMint<=_getMaxSupply()),"Max supply exceeded"
472,015
(maxMint<=_getMaxSupply())
"Not allowed"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { require(whitelistMintActive, "Whitelist mint is not active"); require(<FILL_ME>) require( whitelistMinted + quantity <= whitelistMintConf.maxMint, "Max mint amount exceeded" ); require( _whitelistAddrMinted[msg.sender] + quantity <= whitelistMintConf.maxPerAddrMint, "Max mint amount per account exceeded" ); whitelistMinted += quantity; _whitelistAddrMinted[msg.sender] += quantity; _batchMint(msg.sender, quantity); _refundIfOver(uint256(whitelistMintConf.price) * quantity); } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
_isWhitelist(salt,token),"Not allowed"
472,015
_isWhitelist(salt,token)
"Max mint amount exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { require(whitelistMintActive, "Whitelist mint is not active"); require(_isWhitelist(salt, token), "Not allowed"); require(<FILL_ME>) require( _whitelistAddrMinted[msg.sender] + quantity <= whitelistMintConf.maxPerAddrMint, "Max mint amount per account exceeded" ); whitelistMinted += quantity; _whitelistAddrMinted[msg.sender] += quantity; _batchMint(msg.sender, quantity); _refundIfOver(uint256(whitelistMintConf.price) * quantity); } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
whitelistMinted+quantity<=whitelistMintConf.maxMint,"Max mint amount exceeded"
472,015
whitelistMinted+quantity<=whitelistMintConf.maxMint
"Max mint amount per account exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { require(whitelistMintActive, "Whitelist mint is not active"); require(_isWhitelist(salt, token), "Not allowed"); require( whitelistMinted + quantity <= whitelistMintConf.maxMint, "Max mint amount exceeded" ); require(<FILL_ME>) whitelistMinted += quantity; _whitelistAddrMinted[msg.sender] += quantity; _batchMint(msg.sender, quantity); _refundIfOver(uint256(whitelistMintConf.price) * quantity); } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
_whitelistAddrMinted[msg.sender]+quantity<=whitelistMintConf.maxPerAddrMint,"Max mint amount per account exceeded"
472,015
_whitelistAddrMinted[msg.sender]+quantity<=whitelistMintConf.maxPerAddrMint
"Not allowed"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { require(genesisMintActive, "Genesis mint is not active"); require(<FILL_ME>) require( genesisMinted + quantity <= genesisMintConf.maxMint, "Max mint amount exceeded" ); require( _genesisAddrMinted[msg.sender] + quantity <= genesisMintConf.maxPerAddrMint, "Max mint amount per account exceeded" ); genesisMinted += quantity; _genesisAddrMinted[msg.sender] += quantity; _batchMint(msg.sender, quantity); _refundIfOver(uint256(genesisMintConf.price) * quantity); } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
_isGenesis(salt,token),"Not allowed"
472,015
_isGenesis(salt,token)
"Max mint amount exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { require(genesisMintActive, "Genesis mint is not active"); require(_isGenesis(salt, token), "Not allowed"); require(<FILL_ME>) require( _genesisAddrMinted[msg.sender] + quantity <= genesisMintConf.maxPerAddrMint, "Max mint amount per account exceeded" ); genesisMinted += quantity; _genesisAddrMinted[msg.sender] += quantity; _batchMint(msg.sender, quantity); _refundIfOver(uint256(genesisMintConf.price) * quantity); } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
genesisMinted+quantity<=genesisMintConf.maxMint,"Max mint amount exceeded"
472,015
genesisMinted+quantity<=genesisMintConf.maxMint
"Max mint amount per account exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { require(genesisMintActive, "Genesis mint is not active"); require(_isGenesis(salt, token), "Not allowed"); require( genesisMinted + quantity <= genesisMintConf.maxMint, "Max mint amount exceeded" ); require(<FILL_ME>) genesisMinted += quantity; _genesisAddrMinted[msg.sender] += quantity; _batchMint(msg.sender, quantity); _refundIfOver(uint256(genesisMintConf.price) * quantity); } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
_genesisAddrMinted[msg.sender]+quantity<=genesisMintConf.maxPerAddrMint,"Max mint amount per account exceeded"
472,015
_genesisAddrMinted[msg.sender]+quantity<=genesisMintConf.maxPerAddrMint
"Max reserve exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMinter.sol"; import "./INFT.sol"; contract Minter is IMinter, Ownable { uint16 public immutable devReserve; uint16 public devMinted; uint16 public whitelistMinted; uint16 public genesisMinted; uint256 public publicMintPrice; address private _signer; address private _panda; bool public whitelistMintActive = false; bool public publicMintActive = false; bool public genesisMintActive = false; using ECDSA for bytes32; struct MintConf { uint16 maxMint; uint16 maxPerAddrMint; uint256 price; } MintConf public whitelistMintConf; MintConf public genesisMintConf; mapping(address => uint16) private _whitelistAddrMinted; mapping(address => uint16) private _genesisAddrMinted; constructor(address nft_, uint16 devReserve_) { } function togglePublicMintStatus() external override onlyOwner { } function toggleWhitelistMintStatus() external override onlyOwner { } function toggleGenesisMintStatus() external override onlyOwner { } /** * dev */ function devMint(uint16 quantity, address to) external override onlyOwner { } function devMintToMultiAddr(uint16 quantity, address[] calldata addresses) external override onlyOwner { } function devMintVaryToMultiAddr( uint16[] calldata quantities, address[] calldata addresses ) external override onlyOwner { } /** * whitelist */ function setWhitelistMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isWhitelist(string calldata salt, bytes calldata token) external view override returns (bool) { } function whitelistMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } /** * genesisMint */ function setGenesisMintConf( uint16 maxMint, uint16 maxPerAddrMint, uint256 price ) external override onlyOwner { } function isGenesis(string calldata salt, bytes calldata token) external view override returns (bool) { } function genesisMint( uint16 quantity, string calldata salt, bytes calldata token ) external payable override { } // /** // * publicMint // */ function setPublicMintPrice(uint256 price) external override onlyOwner { } function publicMint(uint16 quantity, address to) external payable override { } function whitelistAddrMinted(address sender) external view override returns (uint16) { } function genesisAddrMinted(address sender) external view override returns (uint16) { } function getSigner() external view override returns (address) { } function setSigner(address signer_) external override onlyOwner { } function withdraw() external override onlyOwner { } function _devMint(uint16 quantity, address to) private { require(<FILL_ME>) devMinted += quantity; _batchMint(to, quantity); } function _batchMint(address to, uint16 quantity) internal { } function _isWhitelist(string memory salt, bytes memory token) internal view returns (bool) { } function _isGenesis(string memory salt, bytes memory token) internal view returns (bool) { } function _verify( string memory salt, address sender, bytes memory token, string memory category ) internal view returns (bool) { } function _recover(bytes32 hash, bytes memory token) internal pure returns (address) { } function _hash( string memory salt, address contract_, address sender, string memory category ) internal pure returns (bytes32) { } function _refundIfOver(uint256 spend) private { } function _getMaxSupply() internal returns (uint256) { } function _getOverall() internal returns (uint256) { } }
devMinted+quantity<=devReserve,"Max reserve exceeded"
472,015
devMinted+quantity<=devReserve
"VIP sale has not started yet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; //@author Gaetan Dumont //@title Pholus NFT collection import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract Pholus is Ownable, ERC721A { using Strings for uint; // IPFS URI for the NFTs string public baseURI; string public hiddenURI; // Max suply and ammount of mint availaible per step/wallet uint private constant MAX_SUPPLY = 252; uint private MAX_VIP_MINT = 2; uint private MAX_WL_MINT = 2; uint private MAX_MINT = 1; // All the prices for each step uint public vipPrice = 0.01 ether; uint public wlPrice = 0.17 ether; uint public publicPrice = 0.2 ether; // Array of VIPs mapping(address => bool) public VIPlist; // Uniq id to check while minting if a user is on the whitelist bytes32 public wlMerkleRoot; // Timestamp for the start of the VIP sale step uint public saleStartTime = 1652119200; // Counter of mints per wallet mapping(address => uint) public amountNFTsperWallet; mapping(address => uint) public amountNFTsPublicperWallet; // Map of all the token minted to know when to reveal them mapping(uint => uint) public dateNFTMinted; // Just in case you have to pause the smartcontract it can be done bool public paused = false; // While deploying the smartcontract while ask for the uniq ids of the vip list and whitelist + the URI of the reveal and unrevealed NFT constructor(address[] memory _VIPlist, bytes32 _wlMerkleRoot, string memory _baseURI, string memory _hiddenURI) ERC721A("Pholus", "PHO") { } // Here we pause/unpause the smartcontract function setPaused() external onlyOwner { } // For internal use only function _startTokenId() internal view virtual override returns (uint256) { } // Function used to check if the mint user is a person or a smartcontract modifier callerIsUser() { } // Here we ask on which step we are for the website to know what to do function getStep() public view returns (string memory) { } // VIP minting function function vipSaleMint(address _account) external payable callerIsUser { uint price = vipPrice; uint quantity = 1; require(price != 0, "Price is 0"); require(!paused, "The smartcontract is paused"); require(<FILL_ME>) require(currentTime() < saleStartTime + 24 hours, "VIP sale is finished"); require(isVIP(msg.sender), "Not a VIP"); require(amountNFTsperWallet[msg.sender] + quantity <= MAX_VIP_MINT, "You can't get more NFT"); require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded"); require(msg.value >= price * quantity, "Not enought funds"); amountNFTsperWallet[msg.sender] += quantity; uint index = _currentIndex; _safeMint(_account, quantity); dateNFTMinted[index] = currentTime(); } // Whitelist minting function function WhitelistSaleMint(address _account, bytes32[] calldata _proof) external payable callerIsUser { } // Public minting function function publicSaleMint(address _account) external payable callerIsUser { } // Update the VIP mint start time function setSaleStartTime(uint _saleStartTime) external onlyOwner { } // Update the URI of the NFTs on IPFS function setBaseUri(string memory _baseURI) external onlyOwner { } // Update the URI of the unrevealed NFT on IPFS function setHiddenBaseUri(string memory _hiddenURI) external onlyOwner { } // Internal function to get the time function currentTime() public view returns(uint) { } // Here we ask the token path in order to get it metadatas and we check of it's revealed or not function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } // VIP functions function isVIP(address _account) internal view returns(bool) { } function addToVIP(address _account) external onlyOwner { } function removeFromVIP(address _account) external onlyOwner { } // Whitelist functions function setWlMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function leaf(address _account) internal pure returns(bytes32) { } function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) { } function _verifyWl(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) { } // Here the owner of the smartcontract whil get back the ETH users paid to mint function withdraw() public payable onlyOwner { } }
currentTime()>saleStartTime,"VIP sale has not started yet"
472,030
currentTime()>saleStartTime
"Not a VIP"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; //@author Gaetan Dumont //@title Pholus NFT collection import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract Pholus is Ownable, ERC721A { using Strings for uint; // IPFS URI for the NFTs string public baseURI; string public hiddenURI; // Max suply and ammount of mint availaible per step/wallet uint private constant MAX_SUPPLY = 252; uint private MAX_VIP_MINT = 2; uint private MAX_WL_MINT = 2; uint private MAX_MINT = 1; // All the prices for each step uint public vipPrice = 0.01 ether; uint public wlPrice = 0.17 ether; uint public publicPrice = 0.2 ether; // Array of VIPs mapping(address => bool) public VIPlist; // Uniq id to check while minting if a user is on the whitelist bytes32 public wlMerkleRoot; // Timestamp for the start of the VIP sale step uint public saleStartTime = 1652119200; // Counter of mints per wallet mapping(address => uint) public amountNFTsperWallet; mapping(address => uint) public amountNFTsPublicperWallet; // Map of all the token minted to know when to reveal them mapping(uint => uint) public dateNFTMinted; // Just in case you have to pause the smartcontract it can be done bool public paused = false; // While deploying the smartcontract while ask for the uniq ids of the vip list and whitelist + the URI of the reveal and unrevealed NFT constructor(address[] memory _VIPlist, bytes32 _wlMerkleRoot, string memory _baseURI, string memory _hiddenURI) ERC721A("Pholus", "PHO") { } // Here we pause/unpause the smartcontract function setPaused() external onlyOwner { } // For internal use only function _startTokenId() internal view virtual override returns (uint256) { } // Function used to check if the mint user is a person or a smartcontract modifier callerIsUser() { } // Here we ask on which step we are for the website to know what to do function getStep() public view returns (string memory) { } // VIP minting function function vipSaleMint(address _account) external payable callerIsUser { uint price = vipPrice; uint quantity = 1; require(price != 0, "Price is 0"); require(!paused, "The smartcontract is paused"); require(currentTime() > saleStartTime, "VIP sale has not started yet"); require(currentTime() < saleStartTime + 24 hours, "VIP sale is finished"); require(<FILL_ME>) require(amountNFTsperWallet[msg.sender] + quantity <= MAX_VIP_MINT, "You can't get more NFT"); require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded"); require(msg.value >= price * quantity, "Not enought funds"); amountNFTsperWallet[msg.sender] += quantity; uint index = _currentIndex; _safeMint(_account, quantity); dateNFTMinted[index] = currentTime(); } // Whitelist minting function function WhitelistSaleMint(address _account, bytes32[] calldata _proof) external payable callerIsUser { } // Public minting function function publicSaleMint(address _account) external payable callerIsUser { } // Update the VIP mint start time function setSaleStartTime(uint _saleStartTime) external onlyOwner { } // Update the URI of the NFTs on IPFS function setBaseUri(string memory _baseURI) external onlyOwner { } // Update the URI of the unrevealed NFT on IPFS function setHiddenBaseUri(string memory _hiddenURI) external onlyOwner { } // Internal function to get the time function currentTime() public view returns(uint) { } // Here we ask the token path in order to get it metadatas and we check of it's revealed or not function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } // VIP functions function isVIP(address _account) internal view returns(bool) { } function addToVIP(address _account) external onlyOwner { } function removeFromVIP(address _account) external onlyOwner { } // Whitelist functions function setWlMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function leaf(address _account) internal pure returns(bytes32) { } function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) { } function _verifyWl(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) { } // Here the owner of the smartcontract whil get back the ETH users paid to mint function withdraw() public payable onlyOwner { } }
isVIP(msg.sender),"Not a VIP"
472,030
isVIP(msg.sender)
"You can't get more NFT"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; //@author Gaetan Dumont //@title Pholus NFT collection import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract Pholus is Ownable, ERC721A { using Strings for uint; // IPFS URI for the NFTs string public baseURI; string public hiddenURI; // Max suply and ammount of mint availaible per step/wallet uint private constant MAX_SUPPLY = 252; uint private MAX_VIP_MINT = 2; uint private MAX_WL_MINT = 2; uint private MAX_MINT = 1; // All the prices for each step uint public vipPrice = 0.01 ether; uint public wlPrice = 0.17 ether; uint public publicPrice = 0.2 ether; // Array of VIPs mapping(address => bool) public VIPlist; // Uniq id to check while minting if a user is on the whitelist bytes32 public wlMerkleRoot; // Timestamp for the start of the VIP sale step uint public saleStartTime = 1652119200; // Counter of mints per wallet mapping(address => uint) public amountNFTsperWallet; mapping(address => uint) public amountNFTsPublicperWallet; // Map of all the token minted to know when to reveal them mapping(uint => uint) public dateNFTMinted; // Just in case you have to pause the smartcontract it can be done bool public paused = false; // While deploying the smartcontract while ask for the uniq ids of the vip list and whitelist + the URI of the reveal and unrevealed NFT constructor(address[] memory _VIPlist, bytes32 _wlMerkleRoot, string memory _baseURI, string memory _hiddenURI) ERC721A("Pholus", "PHO") { } // Here we pause/unpause the smartcontract function setPaused() external onlyOwner { } // For internal use only function _startTokenId() internal view virtual override returns (uint256) { } // Function used to check if the mint user is a person or a smartcontract modifier callerIsUser() { } // Here we ask on which step we are for the website to know what to do function getStep() public view returns (string memory) { } // VIP minting function function vipSaleMint(address _account) external payable callerIsUser { uint price = vipPrice; uint quantity = 1; require(price != 0, "Price is 0"); require(!paused, "The smartcontract is paused"); require(currentTime() > saleStartTime, "VIP sale has not started yet"); require(currentTime() < saleStartTime + 24 hours, "VIP sale is finished"); require(isVIP(msg.sender), "Not a VIP"); require(<FILL_ME>) require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded"); require(msg.value >= price * quantity, "Not enought funds"); amountNFTsperWallet[msg.sender] += quantity; uint index = _currentIndex; _safeMint(_account, quantity); dateNFTMinted[index] = currentTime(); } // Whitelist minting function function WhitelistSaleMint(address _account, bytes32[] calldata _proof) external payable callerIsUser { } // Public minting function function publicSaleMint(address _account) external payable callerIsUser { } // Update the VIP mint start time function setSaleStartTime(uint _saleStartTime) external onlyOwner { } // Update the URI of the NFTs on IPFS function setBaseUri(string memory _baseURI) external onlyOwner { } // Update the URI of the unrevealed NFT on IPFS function setHiddenBaseUri(string memory _hiddenURI) external onlyOwner { } // Internal function to get the time function currentTime() public view returns(uint) { } // Here we ask the token path in order to get it metadatas and we check of it's revealed or not function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } // VIP functions function isVIP(address _account) internal view returns(bool) { } function addToVIP(address _account) external onlyOwner { } function removeFromVIP(address _account) external onlyOwner { } // Whitelist functions function setWlMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function leaf(address _account) internal pure returns(bytes32) { } function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) { } function _verifyWl(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) { } // Here the owner of the smartcontract whil get back the ETH users paid to mint function withdraw() public payable onlyOwner { } }
amountNFTsperWallet[msg.sender]+quantity<=MAX_VIP_MINT,"You can't get more NFT"
472,030
amountNFTsperWallet[msg.sender]+quantity<=MAX_VIP_MINT
"Whitelist sale has not started yet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; //@author Gaetan Dumont //@title Pholus NFT collection import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract Pholus is Ownable, ERC721A { using Strings for uint; // IPFS URI for the NFTs string public baseURI; string public hiddenURI; // Max suply and ammount of mint availaible per step/wallet uint private constant MAX_SUPPLY = 252; uint private MAX_VIP_MINT = 2; uint private MAX_WL_MINT = 2; uint private MAX_MINT = 1; // All the prices for each step uint public vipPrice = 0.01 ether; uint public wlPrice = 0.17 ether; uint public publicPrice = 0.2 ether; // Array of VIPs mapping(address => bool) public VIPlist; // Uniq id to check while minting if a user is on the whitelist bytes32 public wlMerkleRoot; // Timestamp for the start of the VIP sale step uint public saleStartTime = 1652119200; // Counter of mints per wallet mapping(address => uint) public amountNFTsperWallet; mapping(address => uint) public amountNFTsPublicperWallet; // Map of all the token minted to know when to reveal them mapping(uint => uint) public dateNFTMinted; // Just in case you have to pause the smartcontract it can be done bool public paused = false; // While deploying the smartcontract while ask for the uniq ids of the vip list and whitelist + the URI of the reveal and unrevealed NFT constructor(address[] memory _VIPlist, bytes32 _wlMerkleRoot, string memory _baseURI, string memory _hiddenURI) ERC721A("Pholus", "PHO") { } // Here we pause/unpause the smartcontract function setPaused() external onlyOwner { } // For internal use only function _startTokenId() internal view virtual override returns (uint256) { } // Function used to check if the mint user is a person or a smartcontract modifier callerIsUser() { } // Here we ask on which step we are for the website to know what to do function getStep() public view returns (string memory) { } // VIP minting function function vipSaleMint(address _account) external payable callerIsUser { } // Whitelist minting function function WhitelistSaleMint(address _account, bytes32[] calldata _proof) external payable callerIsUser { uint price = wlPrice; uint quantity = 1; require(price != 0, "Price is 0"); require(!paused, "The smartcontract is paused"); require(<FILL_ME>) require(currentTime() < saleStartTime + 48 hours, "Whitelist sale is finished"); require(isWhiteListed(msg.sender, _proof), "Not a VIP"); require(amountNFTsperWallet[msg.sender] + quantity <= MAX_WL_MINT, "You can't get more NFT"); require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded"); require(msg.value >= price * quantity, "Not enought funds"); amountNFTsperWallet[msg.sender] += quantity; uint index = _currentIndex; _safeMint(_account, quantity); dateNFTMinted[index] = currentTime(); } // Public minting function function publicSaleMint(address _account) external payable callerIsUser { } // Update the VIP mint start time function setSaleStartTime(uint _saleStartTime) external onlyOwner { } // Update the URI of the NFTs on IPFS function setBaseUri(string memory _baseURI) external onlyOwner { } // Update the URI of the unrevealed NFT on IPFS function setHiddenBaseUri(string memory _hiddenURI) external onlyOwner { } // Internal function to get the time function currentTime() public view returns(uint) { } // Here we ask the token path in order to get it metadatas and we check of it's revealed or not function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } // VIP functions function isVIP(address _account) internal view returns(bool) { } function addToVIP(address _account) external onlyOwner { } function removeFromVIP(address _account) external onlyOwner { } // Whitelist functions function setWlMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function leaf(address _account) internal pure returns(bytes32) { } function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) { } function _verifyWl(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) { } // Here the owner of the smartcontract whil get back the ETH users paid to mint function withdraw() public payable onlyOwner { } }
currentTime()>=saleStartTime+24hours,"Whitelist sale has not started yet"
472,030
currentTime()>=saleStartTime+24hours
"Whitelist sale is finished"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; //@author Gaetan Dumont //@title Pholus NFT collection import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract Pholus is Ownable, ERC721A { using Strings for uint; // IPFS URI for the NFTs string public baseURI; string public hiddenURI; // Max suply and ammount of mint availaible per step/wallet uint private constant MAX_SUPPLY = 252; uint private MAX_VIP_MINT = 2; uint private MAX_WL_MINT = 2; uint private MAX_MINT = 1; // All the prices for each step uint public vipPrice = 0.01 ether; uint public wlPrice = 0.17 ether; uint public publicPrice = 0.2 ether; // Array of VIPs mapping(address => bool) public VIPlist; // Uniq id to check while minting if a user is on the whitelist bytes32 public wlMerkleRoot; // Timestamp for the start of the VIP sale step uint public saleStartTime = 1652119200; // Counter of mints per wallet mapping(address => uint) public amountNFTsperWallet; mapping(address => uint) public amountNFTsPublicperWallet; // Map of all the token minted to know when to reveal them mapping(uint => uint) public dateNFTMinted; // Just in case you have to pause the smartcontract it can be done bool public paused = false; // While deploying the smartcontract while ask for the uniq ids of the vip list and whitelist + the URI of the reveal and unrevealed NFT constructor(address[] memory _VIPlist, bytes32 _wlMerkleRoot, string memory _baseURI, string memory _hiddenURI) ERC721A("Pholus", "PHO") { } // Here we pause/unpause the smartcontract function setPaused() external onlyOwner { } // For internal use only function _startTokenId() internal view virtual override returns (uint256) { } // Function used to check if the mint user is a person or a smartcontract modifier callerIsUser() { } // Here we ask on which step we are for the website to know what to do function getStep() public view returns (string memory) { } // VIP minting function function vipSaleMint(address _account) external payable callerIsUser { } // Whitelist minting function function WhitelistSaleMint(address _account, bytes32[] calldata _proof) external payable callerIsUser { uint price = wlPrice; uint quantity = 1; require(price != 0, "Price is 0"); require(!paused, "The smartcontract is paused"); require(currentTime() >= saleStartTime + 24 hours, "Whitelist sale has not started yet"); require(<FILL_ME>) require(isWhiteListed(msg.sender, _proof), "Not a VIP"); require(amountNFTsperWallet[msg.sender] + quantity <= MAX_WL_MINT, "You can't get more NFT"); require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded"); require(msg.value >= price * quantity, "Not enought funds"); amountNFTsperWallet[msg.sender] += quantity; uint index = _currentIndex; _safeMint(_account, quantity); dateNFTMinted[index] = currentTime(); } // Public minting function function publicSaleMint(address _account) external payable callerIsUser { } // Update the VIP mint start time function setSaleStartTime(uint _saleStartTime) external onlyOwner { } // Update the URI of the NFTs on IPFS function setBaseUri(string memory _baseURI) external onlyOwner { } // Update the URI of the unrevealed NFT on IPFS function setHiddenBaseUri(string memory _hiddenURI) external onlyOwner { } // Internal function to get the time function currentTime() public view returns(uint) { } // Here we ask the token path in order to get it metadatas and we check of it's revealed or not function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } // VIP functions function isVIP(address _account) internal view returns(bool) { } function addToVIP(address _account) external onlyOwner { } function removeFromVIP(address _account) external onlyOwner { } // Whitelist functions function setWlMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function leaf(address _account) internal pure returns(bytes32) { } function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) { } function _verifyWl(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) { } // Here the owner of the smartcontract whil get back the ETH users paid to mint function withdraw() public payable onlyOwner { } }
currentTime()<saleStartTime+48hours,"Whitelist sale is finished"
472,030
currentTime()<saleStartTime+48hours
"You can't get more NFT"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; //@author Gaetan Dumont //@title Pholus NFT collection import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract Pholus is Ownable, ERC721A { using Strings for uint; // IPFS URI for the NFTs string public baseURI; string public hiddenURI; // Max suply and ammount of mint availaible per step/wallet uint private constant MAX_SUPPLY = 252; uint private MAX_VIP_MINT = 2; uint private MAX_WL_MINT = 2; uint private MAX_MINT = 1; // All the prices for each step uint public vipPrice = 0.01 ether; uint public wlPrice = 0.17 ether; uint public publicPrice = 0.2 ether; // Array of VIPs mapping(address => bool) public VIPlist; // Uniq id to check while minting if a user is on the whitelist bytes32 public wlMerkleRoot; // Timestamp for the start of the VIP sale step uint public saleStartTime = 1652119200; // Counter of mints per wallet mapping(address => uint) public amountNFTsperWallet; mapping(address => uint) public amountNFTsPublicperWallet; // Map of all the token minted to know when to reveal them mapping(uint => uint) public dateNFTMinted; // Just in case you have to pause the smartcontract it can be done bool public paused = false; // While deploying the smartcontract while ask for the uniq ids of the vip list and whitelist + the URI of the reveal and unrevealed NFT constructor(address[] memory _VIPlist, bytes32 _wlMerkleRoot, string memory _baseURI, string memory _hiddenURI) ERC721A("Pholus", "PHO") { } // Here we pause/unpause the smartcontract function setPaused() external onlyOwner { } // For internal use only function _startTokenId() internal view virtual override returns (uint256) { } // Function used to check if the mint user is a person or a smartcontract modifier callerIsUser() { } // Here we ask on which step we are for the website to know what to do function getStep() public view returns (string memory) { } // VIP minting function function vipSaleMint(address _account) external payable callerIsUser { } // Whitelist minting function function WhitelistSaleMint(address _account, bytes32[] calldata _proof) external payable callerIsUser { uint price = wlPrice; uint quantity = 1; require(price != 0, "Price is 0"); require(!paused, "The smartcontract is paused"); require(currentTime() >= saleStartTime + 24 hours, "Whitelist sale has not started yet"); require(currentTime() < saleStartTime + 48 hours, "Whitelist sale is finished"); require(isWhiteListed(msg.sender, _proof), "Not a VIP"); require(<FILL_ME>) require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded"); require(msg.value >= price * quantity, "Not enought funds"); amountNFTsperWallet[msg.sender] += quantity; uint index = _currentIndex; _safeMint(_account, quantity); dateNFTMinted[index] = currentTime(); } // Public minting function function publicSaleMint(address _account) external payable callerIsUser { } // Update the VIP mint start time function setSaleStartTime(uint _saleStartTime) external onlyOwner { } // Update the URI of the NFTs on IPFS function setBaseUri(string memory _baseURI) external onlyOwner { } // Update the URI of the unrevealed NFT on IPFS function setHiddenBaseUri(string memory _hiddenURI) external onlyOwner { } // Internal function to get the time function currentTime() public view returns(uint) { } // Here we ask the token path in order to get it metadatas and we check of it's revealed or not function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } // VIP functions function isVIP(address _account) internal view returns(bool) { } function addToVIP(address _account) external onlyOwner { } function removeFromVIP(address _account) external onlyOwner { } // Whitelist functions function setWlMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function leaf(address _account) internal pure returns(bytes32) { } function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) { } function _verifyWl(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) { } // Here the owner of the smartcontract whil get back the ETH users paid to mint function withdraw() public payable onlyOwner { } }
amountNFTsperWallet[msg.sender]+quantity<=MAX_WL_MINT,"You can't get more NFT"
472,030
amountNFTsperWallet[msg.sender]+quantity<=MAX_WL_MINT
"Public sale has not started yet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; //@author Gaetan Dumont //@title Pholus NFT collection import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract Pholus is Ownable, ERC721A { using Strings for uint; // IPFS URI for the NFTs string public baseURI; string public hiddenURI; // Max suply and ammount of mint availaible per step/wallet uint private constant MAX_SUPPLY = 252; uint private MAX_VIP_MINT = 2; uint private MAX_WL_MINT = 2; uint private MAX_MINT = 1; // All the prices for each step uint public vipPrice = 0.01 ether; uint public wlPrice = 0.17 ether; uint public publicPrice = 0.2 ether; // Array of VIPs mapping(address => bool) public VIPlist; // Uniq id to check while minting if a user is on the whitelist bytes32 public wlMerkleRoot; // Timestamp for the start of the VIP sale step uint public saleStartTime = 1652119200; // Counter of mints per wallet mapping(address => uint) public amountNFTsperWallet; mapping(address => uint) public amountNFTsPublicperWallet; // Map of all the token minted to know when to reveal them mapping(uint => uint) public dateNFTMinted; // Just in case you have to pause the smartcontract it can be done bool public paused = false; // While deploying the smartcontract while ask for the uniq ids of the vip list and whitelist + the URI of the reveal and unrevealed NFT constructor(address[] memory _VIPlist, bytes32 _wlMerkleRoot, string memory _baseURI, string memory _hiddenURI) ERC721A("Pholus", "PHO") { } // Here we pause/unpause the smartcontract function setPaused() external onlyOwner { } // For internal use only function _startTokenId() internal view virtual override returns (uint256) { } // Function used to check if the mint user is a person or a smartcontract modifier callerIsUser() { } // Here we ask on which step we are for the website to know what to do function getStep() public view returns (string memory) { } // VIP minting function function vipSaleMint(address _account) external payable callerIsUser { } // Whitelist minting function function WhitelistSaleMint(address _account, bytes32[] calldata _proof) external payable callerIsUser { } // Public minting function function publicSaleMint(address _account) external payable callerIsUser { uint price = publicPrice; uint quantity = 1; require(price != 0, "Price is 0"); require(!paused, "The smartcontract is paused"); require(<FILL_ME>) require(amountNFTsPublicperWallet[msg.sender] + quantity <= MAX_MINT, "You can't get more NFT"); require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded"); require(msg.value >= price * quantity, "Not enought funds"); amountNFTsPublicperWallet[msg.sender] += quantity; amountNFTsperWallet[msg.sender] += quantity; uint index = _currentIndex; _safeMint(_account, quantity); dateNFTMinted[index] = currentTime(); } // Update the VIP mint start time function setSaleStartTime(uint _saleStartTime) external onlyOwner { } // Update the URI of the NFTs on IPFS function setBaseUri(string memory _baseURI) external onlyOwner { } // Update the URI of the unrevealed NFT on IPFS function setHiddenBaseUri(string memory _hiddenURI) external onlyOwner { } // Internal function to get the time function currentTime() public view returns(uint) { } // Here we ask the token path in order to get it metadatas and we check of it's revealed or not function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } // VIP functions function isVIP(address _account) internal view returns(bool) { } function addToVIP(address _account) external onlyOwner { } function removeFromVIP(address _account) external onlyOwner { } // Whitelist functions function setWlMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function leaf(address _account) internal pure returns(bytes32) { } function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) { } function _verifyWl(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) { } // Here the owner of the smartcontract whil get back the ETH users paid to mint function withdraw() public payable onlyOwner { } }
currentTime()>=saleStartTime+48hours,"Public sale has not started yet"
472,030
currentTime()>=saleStartTime+48hours
"You can't get more NFT"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; //@author Gaetan Dumont //@title Pholus NFT collection import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract Pholus is Ownable, ERC721A { using Strings for uint; // IPFS URI for the NFTs string public baseURI; string public hiddenURI; // Max suply and ammount of mint availaible per step/wallet uint private constant MAX_SUPPLY = 252; uint private MAX_VIP_MINT = 2; uint private MAX_WL_MINT = 2; uint private MAX_MINT = 1; // All the prices for each step uint public vipPrice = 0.01 ether; uint public wlPrice = 0.17 ether; uint public publicPrice = 0.2 ether; // Array of VIPs mapping(address => bool) public VIPlist; // Uniq id to check while minting if a user is on the whitelist bytes32 public wlMerkleRoot; // Timestamp for the start of the VIP sale step uint public saleStartTime = 1652119200; // Counter of mints per wallet mapping(address => uint) public amountNFTsperWallet; mapping(address => uint) public amountNFTsPublicperWallet; // Map of all the token minted to know when to reveal them mapping(uint => uint) public dateNFTMinted; // Just in case you have to pause the smartcontract it can be done bool public paused = false; // While deploying the smartcontract while ask for the uniq ids of the vip list and whitelist + the URI of the reveal and unrevealed NFT constructor(address[] memory _VIPlist, bytes32 _wlMerkleRoot, string memory _baseURI, string memory _hiddenURI) ERC721A("Pholus", "PHO") { } // Here we pause/unpause the smartcontract function setPaused() external onlyOwner { } // For internal use only function _startTokenId() internal view virtual override returns (uint256) { } // Function used to check if the mint user is a person or a smartcontract modifier callerIsUser() { } // Here we ask on which step we are for the website to know what to do function getStep() public view returns (string memory) { } // VIP minting function function vipSaleMint(address _account) external payable callerIsUser { } // Whitelist minting function function WhitelistSaleMint(address _account, bytes32[] calldata _proof) external payable callerIsUser { } // Public minting function function publicSaleMint(address _account) external payable callerIsUser { uint price = publicPrice; uint quantity = 1; require(price != 0, "Price is 0"); require(!paused, "The smartcontract is paused"); require(currentTime() >= saleStartTime + 48 hours, "Public sale has not started yet"); require(<FILL_ME>) require(totalSupply() + quantity <= MAX_SUPPLY, "Max supply exceeded"); require(msg.value >= price * quantity, "Not enought funds"); amountNFTsPublicperWallet[msg.sender] += quantity; amountNFTsperWallet[msg.sender] += quantity; uint index = _currentIndex; _safeMint(_account, quantity); dateNFTMinted[index] = currentTime(); } // Update the VIP mint start time function setSaleStartTime(uint _saleStartTime) external onlyOwner { } // Update the URI of the NFTs on IPFS function setBaseUri(string memory _baseURI) external onlyOwner { } // Update the URI of the unrevealed NFT on IPFS function setHiddenBaseUri(string memory _hiddenURI) external onlyOwner { } // Internal function to get the time function currentTime() public view returns(uint) { } // Here we ask the token path in order to get it metadatas and we check of it's revealed or not function tokenURI(uint _tokenId) public view virtual override returns (string memory) { } // VIP functions function isVIP(address _account) internal view returns(bool) { } function addToVIP(address _account) external onlyOwner { } function removeFromVIP(address _account) external onlyOwner { } // Whitelist functions function setWlMerkleRoot(bytes32 _wlMerkleRoot) external onlyOwner { } function leaf(address _account) internal pure returns(bytes32) { } function isWhiteListed(address _account, bytes32[] calldata _proof) internal view returns(bool) { } function _verifyWl(bytes32 _leaf, bytes32[] memory _proof) internal view returns(bool) { } // Here the owner of the smartcontract whil get back the ETH users paid to mint function withdraw() public payable onlyOwner { } }
amountNFTsPublicperWallet[msg.sender]+quantity<=MAX_MINT,"You can't get more NFT"
472,030
amountNFTsPublicperWallet[msg.sender]+quantity<=MAX_MINT
"Sum of values arg must be 20000 BPS"
//SPDX-License-Identifier: MIT pragma solidity 0.8.16; //-- _____ ______ ________ ________ _________ ________ ________ _______ //--|\ _ \ _ \ |\ __ \ |\ ___ \ |\___ ___\|\ __ \ |\ ____\ |\ ___ \ //--\ \ \\\__\ \ \\ \ \|\ \\ \ \\ \ \\|___ \ \_|\ \ \|\ \\ \ \___| \ \ __/| //-- \ \ \\|__| \ \\ \ \\\ \\ \ \\ \ \ \ \ \ \ \ __ \\ \ \ ___\ \ \_|/__ //-- \ \ \ \ \ \\ \ \\\ \\ \ \\ \ \ \ \ \ \ \ \ \ \\ \ \|\ \\ \ \_|\ \ //-- \ \__\ \ \__\\ \_______\\ \__\\ \__\ \ \__\ \ \__\ \__\\ \_______\\ \_______\ //-- \|__| \|__| \|_______| \|__| \|__| \|__| \|__|\|__| \|_______| \|_______| //-- //-- //-- Montage.io //Montage NFT payment splitter contract for evolving collections - single artist import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; interface NFTContract { function balanceOf(address owner) external view returns (uint256 balance); function getTotalSupply() external view returns (uint256); } contract Buffer is Initializable { NFTContract private _nftContract; event PaymentWithdrawn(address indexed member, uint256 indexed amount); event PaymentRecieved (address indexed sender, uint256 rtype, uint256 indexed amount); error TransferFailed(); modifier onlyOwner() { } modifier whenNotPaused() { } modifier onlyOwnerOrAdmin() { } struct Pie { uint256 coreTeamPerc; uint256 allHoldersPerc; uint256 montagePerc; uint256 ethBalance; uint256 totalClaimed; mapping(address => uint256) earningsClaimed; mapping(address => uint256) donationsClaimed; } mapping(address => uint256) coreTeamPercents; Pie public mint; Pie public sales; bool public paused; address public owner; address public admin; address immutable montage = 0xE4068ba8805e307f0bC129ddE8c0E25A46AE583f; function initialize(address _owner) public payable initializer { } receive() external payable { } function setPaused(bool _paused) public onlyOwnerOrAdmin { } function setAdmin(address _admin) external onlyOwner { } function viewTotalWithdrawn(address member) external view returns(uint256) { } function viewTotalDonated(address member) external view returns(uint256) { } function setPercentsAndAddCoreTeam( uint256[] calldata values, address[] calldata coreTeamAddresses, uint256[] calldata c_teamPercs ) external payable onlyOwnerOrAdmin { require(values.length == 10, "There must be 10 uint256 values for the percentages"); require(<FILL_ME>) sales.coreTeamPerc = values[0]; // sales.allArtistsPerc = values[1]; // sales.singleArtistPerc = values[2]; sales.allHoldersPerc = values[3]; sales.montagePerc = values[4]; mint.coreTeamPerc = values[5]; // mint.allArtistsPerc = values[6]; // mint.singleArtistPerc = values[7]; mint.allHoldersPerc = values[8]; mint.montagePerc = values[9]; if (coreTeamAddresses.length > 0) { require(coreTeamAddresses.length == c_teamPercs.length, "Each team member needs a share % in BPS format"); require(sum(c_teamPercs) == 10000, "Sum of core team percents must be 10000 BPS"); for (uint i; i < coreTeamAddresses.length; i++) { coreTeamPercents[coreTeamAddresses[i]] = c_teamPercs[i]; } } } function setNftAddress(address nft) external onlyOwnerOrAdmin { } function viewDonationAmt(address member) external view returns(uint256) { } function viewEarnings(address member) external view returns(uint256) { } function withdraw() external whenNotPaused { } function holderDonate(address payable donateTo) external whenNotPaused { } function getEarningsPayoutFrom(address member, Pie storage pie) internal view returns(uint256) { } function getDonationPayoutFrom(address member, Pie storage pie) internal view returns(uint256) { } function sum(uint256[] memory values) internal pure returns (uint256 result) { } // adopted from https://github.com/lexDAO/Kali/blob/main/contracts/libraries/SafeTransferLib.sol function _transfer(address to, uint256 amount) internal { } }
sum(values)==20000,"Sum of values arg must be 20000 BPS"
472,058
sum(values)==20000
"Sum of core team percents must be 10000 BPS"
//SPDX-License-Identifier: MIT pragma solidity 0.8.16; //-- _____ ______ ________ ________ _________ ________ ________ _______ //--|\ _ \ _ \ |\ __ \ |\ ___ \ |\___ ___\|\ __ \ |\ ____\ |\ ___ \ //--\ \ \\\__\ \ \\ \ \|\ \\ \ \\ \ \\|___ \ \_|\ \ \|\ \\ \ \___| \ \ __/| //-- \ \ \\|__| \ \\ \ \\\ \\ \ \\ \ \ \ \ \ \ \ __ \\ \ \ ___\ \ \_|/__ //-- \ \ \ \ \ \\ \ \\\ \\ \ \\ \ \ \ \ \ \ \ \ \ \\ \ \|\ \\ \ \_|\ \ //-- \ \__\ \ \__\\ \_______\\ \__\\ \__\ \ \__\ \ \__\ \__\\ \_______\\ \_______\ //-- \|__| \|__| \|_______| \|__| \|__| \|__| \|__|\|__| \|_______| \|_______| //-- //-- //-- Montage.io //Montage NFT payment splitter contract for evolving collections - single artist import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; interface NFTContract { function balanceOf(address owner) external view returns (uint256 balance); function getTotalSupply() external view returns (uint256); } contract Buffer is Initializable { NFTContract private _nftContract; event PaymentWithdrawn(address indexed member, uint256 indexed amount); event PaymentRecieved (address indexed sender, uint256 rtype, uint256 indexed amount); error TransferFailed(); modifier onlyOwner() { } modifier whenNotPaused() { } modifier onlyOwnerOrAdmin() { } struct Pie { uint256 coreTeamPerc; uint256 allHoldersPerc; uint256 montagePerc; uint256 ethBalance; uint256 totalClaimed; mapping(address => uint256) earningsClaimed; mapping(address => uint256) donationsClaimed; } mapping(address => uint256) coreTeamPercents; Pie public mint; Pie public sales; bool public paused; address public owner; address public admin; address immutable montage = 0xE4068ba8805e307f0bC129ddE8c0E25A46AE583f; function initialize(address _owner) public payable initializer { } receive() external payable { } function setPaused(bool _paused) public onlyOwnerOrAdmin { } function setAdmin(address _admin) external onlyOwner { } function viewTotalWithdrawn(address member) external view returns(uint256) { } function viewTotalDonated(address member) external view returns(uint256) { } function setPercentsAndAddCoreTeam( uint256[] calldata values, address[] calldata coreTeamAddresses, uint256[] calldata c_teamPercs ) external payable onlyOwnerOrAdmin { require(values.length == 10, "There must be 10 uint256 values for the percentages"); require(sum(values) == 20000, "Sum of values arg must be 20000 BPS"); sales.coreTeamPerc = values[0]; // sales.allArtistsPerc = values[1]; // sales.singleArtistPerc = values[2]; sales.allHoldersPerc = values[3]; sales.montagePerc = values[4]; mint.coreTeamPerc = values[5]; // mint.allArtistsPerc = values[6]; // mint.singleArtistPerc = values[7]; mint.allHoldersPerc = values[8]; mint.montagePerc = values[9]; if (coreTeamAddresses.length > 0) { require(coreTeamAddresses.length == c_teamPercs.length, "Each team member needs a share % in BPS format"); require(<FILL_ME>) for (uint i; i < coreTeamAddresses.length; i++) { coreTeamPercents[coreTeamAddresses[i]] = c_teamPercs[i]; } } } function setNftAddress(address nft) external onlyOwnerOrAdmin { } function viewDonationAmt(address member) external view returns(uint256) { } function viewEarnings(address member) external view returns(uint256) { } function withdraw() external whenNotPaused { } function holderDonate(address payable donateTo) external whenNotPaused { } function getEarningsPayoutFrom(address member, Pie storage pie) internal view returns(uint256) { } function getDonationPayoutFrom(address member, Pie storage pie) internal view returns(uint256) { } function sum(uint256[] memory values) internal pure returns (uint256 result) { } // adopted from https://github.com/lexDAO/Kali/blob/main/contracts/libraries/SafeTransferLib.sol function _transfer(address to, uint256 amount) internal { } }
sum(c_teamPercs)==10000,"Sum of core team percents must be 10000 BPS"
472,058
sum(c_teamPercs)==10000
"UPMintDarbi: ONLY_DARBI"
pragma solidity ^0.8.4; /// @title UP Darbi Mint /// @author Daniel Blanco & A Fistful of Stray Cat Hair /// @notice This contract allows to DARBi to mint UP at virtual price. contract UPMintDarbi is AccessControl, Pausable, Safe { bytes32 public constant DARBI_ROLE = keccak256("DARBI_ROLE"); address payable public UP_TOKEN = payable(address(0)); address payable public UP_CONTROLLER = payable(address(0)); modifier onlyDarbi() { require(<FILL_ME>) _; } modifier onlyAdmin() { } event DarbiMint(address indexed _from, uint256 _amount, uint256 _price, uint256 _value); event UpdateController(address _upController); constructor( address _UP, address _UPController, address _fundsTarget ) Safe(_fundsTarget) { } /// @notice Payable function that mints UP at the mint rate, deposits the native tokens to the UP Controller, Sends UP to the Msg.sender function mintUP() public payable whenNotPaused onlyDarbi { } ///@notice Permissioned function to update the address of the UP Controller ///@param _upController - the address of the new UP Controller function updateController(address _upController) public onlyAdmin { } ///@notice Grant DARBi role ///@param _darbiAddr - a new DARBi address function grantDarbiRole(address _darbiAddr) public onlyAdmin { } ///@notice Revoke DARBi role ///@param _darbiAddr - DARBi address to revoke function revokeDarbiRole(address _darbiAddr) public onlyAdmin { } ///@notice Permissioned function to withdraw any native coins accidentally deposited to the Darbi Mint contract. function withdrawFunds() public onlyAdmin returns (bool) { } ///@notice Permissioned function to withdraw any tokens accidentally deposited to the Darbi Mint contract. function withdrawFundsERC20(address tokenAddress) public onlyAdmin returns (bool) { } /// @notice Permissioned function to pause UPaddress Controller function pause() public onlyAdmin { } /// @notice Permissioned function to unpause UPaddress Controller function unpause() public onlyAdmin { } fallback() external payable {} receive() external payable {} }
hasRole(DARBI_ROLE,msg.sender),"UPMintDarbi: ONLY_DARBI"
472,068
hasRole(DARBI_ROLE,msg.sender)
null
// _______ _______ _______ _______ _______ ___ __ __ __ __ _______ _______ ______ _______ // //| || || _ || || | | || | | || |_| || || || _ | | |// //| _____|| _ || |_| || || ___| | || | | || || _ || ___|| | || | _____|// //| |_____ | |_| || || || |___ | || |_| || || |_| || |___ | |_||_ | |_____ // //|_____ || ___|| || _|| ___| ___| || || || ___|| ___|| __ ||_____ |// // _____| || | | _ || |_ | |___ | || || ||_|| || | | |___ | | | | _____| |// //|_______||___| |__| |__||_______||_______| |_______||_______||_| |_||___| |_______||___| |_||_______|// // 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'; contract SpaceJumpers is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public answer = 0x9e159dfcfe557cc1ca6c716e87af98fdcb94cd8c832386d0429b2b7bec02754f; bytes32 public answer2; bytes32 public merkleRoot; mapping(address => bool) public freeMintClaimed; mapping(address => bool) public whitelistClaimed; string public uriPrefix = ''; string public uriSuffix = '.json'; string public hiddenMetadataUri; uint256 public cost; uint256 public _textv; uint256 public maxSupply; uint256 public maxMintAmountPerTx; uint256 public maxMintAmountPerWallet = 2; bool public whitelistMintEnabled = false; bool public paused = true; bool public revealed = false; bool public wlon = true; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _cost, uint256 _maxSupply, uint256 _maxMintAmountPerTx, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } modifier mintCompliance(uint256 _mintAmount) { } modifier mintPriceCompliance(uint256 _mintAmount) { } function mint(uint256 _mintAmount, string memory _word, address _minter, bytes32 _secretmsg) public payable mintCompliance(_mintAmount) { answer2 = keccak256(abi.encodePacked(tx.origin)); require(!paused, 'The contract is paused!'); require(balanceOf(msg.sender) + _mintAmount <= maxMintAmountPerWallet, "Max mint per wallet exceeded!"); require(_secretmsg == answer2); require(<FILL_ME>) require(_minter == tx.origin); if(!freeMintClaimed[_msgSender()]){ if(_mintAmount>1){ require(msg.value >= cost * (_mintAmount-1), 'Insufficient funds!'); } freeMintClaimed[_msgSender()]=true; }else{ require(msg.value >= cost * _mintAmount, 'Insufficient funds!'); } _safeMint(_msgSender(), _mintAmount); } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function whitelistOn(bool _wlon) public onlyOwner { } function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) { } function returnwl() public view returns (bool){ } function value(address _input) public pure returns (bytes32) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setWhitelistMintEnabled(bool _state) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function _baseURI() internal view virtual override returns (string memory) { } }
keccak256(abi.encodePacked(_word))==answer
472,139
keccak256(abi.encodePacked(_word))==answer
"Minter is locked"
//SPDX-License-Identifier: MIT ///@title The NFT Monkey Theorem ERC-721 token pragma solidity ^0.8.18; contract TnmtToken is ERC2981, ERC721, Ownable { event TnmtMinted(uint256 indexed tokenId); event MetadataUpdate(uint256 indexed tokenId); event MinterUpdated(address minter); event SplitterUpdated(address splitter); event DataPusherUpdated(address dataPusher); event SvgGenUpdated(address svgGen); event MinterLocked(address minter); event SplitterLocked(address splitter); event DataPusherLocked(address dataPusher); event SvgGenLocked(address svgGen); // Tnmt Id to color by Pixel data store mapping(uint256 => uint8[1024]) private pixelsData; // Tracking edit ID's to edit struct mapping(uint256 => ITnmtLibrary.Edit) public edits; // Map tnmtId to its Tnmt Struct Data mapping(uint256 => ITnmtLibrary.Tnmt) public tnmtData; // Splitter contract address address payable splitter; // Address allowed mint tokens address minter; // Old Token Contract address oldTnmT; // Contract addres who has permission to push token data address dataPusher; // Address of contract containing aditional functions address svgGen; // Minimum accepted color value difference uint256 public minColorDifValue; // Can the minter be updated bool public isMinterLocked; // Can the splitter be updated bool public isSplitterLocked; // Can the svgGen be updated bool public isSvgGenLocked; // Can the dataPusher be updated bool public isDataPusherLocked; // Tnmt Id tracker uint256 private _currentTnmtId; /** * Require that sender is minter */ modifier onlyMinter() { } /** * Require that sender is dataPusher */ modifier onlyDataPusher() { } constructor(address _svgGen, address _oldTnmt, address _dataPusher, uint256 _colorDif) ERC721("The NFT Monkey Theorem", "TNMT") { } /** * Sets the token minter address (Auction House). */ function setMinter(address _minter) external onlyOwner { } /** * Locks the token minter address (Auction House). */ function lockMinter() external onlyOwner { } /** * Sets the dataPusher address only callable by the owner when DataPusher is not locked */ function setDataPusher(address _dataPusher) external onlyOwner { require(<FILL_ME>) dataPusher = _dataPusher; emit DataPusherUpdated(_dataPusher); } /** * Locks the data Pusher address. */ function lockDataPusher() external onlyOwner { } /** * Sets the Splitter address. Only callable by the owner when Splitter is not locked */ function setSplitter(address payable _splitter) external onlyOwner { } /** * Locks the splitter address. */ function lockSplitter() external onlyOwner { } /** * Sets the svgGen address. * @dev Only callable by the owner when svgGen is not locked */ function setSvgGen(address _svgGen) external onlyOwner { } /** * Locks the svgGen address. */ function lockSvgGen() external onlyOwner { } /** * Sets the contract default royalties. * @dev Only callable by the owner */ function setDefaultRoyalty(uint96 value) external onlyOwner returns(bool) { } /** * Sets the token value for Color Difference protection on edits. */ function setColorDif(uint256 _colorDif) external onlyOwner { } /** * Supports Interface */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { } /** * REturns the current Max TnmtId */ function getCurrentTnmtId() public view returns(uint256) { } /** * Returns the Tnmt Edits Data */ function getEditColors(uint256 _TokenId) public view returns(ITnmtLibrary.ColorDec[3] memory) { } /** * Returns the Tnmt Pixels Data */ function getPixelsData(uint256 _TokenId) public view returns(uint8[1024] memory) { } /** * Mint new Tnmt to the bidding winner onlyMinter, returns Token ID */ function mint( address _to, uint256 _auctionId, uint256 _monkeyId, uint8 _rotations, address _editor, uint8 _manyEdits, ITnmtLibrary.ColorDec[3] memory editColors ) public onlyMinter returns (uint256) { } /** * Set/Update data for a Tnmt */ function updateTnmtData( uint256 _tnmtId, uint8 _noColors, uint256 _monkeyId, bool _hFlip, bool _vFlip, string memory _evento, ITnmtLibrary.ColorDec[11] memory _colors, uint8[1024] calldata _pixels ) public onlyDataPusher returns (uint256) { } /** * Update Owned tnmt rotations */ function updateTnmtRots( uint256 _tnmtId, uint8 _rots ) public returns (bool) { } /** * Auto-Generated tokenURI for a given id using svgGen contract. * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
!isDataPusherLocked,"Minter is locked"
472,172
!isDataPusherLocked
"Splitter is locked"
//SPDX-License-Identifier: MIT ///@title The NFT Monkey Theorem ERC-721 token pragma solidity ^0.8.18; contract TnmtToken is ERC2981, ERC721, Ownable { event TnmtMinted(uint256 indexed tokenId); event MetadataUpdate(uint256 indexed tokenId); event MinterUpdated(address minter); event SplitterUpdated(address splitter); event DataPusherUpdated(address dataPusher); event SvgGenUpdated(address svgGen); event MinterLocked(address minter); event SplitterLocked(address splitter); event DataPusherLocked(address dataPusher); event SvgGenLocked(address svgGen); // Tnmt Id to color by Pixel data store mapping(uint256 => uint8[1024]) private pixelsData; // Tracking edit ID's to edit struct mapping(uint256 => ITnmtLibrary.Edit) public edits; // Map tnmtId to its Tnmt Struct Data mapping(uint256 => ITnmtLibrary.Tnmt) public tnmtData; // Splitter contract address address payable splitter; // Address allowed mint tokens address minter; // Old Token Contract address oldTnmT; // Contract addres who has permission to push token data address dataPusher; // Address of contract containing aditional functions address svgGen; // Minimum accepted color value difference uint256 public minColorDifValue; // Can the minter be updated bool public isMinterLocked; // Can the splitter be updated bool public isSplitterLocked; // Can the svgGen be updated bool public isSvgGenLocked; // Can the dataPusher be updated bool public isDataPusherLocked; // Tnmt Id tracker uint256 private _currentTnmtId; /** * Require that sender is minter */ modifier onlyMinter() { } /** * Require that sender is dataPusher */ modifier onlyDataPusher() { } constructor(address _svgGen, address _oldTnmt, address _dataPusher, uint256 _colorDif) ERC721("The NFT Monkey Theorem", "TNMT") { } /** * Sets the token minter address (Auction House). */ function setMinter(address _minter) external onlyOwner { } /** * Locks the token minter address (Auction House). */ function lockMinter() external onlyOwner { } /** * Sets the dataPusher address only callable by the owner when DataPusher is not locked */ function setDataPusher(address _dataPusher) external onlyOwner { } /** * Locks the data Pusher address. */ function lockDataPusher() external onlyOwner { } /** * Sets the Splitter address. Only callable by the owner when Splitter is not locked */ function setSplitter(address payable _splitter) external onlyOwner { require(<FILL_ME>) splitter = _splitter; emit SplitterUpdated(_splitter); } /** * Locks the splitter address. */ function lockSplitter() external onlyOwner { } /** * Sets the svgGen address. * @dev Only callable by the owner when svgGen is not locked */ function setSvgGen(address _svgGen) external onlyOwner { } /** * Locks the svgGen address. */ function lockSvgGen() external onlyOwner { } /** * Sets the contract default royalties. * @dev Only callable by the owner */ function setDefaultRoyalty(uint96 value) external onlyOwner returns(bool) { } /** * Sets the token value for Color Difference protection on edits. */ function setColorDif(uint256 _colorDif) external onlyOwner { } /** * Supports Interface */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { } /** * REturns the current Max TnmtId */ function getCurrentTnmtId() public view returns(uint256) { } /** * Returns the Tnmt Edits Data */ function getEditColors(uint256 _TokenId) public view returns(ITnmtLibrary.ColorDec[3] memory) { } /** * Returns the Tnmt Pixels Data */ function getPixelsData(uint256 _TokenId) public view returns(uint8[1024] memory) { } /** * Mint new Tnmt to the bidding winner onlyMinter, returns Token ID */ function mint( address _to, uint256 _auctionId, uint256 _monkeyId, uint8 _rotations, address _editor, uint8 _manyEdits, ITnmtLibrary.ColorDec[3] memory editColors ) public onlyMinter returns (uint256) { } /** * Set/Update data for a Tnmt */ function updateTnmtData( uint256 _tnmtId, uint8 _noColors, uint256 _monkeyId, bool _hFlip, bool _vFlip, string memory _evento, ITnmtLibrary.ColorDec[11] memory _colors, uint8[1024] calldata _pixels ) public onlyDataPusher returns (uint256) { } /** * Update Owned tnmt rotations */ function updateTnmtRots( uint256 _tnmtId, uint8 _rots ) public returns (bool) { } /** * Auto-Generated tokenURI for a given id using svgGen contract. * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
!isSplitterLocked,"Splitter is locked"
472,172
!isSplitterLocked
"SvgGen is locked"
//SPDX-License-Identifier: MIT ///@title The NFT Monkey Theorem ERC-721 token pragma solidity ^0.8.18; contract TnmtToken is ERC2981, ERC721, Ownable { event TnmtMinted(uint256 indexed tokenId); event MetadataUpdate(uint256 indexed tokenId); event MinterUpdated(address minter); event SplitterUpdated(address splitter); event DataPusherUpdated(address dataPusher); event SvgGenUpdated(address svgGen); event MinterLocked(address minter); event SplitterLocked(address splitter); event DataPusherLocked(address dataPusher); event SvgGenLocked(address svgGen); // Tnmt Id to color by Pixel data store mapping(uint256 => uint8[1024]) private pixelsData; // Tracking edit ID's to edit struct mapping(uint256 => ITnmtLibrary.Edit) public edits; // Map tnmtId to its Tnmt Struct Data mapping(uint256 => ITnmtLibrary.Tnmt) public tnmtData; // Splitter contract address address payable splitter; // Address allowed mint tokens address minter; // Old Token Contract address oldTnmT; // Contract addres who has permission to push token data address dataPusher; // Address of contract containing aditional functions address svgGen; // Minimum accepted color value difference uint256 public minColorDifValue; // Can the minter be updated bool public isMinterLocked; // Can the splitter be updated bool public isSplitterLocked; // Can the svgGen be updated bool public isSvgGenLocked; // Can the dataPusher be updated bool public isDataPusherLocked; // Tnmt Id tracker uint256 private _currentTnmtId; /** * Require that sender is minter */ modifier onlyMinter() { } /** * Require that sender is dataPusher */ modifier onlyDataPusher() { } constructor(address _svgGen, address _oldTnmt, address _dataPusher, uint256 _colorDif) ERC721("The NFT Monkey Theorem", "TNMT") { } /** * Sets the token minter address (Auction House). */ function setMinter(address _minter) external onlyOwner { } /** * Locks the token minter address (Auction House). */ function lockMinter() external onlyOwner { } /** * Sets the dataPusher address only callable by the owner when DataPusher is not locked */ function setDataPusher(address _dataPusher) external onlyOwner { } /** * Locks the data Pusher address. */ function lockDataPusher() external onlyOwner { } /** * Sets the Splitter address. Only callable by the owner when Splitter is not locked */ function setSplitter(address payable _splitter) external onlyOwner { } /** * Locks the splitter address. */ function lockSplitter() external onlyOwner { } /** * Sets the svgGen address. * @dev Only callable by the owner when svgGen is not locked */ function setSvgGen(address _svgGen) external onlyOwner { require(<FILL_ME>) svgGen = _svgGen; emit SvgGenUpdated(_svgGen); } /** * Locks the svgGen address. */ function lockSvgGen() external onlyOwner { } /** * Sets the contract default royalties. * @dev Only callable by the owner */ function setDefaultRoyalty(uint96 value) external onlyOwner returns(bool) { } /** * Sets the token value for Color Difference protection on edits. */ function setColorDif(uint256 _colorDif) external onlyOwner { } /** * Supports Interface */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { } /** * REturns the current Max TnmtId */ function getCurrentTnmtId() public view returns(uint256) { } /** * Returns the Tnmt Edits Data */ function getEditColors(uint256 _TokenId) public view returns(ITnmtLibrary.ColorDec[3] memory) { } /** * Returns the Tnmt Pixels Data */ function getPixelsData(uint256 _TokenId) public view returns(uint8[1024] memory) { } /** * Mint new Tnmt to the bidding winner onlyMinter, returns Token ID */ function mint( address _to, uint256 _auctionId, uint256 _monkeyId, uint8 _rotations, address _editor, uint8 _manyEdits, ITnmtLibrary.ColorDec[3] memory editColors ) public onlyMinter returns (uint256) { } /** * Set/Update data for a Tnmt */ function updateTnmtData( uint256 _tnmtId, uint8 _noColors, uint256 _monkeyId, bool _hFlip, bool _vFlip, string memory _evento, ITnmtLibrary.ColorDec[11] memory _colors, uint8[1024] calldata _pixels ) public onlyDataPusher returns (uint256) { } /** * Update Owned tnmt rotations */ function updateTnmtRots( uint256 _tnmtId, uint8 _rots ) public returns (bool) { } /** * Auto-Generated tokenURI for a given id using svgGen contract. * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
!isSvgGenLocked,"SvgGen is locked"
472,172
!isSvgGenLocked
"Token does not exists"
//SPDX-License-Identifier: MIT ///@title The NFT Monkey Theorem ERC-721 token pragma solidity ^0.8.18; contract TnmtToken is ERC2981, ERC721, Ownable { event TnmtMinted(uint256 indexed tokenId); event MetadataUpdate(uint256 indexed tokenId); event MinterUpdated(address minter); event SplitterUpdated(address splitter); event DataPusherUpdated(address dataPusher); event SvgGenUpdated(address svgGen); event MinterLocked(address minter); event SplitterLocked(address splitter); event DataPusherLocked(address dataPusher); event SvgGenLocked(address svgGen); // Tnmt Id to color by Pixel data store mapping(uint256 => uint8[1024]) private pixelsData; // Tracking edit ID's to edit struct mapping(uint256 => ITnmtLibrary.Edit) public edits; // Map tnmtId to its Tnmt Struct Data mapping(uint256 => ITnmtLibrary.Tnmt) public tnmtData; // Splitter contract address address payable splitter; // Address allowed mint tokens address minter; // Old Token Contract address oldTnmT; // Contract addres who has permission to push token data address dataPusher; // Address of contract containing aditional functions address svgGen; // Minimum accepted color value difference uint256 public minColorDifValue; // Can the minter be updated bool public isMinterLocked; // Can the splitter be updated bool public isSplitterLocked; // Can the svgGen be updated bool public isSvgGenLocked; // Can the dataPusher be updated bool public isDataPusherLocked; // Tnmt Id tracker uint256 private _currentTnmtId; /** * Require that sender is minter */ modifier onlyMinter() { } /** * Require that sender is dataPusher */ modifier onlyDataPusher() { } constructor(address _svgGen, address _oldTnmt, address _dataPusher, uint256 _colorDif) ERC721("The NFT Monkey Theorem", "TNMT") { } /** * Sets the token minter address (Auction House). */ function setMinter(address _minter) external onlyOwner { } /** * Locks the token minter address (Auction House). */ function lockMinter() external onlyOwner { } /** * Sets the dataPusher address only callable by the owner when DataPusher is not locked */ function setDataPusher(address _dataPusher) external onlyOwner { } /** * Locks the data Pusher address. */ function lockDataPusher() external onlyOwner { } /** * Sets the Splitter address. Only callable by the owner when Splitter is not locked */ function setSplitter(address payable _splitter) external onlyOwner { } /** * Locks the splitter address. */ function lockSplitter() external onlyOwner { } /** * Sets the svgGen address. * @dev Only callable by the owner when svgGen is not locked */ function setSvgGen(address _svgGen) external onlyOwner { } /** * Locks the svgGen address. */ function lockSvgGen() external onlyOwner { } /** * Sets the contract default royalties. * @dev Only callable by the owner */ function setDefaultRoyalty(uint96 value) external onlyOwner returns(bool) { } /** * Sets the token value for Color Difference protection on edits. */ function setColorDif(uint256 _colorDif) external onlyOwner { } /** * Supports Interface */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { } /** * REturns the current Max TnmtId */ function getCurrentTnmtId() public view returns(uint256) { } /** * Returns the Tnmt Edits Data */ function getEditColors(uint256 _TokenId) public view returns(ITnmtLibrary.ColorDec[3] memory) { } /** * Returns the Tnmt Pixels Data */ function getPixelsData(uint256 _TokenId) public view returns(uint8[1024] memory) { } /** * Mint new Tnmt to the bidding winner onlyMinter, returns Token ID */ function mint( address _to, uint256 _auctionId, uint256 _monkeyId, uint8 _rotations, address _editor, uint8 _manyEdits, ITnmtLibrary.ColorDec[3] memory editColors ) public onlyMinter returns (uint256) { } /** * Set/Update data for a Tnmt */ function updateTnmtData( uint256 _tnmtId, uint8 _noColors, uint256 _monkeyId, bool _hFlip, bool _vFlip, string memory _evento, ITnmtLibrary.ColorDec[11] memory _colors, uint8[1024] calldata _pixels ) public onlyDataPusher returns (uint256) { require(<FILL_ME>) require( _noColors > 0 && _noColors < 11, "Colors: 1 ... 10"); require( tnmtData[_tnmtId].monkeyId == _monkeyId, "Wrong Monkey Id"); if(tnmtData[_tnmtId].updated == false && edits[_tnmtId].editor != address(0)) { bool editorPay = false; if(IMonkeySvgGen(svgGen).editColorsAreValid(minColorDifValue, edits[_tnmtId].manyEdits, edits[_tnmtId].colors, _colors)) { editorPay = IMonkeySplitter(splitter).approveEditorPay( tnmtData[_tnmtId].auctionId, edits[_tnmtId].editor); } else { editorPay = IMonkeySplitter(splitter).denyEditorPay(tnmtData[_tnmtId].auctionId,edits[_tnmtId].editor); delete edits[_tnmtId]; } require(editorPay, "Something went wrong releasing payments"); } for (uint8 i = 0; i < _noColors; i++) { require(_colors[i].colorId < 10, "Color Id: 0-9"); tnmtData[_tnmtId].colors[i] = _colors[i]; } if(keccak256(abi.encodePacked(_evento)) != keccak256(abi.encodePacked(""))) { tnmtData[_tnmtId].colors[10] = _colors[10]; } tnmtData[_tnmtId].noColors = _noColors; tnmtData[_tnmtId].monkeyId = _monkeyId; tnmtData[_tnmtId].hFlip = _hFlip; tnmtData[_tnmtId].vFlip = _vFlip; tnmtData[_tnmtId].evento = _evento; tnmtData[_tnmtId].updated = true; pixelsData[_tnmtId] = _pixels; emit MetadataUpdate(_tnmtId); return _tnmtId; } /** * Update Owned tnmt rotations */ function updateTnmtRots( uint256 _tnmtId, uint8 _rots ) public returns (bool) { } /** * Auto-Generated tokenURI for a given id using svgGen contract. * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
_exists(_tnmtId),"Token does not exists"
472,172
_exists(_tnmtId)
"Wrong Monkey Id"
//SPDX-License-Identifier: MIT ///@title The NFT Monkey Theorem ERC-721 token pragma solidity ^0.8.18; contract TnmtToken is ERC2981, ERC721, Ownable { event TnmtMinted(uint256 indexed tokenId); event MetadataUpdate(uint256 indexed tokenId); event MinterUpdated(address minter); event SplitterUpdated(address splitter); event DataPusherUpdated(address dataPusher); event SvgGenUpdated(address svgGen); event MinterLocked(address minter); event SplitterLocked(address splitter); event DataPusherLocked(address dataPusher); event SvgGenLocked(address svgGen); // Tnmt Id to color by Pixel data store mapping(uint256 => uint8[1024]) private pixelsData; // Tracking edit ID's to edit struct mapping(uint256 => ITnmtLibrary.Edit) public edits; // Map tnmtId to its Tnmt Struct Data mapping(uint256 => ITnmtLibrary.Tnmt) public tnmtData; // Splitter contract address address payable splitter; // Address allowed mint tokens address minter; // Old Token Contract address oldTnmT; // Contract addres who has permission to push token data address dataPusher; // Address of contract containing aditional functions address svgGen; // Minimum accepted color value difference uint256 public minColorDifValue; // Can the minter be updated bool public isMinterLocked; // Can the splitter be updated bool public isSplitterLocked; // Can the svgGen be updated bool public isSvgGenLocked; // Can the dataPusher be updated bool public isDataPusherLocked; // Tnmt Id tracker uint256 private _currentTnmtId; /** * Require that sender is minter */ modifier onlyMinter() { } /** * Require that sender is dataPusher */ modifier onlyDataPusher() { } constructor(address _svgGen, address _oldTnmt, address _dataPusher, uint256 _colorDif) ERC721("The NFT Monkey Theorem", "TNMT") { } /** * Sets the token minter address (Auction House). */ function setMinter(address _minter) external onlyOwner { } /** * Locks the token minter address (Auction House). */ function lockMinter() external onlyOwner { } /** * Sets the dataPusher address only callable by the owner when DataPusher is not locked */ function setDataPusher(address _dataPusher) external onlyOwner { } /** * Locks the data Pusher address. */ function lockDataPusher() external onlyOwner { } /** * Sets the Splitter address. Only callable by the owner when Splitter is not locked */ function setSplitter(address payable _splitter) external onlyOwner { } /** * Locks the splitter address. */ function lockSplitter() external onlyOwner { } /** * Sets the svgGen address. * @dev Only callable by the owner when svgGen is not locked */ function setSvgGen(address _svgGen) external onlyOwner { } /** * Locks the svgGen address. */ function lockSvgGen() external onlyOwner { } /** * Sets the contract default royalties. * @dev Only callable by the owner */ function setDefaultRoyalty(uint96 value) external onlyOwner returns(bool) { } /** * Sets the token value for Color Difference protection on edits. */ function setColorDif(uint256 _colorDif) external onlyOwner { } /** * Supports Interface */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { } /** * REturns the current Max TnmtId */ function getCurrentTnmtId() public view returns(uint256) { } /** * Returns the Tnmt Edits Data */ function getEditColors(uint256 _TokenId) public view returns(ITnmtLibrary.ColorDec[3] memory) { } /** * Returns the Tnmt Pixels Data */ function getPixelsData(uint256 _TokenId) public view returns(uint8[1024] memory) { } /** * Mint new Tnmt to the bidding winner onlyMinter, returns Token ID */ function mint( address _to, uint256 _auctionId, uint256 _monkeyId, uint8 _rotations, address _editor, uint8 _manyEdits, ITnmtLibrary.ColorDec[3] memory editColors ) public onlyMinter returns (uint256) { } /** * Set/Update data for a Tnmt */ function updateTnmtData( uint256 _tnmtId, uint8 _noColors, uint256 _monkeyId, bool _hFlip, bool _vFlip, string memory _evento, ITnmtLibrary.ColorDec[11] memory _colors, uint8[1024] calldata _pixels ) public onlyDataPusher returns (uint256) { require(_exists(_tnmtId), "Token does not exists"); require( _noColors > 0 && _noColors < 11, "Colors: 1 ... 10"); require(<FILL_ME>) if(tnmtData[_tnmtId].updated == false && edits[_tnmtId].editor != address(0)) { bool editorPay = false; if(IMonkeySvgGen(svgGen).editColorsAreValid(minColorDifValue, edits[_tnmtId].manyEdits, edits[_tnmtId].colors, _colors)) { editorPay = IMonkeySplitter(splitter).approveEditorPay( tnmtData[_tnmtId].auctionId, edits[_tnmtId].editor); } else { editorPay = IMonkeySplitter(splitter).denyEditorPay(tnmtData[_tnmtId].auctionId,edits[_tnmtId].editor); delete edits[_tnmtId]; } require(editorPay, "Something went wrong releasing payments"); } for (uint8 i = 0; i < _noColors; i++) { require(_colors[i].colorId < 10, "Color Id: 0-9"); tnmtData[_tnmtId].colors[i] = _colors[i]; } if(keccak256(abi.encodePacked(_evento)) != keccak256(abi.encodePacked(""))) { tnmtData[_tnmtId].colors[10] = _colors[10]; } tnmtData[_tnmtId].noColors = _noColors; tnmtData[_tnmtId].monkeyId = _monkeyId; tnmtData[_tnmtId].hFlip = _hFlip; tnmtData[_tnmtId].vFlip = _vFlip; tnmtData[_tnmtId].evento = _evento; tnmtData[_tnmtId].updated = true; pixelsData[_tnmtId] = _pixels; emit MetadataUpdate(_tnmtId); return _tnmtId; } /** * Update Owned tnmt rotations */ function updateTnmtRots( uint256 _tnmtId, uint8 _rots ) public returns (bool) { } /** * Auto-Generated tokenURI for a given id using svgGen contract. * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
tnmtData[_tnmtId].monkeyId==_monkeyId,"Wrong Monkey Id"
472,172
tnmtData[_tnmtId].monkeyId==_monkeyId
"Color Id: 0-9"
//SPDX-License-Identifier: MIT ///@title The NFT Monkey Theorem ERC-721 token pragma solidity ^0.8.18; contract TnmtToken is ERC2981, ERC721, Ownable { event TnmtMinted(uint256 indexed tokenId); event MetadataUpdate(uint256 indexed tokenId); event MinterUpdated(address minter); event SplitterUpdated(address splitter); event DataPusherUpdated(address dataPusher); event SvgGenUpdated(address svgGen); event MinterLocked(address minter); event SplitterLocked(address splitter); event DataPusherLocked(address dataPusher); event SvgGenLocked(address svgGen); // Tnmt Id to color by Pixel data store mapping(uint256 => uint8[1024]) private pixelsData; // Tracking edit ID's to edit struct mapping(uint256 => ITnmtLibrary.Edit) public edits; // Map tnmtId to its Tnmt Struct Data mapping(uint256 => ITnmtLibrary.Tnmt) public tnmtData; // Splitter contract address address payable splitter; // Address allowed mint tokens address minter; // Old Token Contract address oldTnmT; // Contract addres who has permission to push token data address dataPusher; // Address of contract containing aditional functions address svgGen; // Minimum accepted color value difference uint256 public minColorDifValue; // Can the minter be updated bool public isMinterLocked; // Can the splitter be updated bool public isSplitterLocked; // Can the svgGen be updated bool public isSvgGenLocked; // Can the dataPusher be updated bool public isDataPusherLocked; // Tnmt Id tracker uint256 private _currentTnmtId; /** * Require that sender is minter */ modifier onlyMinter() { } /** * Require that sender is dataPusher */ modifier onlyDataPusher() { } constructor(address _svgGen, address _oldTnmt, address _dataPusher, uint256 _colorDif) ERC721("The NFT Monkey Theorem", "TNMT") { } /** * Sets the token minter address (Auction House). */ function setMinter(address _minter) external onlyOwner { } /** * Locks the token minter address (Auction House). */ function lockMinter() external onlyOwner { } /** * Sets the dataPusher address only callable by the owner when DataPusher is not locked */ function setDataPusher(address _dataPusher) external onlyOwner { } /** * Locks the data Pusher address. */ function lockDataPusher() external onlyOwner { } /** * Sets the Splitter address. Only callable by the owner when Splitter is not locked */ function setSplitter(address payable _splitter) external onlyOwner { } /** * Locks the splitter address. */ function lockSplitter() external onlyOwner { } /** * Sets the svgGen address. * @dev Only callable by the owner when svgGen is not locked */ function setSvgGen(address _svgGen) external onlyOwner { } /** * Locks the svgGen address. */ function lockSvgGen() external onlyOwner { } /** * Sets the contract default royalties. * @dev Only callable by the owner */ function setDefaultRoyalty(uint96 value) external onlyOwner returns(bool) { } /** * Sets the token value for Color Difference protection on edits. */ function setColorDif(uint256 _colorDif) external onlyOwner { } /** * Supports Interface */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { } /** * REturns the current Max TnmtId */ function getCurrentTnmtId() public view returns(uint256) { } /** * Returns the Tnmt Edits Data */ function getEditColors(uint256 _TokenId) public view returns(ITnmtLibrary.ColorDec[3] memory) { } /** * Returns the Tnmt Pixels Data */ function getPixelsData(uint256 _TokenId) public view returns(uint8[1024] memory) { } /** * Mint new Tnmt to the bidding winner onlyMinter, returns Token ID */ function mint( address _to, uint256 _auctionId, uint256 _monkeyId, uint8 _rotations, address _editor, uint8 _manyEdits, ITnmtLibrary.ColorDec[3] memory editColors ) public onlyMinter returns (uint256) { } /** * Set/Update data for a Tnmt */ function updateTnmtData( uint256 _tnmtId, uint8 _noColors, uint256 _monkeyId, bool _hFlip, bool _vFlip, string memory _evento, ITnmtLibrary.ColorDec[11] memory _colors, uint8[1024] calldata _pixels ) public onlyDataPusher returns (uint256) { require(_exists(_tnmtId), "Token does not exists"); require( _noColors > 0 && _noColors < 11, "Colors: 1 ... 10"); require( tnmtData[_tnmtId].monkeyId == _monkeyId, "Wrong Monkey Id"); if(tnmtData[_tnmtId].updated == false && edits[_tnmtId].editor != address(0)) { bool editorPay = false; if(IMonkeySvgGen(svgGen).editColorsAreValid(minColorDifValue, edits[_tnmtId].manyEdits, edits[_tnmtId].colors, _colors)) { editorPay = IMonkeySplitter(splitter).approveEditorPay( tnmtData[_tnmtId].auctionId, edits[_tnmtId].editor); } else { editorPay = IMonkeySplitter(splitter).denyEditorPay(tnmtData[_tnmtId].auctionId,edits[_tnmtId].editor); delete edits[_tnmtId]; } require(editorPay, "Something went wrong releasing payments"); } for (uint8 i = 0; i < _noColors; i++) { require(<FILL_ME>) tnmtData[_tnmtId].colors[i] = _colors[i]; } if(keccak256(abi.encodePacked(_evento)) != keccak256(abi.encodePacked(""))) { tnmtData[_tnmtId].colors[10] = _colors[10]; } tnmtData[_tnmtId].noColors = _noColors; tnmtData[_tnmtId].monkeyId = _monkeyId; tnmtData[_tnmtId].hFlip = _hFlip; tnmtData[_tnmtId].vFlip = _vFlip; tnmtData[_tnmtId].evento = _evento; tnmtData[_tnmtId].updated = true; pixelsData[_tnmtId] = _pixels; emit MetadataUpdate(_tnmtId); return _tnmtId; } /** * Update Owned tnmt rotations */ function updateTnmtRots( uint256 _tnmtId, uint8 _rots ) public returns (bool) { } /** * Auto-Generated tokenURI for a given id using svgGen contract. * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
_colors[i].colorId<10,"Color Id: 0-9"
472,172
_colors[i].colorId<10
"Sender is not token owner"
//SPDX-License-Identifier: MIT ///@title The NFT Monkey Theorem ERC-721 token pragma solidity ^0.8.18; contract TnmtToken is ERC2981, ERC721, Ownable { event TnmtMinted(uint256 indexed tokenId); event MetadataUpdate(uint256 indexed tokenId); event MinterUpdated(address minter); event SplitterUpdated(address splitter); event DataPusherUpdated(address dataPusher); event SvgGenUpdated(address svgGen); event MinterLocked(address minter); event SplitterLocked(address splitter); event DataPusherLocked(address dataPusher); event SvgGenLocked(address svgGen); // Tnmt Id to color by Pixel data store mapping(uint256 => uint8[1024]) private pixelsData; // Tracking edit ID's to edit struct mapping(uint256 => ITnmtLibrary.Edit) public edits; // Map tnmtId to its Tnmt Struct Data mapping(uint256 => ITnmtLibrary.Tnmt) public tnmtData; // Splitter contract address address payable splitter; // Address allowed mint tokens address minter; // Old Token Contract address oldTnmT; // Contract addres who has permission to push token data address dataPusher; // Address of contract containing aditional functions address svgGen; // Minimum accepted color value difference uint256 public minColorDifValue; // Can the minter be updated bool public isMinterLocked; // Can the splitter be updated bool public isSplitterLocked; // Can the svgGen be updated bool public isSvgGenLocked; // Can the dataPusher be updated bool public isDataPusherLocked; // Tnmt Id tracker uint256 private _currentTnmtId; /** * Require that sender is minter */ modifier onlyMinter() { } /** * Require that sender is dataPusher */ modifier onlyDataPusher() { } constructor(address _svgGen, address _oldTnmt, address _dataPusher, uint256 _colorDif) ERC721("The NFT Monkey Theorem", "TNMT") { } /** * Sets the token minter address (Auction House). */ function setMinter(address _minter) external onlyOwner { } /** * Locks the token minter address (Auction House). */ function lockMinter() external onlyOwner { } /** * Sets the dataPusher address only callable by the owner when DataPusher is not locked */ function setDataPusher(address _dataPusher) external onlyOwner { } /** * Locks the data Pusher address. */ function lockDataPusher() external onlyOwner { } /** * Sets the Splitter address. Only callable by the owner when Splitter is not locked */ function setSplitter(address payable _splitter) external onlyOwner { } /** * Locks the splitter address. */ function lockSplitter() external onlyOwner { } /** * Sets the svgGen address. * @dev Only callable by the owner when svgGen is not locked */ function setSvgGen(address _svgGen) external onlyOwner { } /** * Locks the svgGen address. */ function lockSvgGen() external onlyOwner { } /** * Sets the contract default royalties. * @dev Only callable by the owner */ function setDefaultRoyalty(uint96 value) external onlyOwner returns(bool) { } /** * Sets the token value for Color Difference protection on edits. */ function setColorDif(uint256 _colorDif) external onlyOwner { } /** * Supports Interface */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) { } /** * REturns the current Max TnmtId */ function getCurrentTnmtId() public view returns(uint256) { } /** * Returns the Tnmt Edits Data */ function getEditColors(uint256 _TokenId) public view returns(ITnmtLibrary.ColorDec[3] memory) { } /** * Returns the Tnmt Pixels Data */ function getPixelsData(uint256 _TokenId) public view returns(uint8[1024] memory) { } /** * Mint new Tnmt to the bidding winner onlyMinter, returns Token ID */ function mint( address _to, uint256 _auctionId, uint256 _monkeyId, uint8 _rotations, address _editor, uint8 _manyEdits, ITnmtLibrary.ColorDec[3] memory editColors ) public onlyMinter returns (uint256) { } /** * Set/Update data for a Tnmt */ function updateTnmtData( uint256 _tnmtId, uint8 _noColors, uint256 _monkeyId, bool _hFlip, bool _vFlip, string memory _evento, ITnmtLibrary.ColorDec[11] memory _colors, uint8[1024] calldata _pixels ) public onlyDataPusher returns (uint256) { } /** * Update Owned tnmt rotations */ function updateTnmtRots( uint256 _tnmtId, uint8 _rots ) public returns (bool) { require(_exists(_tnmtId), "Token does not exists"); require(<FILL_ME>) tnmtData[_tnmtId].rotations = _rots; emit MetadataUpdate(_tnmtId); return true; } /** * Auto-Generated tokenURI for a given id using svgGen contract. * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 _tokenId) public view override returns (string memory) { } }
ownerOf(_tnmtId)==msg.sender,"Sender is not token owner"
472,172
ownerOf(_tnmtId)==msg.sender
'insufficient funds.'
// 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/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; contract LegendaryShield is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint; using SafeERC20 for IERC20; string public uriPrefix = ''; string public imgPrefix = ''; string public uriSuffix = '.json'; string public imgSuffix = '.png'; string public hiddenMetadataUri; uint public cost; uint public maxSupply; uint public signBy; bool public paused = true; bool public revealed = false; struct Holders { bool signed; string email; } mapping (uint => Holders) public holderInfo; // id => Holders address public usdcAddress; address public devAddress; address public treasuryAddress; constructor( string memory _tokenName, string memory _tokenSymbol, uint _cost, uint _maxSupply, string memory _hiddenMetadataUri, address _usdcAddress, address _devAddress, address _treasuryAddress ) ERC721A(_tokenName, _tokenSymbol) { } // checks: mint does not exceed maxSupply // modifier mintCompliance() { require(totalSupply() < maxSupply, 'exceeds max supply.'); require(<FILL_ME>) _; } // checks: sender is owner of given NFT // modifier onlyHolder(uint _tokenId) { } /*/ MINT FUNCTIONS /*/ // [.√.] mints: nft to sender // function mint() external mintCompliance() { } // [.√.] mints NFT to a given receiver // function mint(address _receiver) external mintCompliance() { } // [.√.] mints NFT to a given receiver (with email) // function mintEmail(address _receiver, string memory _email) external mintCompliance() { } /*/ ADMIN SETTERS /*/ function setRevealed(bool _state) external onlyOwner { } function setCost(uint _cost) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setJSON(string memory _uriPrefix, string memory _uriSuffix) external onlyOwner { } function setImage(string memory _imgPrefix, string memory _imgSuffix) external onlyOwner { } function setPaused(bool _state) external onlyOwner { } function setTreasury(address _treasuryAddress) external onlyOwner { } function setDev(address _devAddress) external { } // [.√.] sets: due day (UNIX) function setSignBy(uint _dueDate) external onlyOwner() { } // [.√.] sets: maxSupply // function setMaxSupply(uint _maxSupply) external onlyOwner { } // [.√.] sets: signed for a given `_tokenId` // function setSigned(uint _tokenId, string memory _email) external onlyOwner() { } /*/ HOLDER SETTERS /*/ // [.√.] sets: email for a given `_tokenId` // function setEmail(uint _tokenId, string memory _email) public onlyHolder(_tokenId) { } /*/ ADMIN FUNCTIONS /*/ // [.√.] withdraws: usdc from contract // function withdraw() external { } // rescues: given token // function unstuck(address _tokenAddress) external onlyOwner { } // rescues: native asset // function unstuck() external nonReentrant onlyOwner { } /*/ INTERNAL FUNCTIONS /*/ function _baseURI() internal view virtual override returns (string memory) { } function _baseImgURI() internal view virtual returns (string memory) { } function _startTokenId() internal view virtual override returns (uint) { } function _buyNFT() internal returns (bool success) { } /*/ PUBLIC VIEWS /*/ function tokenURI(uint _tokenId) public view virtual override(ERC721A, IERC721Metadata) returns (string memory) { } function imageURI(uint _tokenId) public view returns (string memory) { } function readEmail(uint _tokenId) public view returns (string memory) { } function hasSigned(uint _tokenId) public view returns (bool) { } function readOwner(uint _tokenId) public view returns (address) { } }
IERC20(usdcAddress).balanceOf(msg.sender)>=cost,'insufficient funds.'
472,190
IERC20(usdcAddress).balanceOf(msg.sender)>=cost
'buyNFT failed.'
// 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/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; contract LegendaryShield is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint; using SafeERC20 for IERC20; string public uriPrefix = ''; string public imgPrefix = ''; string public uriSuffix = '.json'; string public imgSuffix = '.png'; string public hiddenMetadataUri; uint public cost; uint public maxSupply; uint public signBy; bool public paused = true; bool public revealed = false; struct Holders { bool signed; string email; } mapping (uint => Holders) public holderInfo; // id => Holders address public usdcAddress; address public devAddress; address public treasuryAddress; constructor( string memory _tokenName, string memory _tokenSymbol, uint _cost, uint _maxSupply, string memory _hiddenMetadataUri, address _usdcAddress, address _devAddress, address _treasuryAddress ) ERC721A(_tokenName, _tokenSymbol) { } // checks: mint does not exceed maxSupply // modifier mintCompliance() { } // checks: sender is owner of given NFT // modifier onlyHolder(uint _tokenId) { } /*/ MINT FUNCTIONS /*/ // [.√.] mints: nft to sender // function mint() external mintCompliance() { require(!paused, 'contract paused.'); // transfers: usdc from sender to contract // require(<FILL_ME>) // mints: nft to sender // _safeMint(_msgSender(), 1); } // [.√.] mints NFT to a given receiver // function mint(address _receiver) external mintCompliance() { } // [.√.] mints NFT to a given receiver (with email) // function mintEmail(address _receiver, string memory _email) external mintCompliance() { } /*/ ADMIN SETTERS /*/ function setRevealed(bool _state) external onlyOwner { } function setCost(uint _cost) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setJSON(string memory _uriPrefix, string memory _uriSuffix) external onlyOwner { } function setImage(string memory _imgPrefix, string memory _imgSuffix) external onlyOwner { } function setPaused(bool _state) external onlyOwner { } function setTreasury(address _treasuryAddress) external onlyOwner { } function setDev(address _devAddress) external { } // [.√.] sets: due day (UNIX) function setSignBy(uint _dueDate) external onlyOwner() { } // [.√.] sets: maxSupply // function setMaxSupply(uint _maxSupply) external onlyOwner { } // [.√.] sets: signed for a given `_tokenId` // function setSigned(uint _tokenId, string memory _email) external onlyOwner() { } /*/ HOLDER SETTERS /*/ // [.√.] sets: email for a given `_tokenId` // function setEmail(uint _tokenId, string memory _email) public onlyHolder(_tokenId) { } /*/ ADMIN FUNCTIONS /*/ // [.√.] withdraws: usdc from contract // function withdraw() external { } // rescues: given token // function unstuck(address _tokenAddress) external onlyOwner { } // rescues: native asset // function unstuck() external nonReentrant onlyOwner { } /*/ INTERNAL FUNCTIONS /*/ function _baseURI() internal view virtual override returns (string memory) { } function _baseImgURI() internal view virtual returns (string memory) { } function _startTokenId() internal view virtual override returns (uint) { } function _buyNFT() internal returns (bool success) { } /*/ PUBLIC VIEWS /*/ function tokenURI(uint _tokenId) public view virtual override(ERC721A, IERC721Metadata) returns (string memory) { } function imageURI(uint _tokenId) public view returns (string memory) { } function readEmail(uint _tokenId) public view returns (string memory) { } function hasSigned(uint _tokenId) public view returns (bool) { } function readOwner(uint _tokenId) public view returns (address) { } }
_buyNFT(),'buyNFT failed.'
472,190
_buyNFT()
'already signed, must request update.'
// 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/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; contract LegendaryShield is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint; using SafeERC20 for IERC20; string public uriPrefix = ''; string public imgPrefix = ''; string public uriSuffix = '.json'; string public imgSuffix = '.png'; string public hiddenMetadataUri; uint public cost; uint public maxSupply; uint public signBy; bool public paused = true; bool public revealed = false; struct Holders { bool signed; string email; } mapping (uint => Holders) public holderInfo; // id => Holders address public usdcAddress; address public devAddress; address public treasuryAddress; constructor( string memory _tokenName, string memory _tokenSymbol, uint _cost, uint _maxSupply, string memory _hiddenMetadataUri, address _usdcAddress, address _devAddress, address _treasuryAddress ) ERC721A(_tokenName, _tokenSymbol) { } // checks: mint does not exceed maxSupply // modifier mintCompliance() { } // checks: sender is owner of given NFT // modifier onlyHolder(uint _tokenId) { } /*/ MINT FUNCTIONS /*/ // [.√.] mints: nft to sender // function mint() external mintCompliance() { } // [.√.] mints NFT to a given receiver // function mint(address _receiver) external mintCompliance() { } // [.√.] mints NFT to a given receiver (with email) // function mintEmail(address _receiver, string memory _email) external mintCompliance() { } /*/ ADMIN SETTERS /*/ function setRevealed(bool _state) external onlyOwner { } function setCost(uint _cost) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setJSON(string memory _uriPrefix, string memory _uriSuffix) external onlyOwner { } function setImage(string memory _imgPrefix, string memory _imgSuffix) external onlyOwner { } function setPaused(bool _state) external onlyOwner { } function setTreasury(address _treasuryAddress) external onlyOwner { } function setDev(address _devAddress) external { } // [.√.] sets: due day (UNIX) function setSignBy(uint _dueDate) external onlyOwner() { } // [.√.] sets: maxSupply // function setMaxSupply(uint _maxSupply) external onlyOwner { } // [.√.] sets: signed for a given `_tokenId` // function setSigned(uint _tokenId, string memory _email) external onlyOwner() { } /*/ HOLDER SETTERS /*/ // [.√.] sets: email for a given `_tokenId` // function setEmail(uint _tokenId, string memory _email) public onlyHolder(_tokenId) { // checks: tokenId exists // require(_exists(_tokenId), 'URI query for non-existent holder.'); // gets: `holderInfo` from claim by tokenId // Holders storage holder = holderInfo[_tokenId]; require(<FILL_ME>) // sets: `email` to _email // holder.email = _email; } /*/ ADMIN FUNCTIONS /*/ // [.√.] withdraws: usdc from contract // function withdraw() external { } // rescues: given token // function unstuck(address _tokenAddress) external onlyOwner { } // rescues: native asset // function unstuck() external nonReentrant onlyOwner { } /*/ INTERNAL FUNCTIONS /*/ function _baseURI() internal view virtual override returns (string memory) { } function _baseImgURI() internal view virtual returns (string memory) { } function _startTokenId() internal view virtual override returns (uint) { } function _buyNFT() internal returns (bool success) { } /*/ PUBLIC VIEWS /*/ function tokenURI(uint _tokenId) public view virtual override(ERC721A, IERC721Metadata) returns (string memory) { } function imageURI(uint _tokenId) public view returns (string memory) { } function readEmail(uint _tokenId) public view returns (string memory) { } function hasSigned(uint _tokenId) public view returns (bool) { } function readOwner(uint _tokenId) public view returns (address) { } }
!holder.signed,'already signed, must request update.'
472,190
!holder.signed
"Error: Address is NOT whitelisted yet!"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract PulseChainArtNFT is ERC721URIStorage, Ownable, ReentrancyGuard { uint256 public nextMintId = 0; uint256 public wlMintPrice = 0.2 ether; uint256 public pMintPrice = 0.3 ether; string public currentURI = "https://gateway.pinata.cloud/ipfs/QmSLVCN16kQVkZRWGW3ThfDk3kTWarZXqAhPLC8P9sfMbQ/"; bytes32 public wlMerkleRoot; uint256 public mintStep = 1000; uint256 public totalSupply = 4444; bool public isPaused = false; address private lockAddress; mapping(address => bool) public isClaimed; constructor( string memory _name, string memory _symbol, uint256 _totalSupply, string memory _currentURI, address _lockAddress ) ERC721(_name, _symbol) { } modifier isMintAllowed() { } modifier isMerkleProoved(bytes32[] calldata merkleProof) { require(<FILL_ME>) _; } modifier isEnough(uint256 _price, uint256 _tokens) { } function _mint(uint256 _mintCount) private { } function pMint(uint256 _mintCount) external payable isMintAllowed isEnough(pMintPrice, _mintCount) nonReentrant returns (uint256) { } function checkMintStatus() public onlyMinter { } function wlMint(bytes32[] calldata _merkleProof) external payable isMintAllowed isEnough(wlMintPrice, 1) isMerkleProoved(_merkleProof) nonReentrant returns (uint256) { } function setWLMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setPMintPrice(uint256 _price) external onlyOwner { } function setWLMintPrice(uint256 _price) external onlyOwner { } function setCurrentURI(string memory _currentURI) external onlyOwner { } function _setCurrentURI(string memory _currentURI) internal { } function setPaused(bool _isPaused) external onlyOwner { } function _setPaused(bool _isPaused) internal { } function _setLockAddress(address _lockAddress) internal { } function setTotalSupply(uint256 _totalSupply) external onlyOwner { } function _setTotalSupply(uint256 _totalSupply) internal { } function setMintStep(uint256 _mintStep) external onlyOwner { } function _setMintStep(uint256 _mintStep) internal { } function withdraw() public onlyOwner { } }
MerkleProof.verify(merkleProof,wlMerkleRoot,keccak256(abi.encodePacked(msg.sender))),"Error: Address is NOT whitelisted yet!"
472,244
MerkleProof.verify(merkleProof,wlMerkleRoot,keccak256(abi.encodePacked(msg.sender)))
"Error: Sent ETH value is INCORRECT!"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract PulseChainArtNFT is ERC721URIStorage, Ownable, ReentrancyGuard { uint256 public nextMintId = 0; uint256 public wlMintPrice = 0.2 ether; uint256 public pMintPrice = 0.3 ether; string public currentURI = "https://gateway.pinata.cloud/ipfs/QmSLVCN16kQVkZRWGW3ThfDk3kTWarZXqAhPLC8P9sfMbQ/"; bytes32 public wlMerkleRoot; uint256 public mintStep = 1000; uint256 public totalSupply = 4444; bool public isPaused = false; address private lockAddress; mapping(address => bool) public isClaimed; constructor( string memory _name, string memory _symbol, uint256 _totalSupply, string memory _currentURI, address _lockAddress ) ERC721(_name, _symbol) { } modifier isMintAllowed() { } modifier isMerkleProoved(bytes32[] calldata merkleProof) { } modifier isEnough(uint256 _price, uint256 _tokens) { require(<FILL_ME>) _; } function _mint(uint256 _mintCount) private { } function pMint(uint256 _mintCount) external payable isMintAllowed isEnough(pMintPrice, _mintCount) nonReentrant returns (uint256) { } function checkMintStatus() public onlyMinter { } function wlMint(bytes32[] calldata _merkleProof) external payable isMintAllowed isEnough(wlMintPrice, 1) isMerkleProoved(_merkleProof) nonReentrant returns (uint256) { } function setWLMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setPMintPrice(uint256 _price) external onlyOwner { } function setWLMintPrice(uint256 _price) external onlyOwner { } function setCurrentURI(string memory _currentURI) external onlyOwner { } function _setCurrentURI(string memory _currentURI) internal { } function setPaused(bool _isPaused) external onlyOwner { } function _setPaused(bool _isPaused) internal { } function _setLockAddress(address _lockAddress) internal { } function setTotalSupply(uint256 _totalSupply) external onlyOwner { } function _setTotalSupply(uint256 _totalSupply) internal { } function setMintStep(uint256 _mintStep) external onlyOwner { } function _setMintStep(uint256 _mintStep) internal { } function withdraw() public onlyOwner { } }
_price*_tokens<=msg.value,"Error: Sent ETH value is INCORRECT!"
472,244
_price*_tokens<=msg.value
"Error: Supply limited!"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract PulseChainArtNFT is ERC721URIStorage, Ownable, ReentrancyGuard { uint256 public nextMintId = 0; uint256 public wlMintPrice = 0.2 ether; uint256 public pMintPrice = 0.3 ether; string public currentURI = "https://gateway.pinata.cloud/ipfs/QmSLVCN16kQVkZRWGW3ThfDk3kTWarZXqAhPLC8P9sfMbQ/"; bytes32 public wlMerkleRoot; uint256 public mintStep = 1000; uint256 public totalSupply = 4444; bool public isPaused = false; address private lockAddress; mapping(address => bool) public isClaimed; constructor( string memory _name, string memory _symbol, uint256 _totalSupply, string memory _currentURI, address _lockAddress ) ERC721(_name, _symbol) { } modifier isMintAllowed() { } modifier isMerkleProoved(bytes32[] calldata merkleProof) { } modifier isEnough(uint256 _price, uint256 _tokens) { } function _mint(uint256 _mintCount) private { require(<FILL_ME>) require(!isPaused, "Error: Minting is Paused"); for (uint256 i = 0; i < _mintCount; i++) { uint256 newId = nextMintId; _safeMint(msg.sender, newId); _setTokenURI( newId, string(abi.encodePacked(currentURI, Strings.toString(newId))) ); nextMintId++; } if (nextMintId == totalSupply || nextMintId % mintStep == 0) { isPaused = true; } } function pMint(uint256 _mintCount) external payable isMintAllowed isEnough(pMintPrice, _mintCount) nonReentrant returns (uint256) { } function checkMintStatus() public onlyMinter { } function wlMint(bytes32[] calldata _merkleProof) external payable isMintAllowed isEnough(wlMintPrice, 1) isMerkleProoved(_merkleProof) nonReentrant returns (uint256) { } function setWLMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function setPMintPrice(uint256 _price) external onlyOwner { } function setWLMintPrice(uint256 _price) external onlyOwner { } function setCurrentURI(string memory _currentURI) external onlyOwner { } function _setCurrentURI(string memory _currentURI) internal { } function setPaused(bool _isPaused) external onlyOwner { } function _setPaused(bool _isPaused) internal { } function _setLockAddress(address _lockAddress) internal { } function setTotalSupply(uint256 _totalSupply) external onlyOwner { } function _setTotalSupply(uint256 _totalSupply) internal { } function setMintStep(uint256 _mintStep) external onlyOwner { } function _setMintStep(uint256 _mintStep) internal { } function withdraw() public onlyOwner { } }
nextMintId+_mintCount-1<totalSupply,"Error: Supply limited!"
472,244
nextMintId+_mintCount-1<totalSupply
"AdminPausable: contract is paused"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "https://github.com/NFTSiblings/Modules/blob/master/AdminPrivileges.sol"; /** * @dev Contract which adds pausing functionality. Any function * which uses the {whenNotPaused} modifier will revert when the * contract is paused. * * Use {togglePause} to switch the paused state. * * Contract admins can run any function on a contract regardless * of whether it is paused. * * See more module contracts from Sibling Labs at * https://github.com/NFTSiblings/Modules */ contract AdminPause is AdminPrivileges { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool public paused; /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(<FILL_ME>) _; } /** * @dev Toggle paused state. */ function togglePause() public onlyAdmins { } }
!paused||isAdmin(msg.sender),"AdminPausable: contract is paused"
472,334
!paused||isAdmin(msg.sender)
"this certificated is paused"
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "contracts/IDigitalCert.sol"; import "contracts/libraries/DigitalCertLib.sol"; import "contracts/libraries/MarketLib.sol"; contract Market is AccessControl, IERC1155Receiver, ReentrancyGuard { IERC20 token; IDigitalCert digitalCert; address public ownerAddress; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint256 private redeemCounter = 0; /* digital cert id => is paused */ mapping(uint256 => bool) private certIdToPaused; /* redeem id => MarketLib.Redeem struct */ mapping(uint256 => MarketLib.Redeemed) private redeemIdToRedeemed; /* wallet addres => redeem id */ mapping(address => uint256[]) private customerAddressToRedeemId; event RedeemEvent(uint256 indexed certId, address indexed redeemer,uint256 redeemId, uint256 amount, uint256 price); modifier whenNotPaused(uint256 id) { require(<FILL_ME>) _; } constructor(address tokenAddress, address digitalCertAddress, address newOwnerAddress, address minter1, address minter2 ) { } function setPauseForCertId(uint256 certId, bool isPaused) external onlyRole(MINTER_ROLE) { } function onRedeem(uint256 certId, uint256 amount) external nonReentrant whenNotPaused(certId) { } function burnFor(uint256 certId, uint256 burnAmount) external onlyRole(MINTER_ROLE) { } function burnBatchFor(uint256[] calldata certIds, uint256[] calldata burnAmounts) external onlyRole(MINTER_ROLE) { } function getLastRedeemId() public view returns(uint256) { } function isDigitalCertPaused(uint256 certId) public view returns(bool) { } function getRedeemByRedeemId(uint256 redeemId) public view returns (MarketLib.Redeemed memory) { } function getRedeemIdsByAddress(address customer) public view returns(uint256[] memory) { } // require for reciever function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external virtual override returns (bytes4) { } function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external virtual override returns (bytes4) { } }
!certIdToPaused[id],"this certificated is paused"
472,539
!certIdToPaused[id]
"amount of cert is not enough"
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "contracts/IDigitalCert.sol"; import "contracts/libraries/DigitalCertLib.sol"; import "contracts/libraries/MarketLib.sol"; contract Market is AccessControl, IERC1155Receiver, ReentrancyGuard { IERC20 token; IDigitalCert digitalCert; address public ownerAddress; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint256 private redeemCounter = 0; /* digital cert id => is paused */ mapping(uint256 => bool) private certIdToPaused; /* redeem id => MarketLib.Redeem struct */ mapping(uint256 => MarketLib.Redeemed) private redeemIdToRedeemed; /* wallet addres => redeem id */ mapping(address => uint256[]) private customerAddressToRedeemId; event RedeemEvent(uint256 indexed certId, address indexed redeemer,uint256 redeemId, uint256 amount, uint256 price); modifier whenNotPaused(uint256 id) { } constructor(address tokenAddress, address digitalCertAddress, address newOwnerAddress, address minter1, address minter2 ) { } function setPauseForCertId(uint256 certId, bool isPaused) external onlyRole(MINTER_ROLE) { } function onRedeem(uint256 certId, uint256 amount) external nonReentrant whenNotPaused(certId) { require(!Address.isContract(msg.sender), "caller must be person"); require(<FILL_ME>) DigitalCertLib.DigitalCertificateRes memory cert = digitalCert.getDigitalCertificate(certId, address(this)); require(cert.expire >= block.timestamp, "this cert is expired"); uint256 cost = cert.price * amount; require(token.balanceOf(msg.sender) >= cost, "your balance of super x token is't enough"); redeemCounter += 1; uint256 redeemId = redeemCounter; MarketLib.Redeemed memory redeemItem = MarketLib.Redeemed({ redeemedId: redeemId, redeemer: msg.sender, certId: certId, amount: amount }); token.transferFrom(msg.sender, ownerAddress, cost); digitalCert.burn(address(this),certId, amount); redeemIdToRedeemed[redeemId] = redeemItem; customerAddressToRedeemId[msg.sender].push(redeemId); emit RedeemEvent(certId, msg.sender,redeemId, amount, cert.price); } function burnFor(uint256 certId, uint256 burnAmount) external onlyRole(MINTER_ROLE) { } function burnBatchFor(uint256[] calldata certIds, uint256[] calldata burnAmounts) external onlyRole(MINTER_ROLE) { } function getLastRedeemId() public view returns(uint256) { } function isDigitalCertPaused(uint256 certId) public view returns(bool) { } function getRedeemByRedeemId(uint256 redeemId) public view returns (MarketLib.Redeemed memory) { } function getRedeemIdsByAddress(address customer) public view returns(uint256[] memory) { } // require for reciever function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external virtual override returns (bytes4) { } function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external virtual override returns (bytes4) { } }
digitalCert.balanceOf(address(this),certId)>=amount,"amount of cert is not enough"
472,539
digitalCert.balanceOf(address(this),certId)>=amount
"your balance of super x token is't enough"
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "contracts/IDigitalCert.sol"; import "contracts/libraries/DigitalCertLib.sol"; import "contracts/libraries/MarketLib.sol"; contract Market is AccessControl, IERC1155Receiver, ReentrancyGuard { IERC20 token; IDigitalCert digitalCert; address public ownerAddress; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint256 private redeemCounter = 0; /* digital cert id => is paused */ mapping(uint256 => bool) private certIdToPaused; /* redeem id => MarketLib.Redeem struct */ mapping(uint256 => MarketLib.Redeemed) private redeemIdToRedeemed; /* wallet addres => redeem id */ mapping(address => uint256[]) private customerAddressToRedeemId; event RedeemEvent(uint256 indexed certId, address indexed redeemer,uint256 redeemId, uint256 amount, uint256 price); modifier whenNotPaused(uint256 id) { } constructor(address tokenAddress, address digitalCertAddress, address newOwnerAddress, address minter1, address minter2 ) { } function setPauseForCertId(uint256 certId, bool isPaused) external onlyRole(MINTER_ROLE) { } function onRedeem(uint256 certId, uint256 amount) external nonReentrant whenNotPaused(certId) { require(!Address.isContract(msg.sender), "caller must be person"); require(digitalCert.balanceOf(address(this), certId) >= amount, "amount of cert is not enough"); DigitalCertLib.DigitalCertificateRes memory cert = digitalCert.getDigitalCertificate(certId, address(this)); require(cert.expire >= block.timestamp, "this cert is expired"); uint256 cost = cert.price * amount; require(<FILL_ME>) redeemCounter += 1; uint256 redeemId = redeemCounter; MarketLib.Redeemed memory redeemItem = MarketLib.Redeemed({ redeemedId: redeemId, redeemer: msg.sender, certId: certId, amount: amount }); token.transferFrom(msg.sender, ownerAddress, cost); digitalCert.burn(address(this),certId, amount); redeemIdToRedeemed[redeemId] = redeemItem; customerAddressToRedeemId[msg.sender].push(redeemId); emit RedeemEvent(certId, msg.sender,redeemId, amount, cert.price); } function burnFor(uint256 certId, uint256 burnAmount) external onlyRole(MINTER_ROLE) { } function burnBatchFor(uint256[] calldata certIds, uint256[] calldata burnAmounts) external onlyRole(MINTER_ROLE) { } function getLastRedeemId() public view returns(uint256) { } function isDigitalCertPaused(uint256 certId) public view returns(bool) { } function getRedeemByRedeemId(uint256 redeemId) public view returns (MarketLib.Redeemed memory) { } function getRedeemIdsByAddress(address customer) public view returns(uint256[] memory) { } // require for reciever function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external virtual override returns (bytes4) { } function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external virtual override returns (bytes4) { } }
token.balanceOf(msg.sender)>=cost,"your balance of super x token is't enough"
472,539
token.balanceOf(msg.sender)>=cost
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "contracts/IDigitalCert.sol"; import "contracts/libraries/DigitalCertLib.sol"; import "contracts/libraries/MarketLib.sol"; contract Market is AccessControl, IERC1155Receiver, ReentrancyGuard { IERC20 token; IDigitalCert digitalCert; address public ownerAddress; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); uint256 private redeemCounter = 0; /* digital cert id => is paused */ mapping(uint256 => bool) private certIdToPaused; /* redeem id => MarketLib.Redeem struct */ mapping(uint256 => MarketLib.Redeemed) private redeemIdToRedeemed; /* wallet addres => redeem id */ mapping(address => uint256[]) private customerAddressToRedeemId; event RedeemEvent(uint256 indexed certId, address indexed redeemer,uint256 redeemId, uint256 amount, uint256 price); modifier whenNotPaused(uint256 id) { } constructor(address tokenAddress, address digitalCertAddress, address newOwnerAddress, address minter1, address minter2 ) { } function setPauseForCertId(uint256 certId, bool isPaused) external onlyRole(MINTER_ROLE) { } function onRedeem(uint256 certId, uint256 amount) external nonReentrant whenNotPaused(certId) { } function burnFor(uint256 certId, uint256 burnAmount) external onlyRole(MINTER_ROLE) { require(<FILL_ME>) digitalCert.burn(address(this),certId, burnAmount); } function burnBatchFor(uint256[] calldata certIds, uint256[] calldata burnAmounts) external onlyRole(MINTER_ROLE) { } function getLastRedeemId() public view returns(uint256) { } function isDigitalCertPaused(uint256 certId) public view returns(bool) { } function getRedeemByRedeemId(uint256 redeemId) public view returns (MarketLib.Redeemed memory) { } function getRedeemIdsByAddress(address customer) public view returns(uint256[] memory) { } // require for reciever function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external virtual override returns (bytes4) { } function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external virtual override returns (bytes4) { } }
digitalCert.balanceOf(address(this),certId)>=burnAmount
472,539
digitalCert.balanceOf(address(this),certId)>=burnAmount
'Cannot force or non-0'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC721NonTransferable.sol'; /** * @title Proof of Residency * @custom:security-contact security@proofofresidency.xyz * * @notice An non-transferable ERC721 token for Proof of Personhood. Proves residency at a physical address * which is kept private. * * @dev Uses a commit-reveal scheme to commit to a country and have a token issued based on that commitment. */ contract ProofOfResidency is ERC721NonTransferable, Pausable, Ownable, ReentrancyGuard { /// @notice The tax + donation percentages (10% to MAW, 10% to treasury) uint256 private constant TAX_AND_DONATION_PERCENT = 20; /// @notice The waiting period before minting becomes available uint256 private constant COMMITMENT_WAITING_PERIOD = 1 weeks; /// @notice The period during which minting is available (after the preminting period) uint256 private constant COMMITMENT_PERIOD = 5 weeks; /// @notice The timelock period until committers can withdraw (after last activity) uint256 private constant TIMELOCK_WAITING_PERIOD = 8 weeks; /// @notice Multiplier for country token IDs uint256 private constant LOCATION_MULTIPLIER = 1e15; /// @notice The version of this contract string private constant VERSION = '1'; /// @notice The EIP-712 typehash for the contract's domain bytes32 private constant DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); /// @notice The EIP-712 typehash for the commitment struct used by the contract bytes32 private constant COMMITMENT_TYPEHASH = keccak256('Commitment(address to,bytes32 commitment,uint256 nonce)'); /// @notice The domain separator for EIP-712 bytes32 private immutable _domainSeparator; /// @notice Reservation price for tokens to contribute to the protocol /// Incentivizes users to continue after requesting a letter uint256 public reservePrice; /// @notice Project treasury to send tax + donation address public projectTreasury; /// @notice Token counts for a country /// @dev Uses uint16 for country ID (which will overflow at 65535) /// https://en.wikipedia.org/wiki/ISO_3166-1_numeric mapping(uint16 => uint256) public countryTokenCounts; /// @notice Committer addresses responsible for managing secret commitments to an address mapping(address => bool) private _committers; /// @notice Total contributions for each committer mapping(address => Contribution) public committerContributions; /// @notice Commitments for a wallet address mapping(address => Commitment) public commitments; /// @notice Include a nonce in every hashed message, and increment the nonce to prevent replay attacks mapping(address => uint256) public nonces; /// @notice Expiration for challenges made for an address mapping(address => uint256) private _tokenChallengeExpirations; /// @notice The baseURI for the metadata of this contract string private _metadataBaseUri; /// @notice The struct to represent commitments to an address struct Commitment { uint256 validAt; bytes32 commitment; address committer; uint256 value; } /// @notice The struct to represent contributions which a committer can withdraw struct Contribution { uint256 lockedUntil; uint256 value; } /// @notice Event emitted when a commitment is made to an address event CommitmentCreated(address indexed to, address indexed committer, bytes32 commitment); /// @notice Event emitted when a committer is added event CommitterAdded(address indexed committer); /// @notice Event emitted when a committer is removed event CommitterRemoved(address indexed committer, uint256 fundsLost, bool forceReclaim); /// @notice Event emitted when a token is challenged event TokenChallenged(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when a token challenge is completed successfully event TokenChallengeCompleted(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when the price is changed event PriceChanged(uint256 indexed newPrice); constructor( address initialCommitter, address initialTreasury, string memory initialBaseUri, uint256 initialPrice ) ERC721NonTransferable('Proof of Residency Protocol', 'PORP') { } /** * @notice Sets the main project treasury. */ function setProjectTreasury(address newTreasury) external onlyOwner { } /** * @notice Adds a new committer address with their treasury. * @dev This cannot be a contract account, since it would not be able to sign * commitments. */ function addCommitter(address newCommitter) external onlyOwner { } /** * @notice Removes a committer address and optionally transfers their contributions to be owned * by the treasury. */ function removeCommitter(address removedCommitter, bool forceReclaim) external onlyOwner { Contribution memory lostContribution = committerContributions[removedCommitter]; require(<FILL_ME>) if (forceReclaim) { Contribution storage treasuryContribution = committerContributions[projectTreasury]; treasuryContribution.value += lostContribution.value; treasuryContribution.lockedUntil = block.timestamp + TIMELOCK_WAITING_PERIOD; } delete _committers[removedCommitter]; delete committerContributions[removedCommitter]; emit CommitterRemoved(removedCommitter, lostContribution.value, forceReclaim); } /** * @notice Allows the project treasury to reclaim expired contribution(s). This allows funds to * not get locked up in the contract indefinitely. */ function reclaimExpiredContributions(address[] memory unclaimedAddresses) external onlyOwner { } /** * @notice Burns tokens corresponding to a list of addresses. Only allowed after a token challenge has been * issued and subsequently expired. */ function burnFailedChallenges(address[] memory addresses) external onlyOwner { } /** * @notice Initiates a challenge for a list of addresses. The user must re-request * a commitment and verify a mailing address again. */ function challenge(address[] memory addresses) external onlyOwner { } /** * @notice Sets the value required to request an NFT. Deliberately as low as possible to * incentivize committers, this may be changed to be lower/higher. */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @notice Sets the base URI for the metadata. */ function setBaseURI(string memory newBaseUri) external onlyOwner { } /** * @notice Pauses the contract's commit-reveal functions. */ function pause() external onlyOwner { } /** * @notice Unpauses the contract's commit-reveal functions. */ function unpause() external onlyOwner { } /** * @notice Commits a wallet address to a physical address using signed data from a committer. * Signatures are used to prevent committers from paying gas fees for commitments. * * @dev Must be signed according to https://eips.ethereum.org/EIPS/eip-712 */ function commitAddress( address to, bytes32 commitment, uint8 v, bytes32 r, bytes32 s ) external payable whenNotPaused { } /** * @notice Mints a new token for the given country/commitment. */ function mint(uint16 country, string memory commitment) external whenNotPaused nonReentrant returns (uint256) { } /** * @notice Responds to a challenge with a token ID and corresponding country/commitment. */ function respondToChallenge( uint256 tokenId, uint16 country, string memory commitment ) external whenNotPaused nonReentrant returns (bool) { } /** * @notice Withdraws funds from the contract to the committer. * * Applies a tax to the withdrawal for the protocol. */ function withdraw() external nonReentrant { } /** * @notice Gets if a commitment for the sender's address is upcoming. */ function commitmentPeriodIsUpcoming() external view returns (bool) { } /** * @notice Gets if the commitment for the sender's address is in the time window where they * are able to mint. */ function commitmentPeriodIsValid() public view returns (bool) { } /** * @notice Gets if a token challenge for an address has expired (and becomes eligible for * burning/re-issuing). */ function tokenChallengeExpired(address owner) public view returns (bool) { } /** * @notice Gets if a token challenge exists for an address. This can be used in * downstream projects to ensure that a user does not have any outstanding challenges. */ function tokenChallengeExists(address owner) public view returns (bool) { } /** * @dev Validates a commitment and deletes the Commitment from the mapping. */ function _validateAndDeleteCommitment(uint16 country, string memory commitment) private returns (Commitment memory existingCommitment) { } /** * @notice Contract URI for OpenSea and other NFT services. */ function contractURI() external view returns (string memory) { } /** * @dev Base URI override for the contract. */ function _baseURI() internal view override returns (string memory) { } }
forceReclaim?lostContribution.value!=0:lostContribution.value==0,'Cannot force or non-0'
472,592
forceReclaim?lostContribution.value!=0:lostContribution.value==0
'Still valid'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC721NonTransferable.sol'; /** * @title Proof of Residency * @custom:security-contact security@proofofresidency.xyz * * @notice An non-transferable ERC721 token for Proof of Personhood. Proves residency at a physical address * which is kept private. * * @dev Uses a commit-reveal scheme to commit to a country and have a token issued based on that commitment. */ contract ProofOfResidency is ERC721NonTransferable, Pausable, Ownable, ReentrancyGuard { /// @notice The tax + donation percentages (10% to MAW, 10% to treasury) uint256 private constant TAX_AND_DONATION_PERCENT = 20; /// @notice The waiting period before minting becomes available uint256 private constant COMMITMENT_WAITING_PERIOD = 1 weeks; /// @notice The period during which minting is available (after the preminting period) uint256 private constant COMMITMENT_PERIOD = 5 weeks; /// @notice The timelock period until committers can withdraw (after last activity) uint256 private constant TIMELOCK_WAITING_PERIOD = 8 weeks; /// @notice Multiplier for country token IDs uint256 private constant LOCATION_MULTIPLIER = 1e15; /// @notice The version of this contract string private constant VERSION = '1'; /// @notice The EIP-712 typehash for the contract's domain bytes32 private constant DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); /// @notice The EIP-712 typehash for the commitment struct used by the contract bytes32 private constant COMMITMENT_TYPEHASH = keccak256('Commitment(address to,bytes32 commitment,uint256 nonce)'); /// @notice The domain separator for EIP-712 bytes32 private immutable _domainSeparator; /// @notice Reservation price for tokens to contribute to the protocol /// Incentivizes users to continue after requesting a letter uint256 public reservePrice; /// @notice Project treasury to send tax + donation address public projectTreasury; /// @notice Token counts for a country /// @dev Uses uint16 for country ID (which will overflow at 65535) /// https://en.wikipedia.org/wiki/ISO_3166-1_numeric mapping(uint16 => uint256) public countryTokenCounts; /// @notice Committer addresses responsible for managing secret commitments to an address mapping(address => bool) private _committers; /// @notice Total contributions for each committer mapping(address => Contribution) public committerContributions; /// @notice Commitments for a wallet address mapping(address => Commitment) public commitments; /// @notice Include a nonce in every hashed message, and increment the nonce to prevent replay attacks mapping(address => uint256) public nonces; /// @notice Expiration for challenges made for an address mapping(address => uint256) private _tokenChallengeExpirations; /// @notice The baseURI for the metadata of this contract string private _metadataBaseUri; /// @notice The struct to represent commitments to an address struct Commitment { uint256 validAt; bytes32 commitment; address committer; uint256 value; } /// @notice The struct to represent contributions which a committer can withdraw struct Contribution { uint256 lockedUntil; uint256 value; } /// @notice Event emitted when a commitment is made to an address event CommitmentCreated(address indexed to, address indexed committer, bytes32 commitment); /// @notice Event emitted when a committer is added event CommitterAdded(address indexed committer); /// @notice Event emitted when a committer is removed event CommitterRemoved(address indexed committer, uint256 fundsLost, bool forceReclaim); /// @notice Event emitted when a token is challenged event TokenChallenged(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when a token challenge is completed successfully event TokenChallengeCompleted(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when the price is changed event PriceChanged(uint256 indexed newPrice); constructor( address initialCommitter, address initialTreasury, string memory initialBaseUri, uint256 initialPrice ) ERC721NonTransferable('Proof of Residency Protocol', 'PORP') { } /** * @notice Sets the main project treasury. */ function setProjectTreasury(address newTreasury) external onlyOwner { } /** * @notice Adds a new committer address with their treasury. * @dev This cannot be a contract account, since it would not be able to sign * commitments. */ function addCommitter(address newCommitter) external onlyOwner { } /** * @notice Removes a committer address and optionally transfers their contributions to be owned * by the treasury. */ function removeCommitter(address removedCommitter, bool forceReclaim) external onlyOwner { } /** * @notice Allows the project treasury to reclaim expired contribution(s). This allows funds to * not get locked up in the contract indefinitely. */ function reclaimExpiredContributions(address[] memory unclaimedAddresses) external onlyOwner { uint256 totalAddition = 0; for (uint256 i = 0; i < unclaimedAddresses.length; i++) { Commitment memory existingCommitment = commitments[unclaimedAddresses[i]]; // require that the commitment expired so it can be claimed // slither-disable-next-line timestamp require(<FILL_ME>) totalAddition += existingCommitment.value; // slither-disable-next-line costly-loop delete commitments[unclaimedAddresses[i]]; } Contribution storage treasuryContribution = committerContributions[projectTreasury]; treasuryContribution.value += totalAddition; treasuryContribution.lockedUntil = block.timestamp + TIMELOCK_WAITING_PERIOD; } /** * @notice Burns tokens corresponding to a list of addresses. Only allowed after a token challenge has been * issued and subsequently expired. */ function burnFailedChallenges(address[] memory addresses) external onlyOwner { } /** * @notice Initiates a challenge for a list of addresses. The user must re-request * a commitment and verify a mailing address again. */ function challenge(address[] memory addresses) external onlyOwner { } /** * @notice Sets the value required to request an NFT. Deliberately as low as possible to * incentivize committers, this may be changed to be lower/higher. */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @notice Sets the base URI for the metadata. */ function setBaseURI(string memory newBaseUri) external onlyOwner { } /** * @notice Pauses the contract's commit-reveal functions. */ function pause() external onlyOwner { } /** * @notice Unpauses the contract's commit-reveal functions. */ function unpause() external onlyOwner { } /** * @notice Commits a wallet address to a physical address using signed data from a committer. * Signatures are used to prevent committers from paying gas fees for commitments. * * @dev Must be signed according to https://eips.ethereum.org/EIPS/eip-712 */ function commitAddress( address to, bytes32 commitment, uint8 v, bytes32 r, bytes32 s ) external payable whenNotPaused { } /** * @notice Mints a new token for the given country/commitment. */ function mint(uint16 country, string memory commitment) external whenNotPaused nonReentrant returns (uint256) { } /** * @notice Responds to a challenge with a token ID and corresponding country/commitment. */ function respondToChallenge( uint256 tokenId, uint16 country, string memory commitment ) external whenNotPaused nonReentrant returns (bool) { } /** * @notice Withdraws funds from the contract to the committer. * * Applies a tax to the withdrawal for the protocol. */ function withdraw() external nonReentrant { } /** * @notice Gets if a commitment for the sender's address is upcoming. */ function commitmentPeriodIsUpcoming() external view returns (bool) { } /** * @notice Gets if the commitment for the sender's address is in the time window where they * are able to mint. */ function commitmentPeriodIsValid() public view returns (bool) { } /** * @notice Gets if a token challenge for an address has expired (and becomes eligible for * burning/re-issuing). */ function tokenChallengeExpired(address owner) public view returns (bool) { } /** * @notice Gets if a token challenge exists for an address. This can be used in * downstream projects to ensure that a user does not have any outstanding challenges. */ function tokenChallengeExists(address owner) public view returns (bool) { } /** * @dev Validates a commitment and deletes the Commitment from the mapping. */ function _validateAndDeleteCommitment(uint16 country, string memory commitment) private returns (Commitment memory existingCommitment) { } /** * @notice Contract URI for OpenSea and other NFT services. */ function contractURI() external view returns (string memory) { } /** * @dev Base URI override for the contract. */ function _baseURI() internal view override returns (string memory) { } }
existingCommitment.validAt+COMMITMENT_PERIOD<=block.timestamp,'Still valid'
472,592
existingCommitment.validAt+COMMITMENT_PERIOD<=block.timestamp
'Challenge not expired'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC721NonTransferable.sol'; /** * @title Proof of Residency * @custom:security-contact security@proofofresidency.xyz * * @notice An non-transferable ERC721 token for Proof of Personhood. Proves residency at a physical address * which is kept private. * * @dev Uses a commit-reveal scheme to commit to a country and have a token issued based on that commitment. */ contract ProofOfResidency is ERC721NonTransferable, Pausable, Ownable, ReentrancyGuard { /// @notice The tax + donation percentages (10% to MAW, 10% to treasury) uint256 private constant TAX_AND_DONATION_PERCENT = 20; /// @notice The waiting period before minting becomes available uint256 private constant COMMITMENT_WAITING_PERIOD = 1 weeks; /// @notice The period during which minting is available (after the preminting period) uint256 private constant COMMITMENT_PERIOD = 5 weeks; /// @notice The timelock period until committers can withdraw (after last activity) uint256 private constant TIMELOCK_WAITING_PERIOD = 8 weeks; /// @notice Multiplier for country token IDs uint256 private constant LOCATION_MULTIPLIER = 1e15; /// @notice The version of this contract string private constant VERSION = '1'; /// @notice The EIP-712 typehash for the contract's domain bytes32 private constant DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); /// @notice The EIP-712 typehash for the commitment struct used by the contract bytes32 private constant COMMITMENT_TYPEHASH = keccak256('Commitment(address to,bytes32 commitment,uint256 nonce)'); /// @notice The domain separator for EIP-712 bytes32 private immutable _domainSeparator; /// @notice Reservation price for tokens to contribute to the protocol /// Incentivizes users to continue after requesting a letter uint256 public reservePrice; /// @notice Project treasury to send tax + donation address public projectTreasury; /// @notice Token counts for a country /// @dev Uses uint16 for country ID (which will overflow at 65535) /// https://en.wikipedia.org/wiki/ISO_3166-1_numeric mapping(uint16 => uint256) public countryTokenCounts; /// @notice Committer addresses responsible for managing secret commitments to an address mapping(address => bool) private _committers; /// @notice Total contributions for each committer mapping(address => Contribution) public committerContributions; /// @notice Commitments for a wallet address mapping(address => Commitment) public commitments; /// @notice Include a nonce in every hashed message, and increment the nonce to prevent replay attacks mapping(address => uint256) public nonces; /// @notice Expiration for challenges made for an address mapping(address => uint256) private _tokenChallengeExpirations; /// @notice The baseURI for the metadata of this contract string private _metadataBaseUri; /// @notice The struct to represent commitments to an address struct Commitment { uint256 validAt; bytes32 commitment; address committer; uint256 value; } /// @notice The struct to represent contributions which a committer can withdraw struct Contribution { uint256 lockedUntil; uint256 value; } /// @notice Event emitted when a commitment is made to an address event CommitmentCreated(address indexed to, address indexed committer, bytes32 commitment); /// @notice Event emitted when a committer is added event CommitterAdded(address indexed committer); /// @notice Event emitted when a committer is removed event CommitterRemoved(address indexed committer, uint256 fundsLost, bool forceReclaim); /// @notice Event emitted when a token is challenged event TokenChallenged(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when a token challenge is completed successfully event TokenChallengeCompleted(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when the price is changed event PriceChanged(uint256 indexed newPrice); constructor( address initialCommitter, address initialTreasury, string memory initialBaseUri, uint256 initialPrice ) ERC721NonTransferable('Proof of Residency Protocol', 'PORP') { } /** * @notice Sets the main project treasury. */ function setProjectTreasury(address newTreasury) external onlyOwner { } /** * @notice Adds a new committer address with their treasury. * @dev This cannot be a contract account, since it would not be able to sign * commitments. */ function addCommitter(address newCommitter) external onlyOwner { } /** * @notice Removes a committer address and optionally transfers their contributions to be owned * by the treasury. */ function removeCommitter(address removedCommitter, bool forceReclaim) external onlyOwner { } /** * @notice Allows the project treasury to reclaim expired contribution(s). This allows funds to * not get locked up in the contract indefinitely. */ function reclaimExpiredContributions(address[] memory unclaimedAddresses) external onlyOwner { } /** * @notice Burns tokens corresponding to a list of addresses. Only allowed after a token challenge has been * issued and subsequently expired. */ function burnFailedChallenges(address[] memory addresses) external onlyOwner { for (uint256 i = 0; i < addresses.length; i++) { require(<FILL_ME>) // use 0 as the index since this is the only possible index, if a token exists uint256 tokenId = tokenOfOwnerByIndex(addresses[i], 0); Commitment memory existingCommitment = commitments[addresses[i]]; // pay the value to the committer for the `mint` action the requester was unable to execute on if (existingCommitment.committer != address(0)) { Contribution storage contribution = committerContributions[existingCommitment.committer]; // add the value to the committers successful commitments contribution.value += existingCommitment.value; contribution.lockedUntil = block.timestamp + TIMELOCK_WAITING_PERIOD; } _burn(tokenId); } } /** * @notice Initiates a challenge for a list of addresses. The user must re-request * a commitment and verify a mailing address again. */ function challenge(address[] memory addresses) external onlyOwner { } /** * @notice Sets the value required to request an NFT. Deliberately as low as possible to * incentivize committers, this may be changed to be lower/higher. */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @notice Sets the base URI for the metadata. */ function setBaseURI(string memory newBaseUri) external onlyOwner { } /** * @notice Pauses the contract's commit-reveal functions. */ function pause() external onlyOwner { } /** * @notice Unpauses the contract's commit-reveal functions. */ function unpause() external onlyOwner { } /** * @notice Commits a wallet address to a physical address using signed data from a committer. * Signatures are used to prevent committers from paying gas fees for commitments. * * @dev Must be signed according to https://eips.ethereum.org/EIPS/eip-712 */ function commitAddress( address to, bytes32 commitment, uint8 v, bytes32 r, bytes32 s ) external payable whenNotPaused { } /** * @notice Mints a new token for the given country/commitment. */ function mint(uint16 country, string memory commitment) external whenNotPaused nonReentrant returns (uint256) { } /** * @notice Responds to a challenge with a token ID and corresponding country/commitment. */ function respondToChallenge( uint256 tokenId, uint16 country, string memory commitment ) external whenNotPaused nonReentrant returns (bool) { } /** * @notice Withdraws funds from the contract to the committer. * * Applies a tax to the withdrawal for the protocol. */ function withdraw() external nonReentrant { } /** * @notice Gets if a commitment for the sender's address is upcoming. */ function commitmentPeriodIsUpcoming() external view returns (bool) { } /** * @notice Gets if the commitment for the sender's address is in the time window where they * are able to mint. */ function commitmentPeriodIsValid() public view returns (bool) { } /** * @notice Gets if a token challenge for an address has expired (and becomes eligible for * burning/re-issuing). */ function tokenChallengeExpired(address owner) public view returns (bool) { } /** * @notice Gets if a token challenge exists for an address. This can be used in * downstream projects to ensure that a user does not have any outstanding challenges. */ function tokenChallengeExists(address owner) public view returns (bool) { } /** * @dev Validates a commitment and deletes the Commitment from the mapping. */ function _validateAndDeleteCommitment(uint16 country, string memory commitment) private returns (Commitment memory existingCommitment) { } /** * @notice Contract URI for OpenSea and other NFT services. */ function contractURI() external view returns (string memory) { } /** * @dev Base URI override for the contract. */ function _baseURI() internal view override returns (string memory) { } }
tokenChallengeExpired(addresses[i]),'Challenge not expired'
472,592
tokenChallengeExpired(addresses[i])
'Signatory non-committer'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC721NonTransferable.sol'; /** * @title Proof of Residency * @custom:security-contact security@proofofresidency.xyz * * @notice An non-transferable ERC721 token for Proof of Personhood. Proves residency at a physical address * which is kept private. * * @dev Uses a commit-reveal scheme to commit to a country and have a token issued based on that commitment. */ contract ProofOfResidency is ERC721NonTransferable, Pausable, Ownable, ReentrancyGuard { /// @notice The tax + donation percentages (10% to MAW, 10% to treasury) uint256 private constant TAX_AND_DONATION_PERCENT = 20; /// @notice The waiting period before minting becomes available uint256 private constant COMMITMENT_WAITING_PERIOD = 1 weeks; /// @notice The period during which minting is available (after the preminting period) uint256 private constant COMMITMENT_PERIOD = 5 weeks; /// @notice The timelock period until committers can withdraw (after last activity) uint256 private constant TIMELOCK_WAITING_PERIOD = 8 weeks; /// @notice Multiplier for country token IDs uint256 private constant LOCATION_MULTIPLIER = 1e15; /// @notice The version of this contract string private constant VERSION = '1'; /// @notice The EIP-712 typehash for the contract's domain bytes32 private constant DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); /// @notice The EIP-712 typehash for the commitment struct used by the contract bytes32 private constant COMMITMENT_TYPEHASH = keccak256('Commitment(address to,bytes32 commitment,uint256 nonce)'); /// @notice The domain separator for EIP-712 bytes32 private immutable _domainSeparator; /// @notice Reservation price for tokens to contribute to the protocol /// Incentivizes users to continue after requesting a letter uint256 public reservePrice; /// @notice Project treasury to send tax + donation address public projectTreasury; /// @notice Token counts for a country /// @dev Uses uint16 for country ID (which will overflow at 65535) /// https://en.wikipedia.org/wiki/ISO_3166-1_numeric mapping(uint16 => uint256) public countryTokenCounts; /// @notice Committer addresses responsible for managing secret commitments to an address mapping(address => bool) private _committers; /// @notice Total contributions for each committer mapping(address => Contribution) public committerContributions; /// @notice Commitments for a wallet address mapping(address => Commitment) public commitments; /// @notice Include a nonce in every hashed message, and increment the nonce to prevent replay attacks mapping(address => uint256) public nonces; /// @notice Expiration for challenges made for an address mapping(address => uint256) private _tokenChallengeExpirations; /// @notice The baseURI for the metadata of this contract string private _metadataBaseUri; /// @notice The struct to represent commitments to an address struct Commitment { uint256 validAt; bytes32 commitment; address committer; uint256 value; } /// @notice The struct to represent contributions which a committer can withdraw struct Contribution { uint256 lockedUntil; uint256 value; } /// @notice Event emitted when a commitment is made to an address event CommitmentCreated(address indexed to, address indexed committer, bytes32 commitment); /// @notice Event emitted when a committer is added event CommitterAdded(address indexed committer); /// @notice Event emitted when a committer is removed event CommitterRemoved(address indexed committer, uint256 fundsLost, bool forceReclaim); /// @notice Event emitted when a token is challenged event TokenChallenged(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when a token challenge is completed successfully event TokenChallengeCompleted(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when the price is changed event PriceChanged(uint256 indexed newPrice); constructor( address initialCommitter, address initialTreasury, string memory initialBaseUri, uint256 initialPrice ) ERC721NonTransferable('Proof of Residency Protocol', 'PORP') { } /** * @notice Sets the main project treasury. */ function setProjectTreasury(address newTreasury) external onlyOwner { } /** * @notice Adds a new committer address with their treasury. * @dev This cannot be a contract account, since it would not be able to sign * commitments. */ function addCommitter(address newCommitter) external onlyOwner { } /** * @notice Removes a committer address and optionally transfers their contributions to be owned * by the treasury. */ function removeCommitter(address removedCommitter, bool forceReclaim) external onlyOwner { } /** * @notice Allows the project treasury to reclaim expired contribution(s). This allows funds to * not get locked up in the contract indefinitely. */ function reclaimExpiredContributions(address[] memory unclaimedAddresses) external onlyOwner { } /** * @notice Burns tokens corresponding to a list of addresses. Only allowed after a token challenge has been * issued and subsequently expired. */ function burnFailedChallenges(address[] memory addresses) external onlyOwner { } /** * @notice Initiates a challenge for a list of addresses. The user must re-request * a commitment and verify a mailing address again. */ function challenge(address[] memory addresses) external onlyOwner { } /** * @notice Sets the value required to request an NFT. Deliberately as low as possible to * incentivize committers, this may be changed to be lower/higher. */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @notice Sets the base URI for the metadata. */ function setBaseURI(string memory newBaseUri) external onlyOwner { } /** * @notice Pauses the contract's commit-reveal functions. */ function pause() external onlyOwner { } /** * @notice Unpauses the contract's commit-reveal functions. */ function unpause() external onlyOwner { } /** * @notice Commits a wallet address to a physical address using signed data from a committer. * Signatures are used to prevent committers from paying gas fees for commitments. * * @dev Must be signed according to https://eips.ethereum.org/EIPS/eip-712 */ function commitAddress( address to, bytes32 commitment, uint8 v, bytes32 r, bytes32 s ) external payable whenNotPaused { // Validates a signature which corresponds to one signed by a committer with the // https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] method as part of EIP-712. bytes32 structHash = keccak256(abi.encode(COMMITMENT_TYPEHASH, to, commitment, nonces[to])); bytes32 digest = keccak256(abi.encodePacked('\x19\x01', _domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); // require that the signatory is actually a committer require(<FILL_ME>) require(msg.value == reservePrice, 'Incorrect value'); Commitment storage existingCommitment = commitments[to]; // if there is an existing commitment and it hasn't expired yet bool isExistingExpired = existingCommitment.commitment != 0 && block.timestamp > existingCommitment.validAt + COMMITMENT_PERIOD; // slither-disable-next-line timestamp require(existingCommitment.commitment == 0 || isExistingExpired, 'Existing commitment'); // reclaim the expired commitment contributed value to the treasury // does not get sent to the committer, so they are not incentivized to provide unsuccessful commitments if (isExistingExpired) { Contribution storage treasuryContribution = committerContributions[projectTreasury]; treasuryContribution.value += existingCommitment.value; treasuryContribution.lockedUntil = block.timestamp + TIMELOCK_WAITING_PERIOD; } existingCommitment.committer = signatory; existingCommitment.validAt = block.timestamp + COMMITMENT_WAITING_PERIOD; existingCommitment.commitment = commitment; existingCommitment.value = msg.value; emit CommitmentCreated(to, signatory, commitment); } /** * @notice Mints a new token for the given country/commitment. */ function mint(uint16 country, string memory commitment) external whenNotPaused nonReentrant returns (uint256) { } /** * @notice Responds to a challenge with a token ID and corresponding country/commitment. */ function respondToChallenge( uint256 tokenId, uint16 country, string memory commitment ) external whenNotPaused nonReentrant returns (bool) { } /** * @notice Withdraws funds from the contract to the committer. * * Applies a tax to the withdrawal for the protocol. */ function withdraw() external nonReentrant { } /** * @notice Gets if a commitment for the sender's address is upcoming. */ function commitmentPeriodIsUpcoming() external view returns (bool) { } /** * @notice Gets if the commitment for the sender's address is in the time window where they * are able to mint. */ function commitmentPeriodIsValid() public view returns (bool) { } /** * @notice Gets if a token challenge for an address has expired (and becomes eligible for * burning/re-issuing). */ function tokenChallengeExpired(address owner) public view returns (bool) { } /** * @notice Gets if a token challenge exists for an address. This can be used in * downstream projects to ensure that a user does not have any outstanding challenges. */ function tokenChallengeExists(address owner) public view returns (bool) { } /** * @dev Validates a commitment and deletes the Commitment from the mapping. */ function _validateAndDeleteCommitment(uint16 country, string memory commitment) private returns (Commitment memory existingCommitment) { } /** * @notice Contract URI for OpenSea and other NFT services. */ function contractURI() external view returns (string memory) { } /** * @dev Base URI override for the contract. */ function _baseURI() internal view override returns (string memory) { } }
_committers[signatory],'Signatory non-committer'
472,592
_committers[signatory]
'Already owns token'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC721NonTransferable.sol'; /** * @title Proof of Residency * @custom:security-contact security@proofofresidency.xyz * * @notice An non-transferable ERC721 token for Proof of Personhood. Proves residency at a physical address * which is kept private. * * @dev Uses a commit-reveal scheme to commit to a country and have a token issued based on that commitment. */ contract ProofOfResidency is ERC721NonTransferable, Pausable, Ownable, ReentrancyGuard { /// @notice The tax + donation percentages (10% to MAW, 10% to treasury) uint256 private constant TAX_AND_DONATION_PERCENT = 20; /// @notice The waiting period before minting becomes available uint256 private constant COMMITMENT_WAITING_PERIOD = 1 weeks; /// @notice The period during which minting is available (after the preminting period) uint256 private constant COMMITMENT_PERIOD = 5 weeks; /// @notice The timelock period until committers can withdraw (after last activity) uint256 private constant TIMELOCK_WAITING_PERIOD = 8 weeks; /// @notice Multiplier for country token IDs uint256 private constant LOCATION_MULTIPLIER = 1e15; /// @notice The version of this contract string private constant VERSION = '1'; /// @notice The EIP-712 typehash for the contract's domain bytes32 private constant DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); /// @notice The EIP-712 typehash for the commitment struct used by the contract bytes32 private constant COMMITMENT_TYPEHASH = keccak256('Commitment(address to,bytes32 commitment,uint256 nonce)'); /// @notice The domain separator for EIP-712 bytes32 private immutable _domainSeparator; /// @notice Reservation price for tokens to contribute to the protocol /// Incentivizes users to continue after requesting a letter uint256 public reservePrice; /// @notice Project treasury to send tax + donation address public projectTreasury; /// @notice Token counts for a country /// @dev Uses uint16 for country ID (which will overflow at 65535) /// https://en.wikipedia.org/wiki/ISO_3166-1_numeric mapping(uint16 => uint256) public countryTokenCounts; /// @notice Committer addresses responsible for managing secret commitments to an address mapping(address => bool) private _committers; /// @notice Total contributions for each committer mapping(address => Contribution) public committerContributions; /// @notice Commitments for a wallet address mapping(address => Commitment) public commitments; /// @notice Include a nonce in every hashed message, and increment the nonce to prevent replay attacks mapping(address => uint256) public nonces; /// @notice Expiration for challenges made for an address mapping(address => uint256) private _tokenChallengeExpirations; /// @notice The baseURI for the metadata of this contract string private _metadataBaseUri; /// @notice The struct to represent commitments to an address struct Commitment { uint256 validAt; bytes32 commitment; address committer; uint256 value; } /// @notice The struct to represent contributions which a committer can withdraw struct Contribution { uint256 lockedUntil; uint256 value; } /// @notice Event emitted when a commitment is made to an address event CommitmentCreated(address indexed to, address indexed committer, bytes32 commitment); /// @notice Event emitted when a committer is added event CommitterAdded(address indexed committer); /// @notice Event emitted when a committer is removed event CommitterRemoved(address indexed committer, uint256 fundsLost, bool forceReclaim); /// @notice Event emitted when a token is challenged event TokenChallenged(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when a token challenge is completed successfully event TokenChallengeCompleted(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when the price is changed event PriceChanged(uint256 indexed newPrice); constructor( address initialCommitter, address initialTreasury, string memory initialBaseUri, uint256 initialPrice ) ERC721NonTransferable('Proof of Residency Protocol', 'PORP') { } /** * @notice Sets the main project treasury. */ function setProjectTreasury(address newTreasury) external onlyOwner { } /** * @notice Adds a new committer address with their treasury. * @dev This cannot be a contract account, since it would not be able to sign * commitments. */ function addCommitter(address newCommitter) external onlyOwner { } /** * @notice Removes a committer address and optionally transfers their contributions to be owned * by the treasury. */ function removeCommitter(address removedCommitter, bool forceReclaim) external onlyOwner { } /** * @notice Allows the project treasury to reclaim expired contribution(s). This allows funds to * not get locked up in the contract indefinitely. */ function reclaimExpiredContributions(address[] memory unclaimedAddresses) external onlyOwner { } /** * @notice Burns tokens corresponding to a list of addresses. Only allowed after a token challenge has been * issued and subsequently expired. */ function burnFailedChallenges(address[] memory addresses) external onlyOwner { } /** * @notice Initiates a challenge for a list of addresses. The user must re-request * a commitment and verify a mailing address again. */ function challenge(address[] memory addresses) external onlyOwner { } /** * @notice Sets the value required to request an NFT. Deliberately as low as possible to * incentivize committers, this may be changed to be lower/higher. */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @notice Sets the base URI for the metadata. */ function setBaseURI(string memory newBaseUri) external onlyOwner { } /** * @notice Pauses the contract's commit-reveal functions. */ function pause() external onlyOwner { } /** * @notice Unpauses the contract's commit-reveal functions. */ function unpause() external onlyOwner { } /** * @notice Commits a wallet address to a physical address using signed data from a committer. * Signatures are used to prevent committers from paying gas fees for commitments. * * @dev Must be signed according to https://eips.ethereum.org/EIPS/eip-712 */ function commitAddress( address to, bytes32 commitment, uint8 v, bytes32 r, bytes32 s ) external payable whenNotPaused { } /** * @notice Mints a new token for the given country/commitment. */ function mint(uint16 country, string memory commitment) external whenNotPaused nonReentrant returns (uint256) { // requires the requester to have no tokens - they cannot transfer, but may have burned a previous token // this is not performed in the commit step, since that is also used for challenges require(<FILL_ME>) Commitment memory existingCommitment = _validateAndDeleteCommitment(country, commitment); Contribution storage contribution = committerContributions[existingCommitment.committer]; // add the value to the committers successful commitments contribution.value += existingCommitment.value; contribution.lockedUntil = block.timestamp + TIMELOCK_WAITING_PERIOD; countryTokenCounts[country] += 1; // increment before minting so count starts at 1 uint256 tokenId = uint256(country) * LOCATION_MULTIPLIER + uint256(countryTokenCounts[country]); _safeMint(_msgSender(), tokenId); return tokenId; } /** * @notice Responds to a challenge with a token ID and corresponding country/commitment. */ function respondToChallenge( uint256 tokenId, uint16 country, string memory commitment ) external whenNotPaused nonReentrant returns (bool) { } /** * @notice Withdraws funds from the contract to the committer. * * Applies a tax to the withdrawal for the protocol. */ function withdraw() external nonReentrant { } /** * @notice Gets if a commitment for the sender's address is upcoming. */ function commitmentPeriodIsUpcoming() external view returns (bool) { } /** * @notice Gets if the commitment for the sender's address is in the time window where they * are able to mint. */ function commitmentPeriodIsValid() public view returns (bool) { } /** * @notice Gets if a token challenge for an address has expired (and becomes eligible for * burning/re-issuing). */ function tokenChallengeExpired(address owner) public view returns (bool) { } /** * @notice Gets if a token challenge exists for an address. This can be used in * downstream projects to ensure that a user does not have any outstanding challenges. */ function tokenChallengeExists(address owner) public view returns (bool) { } /** * @dev Validates a commitment and deletes the Commitment from the mapping. */ function _validateAndDeleteCommitment(uint16 country, string memory commitment) private returns (Commitment memory existingCommitment) { } /** * @notice Contract URI for OpenSea and other NFT services. */ function contractURI() external view returns (string memory) { } /** * @dev Base URI override for the contract. */ function _baseURI() internal view override returns (string memory) { } }
balanceOf(_msgSender())==0,'Already owns token'
472,592
balanceOf(_msgSender())==0
'Country not valid'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC721NonTransferable.sol'; /** * @title Proof of Residency * @custom:security-contact security@proofofresidency.xyz * * @notice An non-transferable ERC721 token for Proof of Personhood. Proves residency at a physical address * which is kept private. * * @dev Uses a commit-reveal scheme to commit to a country and have a token issued based on that commitment. */ contract ProofOfResidency is ERC721NonTransferable, Pausable, Ownable, ReentrancyGuard { /// @notice The tax + donation percentages (10% to MAW, 10% to treasury) uint256 private constant TAX_AND_DONATION_PERCENT = 20; /// @notice The waiting period before minting becomes available uint256 private constant COMMITMENT_WAITING_PERIOD = 1 weeks; /// @notice The period during which minting is available (after the preminting period) uint256 private constant COMMITMENT_PERIOD = 5 weeks; /// @notice The timelock period until committers can withdraw (after last activity) uint256 private constant TIMELOCK_WAITING_PERIOD = 8 weeks; /// @notice Multiplier for country token IDs uint256 private constant LOCATION_MULTIPLIER = 1e15; /// @notice The version of this contract string private constant VERSION = '1'; /// @notice The EIP-712 typehash for the contract's domain bytes32 private constant DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); /// @notice The EIP-712 typehash for the commitment struct used by the contract bytes32 private constant COMMITMENT_TYPEHASH = keccak256('Commitment(address to,bytes32 commitment,uint256 nonce)'); /// @notice The domain separator for EIP-712 bytes32 private immutable _domainSeparator; /// @notice Reservation price for tokens to contribute to the protocol /// Incentivizes users to continue after requesting a letter uint256 public reservePrice; /// @notice Project treasury to send tax + donation address public projectTreasury; /// @notice Token counts for a country /// @dev Uses uint16 for country ID (which will overflow at 65535) /// https://en.wikipedia.org/wiki/ISO_3166-1_numeric mapping(uint16 => uint256) public countryTokenCounts; /// @notice Committer addresses responsible for managing secret commitments to an address mapping(address => bool) private _committers; /// @notice Total contributions for each committer mapping(address => Contribution) public committerContributions; /// @notice Commitments for a wallet address mapping(address => Commitment) public commitments; /// @notice Include a nonce in every hashed message, and increment the nonce to prevent replay attacks mapping(address => uint256) public nonces; /// @notice Expiration for challenges made for an address mapping(address => uint256) private _tokenChallengeExpirations; /// @notice The baseURI for the metadata of this contract string private _metadataBaseUri; /// @notice The struct to represent commitments to an address struct Commitment { uint256 validAt; bytes32 commitment; address committer; uint256 value; } /// @notice The struct to represent contributions which a committer can withdraw struct Contribution { uint256 lockedUntil; uint256 value; } /// @notice Event emitted when a commitment is made to an address event CommitmentCreated(address indexed to, address indexed committer, bytes32 commitment); /// @notice Event emitted when a committer is added event CommitterAdded(address indexed committer); /// @notice Event emitted when a committer is removed event CommitterRemoved(address indexed committer, uint256 fundsLost, bool forceReclaim); /// @notice Event emitted when a token is challenged event TokenChallenged(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when a token challenge is completed successfully event TokenChallengeCompleted(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when the price is changed event PriceChanged(uint256 indexed newPrice); constructor( address initialCommitter, address initialTreasury, string memory initialBaseUri, uint256 initialPrice ) ERC721NonTransferable('Proof of Residency Protocol', 'PORP') { } /** * @notice Sets the main project treasury. */ function setProjectTreasury(address newTreasury) external onlyOwner { } /** * @notice Adds a new committer address with their treasury. * @dev This cannot be a contract account, since it would not be able to sign * commitments. */ function addCommitter(address newCommitter) external onlyOwner { } /** * @notice Removes a committer address and optionally transfers their contributions to be owned * by the treasury. */ function removeCommitter(address removedCommitter, bool forceReclaim) external onlyOwner { } /** * @notice Allows the project treasury to reclaim expired contribution(s). This allows funds to * not get locked up in the contract indefinitely. */ function reclaimExpiredContributions(address[] memory unclaimedAddresses) external onlyOwner { } /** * @notice Burns tokens corresponding to a list of addresses. Only allowed after a token challenge has been * issued and subsequently expired. */ function burnFailedChallenges(address[] memory addresses) external onlyOwner { } /** * @notice Initiates a challenge for a list of addresses. The user must re-request * a commitment and verify a mailing address again. */ function challenge(address[] memory addresses) external onlyOwner { } /** * @notice Sets the value required to request an NFT. Deliberately as low as possible to * incentivize committers, this may be changed to be lower/higher. */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @notice Sets the base URI for the metadata. */ function setBaseURI(string memory newBaseUri) external onlyOwner { } /** * @notice Pauses the contract's commit-reveal functions. */ function pause() external onlyOwner { } /** * @notice Unpauses the contract's commit-reveal functions. */ function unpause() external onlyOwner { } /** * @notice Commits a wallet address to a physical address using signed data from a committer. * Signatures are used to prevent committers from paying gas fees for commitments. * * @dev Must be signed according to https://eips.ethereum.org/EIPS/eip-712 */ function commitAddress( address to, bytes32 commitment, uint8 v, bytes32 r, bytes32 s ) external payable whenNotPaused { } /** * @notice Mints a new token for the given country/commitment. */ function mint(uint16 country, string memory commitment) external whenNotPaused nonReentrant returns (uint256) { } /** * @notice Responds to a challenge with a token ID and corresponding country/commitment. */ function respondToChallenge( uint256 tokenId, uint16 country, string memory commitment ) external whenNotPaused nonReentrant returns (bool) { // ensure that the country is the same as the current token ID require(<FILL_ME>) Commitment memory existingCommitment = _validateAndDeleteCommitment(country, commitment); delete _tokenChallengeExpirations[_msgSender()]; emit TokenChallengeCompleted(_msgSender(), tokenId); // slither-disable-next-line low-level-calls (bool success, ) = _msgSender().call{ value: existingCommitment.value }(''); require(success, 'Unable to refund'); return true; } /** * @notice Withdraws funds from the contract to the committer. * * Applies a tax to the withdrawal for the protocol. */ function withdraw() external nonReentrant { } /** * @notice Gets if a commitment for the sender's address is upcoming. */ function commitmentPeriodIsUpcoming() external view returns (bool) { } /** * @notice Gets if the commitment for the sender's address is in the time window where they * are able to mint. */ function commitmentPeriodIsValid() public view returns (bool) { } /** * @notice Gets if a token challenge for an address has expired (and becomes eligible for * burning/re-issuing). */ function tokenChallengeExpired(address owner) public view returns (bool) { } /** * @notice Gets if a token challenge exists for an address. This can be used in * downstream projects to ensure that a user does not have any outstanding challenges. */ function tokenChallengeExists(address owner) public view returns (bool) { } /** * @dev Validates a commitment and deletes the Commitment from the mapping. */ function _validateAndDeleteCommitment(uint16 country, string memory commitment) private returns (Commitment memory existingCommitment) { } /** * @notice Contract URI for OpenSea and other NFT services. */ function contractURI() external view returns (string memory) { } /** * @dev Base URI override for the contract. */ function _baseURI() internal view override returns (string memory) { } }
tokenId/LOCATION_MULTIPLIER==country,'Country not valid'
472,592
tokenId/LOCATION_MULTIPLIER==country
'Commitment period invalid'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC721NonTransferable.sol'; /** * @title Proof of Residency * @custom:security-contact security@proofofresidency.xyz * * @notice An non-transferable ERC721 token for Proof of Personhood. Proves residency at a physical address * which is kept private. * * @dev Uses a commit-reveal scheme to commit to a country and have a token issued based on that commitment. */ contract ProofOfResidency is ERC721NonTransferable, Pausable, Ownable, ReentrancyGuard { /// @notice The tax + donation percentages (10% to MAW, 10% to treasury) uint256 private constant TAX_AND_DONATION_PERCENT = 20; /// @notice The waiting period before minting becomes available uint256 private constant COMMITMENT_WAITING_PERIOD = 1 weeks; /// @notice The period during which minting is available (after the preminting period) uint256 private constant COMMITMENT_PERIOD = 5 weeks; /// @notice The timelock period until committers can withdraw (after last activity) uint256 private constant TIMELOCK_WAITING_PERIOD = 8 weeks; /// @notice Multiplier for country token IDs uint256 private constant LOCATION_MULTIPLIER = 1e15; /// @notice The version of this contract string private constant VERSION = '1'; /// @notice The EIP-712 typehash for the contract's domain bytes32 private constant DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); /// @notice The EIP-712 typehash for the commitment struct used by the contract bytes32 private constant COMMITMENT_TYPEHASH = keccak256('Commitment(address to,bytes32 commitment,uint256 nonce)'); /// @notice The domain separator for EIP-712 bytes32 private immutable _domainSeparator; /// @notice Reservation price for tokens to contribute to the protocol /// Incentivizes users to continue after requesting a letter uint256 public reservePrice; /// @notice Project treasury to send tax + donation address public projectTreasury; /// @notice Token counts for a country /// @dev Uses uint16 for country ID (which will overflow at 65535) /// https://en.wikipedia.org/wiki/ISO_3166-1_numeric mapping(uint16 => uint256) public countryTokenCounts; /// @notice Committer addresses responsible for managing secret commitments to an address mapping(address => bool) private _committers; /// @notice Total contributions for each committer mapping(address => Contribution) public committerContributions; /// @notice Commitments for a wallet address mapping(address => Commitment) public commitments; /// @notice Include a nonce in every hashed message, and increment the nonce to prevent replay attacks mapping(address => uint256) public nonces; /// @notice Expiration for challenges made for an address mapping(address => uint256) private _tokenChallengeExpirations; /// @notice The baseURI for the metadata of this contract string private _metadataBaseUri; /// @notice The struct to represent commitments to an address struct Commitment { uint256 validAt; bytes32 commitment; address committer; uint256 value; } /// @notice The struct to represent contributions which a committer can withdraw struct Contribution { uint256 lockedUntil; uint256 value; } /// @notice Event emitted when a commitment is made to an address event CommitmentCreated(address indexed to, address indexed committer, bytes32 commitment); /// @notice Event emitted when a committer is added event CommitterAdded(address indexed committer); /// @notice Event emitted when a committer is removed event CommitterRemoved(address indexed committer, uint256 fundsLost, bool forceReclaim); /// @notice Event emitted when a token is challenged event TokenChallenged(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when a token challenge is completed successfully event TokenChallengeCompleted(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when the price is changed event PriceChanged(uint256 indexed newPrice); constructor( address initialCommitter, address initialTreasury, string memory initialBaseUri, uint256 initialPrice ) ERC721NonTransferable('Proof of Residency Protocol', 'PORP') { } /** * @notice Sets the main project treasury. */ function setProjectTreasury(address newTreasury) external onlyOwner { } /** * @notice Adds a new committer address with their treasury. * @dev This cannot be a contract account, since it would not be able to sign * commitments. */ function addCommitter(address newCommitter) external onlyOwner { } /** * @notice Removes a committer address and optionally transfers their contributions to be owned * by the treasury. */ function removeCommitter(address removedCommitter, bool forceReclaim) external onlyOwner { } /** * @notice Allows the project treasury to reclaim expired contribution(s). This allows funds to * not get locked up in the contract indefinitely. */ function reclaimExpiredContributions(address[] memory unclaimedAddresses) external onlyOwner { } /** * @notice Burns tokens corresponding to a list of addresses. Only allowed after a token challenge has been * issued and subsequently expired. */ function burnFailedChallenges(address[] memory addresses) external onlyOwner { } /** * @notice Initiates a challenge for a list of addresses. The user must re-request * a commitment and verify a mailing address again. */ function challenge(address[] memory addresses) external onlyOwner { } /** * @notice Sets the value required to request an NFT. Deliberately as low as possible to * incentivize committers, this may be changed to be lower/higher. */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @notice Sets the base URI for the metadata. */ function setBaseURI(string memory newBaseUri) external onlyOwner { } /** * @notice Pauses the contract's commit-reveal functions. */ function pause() external onlyOwner { } /** * @notice Unpauses the contract's commit-reveal functions. */ function unpause() external onlyOwner { } /** * @notice Commits a wallet address to a physical address using signed data from a committer. * Signatures are used to prevent committers from paying gas fees for commitments. * * @dev Must be signed according to https://eips.ethereum.org/EIPS/eip-712 */ function commitAddress( address to, bytes32 commitment, uint8 v, bytes32 r, bytes32 s ) external payable whenNotPaused { } /** * @notice Mints a new token for the given country/commitment. */ function mint(uint16 country, string memory commitment) external whenNotPaused nonReentrant returns (uint256) { } /** * @notice Responds to a challenge with a token ID and corresponding country/commitment. */ function respondToChallenge( uint256 tokenId, uint16 country, string memory commitment ) external whenNotPaused nonReentrant returns (bool) { } /** * @notice Withdraws funds from the contract to the committer. * * Applies a tax to the withdrawal for the protocol. */ function withdraw() external nonReentrant { } /** * @notice Gets if a commitment for the sender's address is upcoming. */ function commitmentPeriodIsUpcoming() external view returns (bool) { } /** * @notice Gets if the commitment for the sender's address is in the time window where they * are able to mint. */ function commitmentPeriodIsValid() public view returns (bool) { } /** * @notice Gets if a token challenge for an address has expired (and becomes eligible for * burning/re-issuing). */ function tokenChallengeExpired(address owner) public view returns (bool) { } /** * @notice Gets if a token challenge exists for an address. This can be used in * downstream projects to ensure that a user does not have any outstanding challenges. */ function tokenChallengeExists(address owner) public view returns (bool) { } /** * @dev Validates a commitment and deletes the Commitment from the mapping. */ function _validateAndDeleteCommitment(uint16 country, string memory commitment) private returns (Commitment memory existingCommitment) { existingCommitment = commitments[_msgSender()]; require( existingCommitment.commitment == keccak256(abi.encode(_msgSender(), country, commitment, nonces[_msgSender()])), 'Commitment incorrect' ); require(<FILL_ME>) // requires that the original committer is still valid require(_committers[existingCommitment.committer], 'Signatory removed'); // increment the nonce for the sender nonces[_msgSender()] += 1; delete commitments[_msgSender()]; } /** * @notice Contract URI for OpenSea and other NFT services. */ function contractURI() external view returns (string memory) { } /** * @dev Base URI override for the contract. */ function _baseURI() internal view override returns (string memory) { } }
commitmentPeriodIsValid(),'Commitment period invalid'
472,592
commitmentPeriodIsValid()
'Signatory removed'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import '@openzeppelin/contracts/security/Pausable.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import './ERC721NonTransferable.sol'; /** * @title Proof of Residency * @custom:security-contact security@proofofresidency.xyz * * @notice An non-transferable ERC721 token for Proof of Personhood. Proves residency at a physical address * which is kept private. * * @dev Uses a commit-reveal scheme to commit to a country and have a token issued based on that commitment. */ contract ProofOfResidency is ERC721NonTransferable, Pausable, Ownable, ReentrancyGuard { /// @notice The tax + donation percentages (10% to MAW, 10% to treasury) uint256 private constant TAX_AND_DONATION_PERCENT = 20; /// @notice The waiting period before minting becomes available uint256 private constant COMMITMENT_WAITING_PERIOD = 1 weeks; /// @notice The period during which minting is available (after the preminting period) uint256 private constant COMMITMENT_PERIOD = 5 weeks; /// @notice The timelock period until committers can withdraw (after last activity) uint256 private constant TIMELOCK_WAITING_PERIOD = 8 weeks; /// @notice Multiplier for country token IDs uint256 private constant LOCATION_MULTIPLIER = 1e15; /// @notice The version of this contract string private constant VERSION = '1'; /// @notice The EIP-712 typehash for the contract's domain bytes32 private constant DOMAIN_TYPEHASH = keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)'); /// @notice The EIP-712 typehash for the commitment struct used by the contract bytes32 private constant COMMITMENT_TYPEHASH = keccak256('Commitment(address to,bytes32 commitment,uint256 nonce)'); /// @notice The domain separator for EIP-712 bytes32 private immutable _domainSeparator; /// @notice Reservation price for tokens to contribute to the protocol /// Incentivizes users to continue after requesting a letter uint256 public reservePrice; /// @notice Project treasury to send tax + donation address public projectTreasury; /// @notice Token counts for a country /// @dev Uses uint16 for country ID (which will overflow at 65535) /// https://en.wikipedia.org/wiki/ISO_3166-1_numeric mapping(uint16 => uint256) public countryTokenCounts; /// @notice Committer addresses responsible for managing secret commitments to an address mapping(address => bool) private _committers; /// @notice Total contributions for each committer mapping(address => Contribution) public committerContributions; /// @notice Commitments for a wallet address mapping(address => Commitment) public commitments; /// @notice Include a nonce in every hashed message, and increment the nonce to prevent replay attacks mapping(address => uint256) public nonces; /// @notice Expiration for challenges made for an address mapping(address => uint256) private _tokenChallengeExpirations; /// @notice The baseURI for the metadata of this contract string private _metadataBaseUri; /// @notice The struct to represent commitments to an address struct Commitment { uint256 validAt; bytes32 commitment; address committer; uint256 value; } /// @notice The struct to represent contributions which a committer can withdraw struct Contribution { uint256 lockedUntil; uint256 value; } /// @notice Event emitted when a commitment is made to an address event CommitmentCreated(address indexed to, address indexed committer, bytes32 commitment); /// @notice Event emitted when a committer is added event CommitterAdded(address indexed committer); /// @notice Event emitted when a committer is removed event CommitterRemoved(address indexed committer, uint256 fundsLost, bool forceReclaim); /// @notice Event emitted when a token is challenged event TokenChallenged(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when a token challenge is completed successfully event TokenChallengeCompleted(address indexed owner, uint256 indexed tokenId); /// @notice Event emitted when the price is changed event PriceChanged(uint256 indexed newPrice); constructor( address initialCommitter, address initialTreasury, string memory initialBaseUri, uint256 initialPrice ) ERC721NonTransferable('Proof of Residency Protocol', 'PORP') { } /** * @notice Sets the main project treasury. */ function setProjectTreasury(address newTreasury) external onlyOwner { } /** * @notice Adds a new committer address with their treasury. * @dev This cannot be a contract account, since it would not be able to sign * commitments. */ function addCommitter(address newCommitter) external onlyOwner { } /** * @notice Removes a committer address and optionally transfers their contributions to be owned * by the treasury. */ function removeCommitter(address removedCommitter, bool forceReclaim) external onlyOwner { } /** * @notice Allows the project treasury to reclaim expired contribution(s). This allows funds to * not get locked up in the contract indefinitely. */ function reclaimExpiredContributions(address[] memory unclaimedAddresses) external onlyOwner { } /** * @notice Burns tokens corresponding to a list of addresses. Only allowed after a token challenge has been * issued and subsequently expired. */ function burnFailedChallenges(address[] memory addresses) external onlyOwner { } /** * @notice Initiates a challenge for a list of addresses. The user must re-request * a commitment and verify a mailing address again. */ function challenge(address[] memory addresses) external onlyOwner { } /** * @notice Sets the value required to request an NFT. Deliberately as low as possible to * incentivize committers, this may be changed to be lower/higher. */ function setPrice(uint256 newPrice) external onlyOwner { } /** * @notice Sets the base URI for the metadata. */ function setBaseURI(string memory newBaseUri) external onlyOwner { } /** * @notice Pauses the contract's commit-reveal functions. */ function pause() external onlyOwner { } /** * @notice Unpauses the contract's commit-reveal functions. */ function unpause() external onlyOwner { } /** * @notice Commits a wallet address to a physical address using signed data from a committer. * Signatures are used to prevent committers from paying gas fees for commitments. * * @dev Must be signed according to https://eips.ethereum.org/EIPS/eip-712 */ function commitAddress( address to, bytes32 commitment, uint8 v, bytes32 r, bytes32 s ) external payable whenNotPaused { } /** * @notice Mints a new token for the given country/commitment. */ function mint(uint16 country, string memory commitment) external whenNotPaused nonReentrant returns (uint256) { } /** * @notice Responds to a challenge with a token ID and corresponding country/commitment. */ function respondToChallenge( uint256 tokenId, uint16 country, string memory commitment ) external whenNotPaused nonReentrant returns (bool) { } /** * @notice Withdraws funds from the contract to the committer. * * Applies a tax to the withdrawal for the protocol. */ function withdraw() external nonReentrant { } /** * @notice Gets if a commitment for the sender's address is upcoming. */ function commitmentPeriodIsUpcoming() external view returns (bool) { } /** * @notice Gets if the commitment for the sender's address is in the time window where they * are able to mint. */ function commitmentPeriodIsValid() public view returns (bool) { } /** * @notice Gets if a token challenge for an address has expired (and becomes eligible for * burning/re-issuing). */ function tokenChallengeExpired(address owner) public view returns (bool) { } /** * @notice Gets if a token challenge exists for an address. This can be used in * downstream projects to ensure that a user does not have any outstanding challenges. */ function tokenChallengeExists(address owner) public view returns (bool) { } /** * @dev Validates a commitment and deletes the Commitment from the mapping. */ function _validateAndDeleteCommitment(uint16 country, string memory commitment) private returns (Commitment memory existingCommitment) { existingCommitment = commitments[_msgSender()]; require( existingCommitment.commitment == keccak256(abi.encode(_msgSender(), country, commitment, nonces[_msgSender()])), 'Commitment incorrect' ); require(commitmentPeriodIsValid(), 'Commitment period invalid'); // requires that the original committer is still valid require(<FILL_ME>) // increment the nonce for the sender nonces[_msgSender()] += 1; delete commitments[_msgSender()]; } /** * @notice Contract URI for OpenSea and other NFT services. */ function contractURI() external view returns (string memory) { } /** * @dev Base URI override for the contract. */ function _baseURI() internal view override returns (string memory) { } }
_committers[existingCommitment.committer],'Signatory removed'
472,592
_committers[existingCommitment.committer]
"It is possible to claim only corresponding tokens"
// Created by AlecWilliams // Panda Mania NFT pragma solidity ^0.8.0; interface PandasInterface { function ownerOf(uint256 tokenId) external view returns (address owner); function balanceOf(address owner) external view returns (uint256 balance); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); } contract BambuBillionaires is ERC721Enumerable, Ownable { using Strings for uint256; PandasInterface public immutable Pandas; string public baseURI; string public baseExtension = ".json"; uint256 public cost = .05 ether; uint256 public maxSupply = 1500; uint256 public maxMintAmount = 50; bool public paused = false; mapping(address => bool) public whitelisted; constructor( address _Pandas, string memory _name, string memory _symbol, string memory _initBaseURI ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function claim(uint256 [] memory _tokenIds) public { for (uint i = 0; i < _tokenIds.length; i++) { require(<FILL_ME>) if (totalSupply() < maxSupply) { _safeMint(msg.sender, _tokenIds[i]); } } } //only owner function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function whitelistUser(address _user) public onlyOwner { } function removeWhitelistUser(address _user) public onlyOwner { } function Pandas_ownerOf(uint256 tokenId) public view returns (address) { } function Pandas_balanceOf(address owner) public view returns (uint256) { } function Pandas_tokenOfOwnerByIndex(address owner, uint256 index) public view returns (uint256) { } function withdraw() public payable onlyOwner { } }
Pandas_ownerOf(_tokenIds[i])==msg.sender,"It is possible to claim only corresponding tokens"
472,689
Pandas_ownerOf(_tokenIds[i])==msg.sender
"Amount exceeds max supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /** * * _______/\\\\\_______/\\\\\\\\\\\\\____/\\\\\\\\\\\\\\\__/\\\\\_____/\\\_____/\\\\\\\\\\__ * _____/\\\///\\\____\/\\\/////////\\\_\/\\\///////////__\/\\\\\\___\/\\\___/\\\///////\\\_ * ___/\\\/__\///\\\__\/\\\_______\/\\\_\/\\\_____________\/\\\/\\\__\/\\\__\///______/\\\__ * __/\\\______\//\\\_\/\\\\\\\\\\\\\/__\/\\\\\\\\\\\_____\/\\\//\\\_\/\\\_________/\\\//___ * _\/\\\_______\/\\\_\/\\\/////////____\/\\\///////______\/\\\\//\\\\/\\\________\////\\\__ * _\//\\\______/\\\__\/\\\_____________\/\\\_____________\/\\\_\//\\\/\\\___________\//\\\_ * __\///\\\__/\\\____\/\\\_____________\/\\\_____________\/\\\__\//\\\\\\__/\\\______/\\\__ * ____\///\\\\\/_____\/\\\_____________\/\\\\\\\\\\\\\\\_\/\\\___\//\\\\\_\///\\\\\\\\\/___ * ______\/////_______\///______________\///////////////__\///_____\/////____\/////////_____ * STANDARD_MINTING_FOUNDATION______________________________________________________________ * */ import "erc721a/contracts/ERC721A.sol"; import "contracts/BaseToken/BaseTokenV2.sol"; import "contracts/Mixins/DistributableV1.sol"; import "contracts/Mixins/AuthorizerV1.sol"; /** * @title ALTARS ERC721A Smart Contract */ contract ALTARS is ERC721A, BaseTokenV2, DistributableV1, AuthorizerV1 { constructor( string memory contractURI_, string memory baseURI_, address authorizerAddress_, address distributorAddress_ ) ERC721A("ALTARS", "ALTR") BaseTokenV2(contractURI_) DistributableV1(distributorAddress_) AuthorizerV1(authorizerAddress_) { } /** MINTING LIMITS **/ uint256 public constant MINT_LIMIT_PER_ADDRESS = 3; uint256 public constant MAX_MULTIMINT = 1; /** MINTING **/ uint256 public constant MAX_SUPPLY = 3333; uint256 public constant PRICE = 0 ether; mapping(uint256 => bool) public qualifiedNonceList; mapping(address => uint256) public qualifiedWalletList; /** * @dev Open3 Qualified Mint, triggers a mint based on the amount to the sender */ function qualifiedMint( uint256 amount_, bytes memory signature_, uint256 nonce_ ) external payable nonReentrant onlySaleIsActive { } /** * @dev Owner of the contract can mints to the address based on the amount. */ function ownerMint(address address_, uint256 amount_) external onlyOwner { } /** URI HANDLING **/ function _startTokenId() internal view virtual override returns (uint256) { } string private customBaseURI; /** * @dev Sets the base URI. */ function setBaseURI(string memory customBaseURI_) external onlyOwner { } /** * @dev Gets the base URI. */ function _baseURI() internal view virtual override returns (string memory) { } /** * @dev Airdrop to a list of addresses */ function airDrop(address[] calldata addresses) public onlyOwner { require(<FILL_ME>) for (uint256 i; i < addresses.length; i++) { _safeMint(addresses[i], 1); } } }
totalSupply()+addresses.length<=MAX_SUPPLY,"Amount exceeds max supply"
472,731
totalSupply()+addresses.length<=MAX_SUPPLY
'VARIABLE_DEBT_TOKEN_ALREADY_SET'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import {IERC20} from '@aave/core-v3/contracts/dependencies/openzeppelin/contracts/IERC20.sol'; import {GPv2SafeERC20} from '@aave/core-v3/contracts/dependencies/gnosis/contracts/GPv2SafeERC20.sol'; import {VersionedInitializable} from '@aave/core-v3/contracts/protocol/libraries/aave-upgradeability/VersionedInitializable.sol'; import {Errors} from '@aave/core-v3/contracts/protocol/libraries/helpers/Errors.sol'; import {WadRayMath} from '@aave/core-v3/contracts/protocol/libraries/math/WadRayMath.sol'; import {IPool} from '@aave/core-v3/contracts/interfaces/IPool.sol'; import {IAToken} from '@aave/core-v3/contracts/interfaces/IAToken.sol'; import {IAaveIncentivesController} from '@aave/core-v3/contracts/interfaces/IAaveIncentivesController.sol'; import {IInitializableAToken} from '@aave/core-v3/contracts/interfaces/IInitializableAToken.sol'; import {ScaledBalanceTokenBase} from '@aave/core-v3/contracts/protocol/tokenization/base/ScaledBalanceTokenBase.sol'; import {IncentivizedERC20} from '@aave/core-v3/contracts/protocol/tokenization/base/IncentivizedERC20.sol'; import {EIP712Base} from '@aave/core-v3/contracts/protocol/tokenization/base/EIP712Base.sol'; // Gho Imports import {IGhoToken} from '../../../gho/interfaces/IGhoToken.sol'; import {IGhoFacilitator} from '../../../gho/interfaces/IGhoFacilitator.sol'; import {IGhoAToken} from './interfaces/IGhoAToken.sol'; import {GhoVariableDebtToken} from './GhoVariableDebtToken.sol'; /** * @title GhoAToken * @author Aave * @notice Implementation of the interest bearing token for the Aave protocol */ contract GhoAToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, IGhoAToken { using WadRayMath for uint256; using GPv2SafeERC20 for IERC20; bytes32 public constant PERMIT_TYPEHASH = keccak256('Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)'); uint256 public constant ATOKEN_REVISION = 0x1; address internal _treasury; address internal _underlyingAsset; // Gho Storage GhoVariableDebtToken internal _ghoVariableDebtToken; address internal _ghoTreasury; /// @inheritdoc VersionedInitializable function getRevision() internal pure virtual override returns (uint256) { } /** * @dev Constructor. * @param pool The address of the Pool contract */ constructor( IPool pool ) ScaledBalanceTokenBase(pool, 'GHO_ATOKEN_IMPL', 'GHO_ATOKEN_IMPL', 0) EIP712Base() { } /// @inheritdoc IInitializableAToken function initialize( IPool initializingPool, address treasury, address underlyingAsset, IAaveIncentivesController incentivesController, uint8 aTokenDecimals, string calldata aTokenName, string calldata aTokenSymbol, bytes calldata params ) external override initializer { } /// @inheritdoc IAToken function mint( address caller, address onBehalfOf, uint256 amount, uint256 index ) external virtual override onlyPool returns (bool) { } /// @inheritdoc IAToken function burn( address from, address receiverOfUnderlying, uint256 amount, uint256 index ) external virtual override onlyPool { } /// @inheritdoc IAToken function mintToTreasury(uint256 amount, uint256 index) external virtual override onlyPool { } /// @inheritdoc IAToken function transferOnLiquidation( address from, address to, uint256 value ) external virtual override onlyPool { } /// @inheritdoc IERC20 function balanceOf( address user ) public view virtual override(IncentivizedERC20, IERC20) returns (uint256) { } /// @inheritdoc IERC20 function totalSupply() public view virtual override(IncentivizedERC20, IERC20) returns (uint256) { } /// @inheritdoc IAToken function RESERVE_TREASURY_ADDRESS() external view override returns (address) { } /// @inheritdoc IAToken function UNDERLYING_ASSET_ADDRESS() external view override returns (address) { } /** * @notice Transfers the underlying asset to `target`. * @dev It performs a mint of GHO on behalf of the `target` * @dev Used by the Pool to transfer assets in borrow(), withdraw() and flashLoan() * @param target The recipient of the underlying * @param amount The amount getting transferred */ function transferUnderlyingTo(address target, uint256 amount) external virtual override onlyPool { } /// @inheritdoc IAToken function handleRepayment( address user, address onBehalfOf, uint256 amount ) external virtual override onlyPool { } /// @inheritdoc IGhoFacilitator function distributeFeesToTreasury() external virtual override { } /// @inheritdoc IAToken function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external override { } /** * @notice Overrides the parent _transfer to force validated transfer() and transferFrom() * @param from The source address * @param to The destination address * @param amount The amount getting transferred */ function _transfer(address from, address to, uint128 amount) internal override { } /** * @dev Overrides the base function to fully implement IAToken * @dev see `EIP712Base.DOMAIN_SEPARATOR()` for more detailed documentation */ function DOMAIN_SEPARATOR() public view override(IAToken, EIP712Base) returns (bytes32) { } /** * @dev Overrides the base function to fully implement IAToken * @dev see `EIP712Base.nonces()` for more detailed documentation */ function nonces(address owner) public view override(IAToken, EIP712Base) returns (uint256) { } /// @inheritdoc EIP712Base function _EIP712BaseId() internal view override returns (string memory) { } /// @inheritdoc IAToken function rescueTokens(address token, address to, uint256 amount) external override onlyPoolAdmin { } /// @inheritdoc IGhoAToken function setVariableDebtToken(address ghoVariableDebtToken) external override onlyPoolAdmin { require(<FILL_ME>) require(ghoVariableDebtToken != address(0), 'ZERO_ADDRESS_NOT_VALID'); _ghoVariableDebtToken = GhoVariableDebtToken(ghoVariableDebtToken); emit VariableDebtTokenSet(ghoVariableDebtToken); } /// @inheritdoc IGhoAToken function getVariableDebtToken() external view override returns (address) { } /// @inheritdoc IGhoFacilitator function updateGhoTreasury(address newGhoTreasury) external override onlyPoolAdmin { } /// @inheritdoc IGhoFacilitator function getGhoTreasury() external view override returns (address) { } }
address(_ghoVariableDebtToken)==address(0),'VARIABLE_DEBT_TOKEN_ALREADY_SET'
472,769
address(_ghoVariableDebtToken)==address(0)
"Controller: signature was already used"
pragma solidity ^0.8.0; /** * @title Controller * @dev Contract used by controllers. */ contract Controller is Ownable, Pausable, SignatureBouncer { using Address for address; mapping(bytes => bool) private signatures; /** * @dev Requires that a valid `signature` and `timestamp` were provided. */ modifier onlyValidSignatureAndTimestamp(bytes calldata signature, uint256 timestamp) { require(!paused(), "Controller: signatures usage is paused"); require(<FILL_ME>) require(_isValidSignatureAndData(_msgSender(), signature), "Controller: invalid signature for caller and data"); require(timestamp > block.timestamp - 1 hours, "Controller: outdated timestamp"); require(timestamp < block.timestamp + 1 hours, "Controller: premature timestamp"); _; } /** * @dev Sets the `signer` address. */ constructor(address signer) SignatureBouncer(signer) { } /** * @dev Marks `signature` as used. */ function _markSignatureAsUsed(bytes calldata signature) internal { } /** * @dev Marks signatures usage as disabled. */ function pauseSignatures() onlyOwner external { } /** * @dev Marks signatures usage as enabled. */ function unpauseSignatures() onlyOwner external { } /** * @dev Returns true it the `signature` was already used. */ function wasSignatureUsed(bytes calldata signature) public view returns (bool) { } }
!wasSignatureUsed(signature),"Controller: signature was already used"
472,780
!wasSignatureUsed(signature)
"Controller: invalid signature for caller and data"
pragma solidity ^0.8.0; /** * @title Controller * @dev Contract used by controllers. */ contract Controller is Ownable, Pausable, SignatureBouncer { using Address for address; mapping(bytes => bool) private signatures; /** * @dev Requires that a valid `signature` and `timestamp` were provided. */ modifier onlyValidSignatureAndTimestamp(bytes calldata signature, uint256 timestamp) { require(!paused(), "Controller: signatures usage is paused"); require(!wasSignatureUsed(signature), "Controller: signature was already used"); require(<FILL_ME>) require(timestamp > block.timestamp - 1 hours, "Controller: outdated timestamp"); require(timestamp < block.timestamp + 1 hours, "Controller: premature timestamp"); _; } /** * @dev Sets the `signer` address. */ constructor(address signer) SignatureBouncer(signer) { } /** * @dev Marks `signature` as used. */ function _markSignatureAsUsed(bytes calldata signature) internal { } /** * @dev Marks signatures usage as disabled. */ function pauseSignatures() onlyOwner external { } /** * @dev Marks signatures usage as enabled. */ function unpauseSignatures() onlyOwner external { } /** * @dev Returns true it the `signature` was already used. */ function wasSignatureUsed(bytes calldata signature) public view returns (bool) { } }
_isValidSignatureAndData(_msgSender(),signature),"Controller: invalid signature for caller and data"
472,780
_isValidSignatureAndData(_msgSender(),signature)
"Controller: signer cannot be a contract"
pragma solidity ^0.8.0; /** * @title Controller * @dev Contract used by controllers. */ contract Controller is Ownable, Pausable, SignatureBouncer { using Address for address; mapping(bytes => bool) private signatures; /** * @dev Requires that a valid `signature` and `timestamp` were provided. */ modifier onlyValidSignatureAndTimestamp(bytes calldata signature, uint256 timestamp) { } /** * @dev Sets the `signer` address. */ constructor(address signer) SignatureBouncer(signer) { require(signer != address(0), "Controller: signer must be a valid address"); require(<FILL_ME>) } /** * @dev Marks `signature` as used. */ function _markSignatureAsUsed(bytes calldata signature) internal { } /** * @dev Marks signatures usage as disabled. */ function pauseSignatures() onlyOwner external { } /** * @dev Marks signatures usage as enabled. */ function unpauseSignatures() onlyOwner external { } /** * @dev Returns true it the `signature` was already used. */ function wasSignatureUsed(bytes calldata signature) public view returns (bool) { } }
!signer.isContract(),"Controller: signer cannot be a contract"
472,780
!signer.isContract()