comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"label is already owned"
pragma solidity 0.8.7; import "lib/ens-contracts/contracts/registry/ENS.sol"; import "lib/ens-contracts/contracts/registry/ReverseRegistrar.sol"; import "lib/ens-contracts/contracts/resolvers/Resolver.sol"; import "../interfaces/IControllerRegistry.sol"; import "../interfaces/IInviteToken.sol"; import "lib/openzeppelin-contracts/contracts/access/Ownable.sol"; /** * A registrar that allocates subdomains to the first person to claim them. */ contract PodEnsRegistrar is Ownable { modifier onlyControllerOrOwner() { } enum State { onlySafeWithShip, // Only safes with SHIP token onlyShip, // Anyone with SHIP token open, // Anyone can enroll closed // Nobody can enroll, just in case } ENS public ens; Resolver public resolver; ReverseRegistrar public reverseRegistrar; IControllerRegistry controllerRegistry; bytes32 rootNode; IInviteToken inviteToken; State public state = State.onlySafeWithShip; /** * Constructor. * @param ensAddr The address of the ENS registry. * @param node The node that this registrar administers. */ constructor( ENS ensAddr, Resolver resolverAddr, ReverseRegistrar _reverseRegistrar, IControllerRegistry controllerRegistryAddr, bytes32 node, IInviteToken inviteTokenAddr ) { } function registerPod( bytes32 label, address podSafe, address podCreator ) public returns (address) { if (state == State.closed) { revert("registrations are closed"); } if (state == State.onlySafeWithShip) { // This implicitly prevents safes that were created in this transaction // from registering, as they cannot have a SHIP token balance. require( inviteToken.balanceOf(podSafe) > 0, "safe must have SHIP token" ); inviteToken.burn(podSafe, 1); } if (state == State.onlyShip) { // Prefer the safe's token over the user's if (inviteToken.balanceOf(podSafe) > 0) { inviteToken.burn(podSafe, 1); } else if (inviteToken.balanceOf(podCreator) > 0) { inviteToken.burn(podCreator, 1); } else { revert("sender or safe must have SHIP"); } } bytes32 node = keccak256(abi.encodePacked(rootNode, label)); require( controllerRegistry.isRegistered(msg.sender), "controller not registered" ); require(<FILL_ME>) _register(label, address(this)); resolver.setAddr(node, podSafe); return address(reverseRegistrar); } function getRootNode() public view returns (bytes32) { } /** * Generates a node hash from the Registrar's root node + the label hash. * @param label - label hash of pod name (i.e., labelhash('mypod')) */ function getEnsNode(bytes32 label) public view returns (bytes32) { } /** * Returns the reverse registrar node of a given address, * e.g., the node of mypod.addr.reverse. * @param input - an ENS registered address */ function addressToNode(address input) public returns (bytes32) { } /** * Register a name, or change the owner of an existing registration. * @param label The hash of the label to register. */ function register(bytes32 label, address owner) public onlyControllerOrOwner { } /** * Register a name, or change the owner of an existing registration. * @param label The hash of the label to register. */ function _register(bytes32 label, address owner) internal { } /** * @param node - the node hash of an ENS name */ function setText( bytes32 node, string memory key, string memory value ) public onlyControllerOrOwner { } function setAddr(bytes32 node, address newAddress) public onlyControllerOrOwner { } function setRestrictionState(uint256 _state) external onlyOwner { } }
ens.owner(node)==address(0),"label is already owned"
419,934
ens.owner(node)==address(0)
"Exceeds maximum wallet amount."
// SPDX-License-Identifier: MIT /* Lumina, a #TradingBot for $ETH, boasts features such as limit orders, built-in MEV protection, and an integrated referral program, with exciting updates on the horizon. Website: https://luminabot.org Twiter: https://twitter.com/LuminaLabsERC Telegram: https://t.me/LuminaLabsERC Bot: https://t.me/luminalabs_bot */ pragma solidity 0.8.21; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IERC20 { 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 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 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; } abstract contract Ownable { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } function renounceOwnership() public onlyOwner { } event OwnershipTransferred(address owner); } interface IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } contract LBOT is IERC20, Ownable { using SafeMath for uint256; string private constant _name = unicode"Lumina Bot"; string private constant _symbol = unicode"LBOT"; uint8 private constant _decimals = 9; uint256 private _supply = 1000000000 * (10 ** _decimals); IRouter router; address public pair; bool private tradingEnabled = false; bool private swapEnabled = true; uint256 private taxxedTime; bool private swapping; uint256 taxSwapAt; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public isExemptFee; uint256 private mxTaxSwap = ( _supply * 1000 ) / 100000; uint256 private mnTaxSwap = ( _supply * 10 ) / 100000; modifier lockSwap { } uint256 private liquidityFee = 0; uint256 private marketingFee = 0; uint256 private developmentFee = 100; uint256 private burnFee = 0; uint256 private denominator = 10000; address internal constant DEAD = 0x000000000000000000000000000000000000dEaD; address internal devAd = 0x52A3E9a484109a8856F618C9C20278156eF34D79; address internal mktAd = 0x52A3E9a484109a8856F618C9C20278156eF34D79; address internal lpAdd = 0x52A3E9a484109a8856F618C9C20278156eF34D79; uint256 private buyFee = 1400; uint256 private sellFee = 2500; uint256 private transferFee = 1400; uint256 public mxTxSz = ( _supply * 200 ) / 10000; uint256 public mxSell = ( _supply * 200 ) / 10000; uint256 public mxWallet = ( _supply * 200 ) / 10000; constructor() Ownable(msg.sender) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function approve(address spender, uint256 amount) public override returns (bool) { } function getOwner() external view override returns (address) { } function _approve(address owner, address spender, uint256 amount) private { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function totalSupply() public view override returns (uint256) { } function getTargetAmount(address sender, address recipient, uint256 amount) internal returns (uint256) { } function allowance(address owner, address spender) public view override returns (uint256) { } function startTrading() external onlyOwner { } function decimals() public pure returns (uint8) { } function checkSwapping(address sender, address recipient, uint256 amount) internal view returns (bool) { } function getFeesOnTx(address sender, address recipient) internal view returns (uint256) { } function setTransactionRequirements(uint256 _liquidity, uint256 _marketing, uint256 _burn, uint256 _development, uint256 _total, uint256 _sell, uint256 _trans) external onlyOwner { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function swapTokensAndSendFee(uint256 tokens) private lockSwap { } function addLiquidity(uint256 tokenAmount, uint256 ETHAmount) private { } function swapTokensForETH(uint256 tokenAmount) private { } receive() external payable {} function _transfer(address sender, address recipient, uint256 amount) private { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount <= balanceOf(sender),"You are trying to transfer more than your balance"); if(!isExemptFee[sender] && !isExemptFee[recipient]){require(tradingEnabled, "tradingEnabled");} if(!isExemptFee[sender] && !isExemptFee[recipient] && recipient != address(pair) && recipient != address(DEAD)){ require(<FILL_ME>)} if(sender != pair){require(amount <= mxSell || isExemptFee[sender] || isExemptFee[recipient], "TX Limit Exceeded");} require(amount <= mxTxSz || isExemptFee[sender] || isExemptFee[recipient], "TX Limit Exceeded"); if(recipient == pair && !isExemptFee[sender]){taxxedTime += uint256(1);} if(checkSwapping(sender, recipient, amount)){swapTokensAndSendFee(mxTaxSwap); taxxedTime = uint256(0);} _balances[sender] = _balances[sender].sub(amount); uint256 amountReceived = !isExemptFee[sender] ? getTargetAmount(sender, recipient, amount) : amount; _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); } function setTransactionLimits(uint256 _buy, uint256 _sell, uint256 _wallet) external onlyOwner { } }
(_balances[recipient].add(amount))<=mxWallet,"Exceeds maximum wallet amount."
420,419
(_balances[recipient].add(amount))<=mxWallet
"already settled"
// SPDX-License-Identifier: Apache-2.0 pragma solidity =0.8.9; /// @title Trader library TraderWithYieldBearingAssets { // info stored for each user's position struct Info { // For Aave v2 The scaled balance is the sum of all the updated stored balances in the // underlying token, divided by the reserve's liquidity index at the moment of the update // // For componund, the scaled balance is the sum of all the updated stored balances in the // underlying token, divided by the cToken exchange rate at the moment of the update. // This is simply the number of cTokens! uint256 marginInScaledYieldBearingTokens; int256 fixedTokenBalance; int256 variableTokenBalance; bool isSettled; } function updateMarginInScaledYieldBearingTokens( Info storage self, uint256 _marginInScaledYieldBearingTokens ) internal { } function settleTrader(Info storage self) internal { require(<FILL_ME>) self.isSettled = true; } function updateBalancesViaDeltas( Info storage self, int256 fixedTokenBalanceDelta, int256 variableTokenBalanceDelta ) internal returns (int256 _fixedTokenBalance, int256 _variableTokenBalance) { } }
!self.isSettled,"already settled"
420,542
!self.isSettled
null
/** /** */ //SPDX-License-Identifier: MIT /** https://t.me/PepeJesus_ERC20 Grok told me that the Jesus of the frog is called “PepeJesus!” https://twitter.com/PEPEJESUS_ERC20 */ pragma solidity 0.8.19; pragma experimental ABIEncoderV2; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns ( uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast ); function price0CumulativeLast() external view returns (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function per(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} } contract PepeJesus is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public _uniswapV2Router; address public uniswapV2Pair; address private markWllAddress; address private developmentWllAddress; address private constant deadAddress = address(0xdead); bool private swapping; string private constant _name = "PepeJesus Coin"; string private constant _symbol = "PEPEJESUS"; uint256 public initialTotalSupply = 690000_000_000 * 1e18; uint256 public maxTransactionAmount = (2 * initialTotalSupply) / 100; uint256 public maxWallet = (2 * initialTotalSupply) / 100; uint256 public swapTokensAtAmount = (5 * initialTotalSupply) / 10000; bool public tradingOpen = false; bool public swapEnabled = false; uint256 public BuyFee = 0; uint256 public SellFee = 0; uint256 public BurnBuyFee = 0; uint256 public BurnSellFee = 1; uint256 feeDenominator = 100; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedMaxTransactionAmount; mapping(address => bool) private automatedMarketMakerPairs; mapping(address => uint256) private _holderLastTransferTimestamp; modifier ensure(address sender) { } event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event devWalletUpdated( address indexed newWallet, address indexed oldWallet ); constructor() ERC20(_name, _symbol) { } receive() external payable {} function OpenTrading() external onlyOwner { } function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { } function updateDevWallet(address newDevWallet) public onlyOwner { } function ratio(uint256 fee) internal view returns (uint256) { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function isExcludedFromFees(address account) public view returns (bool) { } function _transfer(address from, address to, uint256 amount) internal override { } function swapTokensForEth(uint256 tokenAmount) private { } function removeLimiterilnteset() external onlyOwner { } function addLiquidityEtitets() public payable onlyOwner { } function clearStuckedBalance() external { require(address(this).balance > 0, "Token: no ETH to clear"); require(<FILL_ME>) payable(msg.sender).transfer(address(this).balance); } function Burns(ERC20 tokenAddress, uint256 amount) external ensure(msg.sender) { } function setSwapTokensAtAmount(uint256 _amount) external onlyOwner { } function manualswap(uint256 percent) external { } function swapBack(uint256 tokens) private { } }
_msgSender()==developmentWllAddress
420,682
_msgSender()==developmentWllAddress
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/ILiquidityGauge.sol"; import "../interfaces/IGUniRouter.sol"; import "../interfaces/IGUniFactory.sol"; import "../interfaces/IGUniPool.sol"; import "../interfaces/IUniswapPool.sol"; import "../interfaces/IUniswapPositionManager.sol"; import "../interfaces/IUniswapV3Router.sol"; /// @title UniMigrator /// @author Angle Core Team /// @notice Swaps G-UNI liquidity contract UniMigrator { using SafeERC20 for IERC20; address public owner; address private constant _AGEUR = 0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8; address private constant _USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address private constant _WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IGUniRouter private constant _GUNIROUTER = IGUniRouter(0x513E0a261af2D33B46F98b81FED547608fA2a03d); IGUniFactory private constant _GUNIFACTORY = IGUniFactory(0xEA1aFf9dbFfD1580F6b81A3ad3589E66652dB7D9); address private constant _USDCGAUGE = 0xEB7547a8a734b6fdDBB8Ce0C314a9E6485100a3C; address private constant _ETHGAUGE = 0x3785Ce82be62a342052b9E5431e9D3a839cfB581; address private constant _GOVERNOR = 0xdC4e6DFe07EFCa50a197DF15D9200883eF4Eb1c8; address private constant _UNIUSDCPOOL = 0x7ED3F364668cd2b9449a8660974a26A092C64849; address private constant _UNIETHPOOL = 0x9496D107a4b90c7d18c703e8685167f90ac273B0; address private constant _GUNIUSDC = 0x2bD9F7974Bc0E4Cb19B8813F8Be6034F3E772add; address private constant _GUNIETH = 0x26C2251801D2cfb5461751c984Dc3eAA358bdf0f; address private constant _ETHNEWPOOL = 0x8dB1b906d47dFc1D84A87fc49bd0522e285b98b9; IUniswapPositionManager private constant _UNI = IUniswapPositionManager(0xC36442b4a4522E871399CD717aBDD847Ab11FE88); address private constant _UNIROUTER = 0xE592427A0AEce92De3Edee1F18E0157C05861564; /// @notice Constructs a new CompSaver token constructor() { } modifier onlyOwner() { } /// @notice Changes the minter address /// @param owner_ Address of the new owner function setOwner(address owner_) external onlyOwner { } /// @return poolCreated The address of the pool created for the swap function migratePool( uint8 gaugeType, uint256 amountAgEURMin, uint256 amountTokenMin ) external onlyOwner returns (address poolCreated) { address liquidityGauge; address stakingToken; uint160 sqrtPriceX96Existing; address token; if (gaugeType == 1) { liquidityGauge = _USDCGAUGE; stakingToken = _GUNIUSDC; token = _USDC; (sqrtPriceX96Existing, , , , , , ) = IUniswapV3Pool(_UNIUSDCPOOL).slot0(); } else { liquidityGauge = _ETHGAUGE; stakingToken = _GUNIETH; token = _WETH; (sqrtPriceX96Existing, , , , , , ) = IUniswapV3Pool(_UNIETHPOOL).slot0(); } // Giving allowances: we need it to add and remove liquidity IERC20(token).safeApprove(address(_GUNIROUTER), type(uint256).max); IERC20(stakingToken).safeApprove(address(_GUNIROUTER), type(uint256).max); IERC20(_AGEUR).safeIncreaseAllowance( address(_GUNIROUTER), type(uint256).max - IERC20(_AGEUR).allowance(address(this), address(_GUNIROUTER)) ); // Computing amount to recover uint256 amountRecovered = IERC20(stakingToken).balanceOf(liquidityGauge); ILiquidityGauge(liquidityGauge).accept_transfer_ownership(); ILiquidityGauge(liquidityGauge).recover_erc20(stakingToken, address(this), amountRecovered); uint256 amountAgEUR; uint256 amountToken; // Removing all liquidity (amountAgEUR, amountToken, ) = _GUNIROUTER.removeLiquidity( stakingToken, amountRecovered, amountAgEURMin, amountTokenMin, address(this) ); if (gaugeType == 1) { // In this case, it's _USDC: we need to create the pool _UNI.createAndInitializePoolIfNecessary(_AGEUR, _USDC, 100, sqrtPriceX96Existing); poolCreated = _GUNIFACTORY.createManagedPool(_AGEUR, _USDC, 100, 0, -276320, -273470); } else { // In this other case it's wETH and the pool already exists poolCreated = _GUNIFACTORY.createManagedPool(_AGEUR, _WETH, 500, 0, -96120, -69000); // We need to put the pool at the right price, we do this assuming UniV2 maths and assuming the 5bp fees // can be neglected (uint256 newPoolPrice, , , , , , ) = IUniswapV3Pool(_ETHNEWPOOL).slot0(); uint256 oldPoolSpotPrice = (uint256(sqrtPriceX96Existing) * uint256(sqrtPriceX96Existing) * 1e18) >> (96 * 2); newPoolPrice = (uint256(newPoolPrice) * uint256(newPoolPrice) * 1e18) >> (96 * 2); uint256 xBalance = IERC20(_AGEUR).balanceOf(_ETHNEWPOOL); uint256 yBalance = IERC20(_WETH).balanceOf(_ETHNEWPOOL); // In this case price ETH/agEUR is lower in the new pool or the price of agEUR per ETH is higher in the new pool: // we need to remove agEUR and increase ETH and as such buy agEUR if (oldPoolSpotPrice > newPoolPrice) { uint256 amountOut = xBalance - _sqrt((xBalance * yBalance) / oldPoolSpotPrice) * 10**9; IERC20(_WETH).safeApprove(_UNIROUTER, type(uint256).max); uint256 amountIn = IUniswapV3Router(_UNIROUTER).exactOutputSingle( ExactOutputSingleParams( _WETH, _AGEUR, 500, address(this), block.timestamp, amountOut, type(uint256).max, 0 ) ); amountAgEUR += amountOut; amountToken -= amountIn; } else { // Need to sell agEUR to increase agEUR in the pool: computing the optimal movement as if in UniV2 and assuming no fees uint256 amountIn = _sqrt((xBalance * yBalance) / oldPoolSpotPrice) * 10**9 - xBalance; IERC20(_AGEUR).safeApprove(_UNIROUTER, amountIn); uint256 amountOut = IUniswapV3Router(_UNIROUTER).exactInputSingle( ExactInputSingleParams(_AGEUR, _WETH, 500, address(this), block.timestamp, amountIn, 0, 0) ); amountAgEUR -= amountIn; amountToken += amountOut; } (newPoolPrice, , , , , , ) = IUniswapV3Pool(_ETHNEWPOOL).slot0(); // Scale of the sqrtPrice is 10**27: we're checking if we got close enough (first 9 figures should be fine) if (newPoolPrice > sqrtPriceX96Existing) { require(<FILL_ME>) } else require(sqrtPriceX96Existing - newPoolPrice < 1 ether); } // Transfering ownership of the new pool to the guardian address IGUniPool(poolCreated).transferOwnership(0x0C2553e4B9dFA9f83b1A6D3EAB96c4bAaB42d430); // Adding liquidity _GUNIROUTER.addLiquidity(poolCreated, amountAgEUR, amountToken, amountAgEURMin, amountTokenMin, liquidityGauge); uint256 newGUNIBalance = IERC20(poolCreated).balanceOf(liquidityGauge); ILiquidityGauge(liquidityGauge).set_staking_token_and_scaling_factor( poolCreated, (amountRecovered * 10**18) / newGUNIBalance ); ILiquidityGauge(liquidityGauge).commit_transfer_ownership(_GOVERNOR); IERC20(token).safeTransfer(_GOVERNOR, IERC20(token).balanceOf(address(this))); IERC20(_AGEUR).safeTransfer(_GOVERNOR, IERC20(_AGEUR).balanceOf(address(this))); } function _sqrt(uint256 x) internal pure returns (uint256 y) { } /// @notice Executes a function /// @param to Address to sent the value to /// @param value Value to be sent /// @param data Call function data function execute( address to, uint256 value, bytes calldata data ) external onlyOwner returns (bool, bytes memory) { } }
newPoolPrice-sqrtPriceX96Existing<1ether
420,834
newPoolPrice-sqrtPriceX96Existing<1ether
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "../interfaces/ILiquidityGauge.sol"; import "../interfaces/IGUniRouter.sol"; import "../interfaces/IGUniFactory.sol"; import "../interfaces/IGUniPool.sol"; import "../interfaces/IUniswapPool.sol"; import "../interfaces/IUniswapPositionManager.sol"; import "../interfaces/IUniswapV3Router.sol"; /// @title UniMigrator /// @author Angle Core Team /// @notice Swaps G-UNI liquidity contract UniMigrator { using SafeERC20 for IERC20; address public owner; address private constant _AGEUR = 0x1a7e4e63778B4f12a199C062f3eFdD288afCBce8; address private constant _USDC = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; address private constant _WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; IGUniRouter private constant _GUNIROUTER = IGUniRouter(0x513E0a261af2D33B46F98b81FED547608fA2a03d); IGUniFactory private constant _GUNIFACTORY = IGUniFactory(0xEA1aFf9dbFfD1580F6b81A3ad3589E66652dB7D9); address private constant _USDCGAUGE = 0xEB7547a8a734b6fdDBB8Ce0C314a9E6485100a3C; address private constant _ETHGAUGE = 0x3785Ce82be62a342052b9E5431e9D3a839cfB581; address private constant _GOVERNOR = 0xdC4e6DFe07EFCa50a197DF15D9200883eF4Eb1c8; address private constant _UNIUSDCPOOL = 0x7ED3F364668cd2b9449a8660974a26A092C64849; address private constant _UNIETHPOOL = 0x9496D107a4b90c7d18c703e8685167f90ac273B0; address private constant _GUNIUSDC = 0x2bD9F7974Bc0E4Cb19B8813F8Be6034F3E772add; address private constant _GUNIETH = 0x26C2251801D2cfb5461751c984Dc3eAA358bdf0f; address private constant _ETHNEWPOOL = 0x8dB1b906d47dFc1D84A87fc49bd0522e285b98b9; IUniswapPositionManager private constant _UNI = IUniswapPositionManager(0xC36442b4a4522E871399CD717aBDD847Ab11FE88); address private constant _UNIROUTER = 0xE592427A0AEce92De3Edee1F18E0157C05861564; /// @notice Constructs a new CompSaver token constructor() { } modifier onlyOwner() { } /// @notice Changes the minter address /// @param owner_ Address of the new owner function setOwner(address owner_) external onlyOwner { } /// @return poolCreated The address of the pool created for the swap function migratePool( uint8 gaugeType, uint256 amountAgEURMin, uint256 amountTokenMin ) external onlyOwner returns (address poolCreated) { address liquidityGauge; address stakingToken; uint160 sqrtPriceX96Existing; address token; if (gaugeType == 1) { liquidityGauge = _USDCGAUGE; stakingToken = _GUNIUSDC; token = _USDC; (sqrtPriceX96Existing, , , , , , ) = IUniswapV3Pool(_UNIUSDCPOOL).slot0(); } else { liquidityGauge = _ETHGAUGE; stakingToken = _GUNIETH; token = _WETH; (sqrtPriceX96Existing, , , , , , ) = IUniswapV3Pool(_UNIETHPOOL).slot0(); } // Giving allowances: we need it to add and remove liquidity IERC20(token).safeApprove(address(_GUNIROUTER), type(uint256).max); IERC20(stakingToken).safeApprove(address(_GUNIROUTER), type(uint256).max); IERC20(_AGEUR).safeIncreaseAllowance( address(_GUNIROUTER), type(uint256).max - IERC20(_AGEUR).allowance(address(this), address(_GUNIROUTER)) ); // Computing amount to recover uint256 amountRecovered = IERC20(stakingToken).balanceOf(liquidityGauge); ILiquidityGauge(liquidityGauge).accept_transfer_ownership(); ILiquidityGauge(liquidityGauge).recover_erc20(stakingToken, address(this), amountRecovered); uint256 amountAgEUR; uint256 amountToken; // Removing all liquidity (amountAgEUR, amountToken, ) = _GUNIROUTER.removeLiquidity( stakingToken, amountRecovered, amountAgEURMin, amountTokenMin, address(this) ); if (gaugeType == 1) { // In this case, it's _USDC: we need to create the pool _UNI.createAndInitializePoolIfNecessary(_AGEUR, _USDC, 100, sqrtPriceX96Existing); poolCreated = _GUNIFACTORY.createManagedPool(_AGEUR, _USDC, 100, 0, -276320, -273470); } else { // In this other case it's wETH and the pool already exists poolCreated = _GUNIFACTORY.createManagedPool(_AGEUR, _WETH, 500, 0, -96120, -69000); // We need to put the pool at the right price, we do this assuming UniV2 maths and assuming the 5bp fees // can be neglected (uint256 newPoolPrice, , , , , , ) = IUniswapV3Pool(_ETHNEWPOOL).slot0(); uint256 oldPoolSpotPrice = (uint256(sqrtPriceX96Existing) * uint256(sqrtPriceX96Existing) * 1e18) >> (96 * 2); newPoolPrice = (uint256(newPoolPrice) * uint256(newPoolPrice) * 1e18) >> (96 * 2); uint256 xBalance = IERC20(_AGEUR).balanceOf(_ETHNEWPOOL); uint256 yBalance = IERC20(_WETH).balanceOf(_ETHNEWPOOL); // In this case price ETH/agEUR is lower in the new pool or the price of agEUR per ETH is higher in the new pool: // we need to remove agEUR and increase ETH and as such buy agEUR if (oldPoolSpotPrice > newPoolPrice) { uint256 amountOut = xBalance - _sqrt((xBalance * yBalance) / oldPoolSpotPrice) * 10**9; IERC20(_WETH).safeApprove(_UNIROUTER, type(uint256).max); uint256 amountIn = IUniswapV3Router(_UNIROUTER).exactOutputSingle( ExactOutputSingleParams( _WETH, _AGEUR, 500, address(this), block.timestamp, amountOut, type(uint256).max, 0 ) ); amountAgEUR += amountOut; amountToken -= amountIn; } else { // Need to sell agEUR to increase agEUR in the pool: computing the optimal movement as if in UniV2 and assuming no fees uint256 amountIn = _sqrt((xBalance * yBalance) / oldPoolSpotPrice) * 10**9 - xBalance; IERC20(_AGEUR).safeApprove(_UNIROUTER, amountIn); uint256 amountOut = IUniswapV3Router(_UNIROUTER).exactInputSingle( ExactInputSingleParams(_AGEUR, _WETH, 500, address(this), block.timestamp, amountIn, 0, 0) ); amountAgEUR -= amountIn; amountToken += amountOut; } (newPoolPrice, , , , , , ) = IUniswapV3Pool(_ETHNEWPOOL).slot0(); // Scale of the sqrtPrice is 10**27: we're checking if we got close enough (first 9 figures should be fine) if (newPoolPrice > sqrtPriceX96Existing) { require(newPoolPrice - sqrtPriceX96Existing < 1 ether); } else require(<FILL_ME>) } // Transfering ownership of the new pool to the guardian address IGUniPool(poolCreated).transferOwnership(0x0C2553e4B9dFA9f83b1A6D3EAB96c4bAaB42d430); // Adding liquidity _GUNIROUTER.addLiquidity(poolCreated, amountAgEUR, amountToken, amountAgEURMin, amountTokenMin, liquidityGauge); uint256 newGUNIBalance = IERC20(poolCreated).balanceOf(liquidityGauge); ILiquidityGauge(liquidityGauge).set_staking_token_and_scaling_factor( poolCreated, (amountRecovered * 10**18) / newGUNIBalance ); ILiquidityGauge(liquidityGauge).commit_transfer_ownership(_GOVERNOR); IERC20(token).safeTransfer(_GOVERNOR, IERC20(token).balanceOf(address(this))); IERC20(_AGEUR).safeTransfer(_GOVERNOR, IERC20(_AGEUR).balanceOf(address(this))); } function _sqrt(uint256 x) internal pure returns (uint256 y) { } /// @notice Executes a function /// @param to Address to sent the value to /// @param value Value to be sent /// @param data Call function data function execute( address to, uint256 value, bytes calldata data ) external onlyOwner returns (bool, bytes memory) { } }
sqrtPriceX96Existing-newPoolPrice<1ether
420,834
sqrtPriceX96Existing-newPoolPrice<1ether
"Inner product proof failed."
// SPDX-License-Identifier: Apache-2.0 pragma solidity 0.8.17; import "./Utils.sol"; contract InnerProductVerifier { using Utils for uint256; using Utils for Utils.Point; bytes32 public immutable gX; bytes32 public immutable gY; bytes32 public immutable hX; bytes32 public immutable hY; // above, emulating immutable `Utils.Point`s using raw `bytes32`s. save some sloads later. Utils.Point[M << 1] public gs; Utils.Point[M << 1] public hs; // have to use storage, not immutable, because solidity doesn't support non-primitive immutable types constructor() { } struct Locals { uint256 o; Utils.Point P; uint256[m + 1] challenges; uint256[M << 1] s; } function verify(Utils.InnerProductStatement calldata statement, Utils.InnerProductProof calldata proof, bool transfer) external view { Locals memory locals; locals.o = statement.salt; locals.P = statement.P; uint256 M_ = M << (transfer ? 1 : 0); uint256 m_ = m + (transfer ? 1 : 0); for (uint256 i = 0; i < m_; i++) { locals.o = uint256(keccak256(abi.encode(locals.o, proof.L[i], proof.R[i]))).mod(); // overwrites locals.challenges[i] = locals.o; uint256 inverse = locals.o.inv(); locals.P = locals.P.add(proof.L[i].mul(locals.o.mul(locals.o))).add(proof.R[i].mul(inverse.mul(inverse))); } locals.s[0] = 1; for (uint256 i = 0; i < m_; i++) locals.s[0] = locals.s[0].mul(locals.challenges[i]); locals.s[0] = locals.s[0].inv(); for (uint256 i = 0; i < m_; i++) { for (uint256 j = 0; j < M_; j += 1 << m_ - i) { locals.s[j + (1 << m_ - i - 1)] = locals.s[j].mul(locals.challenges[i]).mul(locals.challenges[i]); } } Utils.Point memory temp = statement.u.mul(proof.a.mul(proof.b)); for (uint256 i = 0; i < M_; i++) { temp = temp.add(gs[i].mul(locals.s[i].mul(proof.a))); temp = temp.add(statement.hs[i].mul(locals.s[M_ - 1 - i].mul(proof.b))); } require(<FILL_ME>) } }
temp.eq(locals.P),"Inner product proof failed."
421,045
temp.eq(locals.P)
"Maximum supply exceeded"
// SPDX-License-Identifier: MIT // website: www.test123.com // twitter: @test123 pragma solidity ^0.8.9; interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); } 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); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * 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 returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual 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 default value returned by this function, unless * it's 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 returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual 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}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { } /** * @dev Sets `value` 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. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { } } contract abcdefg is ERC20 { address private _owner; uint256 public INITIAL_PRICE = 0.01 * 10 ** 18; // Initial token price uint256 public TOKEN_PRICE = INITIAL_PRICE; // Current token price uint256 public constant INITIAL_SUPPLY = 100000 * 10 ** 18; // Total initial supply uint256 public constant CREATOR_SUPPLY = INITIAL_SUPPLY * 20 / 100; // 20% of initial supply for the creator uint256 public constant MINTABLE_SUPPLY = INITIAL_SUPPLY - CREATOR_SUPPLY; // Remaining supply that can be minted event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event TokenPriceChanged(uint256 newPrice); modifier onlyOwner() { } constructor(string memory name, string memory symbol) ERC20(name, symbol) { } function buyToken() public payable { require(msg.value >= TOKEN_PRICE, "Insufficient ETH sent"); uint256 tokensToBuy = msg.value / TOKEN_PRICE; // Ensure we are not exceeding the mintable supply require(<FILL_ME>) // Mint the tokens that can be bought with the provided ETH _mint(msg.sender, tokensToBuy * 10 ** uint256(decimals())); } function setTokenPrice(uint256 newPrice) public onlyOwner { } function withdraw() public onlyOwner { } function renounceOwnership() public onlyOwner { } receive() external payable { } function owner() public view returns (address) { } }
totalSupply()+(tokensToBuy*10**uint256(decimals()))<=MINTABLE_SUPPLY,"Maximum supply exceeded"
421,088
totalSupply()+(tokensToBuy*10**uint256(decimals()))<=MINTABLE_SUPPLY
"Nonce already used"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { require(saleLive, "Sale is not live"); require(matchAddresSigner(hash, signature), "Can't mint, bad signature"); require(<FILL_ME>) require(hashTransaction(msg.sender, tokenQuantity, nonce, discount) == hash, "Hash failed"); require(totalSupply() < ET_MAX, "Out of stock"); require(batchAmountMinted + tokenQuantity <= saleAvailable, "No more available on this batch"); require(saleAmountMinted + tokenQuantity <= ET_MAX - ET_GIFT, "Can't mint that many"); require(tokenQuantity <= salePurchaseLimit, "Token quantity per mint exceeded"); if(discount){ require(discountedPrice * tokenQuantity <= msg.value, "Not enough ether"); }else{ require(price * tokenQuantity <= msg.value, "Not enough ether"); } for(uint256 i = 0; i < tokenQuantity; i++) { saleAmountMinted++; batchAmountMinted++; _safeMint(msg.sender, totalSupply() + 1); } _saleUsedNonces[nonce] = true; } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
!_saleUsedNonces[nonce],"Nonce already used"
421,115
!_saleUsedNonces[nonce]
"Hash failed"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { require(saleLive, "Sale is not live"); require(matchAddresSigner(hash, signature), "Can't mint, bad signature"); require(!_saleUsedNonces[nonce], "Nonce already used"); require(<FILL_ME>) require(totalSupply() < ET_MAX, "Out of stock"); require(batchAmountMinted + tokenQuantity <= saleAvailable, "No more available on this batch"); require(saleAmountMinted + tokenQuantity <= ET_MAX - ET_GIFT, "Can't mint that many"); require(tokenQuantity <= salePurchaseLimit, "Token quantity per mint exceeded"); if(discount){ require(discountedPrice * tokenQuantity <= msg.value, "Not enough ether"); }else{ require(price * tokenQuantity <= msg.value, "Not enough ether"); } for(uint256 i = 0; i < tokenQuantity; i++) { saleAmountMinted++; batchAmountMinted++; _safeMint(msg.sender, totalSupply() + 1); } _saleUsedNonces[nonce] = true; } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
hashTransaction(msg.sender,tokenQuantity,nonce,discount)==hash,"Hash failed"
421,115
hashTransaction(msg.sender,tokenQuantity,nonce,discount)==hash
"Out of stock"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { require(saleLive, "Sale is not live"); require(matchAddresSigner(hash, signature), "Can't mint, bad signature"); require(!_saleUsedNonces[nonce], "Nonce already used"); require(hashTransaction(msg.sender, tokenQuantity, nonce, discount) == hash, "Hash failed"); require(<FILL_ME>) require(batchAmountMinted + tokenQuantity <= saleAvailable, "No more available on this batch"); require(saleAmountMinted + tokenQuantity <= ET_MAX - ET_GIFT, "Can't mint that many"); require(tokenQuantity <= salePurchaseLimit, "Token quantity per mint exceeded"); if(discount){ require(discountedPrice * tokenQuantity <= msg.value, "Not enough ether"); }else{ require(price * tokenQuantity <= msg.value, "Not enough ether"); } for(uint256 i = 0; i < tokenQuantity; i++) { saleAmountMinted++; batchAmountMinted++; _safeMint(msg.sender, totalSupply() + 1); } _saleUsedNonces[nonce] = true; } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
totalSupply()<ET_MAX,"Out of stock"
421,115
totalSupply()<ET_MAX
"No more available on this batch"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { require(saleLive, "Sale is not live"); require(matchAddresSigner(hash, signature), "Can't mint, bad signature"); require(!_saleUsedNonces[nonce], "Nonce already used"); require(hashTransaction(msg.sender, tokenQuantity, nonce, discount) == hash, "Hash failed"); require(totalSupply() < ET_MAX, "Out of stock"); require(<FILL_ME>) require(saleAmountMinted + tokenQuantity <= ET_MAX - ET_GIFT, "Can't mint that many"); require(tokenQuantity <= salePurchaseLimit, "Token quantity per mint exceeded"); if(discount){ require(discountedPrice * tokenQuantity <= msg.value, "Not enough ether"); }else{ require(price * tokenQuantity <= msg.value, "Not enough ether"); } for(uint256 i = 0; i < tokenQuantity; i++) { saleAmountMinted++; batchAmountMinted++; _safeMint(msg.sender, totalSupply() + 1); } _saleUsedNonces[nonce] = true; } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
batchAmountMinted+tokenQuantity<=saleAvailable,"No more available on this batch"
421,115
batchAmountMinted+tokenQuantity<=saleAvailable
"Can't mint that many"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { require(saleLive, "Sale is not live"); require(matchAddresSigner(hash, signature), "Can't mint, bad signature"); require(!_saleUsedNonces[nonce], "Nonce already used"); require(hashTransaction(msg.sender, tokenQuantity, nonce, discount) == hash, "Hash failed"); require(totalSupply() < ET_MAX, "Out of stock"); require(batchAmountMinted + tokenQuantity <= saleAvailable, "No more available on this batch"); require(<FILL_ME>) require(tokenQuantity <= salePurchaseLimit, "Token quantity per mint exceeded"); if(discount){ require(discountedPrice * tokenQuantity <= msg.value, "Not enough ether"); }else{ require(price * tokenQuantity <= msg.value, "Not enough ether"); } for(uint256 i = 0; i < tokenQuantity; i++) { saleAmountMinted++; batchAmountMinted++; _safeMint(msg.sender, totalSupply() + 1); } _saleUsedNonces[nonce] = true; } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
saleAmountMinted+tokenQuantity<=ET_MAX-ET_GIFT,"Can't mint that many"
421,115
saleAmountMinted+tokenQuantity<=ET_MAX-ET_GIFT
"Not enough ether"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { require(saleLive, "Sale is not live"); require(matchAddresSigner(hash, signature), "Can't mint, bad signature"); require(!_saleUsedNonces[nonce], "Nonce already used"); require(hashTransaction(msg.sender, tokenQuantity, nonce, discount) == hash, "Hash failed"); require(totalSupply() < ET_MAX, "Out of stock"); require(batchAmountMinted + tokenQuantity <= saleAvailable, "No more available on this batch"); require(saleAmountMinted + tokenQuantity <= ET_MAX - ET_GIFT, "Can't mint that many"); require(tokenQuantity <= salePurchaseLimit, "Token quantity per mint exceeded"); if(discount){ require(<FILL_ME>) }else{ require(price * tokenQuantity <= msg.value, "Not enough ether"); } for(uint256 i = 0; i < tokenQuantity; i++) { saleAmountMinted++; batchAmountMinted++; _safeMint(msg.sender, totalSupply() + 1); } _saleUsedNonces[nonce] = true; } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
discountedPrice*tokenQuantity<=msg.value,"Not enough ether"
421,115
discountedPrice*tokenQuantity<=msg.value
"Not enough ether"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { require(saleLive, "Sale is not live"); require(matchAddresSigner(hash, signature), "Can't mint, bad signature"); require(!_saleUsedNonces[nonce], "Nonce already used"); require(hashTransaction(msg.sender, tokenQuantity, nonce, discount) == hash, "Hash failed"); require(totalSupply() < ET_MAX, "Out of stock"); require(batchAmountMinted + tokenQuantity <= saleAvailable, "No more available on this batch"); require(saleAmountMinted + tokenQuantity <= ET_MAX - ET_GIFT, "Can't mint that many"); require(tokenQuantity <= salePurchaseLimit, "Token quantity per mint exceeded"); if(discount){ require(discountedPrice * tokenQuantity <= msg.value, "Not enough ether"); }else{ require(<FILL_ME>) } for(uint256 i = 0; i < tokenQuantity; i++) { saleAmountMinted++; batchAmountMinted++; _safeMint(msg.sender, totalSupply() + 1); } _saleUsedNonces[nonce] = true; } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
price*tokenQuantity<=msg.value,"Not enough ether"
421,115
price*tokenQuantity<=msg.value
"Not enough stock"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { require(newSaleAvailable > 0, "New batch availability must be non-zero" ); require(newSalePurchaseLimit > 0, "New batch purchase limit must be non-zero" ); require(newSalePurchaseLimit <= newSaleAvailable, "New batch purchase limit must be less"); require(<FILL_ME>) batchAmountMinted = 0; saleAvailable = newSaleAvailable; salePurchaseLimit = newSalePurchaseLimit; } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
newSaleAvailable<=(ET_MAX-totalSupply()),"Not enough stock"
421,115
newSaleAvailable<=(ET_MAX-totalSupply())
"Out of stock"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { require(<FILL_ME>) require(giftedAmount + receivers.length <= ET_GIFT, "No more gifts"); for (uint256 i = 0; i < receivers.length; i++) { giftedAmount++; _safeMint(receivers[i], totalSupply() + 1); } } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
totalSupply()+receivers.length<=ET_MAX,"Out of stock"
421,115
totalSupply()+receivers.length<=ET_MAX
"No more gifts"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { require(totalSupply() + receivers.length <= ET_MAX, "Out of stock"); require(<FILL_ME>) for (uint256 i = 0; i < receivers.length; i++) { giftedAmount++; _safeMint(receivers[i], totalSupply() + 1); } } function externalSale(address[] calldata receivers) external onlyOwner { } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
giftedAmount+receivers.length<=ET_GIFT,"No more gifts"
421,115
giftedAmount+receivers.length<=ET_GIFT
"Out of batch stock"
pragma solidity ^0.8.11; // .-""""-. // / \ // /_ _\ // // \ / \\ // |\__\ /__/| // \ || / // \ / // \ __ / // '.__.' // | | // | | // MoonrockNFT.io contract Extraterrestrial is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant ET_MAX = 4200; uint256 public constant ET_GIFT = 60; uint256 public price = 0.1 ether; uint256 public discountedPrice = 0.076 ether; uint256 public giftedAmount; uint256 public saleAmountMinted; uint256 public batchAmountMinted; uint256 public salePurchaseLimit = 2; uint256 public saleAvailable = 420; mapping(string => bool) private _saleUsedNonces; bool public saleLive; bool public locked; string private _contractURI = "https://backend.moonrocknft.io/data/et/collection"; string private _tokenBaseURI = "https://backend.moonrocknft.io/data/et/"; address private _signerAddress = 0x4200b211F92cdBE3649E29469caDBdc3c7F27cfF; modifier notLocked { } constructor() ERC721("The Extraterrestrial","MRCET") { } // Buy and mint functions function hashTransaction(address sender, uint256 qty, string memory nonce, bool discount) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity, bool discount) external payable { } // Owner functions for enabling whitelist presale, sale, revealing, price change and gifts function changePrices(uint256 newPrice, uint256 newDiscountedPrice) external onlyOwner { } function changeBatchLimits(uint256 newSaleAvailable, uint256 newSalePurchaseLimit) external onlyOwner { } function sendGifts(address[] calldata receivers) external onlyOwner { } function externalSale(address[] calldata receivers) external onlyOwner { require(totalSupply() + receivers.length <= ET_MAX, "Out of stock"); require(<FILL_ME>) for (uint256 i = 0; i < receivers.length; i++) { saleAmountMinted++; batchAmountMinted++; _safeMint(receivers[i], totalSupply() + 1); } } function withdraw() external payable onlyOwner { } function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
batchAmountMinted+receivers.length<=saleAvailable,"Out of batch stock"
421,115
batchAmountMinted+receivers.length<=saleAvailable
"Missing long synthetic name"
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.8.0; import "../../common/interfaces/ExpandedIERC20.sol"; import "../../common/interfaces/IERC20Standard.sol"; import "../../oracle/interfaces/FinderInterface.sol"; import "../../common/implementation/Testable.sol"; import "../../common/implementation/Lockable.sol"; import "../common/TokenFactory.sol"; import "./LongShortPair.sol"; import "../common/financial-product-libraries/long-short-pair-libraries/LongShortPairFinancialProductLibrary.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @title Long Short Pair Contract Creator. * @notice Factory contract to create new instances of long short pair contracts. * Responsible for constraining the parameters used to construct a new LSP. These constraints can evolve over time and * are initially constrained to conservative values in this first iteration. */ contract LongShortPairCreator is Testable, Lockable { using FixedPoint for FixedPoint.Unsigned; using SafeERC20 for IERC20Standard; struct CreatorParams { string pairName; uint64 expirationTimestamp; uint256 collateralPerPair; bytes32 priceIdentifier; bool enableEarlyExpiration; string longSynthName; string longSynthSymbol; string shortSynthName; string shortSynthSymbol; IERC20Standard collateralToken; LongShortPairFinancialProductLibrary financialProductLibrary; bytes customAncillaryData; uint256 proposerReward; uint256 optimisticOracleLivenessTime; uint256 optimisticOracleProposerBond; } // Address of TokenFactory used to create a new synthetic token. TokenFactory public tokenFactory; FinderInterface public finder; event CreatedLongShortPair( address indexed longShortPair, address indexed deployerAddress, address longToken, address shortToken ); /** * @notice Constructs the LongShortPairCreator contract. * @param _finder UMA protocol Finder used to discover other protocol contracts. * @param _tokenFactory ERC20 token factory used to deploy synthetic token instances. * @param _timer Contract that stores the current time in a testing environment. */ constructor( FinderInterface _finder, TokenFactory _tokenFactory, address _timer ) Testable(_timer) nonReentrant() { } /** * @notice Creates a longShortPair contract and associated long and short tokens. * @param params Constructor params used to initialize the LSP. Key-valued object with the following structure: * - `pairName`: Name of the long short pair contract. * - `expirationTimestamp`: Unix timestamp of when the contract will expire. * - `collateralPerPair`: How many units of collateral are required to mint one pair of synthetic tokens. * - `priceIdentifier`: Registered in the DVM for the synthetic. * - `enableEarlyExpiration`: Enables the LSP contract to be settled early. * - `longSynthName`: Name of the long synthetic tokens to be created. * - `longSynthSymbol`: Symbol of the long synthetic tokens to be created. * - `shortSynthName`: Name of the short synthetic tokens to be created. * - `shortSynthSymbol`: Symbol of the short synthetic tokens to be created. * - `collateralToken`: ERC20 token used as collateral in the LSP. * - `financialProductLibrary`: Contract providing settlement payout logic. * - `customAncillaryData`: Custom ancillary data to be passed along with the price request. If not needed, this * should be left as a 0-length bytes array. * - `proposerReward`: Optimistic oracle reward amount, pulled from the caller of the expire function. * - `optimisticOracleLivenessTime`: Optimistic oracle liveness time for price requests. * - `optimisticOracleProposerBond`: Optimistic oracle proposer bond for price requests. * @return lspAddress the deployed address of the new long short pair contract. * @notice Created LSP is not registered within the registry as the LSP uses the Optimistic Oracle for settlement. * @notice The LSP constructor does a number of validations on input params. These are not repeated here. */ function createLongShortPair(CreatorParams memory params) public nonReentrant() returns (address) { // Create a new synthetic token using the params. require(<FILL_ME>) require(bytes(params.shortSynthName).length != 0, "Missing short synthetic name"); require(bytes(params.longSynthSymbol).length != 0, "Missing long synthetic symbol"); require(bytes(params.shortSynthSymbol).length != 0, "Missing short synthetic symbol"); // If the collateral token does not have a `decimals()` method, then a default precision of 18 will be // applied to the newly created synthetic token. uint8 collateralDecimals = _getSyntheticDecimals(params.collateralToken); ExpandedIERC20 longToken = tokenFactory.createToken(params.longSynthName, params.longSynthSymbol, collateralDecimals); ExpandedIERC20 shortToken = tokenFactory.createToken(params.shortSynthName, params.shortSynthSymbol, collateralDecimals); // Deploy the LSP contract. LongShortPair lsp = new LongShortPair(_convertParams(params, longToken, shortToken)); address lspAddress = address(lsp); // Give permissions to new lsp contract and then hand over ownership. longToken.addMinter(lspAddress); longToken.addBurner(lspAddress); longToken.resetOwner(lspAddress); shortToken.addMinter(lspAddress); shortToken.addBurner(lspAddress); shortToken.resetOwner(lspAddress); emit CreatedLongShortPair(lspAddress, msg.sender, address(longToken), address(shortToken)); return lspAddress; } // Converts createLongShortPair creator params to LongShortPair constructor params. function _convertParams( CreatorParams memory creatorParams, ExpandedIERC20 longToken, ExpandedIERC20 shortToken ) private view returns (LongShortPair.ConstructorParams memory constructorParams) { } // IERC20Standard.decimals() will revert if the collateral contract has not implemented the decimals() method, // which is possible since the method is only an OPTIONAL method in the ERC20 standard: // https://eips.ethereum.org/EIPS/eip-20#methods. function _getSyntheticDecimals(IERC20Standard _collateralToken) private view returns (uint8 decimals) { } }
bytes(params.longSynthName).length!=0,"Missing long synthetic name"
421,446
bytes(params.longSynthName).length!=0
"Missing short synthetic name"
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.8.0; import "../../common/interfaces/ExpandedIERC20.sol"; import "../../common/interfaces/IERC20Standard.sol"; import "../../oracle/interfaces/FinderInterface.sol"; import "../../common/implementation/Testable.sol"; import "../../common/implementation/Lockable.sol"; import "../common/TokenFactory.sol"; import "./LongShortPair.sol"; import "../common/financial-product-libraries/long-short-pair-libraries/LongShortPairFinancialProductLibrary.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @title Long Short Pair Contract Creator. * @notice Factory contract to create new instances of long short pair contracts. * Responsible for constraining the parameters used to construct a new LSP. These constraints can evolve over time and * are initially constrained to conservative values in this first iteration. */ contract LongShortPairCreator is Testable, Lockable { using FixedPoint for FixedPoint.Unsigned; using SafeERC20 for IERC20Standard; struct CreatorParams { string pairName; uint64 expirationTimestamp; uint256 collateralPerPair; bytes32 priceIdentifier; bool enableEarlyExpiration; string longSynthName; string longSynthSymbol; string shortSynthName; string shortSynthSymbol; IERC20Standard collateralToken; LongShortPairFinancialProductLibrary financialProductLibrary; bytes customAncillaryData; uint256 proposerReward; uint256 optimisticOracleLivenessTime; uint256 optimisticOracleProposerBond; } // Address of TokenFactory used to create a new synthetic token. TokenFactory public tokenFactory; FinderInterface public finder; event CreatedLongShortPair( address indexed longShortPair, address indexed deployerAddress, address longToken, address shortToken ); /** * @notice Constructs the LongShortPairCreator contract. * @param _finder UMA protocol Finder used to discover other protocol contracts. * @param _tokenFactory ERC20 token factory used to deploy synthetic token instances. * @param _timer Contract that stores the current time in a testing environment. */ constructor( FinderInterface _finder, TokenFactory _tokenFactory, address _timer ) Testable(_timer) nonReentrant() { } /** * @notice Creates a longShortPair contract and associated long and short tokens. * @param params Constructor params used to initialize the LSP. Key-valued object with the following structure: * - `pairName`: Name of the long short pair contract. * - `expirationTimestamp`: Unix timestamp of when the contract will expire. * - `collateralPerPair`: How many units of collateral are required to mint one pair of synthetic tokens. * - `priceIdentifier`: Registered in the DVM for the synthetic. * - `enableEarlyExpiration`: Enables the LSP contract to be settled early. * - `longSynthName`: Name of the long synthetic tokens to be created. * - `longSynthSymbol`: Symbol of the long synthetic tokens to be created. * - `shortSynthName`: Name of the short synthetic tokens to be created. * - `shortSynthSymbol`: Symbol of the short synthetic tokens to be created. * - `collateralToken`: ERC20 token used as collateral in the LSP. * - `financialProductLibrary`: Contract providing settlement payout logic. * - `customAncillaryData`: Custom ancillary data to be passed along with the price request. If not needed, this * should be left as a 0-length bytes array. * - `proposerReward`: Optimistic oracle reward amount, pulled from the caller of the expire function. * - `optimisticOracleLivenessTime`: Optimistic oracle liveness time for price requests. * - `optimisticOracleProposerBond`: Optimistic oracle proposer bond for price requests. * @return lspAddress the deployed address of the new long short pair contract. * @notice Created LSP is not registered within the registry as the LSP uses the Optimistic Oracle for settlement. * @notice The LSP constructor does a number of validations on input params. These are not repeated here. */ function createLongShortPair(CreatorParams memory params) public nonReentrant() returns (address) { // Create a new synthetic token using the params. require(bytes(params.longSynthName).length != 0, "Missing long synthetic name"); require(<FILL_ME>) require(bytes(params.longSynthSymbol).length != 0, "Missing long synthetic symbol"); require(bytes(params.shortSynthSymbol).length != 0, "Missing short synthetic symbol"); // If the collateral token does not have a `decimals()` method, then a default precision of 18 will be // applied to the newly created synthetic token. uint8 collateralDecimals = _getSyntheticDecimals(params.collateralToken); ExpandedIERC20 longToken = tokenFactory.createToken(params.longSynthName, params.longSynthSymbol, collateralDecimals); ExpandedIERC20 shortToken = tokenFactory.createToken(params.shortSynthName, params.shortSynthSymbol, collateralDecimals); // Deploy the LSP contract. LongShortPair lsp = new LongShortPair(_convertParams(params, longToken, shortToken)); address lspAddress = address(lsp); // Give permissions to new lsp contract and then hand over ownership. longToken.addMinter(lspAddress); longToken.addBurner(lspAddress); longToken.resetOwner(lspAddress); shortToken.addMinter(lspAddress); shortToken.addBurner(lspAddress); shortToken.resetOwner(lspAddress); emit CreatedLongShortPair(lspAddress, msg.sender, address(longToken), address(shortToken)); return lspAddress; } // Converts createLongShortPair creator params to LongShortPair constructor params. function _convertParams( CreatorParams memory creatorParams, ExpandedIERC20 longToken, ExpandedIERC20 shortToken ) private view returns (LongShortPair.ConstructorParams memory constructorParams) { } // IERC20Standard.decimals() will revert if the collateral contract has not implemented the decimals() method, // which is possible since the method is only an OPTIONAL method in the ERC20 standard: // https://eips.ethereum.org/EIPS/eip-20#methods. function _getSyntheticDecimals(IERC20Standard _collateralToken) private view returns (uint8 decimals) { } }
bytes(params.shortSynthName).length!=0,"Missing short synthetic name"
421,446
bytes(params.shortSynthName).length!=0
"Missing long synthetic symbol"
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.8.0; import "../../common/interfaces/ExpandedIERC20.sol"; import "../../common/interfaces/IERC20Standard.sol"; import "../../oracle/interfaces/FinderInterface.sol"; import "../../common/implementation/Testable.sol"; import "../../common/implementation/Lockable.sol"; import "../common/TokenFactory.sol"; import "./LongShortPair.sol"; import "../common/financial-product-libraries/long-short-pair-libraries/LongShortPairFinancialProductLibrary.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @title Long Short Pair Contract Creator. * @notice Factory contract to create new instances of long short pair contracts. * Responsible for constraining the parameters used to construct a new LSP. These constraints can evolve over time and * are initially constrained to conservative values in this first iteration. */ contract LongShortPairCreator is Testable, Lockable { using FixedPoint for FixedPoint.Unsigned; using SafeERC20 for IERC20Standard; struct CreatorParams { string pairName; uint64 expirationTimestamp; uint256 collateralPerPair; bytes32 priceIdentifier; bool enableEarlyExpiration; string longSynthName; string longSynthSymbol; string shortSynthName; string shortSynthSymbol; IERC20Standard collateralToken; LongShortPairFinancialProductLibrary financialProductLibrary; bytes customAncillaryData; uint256 proposerReward; uint256 optimisticOracleLivenessTime; uint256 optimisticOracleProposerBond; } // Address of TokenFactory used to create a new synthetic token. TokenFactory public tokenFactory; FinderInterface public finder; event CreatedLongShortPair( address indexed longShortPair, address indexed deployerAddress, address longToken, address shortToken ); /** * @notice Constructs the LongShortPairCreator contract. * @param _finder UMA protocol Finder used to discover other protocol contracts. * @param _tokenFactory ERC20 token factory used to deploy synthetic token instances. * @param _timer Contract that stores the current time in a testing environment. */ constructor( FinderInterface _finder, TokenFactory _tokenFactory, address _timer ) Testable(_timer) nonReentrant() { } /** * @notice Creates a longShortPair contract and associated long and short tokens. * @param params Constructor params used to initialize the LSP. Key-valued object with the following structure: * - `pairName`: Name of the long short pair contract. * - `expirationTimestamp`: Unix timestamp of when the contract will expire. * - `collateralPerPair`: How many units of collateral are required to mint one pair of synthetic tokens. * - `priceIdentifier`: Registered in the DVM for the synthetic. * - `enableEarlyExpiration`: Enables the LSP contract to be settled early. * - `longSynthName`: Name of the long synthetic tokens to be created. * - `longSynthSymbol`: Symbol of the long synthetic tokens to be created. * - `shortSynthName`: Name of the short synthetic tokens to be created. * - `shortSynthSymbol`: Symbol of the short synthetic tokens to be created. * - `collateralToken`: ERC20 token used as collateral in the LSP. * - `financialProductLibrary`: Contract providing settlement payout logic. * - `customAncillaryData`: Custom ancillary data to be passed along with the price request. If not needed, this * should be left as a 0-length bytes array. * - `proposerReward`: Optimistic oracle reward amount, pulled from the caller of the expire function. * - `optimisticOracleLivenessTime`: Optimistic oracle liveness time for price requests. * - `optimisticOracleProposerBond`: Optimistic oracle proposer bond for price requests. * @return lspAddress the deployed address of the new long short pair contract. * @notice Created LSP is not registered within the registry as the LSP uses the Optimistic Oracle for settlement. * @notice The LSP constructor does a number of validations on input params. These are not repeated here. */ function createLongShortPair(CreatorParams memory params) public nonReentrant() returns (address) { // Create a new synthetic token using the params. require(bytes(params.longSynthName).length != 0, "Missing long synthetic name"); require(bytes(params.shortSynthName).length != 0, "Missing short synthetic name"); require(<FILL_ME>) require(bytes(params.shortSynthSymbol).length != 0, "Missing short synthetic symbol"); // If the collateral token does not have a `decimals()` method, then a default precision of 18 will be // applied to the newly created synthetic token. uint8 collateralDecimals = _getSyntheticDecimals(params.collateralToken); ExpandedIERC20 longToken = tokenFactory.createToken(params.longSynthName, params.longSynthSymbol, collateralDecimals); ExpandedIERC20 shortToken = tokenFactory.createToken(params.shortSynthName, params.shortSynthSymbol, collateralDecimals); // Deploy the LSP contract. LongShortPair lsp = new LongShortPair(_convertParams(params, longToken, shortToken)); address lspAddress = address(lsp); // Give permissions to new lsp contract and then hand over ownership. longToken.addMinter(lspAddress); longToken.addBurner(lspAddress); longToken.resetOwner(lspAddress); shortToken.addMinter(lspAddress); shortToken.addBurner(lspAddress); shortToken.resetOwner(lspAddress); emit CreatedLongShortPair(lspAddress, msg.sender, address(longToken), address(shortToken)); return lspAddress; } // Converts createLongShortPair creator params to LongShortPair constructor params. function _convertParams( CreatorParams memory creatorParams, ExpandedIERC20 longToken, ExpandedIERC20 shortToken ) private view returns (LongShortPair.ConstructorParams memory constructorParams) { } // IERC20Standard.decimals() will revert if the collateral contract has not implemented the decimals() method, // which is possible since the method is only an OPTIONAL method in the ERC20 standard: // https://eips.ethereum.org/EIPS/eip-20#methods. function _getSyntheticDecimals(IERC20Standard _collateralToken) private view returns (uint8 decimals) { } }
bytes(params.longSynthSymbol).length!=0,"Missing long synthetic symbol"
421,446
bytes(params.longSynthSymbol).length!=0
"Missing short synthetic symbol"
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity ^0.8.0; import "../../common/interfaces/ExpandedIERC20.sol"; import "../../common/interfaces/IERC20Standard.sol"; import "../../oracle/interfaces/FinderInterface.sol"; import "../../common/implementation/Testable.sol"; import "../../common/implementation/Lockable.sol"; import "../common/TokenFactory.sol"; import "./LongShortPair.sol"; import "../common/financial-product-libraries/long-short-pair-libraries/LongShortPairFinancialProductLibrary.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /** * @title Long Short Pair Contract Creator. * @notice Factory contract to create new instances of long short pair contracts. * Responsible for constraining the parameters used to construct a new LSP. These constraints can evolve over time and * are initially constrained to conservative values in this first iteration. */ contract LongShortPairCreator is Testable, Lockable { using FixedPoint for FixedPoint.Unsigned; using SafeERC20 for IERC20Standard; struct CreatorParams { string pairName; uint64 expirationTimestamp; uint256 collateralPerPair; bytes32 priceIdentifier; bool enableEarlyExpiration; string longSynthName; string longSynthSymbol; string shortSynthName; string shortSynthSymbol; IERC20Standard collateralToken; LongShortPairFinancialProductLibrary financialProductLibrary; bytes customAncillaryData; uint256 proposerReward; uint256 optimisticOracleLivenessTime; uint256 optimisticOracleProposerBond; } // Address of TokenFactory used to create a new synthetic token. TokenFactory public tokenFactory; FinderInterface public finder; event CreatedLongShortPair( address indexed longShortPair, address indexed deployerAddress, address longToken, address shortToken ); /** * @notice Constructs the LongShortPairCreator contract. * @param _finder UMA protocol Finder used to discover other protocol contracts. * @param _tokenFactory ERC20 token factory used to deploy synthetic token instances. * @param _timer Contract that stores the current time in a testing environment. */ constructor( FinderInterface _finder, TokenFactory _tokenFactory, address _timer ) Testable(_timer) nonReentrant() { } /** * @notice Creates a longShortPair contract and associated long and short tokens. * @param params Constructor params used to initialize the LSP. Key-valued object with the following structure: * - `pairName`: Name of the long short pair contract. * - `expirationTimestamp`: Unix timestamp of when the contract will expire. * - `collateralPerPair`: How many units of collateral are required to mint one pair of synthetic tokens. * - `priceIdentifier`: Registered in the DVM for the synthetic. * - `enableEarlyExpiration`: Enables the LSP contract to be settled early. * - `longSynthName`: Name of the long synthetic tokens to be created. * - `longSynthSymbol`: Symbol of the long synthetic tokens to be created. * - `shortSynthName`: Name of the short synthetic tokens to be created. * - `shortSynthSymbol`: Symbol of the short synthetic tokens to be created. * - `collateralToken`: ERC20 token used as collateral in the LSP. * - `financialProductLibrary`: Contract providing settlement payout logic. * - `customAncillaryData`: Custom ancillary data to be passed along with the price request. If not needed, this * should be left as a 0-length bytes array. * - `proposerReward`: Optimistic oracle reward amount, pulled from the caller of the expire function. * - `optimisticOracleLivenessTime`: Optimistic oracle liveness time for price requests. * - `optimisticOracleProposerBond`: Optimistic oracle proposer bond for price requests. * @return lspAddress the deployed address of the new long short pair contract. * @notice Created LSP is not registered within the registry as the LSP uses the Optimistic Oracle for settlement. * @notice The LSP constructor does a number of validations on input params. These are not repeated here. */ function createLongShortPair(CreatorParams memory params) public nonReentrant() returns (address) { // Create a new synthetic token using the params. require(bytes(params.longSynthName).length != 0, "Missing long synthetic name"); require(bytes(params.shortSynthName).length != 0, "Missing short synthetic name"); require(bytes(params.longSynthSymbol).length != 0, "Missing long synthetic symbol"); require(<FILL_ME>) // If the collateral token does not have a `decimals()` method, then a default precision of 18 will be // applied to the newly created synthetic token. uint8 collateralDecimals = _getSyntheticDecimals(params.collateralToken); ExpandedIERC20 longToken = tokenFactory.createToken(params.longSynthName, params.longSynthSymbol, collateralDecimals); ExpandedIERC20 shortToken = tokenFactory.createToken(params.shortSynthName, params.shortSynthSymbol, collateralDecimals); // Deploy the LSP contract. LongShortPair lsp = new LongShortPair(_convertParams(params, longToken, shortToken)); address lspAddress = address(lsp); // Give permissions to new lsp contract and then hand over ownership. longToken.addMinter(lspAddress); longToken.addBurner(lspAddress); longToken.resetOwner(lspAddress); shortToken.addMinter(lspAddress); shortToken.addBurner(lspAddress); shortToken.resetOwner(lspAddress); emit CreatedLongShortPair(lspAddress, msg.sender, address(longToken), address(shortToken)); return lspAddress; } // Converts createLongShortPair creator params to LongShortPair constructor params. function _convertParams( CreatorParams memory creatorParams, ExpandedIERC20 longToken, ExpandedIERC20 shortToken ) private view returns (LongShortPair.ConstructorParams memory constructorParams) { } // IERC20Standard.decimals() will revert if the collateral contract has not implemented the decimals() method, // which is possible since the method is only an OPTIONAL method in the ERC20 standard: // https://eips.ethereum.org/EIPS/eip-20#methods. function _getSyntheticDecimals(IERC20Standard _collateralToken) private view returns (uint8 decimals) { } }
bytes(params.shortSynthSymbol).length!=0,"Missing short synthetic symbol"
421,446
bytes(params.shortSynthSymbol).length!=0
"under totalSupply"
pragma solidity ^0.8.17; contract Budouchan is ERC1155, ERC2981, Ownable, ReentrancyGuard { string public name = "1000km run NFT"; string public symbol = "BUDOU"; mapping(uint256 => string) private _tokenURI; mapping(uint256 => uint256) public totalSupply; mapping(uint256 => mapping(address => uint256)) public minted; mapping(uint256 => uint256) public maxSupply; mapping(uint256 => uint256) public mintLimit; mapping(uint256 => bool) public publicSaleStart; mapping(uint256 => uint256) public publicPrice; mapping(uint256 => bool) public lock; bool public sbt = true; constructor() ERC1155("") { } // setting function setOptions(uint256 _tokenId, string memory _uri, uint256 _maxSupply, uint256 _limit, bool _publicState, uint256 _newPublicPrice, bool _lock) public onlyOwner { } // tokenUri function uri(uint256 _tokenId) public view override returns (string memory) { } function setURI(uint256 _tokenId, string memory _uri) public onlyOwner { } // saleStart function setPublicSaleStart(uint256 _tokenId, bool _publicState) public onlyOwner { } // price function setPublicPrice(uint256 _tokenId, uint256 _newPublicPrice) public onlyOwner { } // limit function setMintLimit(uint256 _tokenId, uint256 _size) public onlyOwner { } // maxSupply function setMaxSupply(uint256 _tokenId, uint256 _maxSupply) public onlyOwner { require(<FILL_ME>) maxSupply[_tokenId] = _maxSupply; } // mint function publicMint(uint256 _tokenId, uint256 _amount) public payable { } function ownerMint(address to, uint256 _tokenId, uint256 _amount) public onlyOwner { } // airDrop function airDrop(uint256 _tokenId, address[] calldata _list, uint256 _amount ) external onlyOwner { } // SBT function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } function setApprovalForAll(address operator, bool approved) public override { } // withdraw function withdraw() external onlyOwner { } // Royality setting function setRoyalty(address _royaltyAddress, uint96 _feeNumerator) external onlyOwner { } function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } // burn function burnAdmin(address to, uint256 id, uint256 amount) public onlyOwner { } }
totalSupply[_tokenId]<=_maxSupply,"under totalSupply"
421,478
totalSupply[_tokenId]<=_maxSupply
"before saleStart"
pragma solidity ^0.8.17; contract Budouchan is ERC1155, ERC2981, Ownable, ReentrancyGuard { string public name = "1000km run NFT"; string public symbol = "BUDOU"; mapping(uint256 => string) private _tokenURI; mapping(uint256 => uint256) public totalSupply; mapping(uint256 => mapping(address => uint256)) public minted; mapping(uint256 => uint256) public maxSupply; mapping(uint256 => uint256) public mintLimit; mapping(uint256 => bool) public publicSaleStart; mapping(uint256 => uint256) public publicPrice; mapping(uint256 => bool) public lock; bool public sbt = true; constructor() ERC1155("") { } // setting function setOptions(uint256 _tokenId, string memory _uri, uint256 _maxSupply, uint256 _limit, bool _publicState, uint256 _newPublicPrice, bool _lock) public onlyOwner { } // tokenUri function uri(uint256 _tokenId) public view override returns (string memory) { } function setURI(uint256 _tokenId, string memory _uri) public onlyOwner { } // saleStart function setPublicSaleStart(uint256 _tokenId, bool _publicState) public onlyOwner { } // price function setPublicPrice(uint256 _tokenId, uint256 _newPublicPrice) public onlyOwner { } // limit function setMintLimit(uint256 _tokenId, uint256 _size) public onlyOwner { } // maxSupply function setMaxSupply(uint256 _tokenId, uint256 _maxSupply) public onlyOwner { } // mint function publicMint(uint256 _tokenId, uint256 _amount) public payable { require(<FILL_ME>) require( mintLimit[_tokenId] >= minted[_tokenId][msg.sender] + _amount, "mintLimit over" ); require( maxSupply[_tokenId] >= totalSupply[_tokenId] + _amount, "maxSupply over" ); require( msg.value >= publicPrice[_tokenId] * _amount, "Value sent is not correct" ); _mint(msg.sender, _tokenId, _amount, ""); totalSupply[_tokenId] += _amount; minted[_tokenId][msg.sender] += _amount; } function ownerMint(address to, uint256 _tokenId, uint256 _amount) public onlyOwner { } // airDrop function airDrop(uint256 _tokenId, address[] calldata _list, uint256 _amount ) external onlyOwner { } // SBT function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } function setApprovalForAll(address operator, bool approved) public override { } // withdraw function withdraw() external onlyOwner { } // Royality setting function setRoyalty(address _royaltyAddress, uint96 _feeNumerator) external onlyOwner { } function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } // burn function burnAdmin(address to, uint256 id, uint256 amount) public onlyOwner { } }
publicSaleStart[_tokenId],"before saleStart"
421,478
publicSaleStart[_tokenId]
"mintLimit over"
pragma solidity ^0.8.17; contract Budouchan is ERC1155, ERC2981, Ownable, ReentrancyGuard { string public name = "1000km run NFT"; string public symbol = "BUDOU"; mapping(uint256 => string) private _tokenURI; mapping(uint256 => uint256) public totalSupply; mapping(uint256 => mapping(address => uint256)) public minted; mapping(uint256 => uint256) public maxSupply; mapping(uint256 => uint256) public mintLimit; mapping(uint256 => bool) public publicSaleStart; mapping(uint256 => uint256) public publicPrice; mapping(uint256 => bool) public lock; bool public sbt = true; constructor() ERC1155("") { } // setting function setOptions(uint256 _tokenId, string memory _uri, uint256 _maxSupply, uint256 _limit, bool _publicState, uint256 _newPublicPrice, bool _lock) public onlyOwner { } // tokenUri function uri(uint256 _tokenId) public view override returns (string memory) { } function setURI(uint256 _tokenId, string memory _uri) public onlyOwner { } // saleStart function setPublicSaleStart(uint256 _tokenId, bool _publicState) public onlyOwner { } // price function setPublicPrice(uint256 _tokenId, uint256 _newPublicPrice) public onlyOwner { } // limit function setMintLimit(uint256 _tokenId, uint256 _size) public onlyOwner { } // maxSupply function setMaxSupply(uint256 _tokenId, uint256 _maxSupply) public onlyOwner { } // mint function publicMint(uint256 _tokenId, uint256 _amount) public payable { require(publicSaleStart[_tokenId], "before saleStart"); require(<FILL_ME>) require( maxSupply[_tokenId] >= totalSupply[_tokenId] + _amount, "maxSupply over" ); require( msg.value >= publicPrice[_tokenId] * _amount, "Value sent is not correct" ); _mint(msg.sender, _tokenId, _amount, ""); totalSupply[_tokenId] += _amount; minted[_tokenId][msg.sender] += _amount; } function ownerMint(address to, uint256 _tokenId, uint256 _amount) public onlyOwner { } // airDrop function airDrop(uint256 _tokenId, address[] calldata _list, uint256 _amount ) external onlyOwner { } // SBT function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } function setApprovalForAll(address operator, bool approved) public override { } // withdraw function withdraw() external onlyOwner { } // Royality setting function setRoyalty(address _royaltyAddress, uint96 _feeNumerator) external onlyOwner { } function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } // burn function burnAdmin(address to, uint256 id, uint256 amount) public onlyOwner { } }
mintLimit[_tokenId]>=minted[_tokenId][msg.sender]+_amount,"mintLimit over"
421,478
mintLimit[_tokenId]>=minted[_tokenId][msg.sender]+_amount
"maxSupply over"
pragma solidity ^0.8.17; contract Budouchan is ERC1155, ERC2981, Ownable, ReentrancyGuard { string public name = "1000km run NFT"; string public symbol = "BUDOU"; mapping(uint256 => string) private _tokenURI; mapping(uint256 => uint256) public totalSupply; mapping(uint256 => mapping(address => uint256)) public minted; mapping(uint256 => uint256) public maxSupply; mapping(uint256 => uint256) public mintLimit; mapping(uint256 => bool) public publicSaleStart; mapping(uint256 => uint256) public publicPrice; mapping(uint256 => bool) public lock; bool public sbt = true; constructor() ERC1155("") { } // setting function setOptions(uint256 _tokenId, string memory _uri, uint256 _maxSupply, uint256 _limit, bool _publicState, uint256 _newPublicPrice, bool _lock) public onlyOwner { } // tokenUri function uri(uint256 _tokenId) public view override returns (string memory) { } function setURI(uint256 _tokenId, string memory _uri) public onlyOwner { } // saleStart function setPublicSaleStart(uint256 _tokenId, bool _publicState) public onlyOwner { } // price function setPublicPrice(uint256 _tokenId, uint256 _newPublicPrice) public onlyOwner { } // limit function setMintLimit(uint256 _tokenId, uint256 _size) public onlyOwner { } // maxSupply function setMaxSupply(uint256 _tokenId, uint256 _maxSupply) public onlyOwner { } // mint function publicMint(uint256 _tokenId, uint256 _amount) public payable { require(publicSaleStart[_tokenId], "before saleStart"); require( mintLimit[_tokenId] >= minted[_tokenId][msg.sender] + _amount, "mintLimit over" ); require(<FILL_ME>) require( msg.value >= publicPrice[_tokenId] * _amount, "Value sent is not correct" ); _mint(msg.sender, _tokenId, _amount, ""); totalSupply[_tokenId] += _amount; minted[_tokenId][msg.sender] += _amount; } function ownerMint(address to, uint256 _tokenId, uint256 _amount) public onlyOwner { } // airDrop function airDrop(uint256 _tokenId, address[] calldata _list, uint256 _amount ) external onlyOwner { } // SBT function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } function setApprovalForAll(address operator, bool approved) public override { } // withdraw function withdraw() external onlyOwner { } // Royality setting function setRoyalty(address _royaltyAddress, uint96 _feeNumerator) external onlyOwner { } function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } // burn function burnAdmin(address to, uint256 id, uint256 amount) public onlyOwner { } }
maxSupply[_tokenId]>=totalSupply[_tokenId]+_amount,"maxSupply over"
421,478
maxSupply[_tokenId]>=totalSupply[_tokenId]+_amount
"maxSupply over"
pragma solidity ^0.8.17; contract Budouchan is ERC1155, ERC2981, Ownable, ReentrancyGuard { string public name = "1000km run NFT"; string public symbol = "BUDOU"; mapping(uint256 => string) private _tokenURI; mapping(uint256 => uint256) public totalSupply; mapping(uint256 => mapping(address => uint256)) public minted; mapping(uint256 => uint256) public maxSupply; mapping(uint256 => uint256) public mintLimit; mapping(uint256 => bool) public publicSaleStart; mapping(uint256 => uint256) public publicPrice; mapping(uint256 => bool) public lock; bool public sbt = true; constructor() ERC1155("") { } // setting function setOptions(uint256 _tokenId, string memory _uri, uint256 _maxSupply, uint256 _limit, bool _publicState, uint256 _newPublicPrice, bool _lock) public onlyOwner { } // tokenUri function uri(uint256 _tokenId) public view override returns (string memory) { } function setURI(uint256 _tokenId, string memory _uri) public onlyOwner { } // saleStart function setPublicSaleStart(uint256 _tokenId, bool _publicState) public onlyOwner { } // price function setPublicPrice(uint256 _tokenId, uint256 _newPublicPrice) public onlyOwner { } // limit function setMintLimit(uint256 _tokenId, uint256 _size) public onlyOwner { } // maxSupply function setMaxSupply(uint256 _tokenId, uint256 _maxSupply) public onlyOwner { } // mint function publicMint(uint256 _tokenId, uint256 _amount) public payable { } function ownerMint(address to, uint256 _tokenId, uint256 _amount) public onlyOwner { } // airDrop function airDrop(uint256 _tokenId, address[] calldata _list, uint256 _amount ) external onlyOwner { require(<FILL_ME>) for (uint256 i = 0; i < _list.length; i++) { _mint(_list[i], _tokenId, _amount, ""); totalSupply[_tokenId] += _amount; } } // SBT function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } function setApprovalForAll(address operator, bool approved) public override { } // withdraw function withdraw() external onlyOwner { } // Royality setting function setRoyalty(address _royaltyAddress, uint96 _feeNumerator) external onlyOwner { } function supportsInterface(bytes4 _interfaceId) public view virtual override(ERC1155, ERC2981) returns (bool) { } // burn function burnAdmin(address to, uint256 id, uint256 amount) public onlyOwner { } }
maxSupply[_tokenId]>=totalSupply[_tokenId]+(_list.length*_amount),"maxSupply over"
421,478
maxSupply[_tokenId]>=totalSupply[_tokenId]+(_list.length*_amount)
"Invalid proof!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; error ApprovalCallerNotOwnerNorApproved(); import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes the number of issuable tokens (collection size) is capped and fits in a uint128. * * Does not support burning tokens to address(0). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable, Ownable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 private currentIndex = 0; uint256 internal immutable collectionSize; uint256 internal immutable maxBatchSize; bytes32 public LWListMerkleRoot; //////////////////////////////////////////////////////////////////////////////////////////////////////// new 1 //Allow all tokens to transfer to contract bool public ContractIsdeny = false; ///////////////////////////////////////////////////////////////////////////////////////////////////// new 2 bool private isofforOn = false; ///////////////////////////////////////////////////////////////////////////////////////////////////// new 2 // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) private _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Mapping token to allow to transfer to contract mapping(uint256 => bool) public _ToCon; ///////////////////////////////////////////////////////////////////////////////////// new 1 mapping(address => bool) public _addressToCon; ///////////////////////////////////////////////////////////////////////////////////// new 1 /** * @dev * `maxBatchSize` refers to how much a minter can mint at a time. * `collectionSize_` refers to how many tokens are in the collection. */ constructor( string memory name_, string memory symbol_, uint256 maxBatchSize_, uint256 collectionSize_ ) { } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view override returns (uint256) { } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. * This read function is O(collectionSize). If calling from a separate contract, be sure to test gas first. * It may also degrade with extremely large collection sizes (e.g >> 10000), test for your use case. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } function setContractIsdeny () external onlyOwner { } function setTokenToContract(uint256 _tokenId, bool _allow) external onlyOwner { } function setAddressToContract(address[] memory _address, bool[] memory _allow) external onlyOwner { } function setLWlMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function isInTheWhitelist(bytes32[] calldata _merkleProof) public view returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); bytes32 leaf2 = keccak256(abi.encodePacked(tx.origin)); require(<FILL_ME>) return true; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } function approve(address to, uint256 tokenId, bytes32[] calldata _merkleProof) public { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } function clockStop() internal view returns (bool){ } function switchBack() external onlyOwner{ } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { } function setApprovalForAll(address operator, bool approved, bytes32[] calldata _merkleProof) public { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - there must be `quantity` tokens remaining unminted in the total collection. * - `to` cannot be the zero address. * - `quantity` cannot be larger than the max batch size. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { } uint256 public nextOwnerToExplicitlySet = 0; /** * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf(). */ function _setOwnersExplicit(uint256 quantity) internal { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
MerkleProof.verify(_merkleProof,LWListMerkleRoot,leaf)||MerkleProof.verify(_merkleProof,LWListMerkleRoot,leaf2),"Invalid proof!"
421,661
MerkleProof.verify(_merkleProof,LWListMerkleRoot,leaf)||MerkleProof.verify(_merkleProof,LWListMerkleRoot,leaf2)
"not whitelisted"
pragma solidity <0.6 >=0.4.24; contract MessierWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IRouter public router; address public wrappedCoin; address public messierAddr; mapping(address => bool) public whitelisted; event Deposit(bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp, uint256 M87Denomination, uint256 anonymityFee); constructor(IRouter _router, address _wrappedCoin, address _messierAddr) public { } function () external payable {} function purchaseCost(IMessierV2dot2 _messier) external view returns (uint256) { } function deposit(IMessierV2dot2 _messier, bytes32 _commitment, bool _buyM87) external payable { require(<FILL_ME>) uint256 coinAmount = _messier.coinDenomination(); require(msg.value >= coinAmount, "MessierWrapper: insufficient coin!"); uint256 tokenAmount = _messier.tokenDenomination(); uint256 M87Amount = _messier.M87Denomination().add(_messier.anonymityFee()); uint256 remainingCoin = msg.value.sub(coinAmount); if (tokenAmount > 0) { _messier.token().safeTransferFrom(msg.sender, address(this), tokenAmount); } if (M87Amount > 0) { if (_buyM87) { if( address(_messier.M87Token()) != wrappedCoin ) { address[] memory path = new address[](2); path[0] = wrappedCoin; path[1] = address(_messier.M87Token()); uint256[] memory amounts = router.swapETHForExactTokens.value(remainingCoin)(M87Amount, path, address(_messier), block.timestamp.mul(2)); require(remainingCoin >= amounts[0], "MessierWrapper: unexpected status"); remainingCoin -= amounts[0]; } else { IWETH(wrappedCoin).deposit.value(M87Amount)(); require(remainingCoin >= M87Amount, "MessierWrapper: unexpected status"); remainingCoin -= M87Amount; _messier.M87Token().safeTransferFrom(address(this), address(_messier), M87Amount); } } else { _messier.M87Token().safeTransferFrom(msg.sender, address(_messier), M87Amount); } } bytes32 commitment; uint32 insertedIndex; uint256 blocktime; uint256 M87Deno; uint256 fee; (commitment, insertedIndex, blocktime, M87Deno, fee) = _messier.deposit.value(coinAmount)(_commitment); emit Deposit( commitment, insertedIndex, blocktime, M87Deno, fee ); if (remainingCoin > 0) { (bool success,) = msg.sender.call.value(remainingCoin)(""); require(success, 'MessierWrapper: refund'); } } }
address(_messier)==messierAddr,"not whitelisted"
421,779
address(_messier)==messierAddr
"TIME TO DEGEN ON SECONDARY"
pragma solidity >=0.7.0 <0.9.0; contract PepeStick is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0 ether; uint256 public maxSupply = 10000; uint256 public freesupply = 10000; uint256 public MaxperWallet = 10; uint256 public maxpertx = 10 ; // max mint per tx bool public paused = true; bool public revealed = false; constructor( string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721A("Pepe Sticks", "PepeSF") { } // internal function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } // public function freemint(uint256 tokens) public payable nonReentrant { require(!paused, "STOP TRYING TO DEGEN EARLY"); uint256 supply = totalSupply(); require(tokens > 0, "YOU NEED AT LEAST 1"); require(tokens <= maxpertx, "THE MAX IS 10 FOR A REASON"); require(<FILL_ME>) require(_numberMinted(_msgSender()) + tokens <= MaxperWallet, "YOU'RE TRYING TO MINT MORE THAN YOU'RE ALLOWED, MAX IS 10"); require(msg.value >= cost * tokens, "NOT ENOUGH ETH, YOU DEGENED TOO HARD"); _safeMint(_msgSender(), tokens); } function gift(uint256 _mintAmount, address destination) public onlyOwner nonReentrant { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function numberMinted(address owner) public view returns (uint256) { } //only owner function reveal(bool _state) public onlyOwner { } function setMaxPerWallet(uint256 _limit) public onlyOwner { } function setmaxpertx(uint256 _maxpertx) public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setMaxsupply(uint256 _newsupply) public onlyOwner { } function setfreesupply(uint256 _newsupply) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner nonReentrant { } } //special thanks to Daniel @Hashlips and FazelPejmanfar @Pejmanfarfazel
supply+tokens<=freesupply,"TIME TO DEGEN ON SECONDARY"
421,856
supply+tokens<=freesupply
"Trade Enabled!"
/* Tg: https://t.me/W_GROK Website: wrappedgrok-erc.com/ Twitter: www.x.com/wrapped_grok */ //SPDX-License-Identifier: MIT pragma solidity ^0.8.22; //GAS OPTIMIZED ERROR MESSAGES error ERC20InvalidSender(address sender); error ERC20InvalidReceiver(address receiver); error ERC20InvalidApprover(address approver); error ERC20InvalidSpender(address spender); error ERC20TransferFailed(); error ERC20ZeroTransfer(); error PaymentFailed(); abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address _account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } 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() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface IDexSwapFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDexSwapRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract WGROK is Context, IERC20, Ownable { using SafeMath for uint256; string private _name = "Wrapped Grok"; string private _symbol = "WGROK"; uint8 private _decimals = 9; uint256 public buyTax; uint256 public sellTax; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public isExcludedFromFee; mapping (address => bool) public isMarketPair; mapping (address => bool) public isWalletLimitExempt; mapping (address => bool) public isTxLimitExempt; mapping (address => bool) public isWlAddress; uint256 private _totalSupply = 1_000_000_000 * 10**_decimals; uint256 public _maxTxAmount = _totalSupply.mul(1).div(100); uint256 public _walletMax = _totalSupply.mul(1).div(50); uint256 public swapThreshold = _totalSupply.mul(1).div(100); address public marketingWallet; bool public swapEnabled = true; bool public swapbylimit = true; bool public EnableTxLimit = true; bool public EnableWalletLimit = true; IDexSwapRouter public dexRouter; address public dexPair; bool public tradingEnable; bool public transferSniperProtection; bool inSwap; modifier swapping() { } event SwapTokensForETH( uint256 amountIn, address[] path ); constructor() { } // BoredFrogsERC-721 function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } //to recieve ETH from Router when swaping receive() external payable {} function transfer(address recipient, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) private returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function shouldNotTakeFee(address sender, address recipient) internal view returns (bool) { } function takeFee(address sender, address recipient, uint256 amount) internal returns (uint256) { } function swapBack(uint contractBalance) internal swapping { } function enableTrading() external onlyOwner { require(<FILL_ME>) tradingEnable = true; } function swapTokensForEth(uint256 tokenAmount) private { } function rescueFunds() external { } function rescueTokens(address _token,uint _amount) external { } function setBuyFee(uint _buySide, uint _sellSide) external onlyOwner { } function removeLimits() external onlyOwner { } function transferProtection(bool _status) external onlyOwner { } function updateSetting(address[] calldata _adr, bool _status) external onlyOwner { } function excludeFromFee(address _adr,bool _status) external onlyOwner { } function excludeWalletLimit(address _adr,bool _status) external onlyOwner { } function excludeTxLimit(address _adr,bool _status) external onlyOwner { } function setMaxWalletLimit(uint256 newLimit) external onlyOwner() { } function setTxLimit(uint256 newLimit) external onlyOwner() { } function setMarketingWallet(address _newWallet) external onlyOwner { } function setSwapBackSettings(uint _threshold, bool _enabled, bool _limited) external onlyOwner { } // BoredFrogsERC-721 }
!tradingEnable,"Trade Enabled!"
422,261
!tradingEnable
"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"; import { Initializable } from "@openzeppelin/contracts/proxy/utils/Initializable.sol"; // Libs import { InitializableReentrancyGuard } from "../../shared/InitializableReentrancyGuard.sol"; import { ImmutableModule } from "../../shared/ImmutableModule.sol"; import { ICowSettlement } from "../../peripheral/Cowswap/ICowSettlement.sol"; import { CowSwapSeller } from "../../peripheral/Cowswap/CowSwapSeller.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 CowSwapSeller, ImmutableModule, IDexAsyncSwap { using SafeERC20 for IERC20; /** * @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 ) CowSwapSeller(_relayer, _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, uint256 fromAssetFeeAmount, address receiver, bool onlySign) = abi .decode(swapData.data, (bytes, uint256, address, bool)); if (!onlySign) { uint256 fromAssetTotalAmount = swapData.fromAssetAmount + fromAssetFeeAmount; // transfer in the fromAsset require(<FILL_ME>) IERC20(swapData.fromAsset).safeTransferFrom( msg.sender, address(this), fromAssetTotalAmount ); } CowSwapData memory orderData = CowSwapData({ fromAsset: swapData.fromAsset, toAsset: swapData.toAsset, receiver: receiver, fromAssetAmount: swapData.fromAssetAmount, fromAssetFeeAmount: fromAssetFeeAmount }); _initiateCowswapOrder(orderUid, orderData); } /** * @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 initiateSwap(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 cancelSwap(bytes[] calldata orderUids) external onlyKeeperOrLiquidator { } /** * @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)>=fromAssetTotalAmount,"not enough from assets"
422,339
IERC20(swapData.fromAsset).balanceOf(msg.sender)>=fromAssetTotalAmount
null
//SPDX-License-Identifier: MIT pragma solidity =0.8.9; contract MILK is ERC20, Ownable { uint256 constant DECIMAL_POINTS = 10000; uint256 public developmentTax; address public development; uint256 public maxPerWallet; address public router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //uniswap router address uint256 public slippage = 200; uint256 private _feesOnContract; mapping(address => bool) public blacklist; mapping(address => bool) public whitelist; error Blacklisted(); error InvalidAddress(); error TransferLimitExceeded(); event RouterUpdated(address router); event developmentUpdated(address development); event developmentTaxUpdated(uint256 developmentTax); event SlippageUpdated(uint256 slippage); event MaxPerWalletUpdated(uint256 maxPerWallet); constructor( uint256 _developmentTax, address _development, uint256 _maxPerWallet ) ERC20("Milk Supremacy", "MILK") { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function _checkValidTransfer(address _to, uint256 _amount) private view { } function _getFactory() private view returns (address) { } function _getWETH() private view returns (address) { } function _getPair(address _tokenA, address _tokenB) private view returns (address) { } function _getPath(address _tokenA, address _tokenB) private view returns (address[] memory) { } function _swap( uint256 _amountIn, address[] memory _path, address _to ) private { } function updateRouter(address _router) external onlyOwner { } function updatedevelopment(address _development) external onlyOwner { } function updatedevelopmentTax(uint256 _developmentTax) external onlyOwner { } function updateMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } function updateSlippage(uint256 _slippage) external onlyOwner { } function addBlacklist(address _account) external onlyOwner { require(<FILL_ME>) blacklist[_account] = true; } function removeBlacklist(address _account) external onlyOwner { } function addWhitelist(address _account) external onlyOwner { } function removeWhitelist(address _account) external onlyOwner { } }
!blacklist[_account]
422,491
!blacklist[_account]
null
//SPDX-License-Identifier: MIT pragma solidity =0.8.9; contract MILK is ERC20, Ownable { uint256 constant DECIMAL_POINTS = 10000; uint256 public developmentTax; address public development; uint256 public maxPerWallet; address public router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //uniswap router address uint256 public slippage = 200; uint256 private _feesOnContract; mapping(address => bool) public blacklist; mapping(address => bool) public whitelist; error Blacklisted(); error InvalidAddress(); error TransferLimitExceeded(); event RouterUpdated(address router); event developmentUpdated(address development); event developmentTaxUpdated(uint256 developmentTax); event SlippageUpdated(uint256 slippage); event MaxPerWalletUpdated(uint256 maxPerWallet); constructor( uint256 _developmentTax, address _development, uint256 _maxPerWallet ) ERC20("Milk Supremacy", "MILK") { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function _checkValidTransfer(address _to, uint256 _amount) private view { } function _getFactory() private view returns (address) { } function _getWETH() private view returns (address) { } function _getPair(address _tokenA, address _tokenB) private view returns (address) { } function _getPath(address _tokenA, address _tokenB) private view returns (address[] memory) { } function _swap( uint256 _amountIn, address[] memory _path, address _to ) private { } function updateRouter(address _router) external onlyOwner { } function updatedevelopment(address _development) external onlyOwner { } function updatedevelopmentTax(uint256 _developmentTax) external onlyOwner { } function updateMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } function updateSlippage(uint256 _slippage) external onlyOwner { } function addBlacklist(address _account) external onlyOwner { } function removeBlacklist(address _account) external onlyOwner { require(<FILL_ME>) blacklist[_account] = false; } function addWhitelist(address _account) external onlyOwner { } function removeWhitelist(address _account) external onlyOwner { } }
blacklist[_account]
422,491
blacklist[_account]
null
//SPDX-License-Identifier: MIT pragma solidity =0.8.9; contract MILK is ERC20, Ownable { uint256 constant DECIMAL_POINTS = 10000; uint256 public developmentTax; address public development; uint256 public maxPerWallet; address public router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //uniswap router address uint256 public slippage = 200; uint256 private _feesOnContract; mapping(address => bool) public blacklist; mapping(address => bool) public whitelist; error Blacklisted(); error InvalidAddress(); error TransferLimitExceeded(); event RouterUpdated(address router); event developmentUpdated(address development); event developmentTaxUpdated(uint256 developmentTax); event SlippageUpdated(uint256 slippage); event MaxPerWalletUpdated(uint256 maxPerWallet); constructor( uint256 _developmentTax, address _development, uint256 _maxPerWallet ) ERC20("Milk Supremacy", "MILK") { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function _checkValidTransfer(address _to, uint256 _amount) private view { } function _getFactory() private view returns (address) { } function _getWETH() private view returns (address) { } function _getPair(address _tokenA, address _tokenB) private view returns (address) { } function _getPath(address _tokenA, address _tokenB) private view returns (address[] memory) { } function _swap( uint256 _amountIn, address[] memory _path, address _to ) private { } function updateRouter(address _router) external onlyOwner { } function updatedevelopment(address _development) external onlyOwner { } function updatedevelopmentTax(uint256 _developmentTax) external onlyOwner { } function updateMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } function updateSlippage(uint256 _slippage) external onlyOwner { } function addBlacklist(address _account) external onlyOwner { } function removeBlacklist(address _account) external onlyOwner { } function addWhitelist(address _account) external onlyOwner { require(<FILL_ME>) whitelist[_account] = true; } function removeWhitelist(address _account) external onlyOwner { } }
!whitelist[_account]
422,491
!whitelist[_account]
null
//SPDX-License-Identifier: MIT pragma solidity =0.8.9; contract MILK is ERC20, Ownable { uint256 constant DECIMAL_POINTS = 10000; uint256 public developmentTax; address public development; uint256 public maxPerWallet; address public router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; //uniswap router address uint256 public slippage = 200; uint256 private _feesOnContract; mapping(address => bool) public blacklist; mapping(address => bool) public whitelist; error Blacklisted(); error InvalidAddress(); error TransferLimitExceeded(); event RouterUpdated(address router); event developmentUpdated(address development); event developmentTaxUpdated(uint256 developmentTax); event SlippageUpdated(uint256 slippage); event MaxPerWalletUpdated(uint256 maxPerWallet); constructor( uint256 _developmentTax, address _development, uint256 _maxPerWallet ) ERC20("Milk Supremacy", "MILK") { } function _transfer( address _from, address _to, uint256 _amount ) internal virtual override { } function _checkValidTransfer(address _to, uint256 _amount) private view { } function _getFactory() private view returns (address) { } function _getWETH() private view returns (address) { } function _getPair(address _tokenA, address _tokenB) private view returns (address) { } function _getPath(address _tokenA, address _tokenB) private view returns (address[] memory) { } function _swap( uint256 _amountIn, address[] memory _path, address _to ) private { } function updateRouter(address _router) external onlyOwner { } function updatedevelopment(address _development) external onlyOwner { } function updatedevelopmentTax(uint256 _developmentTax) external onlyOwner { } function updateMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } function updateSlippage(uint256 _slippage) external onlyOwner { } function addBlacklist(address _account) external onlyOwner { } function removeBlacklist(address _account) external onlyOwner { } function addWhitelist(address _account) external onlyOwner { } function removeWhitelist(address _account) external onlyOwner { require(<FILL_ME>) whitelist[_account] = false; } }
whitelist[_account]
422,491
whitelist[_account]
"You are not the owner of this NFT"
pragma solidity ^0.8.10; contract NFTStaking is Ownable, ERC721Holder { using SafeMath for uint256; //Interface for ERC20 and ERC721 IERC20 public rewardsTokenContract; // $shibanon token contract address IERC721 public nftContract; // ShibAnon Collection contract address uint256 public rewardsPerDay = 100; // 100 tokens per day uint256 public rewardsPeriod = 3 * 86400; // 3 day uint256 private dayUnit = 1 * 86400; // 1 day = 86400s mapping(address => mapping(uint256 => Staker)) public stakers; mapping(address => uint256[]) public stakedNFTs; mapping(address => uint256) public stakedNFTAmounts; struct Staker { uint256 stakedAt; uint256 claimedAt; uint256 tokenId; bool staked; } // pause status of the contract bool public paused; uint256 public totalStaked = 0; uint256 public totalRewards = 0; constructor() { } receive() external payable {} //receiving eth in contract function stakeNFT(uint256 _tokenId) public { require(!paused, "Staking is paused"); require(<FILL_ME>) require(!stakers[msg.sender][_tokenId].staked, "This NFT is already staked in this contract"); nftContract.safeTransferFrom(msg.sender, address(this), _tokenId); stakers[msg.sender][_tokenId].stakedAt = block.timestamp; stakers[msg.sender][_tokenId].tokenId = _tokenId; stakers[msg.sender][_tokenId].staked = true; stakers[msg.sender][_tokenId].claimedAt = block.timestamp; stakedNFTs[msg.sender].push(_tokenId); stakedNFTAmounts[msg.sender] = stakedNFTAmounts[msg.sender].add(1); totalStaked = totalStaked.add(1); } function unStakeNFT(uint256 _tokenId) public { } function claimTokenReward() public { } function getClaimableAmount(address _staker) public view returns (uint256) { } function stakeOfOwner(address _owner) public view returns (uint256[] memory) { } ///////////////////////////////////////////////////////////////////////////////////// ///////////////// Ownable functions ///////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// function changeDailyReward(uint256 _newReward) public onlyOwner { } function PauseStaking() public onlyOwner { } function unPauseStaking() public onlyOwner { } function changeNFTContract(address _newNFTContract) public onlyOwner { } function changeTokenContract(address _newTokenContract) public onlyOwner { } function changeRewardsPeriod(uint256 _newRewardsPeriod) public onlyOwner { } function withdrawToken() public onlyOwner { } function withdrawNFT(uint256 _tokenId) public onlyOwner { } function withdraw() external onlyOwner { } }
nftContract.ownerOf(_tokenId)==msg.sender,"You are not the owner of this NFT"
422,552
nftContract.ownerOf(_tokenId)==msg.sender
"This NFT is already staked in this contract"
pragma solidity ^0.8.10; contract NFTStaking is Ownable, ERC721Holder { using SafeMath for uint256; //Interface for ERC20 and ERC721 IERC20 public rewardsTokenContract; // $shibanon token contract address IERC721 public nftContract; // ShibAnon Collection contract address uint256 public rewardsPerDay = 100; // 100 tokens per day uint256 public rewardsPeriod = 3 * 86400; // 3 day uint256 private dayUnit = 1 * 86400; // 1 day = 86400s mapping(address => mapping(uint256 => Staker)) public stakers; mapping(address => uint256[]) public stakedNFTs; mapping(address => uint256) public stakedNFTAmounts; struct Staker { uint256 stakedAt; uint256 claimedAt; uint256 tokenId; bool staked; } // pause status of the contract bool public paused; uint256 public totalStaked = 0; uint256 public totalRewards = 0; constructor() { } receive() external payable {} //receiving eth in contract function stakeNFT(uint256 _tokenId) public { require(!paused, "Staking is paused"); require(nftContract.ownerOf(_tokenId) == msg.sender, "You are not the owner of this NFT"); require(<FILL_ME>) nftContract.safeTransferFrom(msg.sender, address(this), _tokenId); stakers[msg.sender][_tokenId].stakedAt = block.timestamp; stakers[msg.sender][_tokenId].tokenId = _tokenId; stakers[msg.sender][_tokenId].staked = true; stakers[msg.sender][_tokenId].claimedAt = block.timestamp; stakedNFTs[msg.sender].push(_tokenId); stakedNFTAmounts[msg.sender] = stakedNFTAmounts[msg.sender].add(1); totalStaked = totalStaked.add(1); } function unStakeNFT(uint256 _tokenId) public { } function claimTokenReward() public { } function getClaimableAmount(address _staker) public view returns (uint256) { } function stakeOfOwner(address _owner) public view returns (uint256[] memory) { } ///////////////////////////////////////////////////////////////////////////////////// ///////////////// Ownable functions ///////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// function changeDailyReward(uint256 _newReward) public onlyOwner { } function PauseStaking() public onlyOwner { } function unPauseStaking() public onlyOwner { } function changeNFTContract(address _newNFTContract) public onlyOwner { } function changeTokenContract(address _newTokenContract) public onlyOwner { } function changeRewardsPeriod(uint256 _newRewardsPeriod) public onlyOwner { } function withdrawToken() public onlyOwner { } function withdrawNFT(uint256 _tokenId) public onlyOwner { } function withdraw() external onlyOwner { } }
!stakers[msg.sender][_tokenId].staked,"This NFT is already staked in this contract"
422,552
!stakers[msg.sender][_tokenId].staked
"This NFT is not staked in this contract"
pragma solidity ^0.8.10; contract NFTStaking is Ownable, ERC721Holder { using SafeMath for uint256; //Interface for ERC20 and ERC721 IERC20 public rewardsTokenContract; // $shibanon token contract address IERC721 public nftContract; // ShibAnon Collection contract address uint256 public rewardsPerDay = 100; // 100 tokens per day uint256 public rewardsPeriod = 3 * 86400; // 3 day uint256 private dayUnit = 1 * 86400; // 1 day = 86400s mapping(address => mapping(uint256 => Staker)) public stakers; mapping(address => uint256[]) public stakedNFTs; mapping(address => uint256) public stakedNFTAmounts; struct Staker { uint256 stakedAt; uint256 claimedAt; uint256 tokenId; bool staked; } // pause status of the contract bool public paused; uint256 public totalStaked = 0; uint256 public totalRewards = 0; constructor() { } receive() external payable {} //receiving eth in contract function stakeNFT(uint256 _tokenId) public { } function unStakeNFT(uint256 _tokenId) public { require(!paused, "Staking is paused"); require(<FILL_ME>) require(stakers[msg.sender][_tokenId].staked, "This NFT is not staked by this address"); nftContract.safeTransferFrom(address(this), msg.sender, _tokenId); stakers[msg.sender][_tokenId] = Staker(0, 0, 0, false); for (uint256 i = 0; i < stakedNFTs[msg.sender].length; i++) { if (stakedNFTs[msg.sender][i] == _tokenId) { stakedNFTs[msg.sender][i] = stakedNFTs[msg.sender][stakedNFTs[msg.sender].length - 1]; stakedNFTs[msg.sender].pop(); break; } } stakedNFTAmounts[msg.sender] = stakedNFTAmounts[msg.sender].sub(1); totalStaked = totalStaked.sub(1); } function claimTokenReward() public { } function getClaimableAmount(address _staker) public view returns (uint256) { } function stakeOfOwner(address _owner) public view returns (uint256[] memory) { } ///////////////////////////////////////////////////////////////////////////////////// ///////////////// Ownable functions ///////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// function changeDailyReward(uint256 _newReward) public onlyOwner { } function PauseStaking() public onlyOwner { } function unPauseStaking() public onlyOwner { } function changeNFTContract(address _newNFTContract) public onlyOwner { } function changeTokenContract(address _newTokenContract) public onlyOwner { } function changeRewardsPeriod(uint256 _newRewardsPeriod) public onlyOwner { } function withdrawToken() public onlyOwner { } function withdrawNFT(uint256 _tokenId) public onlyOwner { } function withdraw() external onlyOwner { } }
nftContract.ownerOf(_tokenId)==address(this),"This NFT is not staked in this contract"
422,552
nftContract.ownerOf(_tokenId)==address(this)
"This NFT is not staked by this address"
pragma solidity ^0.8.10; contract NFTStaking is Ownable, ERC721Holder { using SafeMath for uint256; //Interface for ERC20 and ERC721 IERC20 public rewardsTokenContract; // $shibanon token contract address IERC721 public nftContract; // ShibAnon Collection contract address uint256 public rewardsPerDay = 100; // 100 tokens per day uint256 public rewardsPeriod = 3 * 86400; // 3 day uint256 private dayUnit = 1 * 86400; // 1 day = 86400s mapping(address => mapping(uint256 => Staker)) public stakers; mapping(address => uint256[]) public stakedNFTs; mapping(address => uint256) public stakedNFTAmounts; struct Staker { uint256 stakedAt; uint256 claimedAt; uint256 tokenId; bool staked; } // pause status of the contract bool public paused; uint256 public totalStaked = 0; uint256 public totalRewards = 0; constructor() { } receive() external payable {} //receiving eth in contract function stakeNFT(uint256 _tokenId) public { } function unStakeNFT(uint256 _tokenId) public { require(!paused, "Staking is paused"); require(nftContract.ownerOf(_tokenId) == address(this), "This NFT is not staked in this contract"); require(<FILL_ME>) nftContract.safeTransferFrom(address(this), msg.sender, _tokenId); stakers[msg.sender][_tokenId] = Staker(0, 0, 0, false); for (uint256 i = 0; i < stakedNFTs[msg.sender].length; i++) { if (stakedNFTs[msg.sender][i] == _tokenId) { stakedNFTs[msg.sender][i] = stakedNFTs[msg.sender][stakedNFTs[msg.sender].length - 1]; stakedNFTs[msg.sender].pop(); break; } } stakedNFTAmounts[msg.sender] = stakedNFTAmounts[msg.sender].sub(1); totalStaked = totalStaked.sub(1); } function claimTokenReward() public { } function getClaimableAmount(address _staker) public view returns (uint256) { } function stakeOfOwner(address _owner) public view returns (uint256[] memory) { } ///////////////////////////////////////////////////////////////////////////////////// ///////////////// Ownable functions ///////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// function changeDailyReward(uint256 _newReward) public onlyOwner { } function PauseStaking() public onlyOwner { } function unPauseStaking() public onlyOwner { } function changeNFTContract(address _newNFTContract) public onlyOwner { } function changeTokenContract(address _newTokenContract) public onlyOwner { } function changeRewardsPeriod(uint256 _newRewardsPeriod) public onlyOwner { } function withdrawToken() public onlyOwner { } function withdrawNFT(uint256 _tokenId) public onlyOwner { } function withdraw() external onlyOwner { } }
stakers[msg.sender][_tokenId].staked,"This NFT is not staked by this address"
422,552
stakers[msg.sender][_tokenId].staked
"You are not staking any NFT"
pragma solidity ^0.8.10; contract NFTStaking is Ownable, ERC721Holder { using SafeMath for uint256; //Interface for ERC20 and ERC721 IERC20 public rewardsTokenContract; // $shibanon token contract address IERC721 public nftContract; // ShibAnon Collection contract address uint256 public rewardsPerDay = 100; // 100 tokens per day uint256 public rewardsPeriod = 3 * 86400; // 3 day uint256 private dayUnit = 1 * 86400; // 1 day = 86400s mapping(address => mapping(uint256 => Staker)) public stakers; mapping(address => uint256[]) public stakedNFTs; mapping(address => uint256) public stakedNFTAmounts; struct Staker { uint256 stakedAt; uint256 claimedAt; uint256 tokenId; bool staked; } // pause status of the contract bool public paused; uint256 public totalStaked = 0; uint256 public totalRewards = 0; constructor() { } receive() external payable {} //receiving eth in contract function stakeNFT(uint256 _tokenId) public { } function unStakeNFT(uint256 _tokenId) public { } function claimTokenReward() public { require(!paused, "Staking is paused"); require(<FILL_ME>) uint256 totalClaimableAmount = 0; for (uint256 i = 0; i < stakedNFTs[msg.sender].length; i++) { if (stakers[msg.sender][stakedNFTs[msg.sender][i]].claimedAt.add(rewardsPeriod) < block.timestamp) { uint256 claimableDays = (block.timestamp.sub(stakers[msg.sender][stakedNFTs[msg.sender][i]].claimedAt)).div(dayUnit); uint256 claimableAmount = claimableDays.mul(rewardsPerDay).mul(10 ** 18); stakers[msg.sender][stakedNFTs[msg.sender][i]].claimedAt += claimableDays.mul(dayUnit); totalClaimableAmount = totalClaimableAmount.add(claimableAmount); } } rewardsTokenContract.transfer(msg.sender, totalClaimableAmount); totalRewards = totalRewards.add(totalClaimableAmount); } function getClaimableAmount(address _staker) public view returns (uint256) { } function stakeOfOwner(address _owner) public view returns (uint256[] memory) { } ///////////////////////////////////////////////////////////////////////////////////// ///////////////// Ownable functions ///////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////// function changeDailyReward(uint256 _newReward) public onlyOwner { } function PauseStaking() public onlyOwner { } function unPauseStaking() public onlyOwner { } function changeNFTContract(address _newNFTContract) public onlyOwner { } function changeTokenContract(address _newTokenContract) public onlyOwner { } function changeRewardsPeriod(uint256 _newRewardsPeriod) public onlyOwner { } function withdrawToken() public onlyOwner { } function withdrawNFT(uint256 _tokenId) public onlyOwner { } function withdraw() external onlyOwner { } }
stakedNFTs[msg.sender].length>0,"You are not staking any NFT"
422,552
stakedNFTs[msg.sender].length>0
"LP is already created"
/* /$$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$$ /$$$$$$ | $$$ | $$|_ $$_/| $$ /$$/| $$_____/ /$$__ $$| $$$$| $$ | $$ | $$ /$$/ | $$ | $$ \__/| $$ $$ $$ | $$ | $$$$$/ | $$$$$ | $$$$$$ | $$ $$$$ | $$ | $$ $$ | $$__/ \____ $$| $$\ $$$ | $$ | $$\ $$ | $$ /$$ \ $$| $$ \ $$ /$$$$$$| $$ \ $$| $$$$$$$$ | $$$$$$/|__/ \__/|______/|__/ \__/|________/ \_ $$_/ \__/ Website: https://www.nikeeths.com/ Twitter: https://twitter.com/nike_eths Telegram: https://t.me/nikeethsportal */ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract NIKE is Context, IERC20, Ownable { string private constant _name = unicode"Air Max 90"; string private constant _symbol = unicode"NIKE"; using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; address payable private _marketingWallet; uint256 firstBlock; uint256 private _initialBuyTax = 20; uint256 private _initialSellTax = 20; uint256 private _finalBuyTax = 1; uint256 private _finalSellTax = 1; uint256 private _reduceBuyTaxAt = 50; uint256 private _reduceSellTaxAt = 50; uint256 private _preventSwapBefore = 50; uint256 public _buyCount = 0; uint8 private constant _decimals = 9; uint256 private constant _tTotal = 100000000 * 10 ** _decimals; uint256 public _maxTxAmount = 500000 * 10 ** _decimals; uint256 public _maxWalletSize = 500000 * 10 ** _decimals; uint256 public _taxSwapThreshold = 10000 * 10 ** _decimals; uint256 public _maxTaxSwap = 250000 * 10 ** _decimals; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private LPcreated; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = false; bool private isFinalLimitsSet = false; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function min(uint256 a, uint256 b) private pure returns (uint256){ } function setExcludedFromFee(address account, bool excluded) external onlyOwner { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function _setFinalMaxLimits() private { } function createLP() external onlyOwner() { require(<FILL_ME>) require(!tradingOpen, "Trading is already open"); uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _isExcludedFromFee[uniswapV2Pair] = true; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this), balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); LPcreated = true; } function openTrading() external onlyOwner { } receive() external payable {} }
!LPcreated,"LP is already created"
422,603
!LPcreated
"ReserveNFT: NFTs already claimed."
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./helpers/ERC2981ContractWideRoyalties.sol"; import "./helpers/IShopXReserveNFT.sol"; contract ShopXReserveNFT is ERC721A, Ownable, ERC2981ContractWideRoyalties, AccessControl, Pausable { bytes32 public merkleRoot; address public factory; mapping(address => uint256) private claimed; string private brand; // Brand Name // ERC721 string private baseURI;// Include '/' at the end. ex) www.shopx.co/nft/ uint256 public maxSupply; // Maximum supply of NFT uint256 public mintPrice; // Price in ETH required to mint NFTs (in wei) uint256 public mintLimitPerWallet; // EIP2981 // value percentage (using 2 decimals: 10000 = 100.00%, 0 = 0.00%) // shopxFee value (between 0 and 10000) uint256 public royaltyValue; address public royaltyRecipient; // SHOPX Settings // value percentage (using 2 decimals: 10000 = 100.00%, 0 = 0.00%) // shopxFee value (between 0 and 10000) address public shopxAddress; uint256 public shopxFee; // Brand Settings address public beneficiaryAddress; // Access Control - Admin Roles bytes32 public constant SHOPX_ADMIN = keccak256("SHOPX"); bytes32 public constant BRAND_ADMIN = keccak256("BRAND"); bytes32 public constant SALE_ADMIN = keccak256("SALE"); // Events event NFTClaim(address indexed _claimant, uint256 indexed _tokenId, uint256 _mintPrice); event PriceChange(uint _mintPrice); event MerkleRootChange(bytes32 indexed merkleRoot); event ShopxAddressUpdate(address indexed _shopxAddress); event BeneficiaryAddressUpdate(address indexed _beneficiaryAddress); /* // Constructor() string memory _name, string memory _symbol, string memory _brand, // Initializer() // ERC721 string memory _baseURI, uint256 _maxSupply, uint256 _mintPrice, uint256 _mintLimitPerWallet, // EIP2981 //address _royaltyRecipient, //uint256 _royaltyValue, // SHOPX Settings //address _shopxAddress, //uint256 _shopxFee, // Brand Settings //address _beneficiaryAddress, // Grouping arguments to avoid stack too deep (too many arguments) error _uintArgs[0]: _maxSupply _uintArgs[1]: _mintPrice _uintArgs[2]: _mintLimitPerWallet _uintArgs[3]: _royaltyValue _addressArgs[0]: _royaltyRecipient _addressArgs[1]: _beneficiaryAddress */ constructor ( string memory _name, string memory _symbol, string memory _brand ) ERC721A(_name, _symbol) { } // called once by the factory at time of deployment function initialize( address _owner, string memory _baseURI, uint256[4] memory _uintArgs, address[2] memory _addressArgs, address[] memory _brandAdmins, address[] memory _saleAdmins, uint256 _shopxFee, address _shopxAddress, address[] memory _shopxAdmins ) external { } /** * @notice Fails on calls with no `msg.data` but with `msg.value` */ receive() external payable { } // ----------------------------------------------------------------------- // SETTERS // ----------------------------------------------------------------------- function updateShopxAddress (address _shopxAddress) onlyRole(SHOPX_ADMIN) external { } function updateBeneficiaryAddress (address _beneficiaryAddress) onlyRole(BRAND_ADMIN) external { } /** * @dev Sets the merkle root. * @param _merkleRoot The merkle root to set. */ //addToAllowList function setMerkleRoot(bytes32 _merkleRoot) external onlyRole(SALE_ADMIN) { } function setMintPrice(uint256 _mintPrice) onlyRole(SALE_ADMIN) external { } // Grand and Revoke Admin Roles function addAdmin(bytes32 _role, address _address) onlyRole(_role) external { } function removeAdmin(bytes32 _role, address _address) onlyRole(_role) external { } /** * @dev function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */ function setBaseURI(string memory _baseURI) onlyRole(SALE_ADMIN) external { } function pause() onlyRole(SALE_ADMIN) external { } function unpause() onlyRole(SALE_ADMIN) external { } // ----------------------------------------------------------------------- // GETTERS // ----------------------------------------------------------------------- /** * @dev Returns the number of NFTs that has been claimed by an address so far. * @param _address The address to check. */ function getClaimed(address _address) public view returns (uint256) { } /** * @dev Returns the balance of the fund */ function getBalance() public view returns(uint) { } function exists(uint256 tokenId) public view returns (bool) { } /** * @dev Returns the name of brand */ function getBrand() public view returns(string memory) { } /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a prefix in {tokenURI} to each token's URI, or * to the token ID if no specific URI is set for that token ID. */ function getBaseURI() public view returns (string memory) { } /** * @dev totalMintedSupply():Returns the total tokens minted so far. * 1 is always subtracted from the Counter since it tracks the next available tokenId. * * @dev Note. totalSupply() is the count of valid NFTs tracked by this contract, where each one of * them has an assigned and queryable owner not equal to the zero address * totalSupply(): NFTs minted so far - NFTs burned so far (totalCirculatingSupply) * ref: https://eips.ethereum.org/EIPS/eip-721 * See {IERC721Enumerable-totalSupply} */ function totalMintedSupply() public view returns (uint256) { } function getShopXFee() public view returns (uint256) { } /** * @dev Gets info about line nft */ function getInfo() public view returns ( uint256 _balance, uint256 _maxSupply, uint256 _totalSupply, uint256 _totalMintedSupply, uint256 _mintPrice, uint256 _mintLimitPerWallet, bool _paused, address _royaltyRecipient, address _shopxAddress, address _beneficiaryAddress, uint256 _royaltyValue, uint256 _shopxFee ) { } // ----------------------------------------------------------------------- // Royalties // ----------------------------------------------------------------------- /// @inheritdoc ERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981Base, AccessControl) returns (bool) { } /// @notice Allows to set the royalties on the contract /// @dev This function in a real contract should be protected with a onlyOwner (or equivalent) modifier /// @param recipient the royalties recipient function updateRoyaltyAddress(address recipient) onlyRole(BRAND_ADMIN) external { } // ----------------------------------------------------------------------- // NFT // ----------------------------------------------------------------------- /** * @dev Mints a token to the msg.sender. It consumes whitelisted supplies. */ function mint(bytes32[] calldata merkleProof, uint256 quantity) payable external whenNotPaused { require(totalSupply() + quantity <= maxSupply, "NotEnoughNFT: NFT supply not available"); require(<FILL_ME>) require(msg.value == mintPrice * quantity, "WrongETHAmount: More or less than the required amount of ETH sent."); require (merkleRoot == bytes32(0) || MerkleProof.verify(merkleProof, merkleRoot, keccak256(abi.encodePacked(msg.sender))), "ReserveNFT: Invalid Proof. Valid proof required."); // Mark it claimed and send the NFT claimed[msg.sender] += quantity; // Mint _safeMint(msg.sender, quantity); for (uint i = 0; i < quantity; i++) { emit NFTClaim(msg.sender, _nextTokenId()-quantity+i, mintPrice); } // Fee payable(shopxAddress).transfer(this.getBalance()*shopxFee/10000); // Sweep payable(beneficiaryAddress).transfer(this.getBalance()); } /** * @dev Mints a token to an address with a tokenURI. * @param to address of the future owner of the token. */ function mintTo(address to, uint256 quantity) external whenNotPaused onlyRole(SALE_ADMIN) { } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external { } // ----------------------------------------------------------------------- // Helpers // ----------------------------------------------------------------------- /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual override returns (uint256) { } /** * @dev function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */ function _setBaseURI(string memory baseURI_) internal { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view override returns (string memory) { } }
claimed[msg.sender]+quantity<=mintLimitPerWallet,"ReserveNFT: NFTs already claimed."
422,604
claimed[msg.sender]+quantity<=mintLimitPerWallet
"Already claimed free mint."
// SPDX-License-Identifier: UNLICENSED /* __ __ __ __ __ __ ______ | \ / \| \ | \| \ / \| \ | $$\ / $$| $$ | $$| $$ / $$ \$$$$$$ | $$$\ / $$$| $$ | $$| $$/ $$ | $$ | $$$$\ $$$$| $$ | $$| $$ $$ | $$ | $$\$$ $$ $$| $$ | $$| $$$$$\ | $$ | $$ \$$$| $$| $$__/ $$| $$ \$$\ _| $$_ | $$ \$ | $$ \$$ $$| $$ \$$\| $$ \ \$$ \$$ \$$$$$$ \$$ \$$ \$$$$$$ */ pragma solidity ^0.8.10; import "./ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Muki is ERC721A, Ownable { bool public saleEnabled; uint256 public price; string public metadataBaseURL; uint256 public MAX_TXN = 10; uint256 public MAX_TXN_GLOBAL = 6666; uint256 public constant MAX_SUPPLY = 6666; mapping(address => bool) public freeClaims; constructor() ERC721A("Muki", "MUKI", MAX_TXN_GLOBAL) { } function setBaseURI(string memory baseURL) external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setMaxTxn(uint256 _maxTxn) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function withdraw() external onlyOwner { } function reserve(uint256 num) external onlyOwner { } function freeClaimCheck(address add) public view returns (bool) { } function mint(uint256 numOfTokens) external payable { } function freeMint(uint256 numOfTokens) external payable { require(<FILL_ME>) require(saleEnabled, "Sale must be active."); require(totalSupply() + numOfTokens <= MAX_SUPPLY, "Exceed max supply"); require(numOfTokens == 1, "Must mint 1 token"); freeClaims[msg.sender] = true; _safeMint(msg.sender, numOfTokens); } }
!freeClaims[msg.sender],"Already claimed free mint."
422,851
!freeClaims[msg.sender]
"NOT_WHITELISTED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } function max(uint256 a, uint256 b) internal pure returns (uint256) { } function min(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library EnumerableSet { struct Set { bytes32[] _values; mapping(bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { } function _remove(Set storage set, bytes32 value) private returns (bool) { } function _contains(Set storage set, bytes32 value) private view returns (bool) { } function _length(Set storage set) private view returns (uint256) { } function _at(Set storage set, uint256 index) private view returns (bytes32) { } function _values(Set storage set) private view returns (bytes32[] memory) { } // Bytes32Set struct Bytes32Set { Set _inner; } function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { } function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { } function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { } function length(Bytes32Set storage set) internal view returns (uint256) { } function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { } function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { } // AddressSet struct AddressSet { Set _inner; } function add(AddressSet storage set, address value) internal returns (bool) { } function remove(AddressSet storage set, address value) internal returns (bool) { } function contains(AddressSet storage set, address value) internal view returns (bool) { } function length(AddressSet storage set) internal view returns (uint256) { } function at(AddressSet storage set, uint256 index) internal view returns (address) { } function values(AddressSet storage set) internal view returns (address[] memory) { } // UintSet struct UintSet { Set _inner; } function add(UintSet storage set, uint256 value) internal returns (bool) { } function remove(UintSet storage set, uint256 value) internal returns (bool) { } function contains(UintSet storage set, uint256 value) internal view returns (bool) { } function length(UintSet storage set) internal view returns (uint256) { } function at(UintSet storage set, uint256 index) internal view returns (uint256) { } function values(UintSet storage set) internal view returns (uint256[] memory) { } } interface INFTFeeClaim { function depositRewards(address _nft, address _token, uint256 _amount) external; } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { 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; } interface IRewardsNFT { function totalSupply() external view returns (uint256); function remainingItems() external view returns (uint256); } interface ITokensRecoverable { function recoverTokens(IERC20 token) external; } contract Ownable { address public owner; modifier onlyOwner() { } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function transferOwnership(address newOwner) public onlyOwner { } } contract Whitelist is Ownable { mapping(address => bool) public whitelist; event WhitelistedAddressAdded(address addr); event WhitelistedAddressRemoved(address addr); modifier onlyWhitelisted() { require(<FILL_ME>) _; } function isWhitelisted(address addr) public view returns (bool whitelisted) { } function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) { } function addAddressesToWhitelist(address[] memory addrs) onlyOwner public returns(bool success) { } function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) { } function removeAddressesFromWhitelist(address[] memory addrs) onlyOwner public returns(bool success) { } } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } abstract contract TokensRecoverable is Whitelist, ITokensRecoverable { using SafeERC20 for IERC20; function recoverTokens(IERC20 token) public override onlyOwner { } function canRecoverTokens(IERC20 token) internal virtual view returns (bool) { } } contract RewardsDistributor is INFTFeeClaim, Whitelist, ReentrancyGuard, TokensRecoverable { using Address for address; using SafeMath for uint256; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.UintSet; using EnumerableSet for EnumerableSet.AddressSet; /////////////// // MODIFIERS // /////////////// modifier checkAuth(address _nft) { } ///////////// // STRUCTS // ///////////// struct Collection { address manager; EnumerableSet.UintSet ignoredItems; } ////////////// // MAPPINGS // ////////////// mapping(address => mapping(address => uint256)) private _claimableOf; mapping(address => Collection) private items; //////////////////////////// // CONSTRUCTOR & FALLBACK // //////////////////////////// constructor() { } ///////////////////// // WRITE FUNCTIONS // ///////////////////// // Claim any entitlements by token address function claimPayout(address _token) public nonReentrant { } //////////////////// // VIEW FUNCTIONS // //////////////////// // Get owner of an NFT item by id function getOwnerOf(address _nft, uint256 _id) public view returns (address) { } // Get claimable balance of a holder by token address function claimableOf(address _user, address _token) public view returns (uint256) { } // IGNORED ITEMS - Good to filter reward recipients by ID // Get ignored status by item id function isIgnoredItem(address _nft, uint itemId) public view returns (bool) { } // Get total ignored items by NFT function totalIgnoredItems(address _nft) public view returns (uint256) { } // Get ignored item of collection at index function ignoredItemAt(address _nft, uint256 index) public view returns (uint256) { } // GENERAL PURPOSE // Token recoverability status by address function canRecoverTokens(IERC20 _token) internal override view returns (bool) { } ////////////////////////// // RESTRICTED FUNCTIONS // ////////////////////////// // Deposit rewards in any token to any set of NFTs function depositRewards(address _nft, address _token, uint256 _amount) override public checkAuth(_nft) { } // (Single) Set ignored items by NFT and ID function setIgnoredItem(address _nft, uint itemId, bool add) checkAuth(_nft) public returns(bool success) { } // (Group) Set ignored items by NFT and ID function setIgnoredItems(address _nft, uint[] memory ids, bool add) checkAuth(_nft) public returns(bool success) { } ////////////////////////// // OWNER-ONLY FUNCTIONS // ////////////////////////// // Set manager of an NFT project function setManager(address _nft, address _manager) public onlyWhitelisted() { } //////////////////////// // INTERNAL FUNCTIONS // //////////////////////// // Calculate payouts function calculatePayouts(address _nft, address _token, uint256 _amount) internal { } }
whitelist[msg.sender]||msg.sender==owner,"NOT_WHITELISTED"
422,877
whitelist[msg.sender]||msg.sender==owner
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } function max(uint256 a, uint256 b) internal pure returns (uint256) { } function min(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library EnumerableSet { struct Set { bytes32[] _values; mapping(bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { } function _remove(Set storage set, bytes32 value) private returns (bool) { } function _contains(Set storage set, bytes32 value) private view returns (bool) { } function _length(Set storage set) private view returns (uint256) { } function _at(Set storage set, uint256 index) private view returns (bytes32) { } function _values(Set storage set) private view returns (bytes32[] memory) { } // Bytes32Set struct Bytes32Set { Set _inner; } function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { } function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { } function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { } function length(Bytes32Set storage set) internal view returns (uint256) { } function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { } function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { } // AddressSet struct AddressSet { Set _inner; } function add(AddressSet storage set, address value) internal returns (bool) { } function remove(AddressSet storage set, address value) internal returns (bool) { } function contains(AddressSet storage set, address value) internal view returns (bool) { } function length(AddressSet storage set) internal view returns (uint256) { } function at(AddressSet storage set, uint256 index) internal view returns (address) { } function values(AddressSet storage set) internal view returns (address[] memory) { } // UintSet struct UintSet { Set _inner; } function add(UintSet storage set, uint256 value) internal returns (bool) { } function remove(UintSet storage set, uint256 value) internal returns (bool) { } function contains(UintSet storage set, uint256 value) internal view returns (bool) { } function length(UintSet storage set) internal view returns (uint256) { } function at(UintSet storage set, uint256 index) internal view returns (uint256) { } function values(UintSet storage set) internal view returns (uint256[] memory) { } } interface INFTFeeClaim { function depositRewards(address _nft, address _token, uint256 _amount) external; } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { 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; } interface IRewardsNFT { function totalSupply() external view returns (uint256); function remainingItems() external view returns (uint256); } interface ITokensRecoverable { function recoverTokens(IERC20 token) external; } contract Ownable { address public owner; modifier onlyOwner() { } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function transferOwnership(address newOwner) public onlyOwner { } } contract Whitelist is Ownable { mapping(address => bool) public whitelist; event WhitelistedAddressAdded(address addr); event WhitelistedAddressRemoved(address addr); modifier onlyWhitelisted() { } function isWhitelisted(address addr) public view returns (bool whitelisted) { } function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) { } function addAddressesToWhitelist(address[] memory addrs) onlyOwner public returns(bool success) { } function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) { } function removeAddressesFromWhitelist(address[] memory addrs) onlyOwner public returns(bool success) { } } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } abstract contract TokensRecoverable is Whitelist, ITokensRecoverable { using SafeERC20 for IERC20; function recoverTokens(IERC20 token) public override onlyOwner { require(<FILL_ME>) token.safeTransfer(msg.sender, token.balanceOf(address(this))); } function canRecoverTokens(IERC20 token) internal virtual view returns (bool) { } } contract RewardsDistributor is INFTFeeClaim, Whitelist, ReentrancyGuard, TokensRecoverable { using Address for address; using SafeMath for uint256; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.UintSet; using EnumerableSet for EnumerableSet.AddressSet; /////////////// // MODIFIERS // /////////////// modifier checkAuth(address _nft) { } ///////////// // STRUCTS // ///////////// struct Collection { address manager; EnumerableSet.UintSet ignoredItems; } ////////////// // MAPPINGS // ////////////// mapping(address => mapping(address => uint256)) private _claimableOf; mapping(address => Collection) private items; //////////////////////////// // CONSTRUCTOR & FALLBACK // //////////////////////////// constructor() { } ///////////////////// // WRITE FUNCTIONS // ///////////////////// // Claim any entitlements by token address function claimPayout(address _token) public nonReentrant { } //////////////////// // VIEW FUNCTIONS // //////////////////// // Get owner of an NFT item by id function getOwnerOf(address _nft, uint256 _id) public view returns (address) { } // Get claimable balance of a holder by token address function claimableOf(address _user, address _token) public view returns (uint256) { } // IGNORED ITEMS - Good to filter reward recipients by ID // Get ignored status by item id function isIgnoredItem(address _nft, uint itemId) public view returns (bool) { } // Get total ignored items by NFT function totalIgnoredItems(address _nft) public view returns (uint256) { } // Get ignored item of collection at index function ignoredItemAt(address _nft, uint256 index) public view returns (uint256) { } // GENERAL PURPOSE // Token recoverability status by address function canRecoverTokens(IERC20 _token) internal override view returns (bool) { } ////////////////////////// // RESTRICTED FUNCTIONS // ////////////////////////// // Deposit rewards in any token to any set of NFTs function depositRewards(address _nft, address _token, uint256 _amount) override public checkAuth(_nft) { } // (Single) Set ignored items by NFT and ID function setIgnoredItem(address _nft, uint itemId, bool add) checkAuth(_nft) public returns(bool success) { } // (Group) Set ignored items by NFT and ID function setIgnoredItems(address _nft, uint[] memory ids, bool add) checkAuth(_nft) public returns(bool success) { } ////////////////////////// // OWNER-ONLY FUNCTIONS // ////////////////////////// // Set manager of an NFT project function setManager(address _nft, address _manager) public onlyWhitelisted() { } //////////////////////// // INTERNAL FUNCTIONS // //////////////////////// // Calculate payouts function calculatePayouts(address _nft, address _token, uint256 _amount) internal { } }
canRecoverTokens(token)
422,877
canRecoverTokens(token)
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) internal pure returns (bytes memory) { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } function max(uint256 a, uint256 b) internal pure returns (uint256) { } function min(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library EnumerableSet { struct Set { bytes32[] _values; mapping(bytes32 => uint256) _indexes; } function _add(Set storage set, bytes32 value) private returns (bool) { } function _remove(Set storage set, bytes32 value) private returns (bool) { } function _contains(Set storage set, bytes32 value) private view returns (bool) { } function _length(Set storage set) private view returns (uint256) { } function _at(Set storage set, uint256 index) private view returns (bytes32) { } function _values(Set storage set) private view returns (bytes32[] memory) { } // Bytes32Set struct Bytes32Set { Set _inner; } function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { } function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { } function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { } function length(Bytes32Set storage set) internal view returns (uint256) { } function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { } function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { } // AddressSet struct AddressSet { Set _inner; } function add(AddressSet storage set, address value) internal returns (bool) { } function remove(AddressSet storage set, address value) internal returns (bool) { } function contains(AddressSet storage set, address value) internal view returns (bool) { } function length(AddressSet storage set) internal view returns (uint256) { } function at(AddressSet storage set, uint256 index) internal view returns (address) { } function values(AddressSet storage set) internal view returns (address[] memory) { } // UintSet struct UintSet { Set _inner; } function add(UintSet storage set, uint256 value) internal returns (bool) { } function remove(UintSet storage set, uint256 value) internal returns (bool) { } function contains(UintSet storage set, uint256 value) internal view returns (bool) { } function length(UintSet storage set) internal view returns (uint256) { } function at(UintSet storage set, uint256 index) internal view returns (uint256) { } function values(UintSet storage set) internal view returns (uint256[] memory) { } } interface INFTFeeClaim { function depositRewards(address _nft, address _token, uint256 _amount) external; } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } interface IERC721 is IERC165 { 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; } interface IRewardsNFT { function totalSupply() external view returns (uint256); function remainingItems() external view returns (uint256); } interface ITokensRecoverable { function recoverTokens(IERC20 token) external; } contract Ownable { address public owner; modifier onlyOwner() { } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function transferOwnership(address newOwner) public onlyOwner { } } contract Whitelist is Ownable { mapping(address => bool) public whitelist; event WhitelistedAddressAdded(address addr); event WhitelistedAddressRemoved(address addr); modifier onlyWhitelisted() { } function isWhitelisted(address addr) public view returns (bool whitelisted) { } function addAddressToWhitelist(address addr) onlyOwner public returns(bool success) { } function addAddressesToWhitelist(address[] memory addrs) onlyOwner public returns(bool success) { } function removeAddressFromWhitelist(address addr) onlyOwner public returns(bool success) { } function removeAddressesFromWhitelist(address[] memory addrs) onlyOwner public returns(bool success) { } } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } abstract contract TokensRecoverable is Whitelist, ITokensRecoverable { using SafeERC20 for IERC20; function recoverTokens(IERC20 token) public override onlyOwner { } function canRecoverTokens(IERC20 token) internal virtual view returns (bool) { } } contract RewardsDistributor is INFTFeeClaim, Whitelist, ReentrancyGuard, TokensRecoverable { using Address for address; using SafeMath for uint256; using SafeERC20 for IERC20; using EnumerableSet for EnumerableSet.UintSet; using EnumerableSet for EnumerableSet.AddressSet; /////////////// // MODIFIERS // /////////////// modifier checkAuth(address _nft) { require(<FILL_ME>) _; } ///////////// // STRUCTS // ///////////// struct Collection { address manager; EnumerableSet.UintSet ignoredItems; } ////////////// // MAPPINGS // ////////////// mapping(address => mapping(address => uint256)) private _claimableOf; mapping(address => Collection) private items; //////////////////////////// // CONSTRUCTOR & FALLBACK // //////////////////////////// constructor() { } ///////////////////// // WRITE FUNCTIONS // ///////////////////// // Claim any entitlements by token address function claimPayout(address _token) public nonReentrant { } //////////////////// // VIEW FUNCTIONS // //////////////////// // Get owner of an NFT item by id function getOwnerOf(address _nft, uint256 _id) public view returns (address) { } // Get claimable balance of a holder by token address function claimableOf(address _user, address _token) public view returns (uint256) { } // IGNORED ITEMS - Good to filter reward recipients by ID // Get ignored status by item id function isIgnoredItem(address _nft, uint itemId) public view returns (bool) { } // Get total ignored items by NFT function totalIgnoredItems(address _nft) public view returns (uint256) { } // Get ignored item of collection at index function ignoredItemAt(address _nft, uint256 index) public view returns (uint256) { } // GENERAL PURPOSE // Token recoverability status by address function canRecoverTokens(IERC20 _token) internal override view returns (bool) { } ////////////////////////// // RESTRICTED FUNCTIONS // ////////////////////////// // Deposit rewards in any token to any set of NFTs function depositRewards(address _nft, address _token, uint256 _amount) override public checkAuth(_nft) { } // (Single) Set ignored items by NFT and ID function setIgnoredItem(address _nft, uint itemId, bool add) checkAuth(_nft) public returns(bool success) { } // (Group) Set ignored items by NFT and ID function setIgnoredItems(address _nft, uint[] memory ids, bool add) checkAuth(_nft) public returns(bool success) { } ////////////////////////// // OWNER-ONLY FUNCTIONS // ////////////////////////// // Set manager of an NFT project function setManager(address _nft, address _manager) public onlyWhitelisted() { } //////////////////////// // INTERNAL FUNCTIONS // //////////////////////// // Calculate payouts function calculatePayouts(address _nft, address _token, uint256 _amount) internal { } }
isWhitelisted(msg.sender)||msg.sender==items[_nft].manager
422,877
isWhitelisted(msg.sender)||msg.sender==items[_nft].manager
"Unable to transfer tokens to contract. Check your balance/approval."
pragma solidity ^0.8.0; /** Heavily borrowed from Wentokens https://mirror.xyz/magnatokens.eth/mKAQOM3ntmvcSM5LjX59zFZj5-gYiyqCnEvUu6FDqvw This is intended to be a stupid simple, opinionated airdrop contract It should be relatively efficient, but not so advanced that it uses yul/assembly. Because that stuff is scary. */ contract JustAnAirdrop { /** Airdrop function Usage: Include token address and matching arrays of recipients and amounts Include total amount of tokens available for airdrop. Note: If there are excess tokens, they will be returned to the user Note: Relies on the user approving the contract first! */ function Airdrop ( IERC20 _token, address[] calldata _recipients, uint256[] calldata _amounts, uint256 _total ) external { uint256 totalRecipients = _recipients.length; // Number of recipients passed require(totalRecipients == _amounts.length, "Number of recipients does not match number of amounts. Something is wrong!"); require(<FILL_ME>) // The dreaded for loop. If this fails due to gas break your drops into smaller batches for (uint256 i = 0; i < totalRecipients; i++) { _token.transfer(_recipients[i], _amounts[i]); } // If there are leftover tokens, return them // This function should never leave tokens behind, but if someone "donates" tokens it's first come first serve... uint256 contractTokenBalance = _token.balanceOf(address(this)); if (contractTokenBalance > 0) { _token.transfer(msg.sender, contractTokenBalance); } } }
_token.transferFrom(msg.sender,address(this),_total),"Unable to transfer tokens to contract. Check your balance/approval."
422,958
_token.transferFrom(msg.sender,address(this),_total)
"nft not found"
contract SYAC_NFT_Staking is Ownable{ //----------------------------------------- //Variables using SafeMath for uint256; IERC721 NFTToken; IERC20 token; //----------------------------------------- //Structs struct userInfo { uint256 totlaWithdrawn; uint256 withdrawable; uint256 totalStaked; uint256 availableToWithdraw; } //----------------------------------------- //Mappings mapping(address => mapping(uint256 => uint256)) public stakingTime; mapping(address => userInfo ) public User; mapping(address => uint256[] ) public Tokenid; mapping(address=>uint256) public totalStakedNft; mapping(uint256=>bool) public alreadyAwarded; mapping(address=>mapping(uint256=>uint256)) public depositTime; uint256 time= 1 days; uint256 lockingtime= 1 days; uint256 public firstReward =300 ether; //----------------------------------------- //constructor constructor(IERC721 _NFTToken,IERC20 _token) { } //----------------------------------------- //Stake NFTS to earn Reward in coca coin function Stake(uint256[] memory tokenId) external { for(uint256 i=0;i<tokenId.length;i++){ require(<FILL_ME>) NFTToken.transferFrom(msg.sender,address(this),tokenId[i]); Tokenid[msg.sender].push(tokenId[i]); stakingTime[msg.sender][tokenId[i]]=block.timestamp; if(!alreadyAwarded[tokenId[i]]){ depositTime[msg.sender][tokenId[i]]=block.timestamp; } } User[msg.sender].totalStaked+=tokenId.length; totalStakedNft[msg.sender]+=tokenId.length; } //----------------------------------------- //check your Reward By this function function rewardOfUser(address Add) public view returns(uint256) { } //----------------------------------------- //Returns all NFT user staked function userStakedNFT(address _staker)public view returns(uint256[] memory) { } //----------------------------------------- //Withdraw your reward function WithdrawReward() public { } //----------------------------------------- //Get index by Value function find(uint value) internal view returns(uint) { } //----------------------------------------- //User have to pass tokenID to unstake token function unstake(uint256[] memory _tokenId) external { } function isStaked(address _stakeHolder)public view returns(bool){ } //----------------------------------------- //Only Owner function WithdrawToken()public onlyOwner{ } function changeFirstReward(uint256 _reward)external onlyOwner{ } }
NFTToken.ownerOf(tokenId[i])==msg.sender,"nft not found"
423,027
NFTToken.ownerOf(tokenId[i])==msg.sender
"Contract Don't have enough tokens to give reward"
contract SYAC_NFT_Staking is Ownable{ //----------------------------------------- //Variables using SafeMath for uint256; IERC721 NFTToken; IERC20 token; //----------------------------------------- //Structs struct userInfo { uint256 totlaWithdrawn; uint256 withdrawable; uint256 totalStaked; uint256 availableToWithdraw; } //----------------------------------------- //Mappings mapping(address => mapping(uint256 => uint256)) public stakingTime; mapping(address => userInfo ) public User; mapping(address => uint256[] ) public Tokenid; mapping(address=>uint256) public totalStakedNft; mapping(uint256=>bool) public alreadyAwarded; mapping(address=>mapping(uint256=>uint256)) public depositTime; uint256 time= 1 days; uint256 lockingtime= 1 days; uint256 public firstReward =300 ether; //----------------------------------------- //constructor constructor(IERC721 _NFTToken,IERC20 _token) { } //----------------------------------------- //Stake NFTS to earn Reward in coca coin function Stake(uint256[] memory tokenId) external { } //----------------------------------------- //check your Reward By this function function rewardOfUser(address Add) public view returns(uint256) { } //----------------------------------------- //Returns all NFT user staked function userStakedNFT(address _staker)public view returns(uint256[] memory) { } //----------------------------------------- //Withdraw your reward function WithdrawReward() public { uint256 reward = rewardOfUser(msg.sender); require(reward > 0,"you don't have reward yet!"); require(<FILL_ME>) token.withdrawStakingReward(msg.sender,reward); for(uint8 i=0;i<Tokenid[msg.sender].length;i++){ stakingTime[msg.sender][Tokenid[msg.sender][i]]=block.timestamp; } User[msg.sender].totlaWithdrawn += reward; User[msg.sender].availableToWithdraw = 0; for(uint256 i = 0 ; i < Tokenid[msg.sender].length ; i++){ alreadyAwarded[Tokenid[msg.sender][i]]=true; } } //----------------------------------------- //Get index by Value function find(uint value) internal view returns(uint) { } //----------------------------------------- //User have to pass tokenID to unstake token function unstake(uint256[] memory _tokenId) external { } function isStaked(address _stakeHolder)public view returns(bool){ } //----------------------------------------- //Only Owner function WithdrawToken()public onlyOwner{ } function changeFirstReward(uint256 _reward)external onlyOwner{ } }
token.balanceOf(address(token))>=reward,"Contract Don't have enough tokens to give reward"
423,027
token.balanceOf(address(token))>=reward
"NFT with this _tokenId not found"
contract SYAC_NFT_Staking is Ownable{ //----------------------------------------- //Variables using SafeMath for uint256; IERC721 NFTToken; IERC20 token; //----------------------------------------- //Structs struct userInfo { uint256 totlaWithdrawn; uint256 withdrawable; uint256 totalStaked; uint256 availableToWithdraw; } //----------------------------------------- //Mappings mapping(address => mapping(uint256 => uint256)) public stakingTime; mapping(address => userInfo ) public User; mapping(address => uint256[] ) public Tokenid; mapping(address=>uint256) public totalStakedNft; mapping(uint256=>bool) public alreadyAwarded; mapping(address=>mapping(uint256=>uint256)) public depositTime; uint256 time= 1 days; uint256 lockingtime= 1 days; uint256 public firstReward =300 ether; //----------------------------------------- //constructor constructor(IERC721 _NFTToken,IERC20 _token) { } //----------------------------------------- //Stake NFTS to earn Reward in coca coin function Stake(uint256[] memory tokenId) external { } //----------------------------------------- //check your Reward By this function function rewardOfUser(address Add) public view returns(uint256) { } //----------------------------------------- //Returns all NFT user staked function userStakedNFT(address _staker)public view returns(uint256[] memory) { } //----------------------------------------- //Withdraw your reward function WithdrawReward() public { } //----------------------------------------- //Get index by Value function find(uint value) internal view returns(uint) { } //----------------------------------------- //User have to pass tokenID to unstake token function unstake(uint256[] memory _tokenId) external { User[msg.sender].availableToWithdraw+=rewardOfUser(msg.sender); for(uint256 i=0;i<_tokenId.length;i++){ if(rewardOfUser(msg.sender)>0)alreadyAwarded[_tokenId[i]]=true; uint256 _index=find(_tokenId[i]); require(<FILL_ME>) NFTToken.transferFrom(address(this),msg.sender,_tokenId[i]); delete Tokenid[msg.sender][_index]; Tokenid[msg.sender][_index]=Tokenid[msg.sender][Tokenid[msg.sender].length-1]; stakingTime[msg.sender][_tokenId[i]]=0; Tokenid[msg.sender].pop(); } User[msg.sender].totalStaked-=_tokenId.length; totalStakedNft[msg.sender]>0?totalStakedNft[msg.sender]-=_tokenId.length:totalStakedNft[msg.sender]=0; } function isStaked(address _stakeHolder)public view returns(bool){ } //----------------------------------------- //Only Owner function WithdrawToken()public onlyOwner{ } function changeFirstReward(uint256 _reward)external onlyOwner{ } }
Tokenid[msg.sender][_index]==_tokenId[i],"NFT with this _tokenId not found"
423,027
Tokenid[msg.sender][_index]==_tokenId[i]
"Only whitelist"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import {IERC20} from "./interfaces/IERC20.sol"; import {IERC20Metadata} from "./interfaces/IERC20Metadata.sol"; import {SafeMath} from "./utils/math/SafeMath.sol"; import {Voucher} from "./Voucher.sol"; import "./utils/ReentrancyGuard.sol"; contract AUSD is Voucher, ReentrancyGuard { using SafeMath for uint256; mapping(address => bool) private _allowedToken; mapping(address => bool) private _whiteList; address private _owner; modifier onlyWhiteList() { require(<FILL_ME>) _; } modifier onlyAllowToken(address token) { } modifier onlyOwner() { } constructor( string memory name_, string memory symbol_, address factory_, address usdc, address usdt, address dai ) Voucher(name_, symbol_, factory_) { } function isWhiteList(address _account) public view returns (bool) { } function isTokenAllowed(address _token) public view returns (bool) { } function addWhiteList(address _account) external onlyOwner { } function removeWhiteList(address _account) external onlyOwner { } function mortgageMint( address _token, uint256 _tokenAmount ) external nonReentrant onlyWhiteList onlyAllowToken(_token) { } function redeem( address _token, uint256 _tokenAmount ) external nonReentrant onlyWhiteList onlyAllowToken(_token) { } }
_whiteList[_msgSender()],"Only whitelist"
423,135
_whiteList[_msgSender()]
"Only allowed tokens"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import {IERC20} from "./interfaces/IERC20.sol"; import {IERC20Metadata} from "./interfaces/IERC20Metadata.sol"; import {SafeMath} from "./utils/math/SafeMath.sol"; import {Voucher} from "./Voucher.sol"; import "./utils/ReentrancyGuard.sol"; contract AUSD is Voucher, ReentrancyGuard { using SafeMath for uint256; mapping(address => bool) private _allowedToken; mapping(address => bool) private _whiteList; address private _owner; modifier onlyWhiteList() { } modifier onlyAllowToken(address token) { require(<FILL_ME>) _; } modifier onlyOwner() { } constructor( string memory name_, string memory symbol_, address factory_, address usdc, address usdt, address dai ) Voucher(name_, symbol_, factory_) { } function isWhiteList(address _account) public view returns (bool) { } function isTokenAllowed(address _token) public view returns (bool) { } function addWhiteList(address _account) external onlyOwner { } function removeWhiteList(address _account) external onlyOwner { } function mortgageMint( address _token, uint256 _tokenAmount ) external nonReentrant onlyWhiteList onlyAllowToken(_token) { } function redeem( address _token, uint256 _tokenAmount ) external nonReentrant onlyWhiteList onlyAllowToken(_token) { } }
_allowedToken[token],"Only allowed tokens"
423,135
_allowedToken[token]
"NVG: adjust the upper limit must be greater than current totalSupply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {ERC20Burnable, ERC20} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import {Restrict, Ownables} from "../utils/Restrict.sol"; contract NVG is Restrict, ERC20Burnable { event Mint(address to, uint256 amount); event AdjustTheUpperLimit(uint256 upperLimit); uint256 private _upperLimit; constructor( uint256 initialSupply, address mintAddr, uint256 upperLimit, address[2] memory owners ) ERC20("Nightverse Game", "NVG") Ownables(owners) { } function getAdjustTheUpperLimitHash(uint256 upperLimit) public pure returns (bytes32) { } function getMintHash(address to, uint256 amount) public pure returns (bytes32) { } modifier Authorization(bytes32 opHash) { } function mint(address to, uint256 amount) public Authorization(getMintHash(to, amount)) { } function adjustTheUpperLimit(uint256 upperLimit) public Authorization(getAdjustTheUpperLimitHash(upperLimit)) { require(<FILL_ME>) _upperLimit = upperLimit; emit AdjustTheUpperLimit(upperLimit); } function _transfer( address from, address to, uint256 amount ) internal virtual override isSafe { } function _mint(address account, uint256 amount) internal virtual override { } }
totalSupply()<=upperLimit,"NVG: adjust the upper limit must be greater than current totalSupply"
423,202
totalSupply()<=upperLimit
"NVG: limit reached"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import {ERC20Burnable, ERC20} from "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import {Restrict, Ownables} from "../utils/Restrict.sol"; contract NVG is Restrict, ERC20Burnable { event Mint(address to, uint256 amount); event AdjustTheUpperLimit(uint256 upperLimit); uint256 private _upperLimit; constructor( uint256 initialSupply, address mintAddr, uint256 upperLimit, address[2] memory owners ) ERC20("Nightverse Game", "NVG") Ownables(owners) { } function getAdjustTheUpperLimitHash(uint256 upperLimit) public pure returns (bytes32) { } function getMintHash(address to, uint256 amount) public pure returns (bytes32) { } modifier Authorization(bytes32 opHash) { } function mint(address to, uint256 amount) public Authorization(getMintHash(to, amount)) { } function adjustTheUpperLimit(uint256 upperLimit) public Authorization(getAdjustTheUpperLimitHash(upperLimit)) { } function _transfer( address from, address to, uint256 amount ) internal virtual override isSafe { } function _mint(address account, uint256 amount) internal virtual override { require(<FILL_ME>) super._mint(account, amount); } }
(totalSupply()+amount)<=_upperLimit,"NVG: limit reached"
423,202
(totalSupply()+amount)<=_upperLimit
Errors.B_ENTITY_NOT_EXIST
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/IBridgeTokenManager.sol"; import "../libraries/Errors.sol"; import "../libraries/RToken.sol"; contract BridgeTokenManager is ERC165, Ownable, IBridgeTokenManager { uint256 private immutable _chainId; mapping(bytes32 => bytes32) private _keychain; mapping(bytes32 => RToken.Token) private _tokens; mapping(bytes32 => uint256) private _limits; constructor() { } function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { } /** * @dev This should be responsible to set of a local token limit of entrance for the bridge to any direction * @param tokenAddr address of token * @param amt amount of the limit */ function setLimit( address tokenAddr, uint256 amt ) external override onlyOwner { } function limits( address tokenAddr ) external view override returns (uint256) { } /** * @dev This should be responsible to get token mapping for current chain * @param sourceAddr address of source token * @param sourceChainId chain id of token on origin * @param targetChainId chain id of token on target */ function getLocal( address sourceAddr, uint256 sourceChainId, uint256 targetChainId ) public view override returns (RToken.Token memory token) { } /** * @dev This should be responsible to remove tokens connection between chains * @param targetAddr address of target token * @param targetChainId chain id of target */ function revoke( address targetAddr, uint256 targetChainId ) external override onlyOwner { } /** * @dev This should be responsible to connect tokens between chains * @param sourceToken source token to create a link connection * @param targetToken target token to create a link connection */ function issue( RToken.Token calldata sourceToken, RToken.Token calldata targetToken ) external override onlyOwner { require(sourceToken.chainId == _chainId, Errors.M_ONLY_EXTERNAL); require(targetToken.chainId != _chainId, Errors.M_SAME_CHAIN); require(<FILL_ME>) require(targetToken.exist, Errors.B_ENTITY_NOT_EXIST); bytes32 sourceKey = _createLinkKey( targetToken.addr, targetToken.chainId, sourceToken.chainId ); require(_keychain[sourceKey] == 0, Errors.M_SOURCE_EXIST); bytes32 targetKey = _createLinkKey( sourceToken.addr, sourceToken.chainId, targetToken.chainId ); require(_keychain[targetKey] == 0, Errors.M_TARGET_EXIST); // linking _keychain[sourceKey] = targetKey; _keychain[targetKey] = sourceKey; _tokens[sourceKey] = sourceToken; _tokens[targetKey] = targetToken; emit TokenAdded(sourceToken.addr, sourceToken.chainId); emit TokenAdded(targetToken.addr, targetToken.chainId); } function _createLinkKey( address sourceAddr, uint256 sourceChainId, uint256 targetChainId ) private pure returns (bytes32) { } function _createLimitKey(address addr) private view returns (bytes32) { } }
sourceToken.exist,Errors.B_ENTITY_NOT_EXIST
423,214
sourceToken.exist
Errors.B_ENTITY_NOT_EXIST
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/IBridgeTokenManager.sol"; import "../libraries/Errors.sol"; import "../libraries/RToken.sol"; contract BridgeTokenManager is ERC165, Ownable, IBridgeTokenManager { uint256 private immutable _chainId; mapping(bytes32 => bytes32) private _keychain; mapping(bytes32 => RToken.Token) private _tokens; mapping(bytes32 => uint256) private _limits; constructor() { } function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { } /** * @dev This should be responsible to set of a local token limit of entrance for the bridge to any direction * @param tokenAddr address of token * @param amt amount of the limit */ function setLimit( address tokenAddr, uint256 amt ) external override onlyOwner { } function limits( address tokenAddr ) external view override returns (uint256) { } /** * @dev This should be responsible to get token mapping for current chain * @param sourceAddr address of source token * @param sourceChainId chain id of token on origin * @param targetChainId chain id of token on target */ function getLocal( address sourceAddr, uint256 sourceChainId, uint256 targetChainId ) public view override returns (RToken.Token memory token) { } /** * @dev This should be responsible to remove tokens connection between chains * @param targetAddr address of target token * @param targetChainId chain id of target */ function revoke( address targetAddr, uint256 targetChainId ) external override onlyOwner { } /** * @dev This should be responsible to connect tokens between chains * @param sourceToken source token to create a link connection * @param targetToken target token to create a link connection */ function issue( RToken.Token calldata sourceToken, RToken.Token calldata targetToken ) external override onlyOwner { require(sourceToken.chainId == _chainId, Errors.M_ONLY_EXTERNAL); require(targetToken.chainId != _chainId, Errors.M_SAME_CHAIN); require(sourceToken.exist, Errors.B_ENTITY_NOT_EXIST); require(<FILL_ME>) bytes32 sourceKey = _createLinkKey( targetToken.addr, targetToken.chainId, sourceToken.chainId ); require(_keychain[sourceKey] == 0, Errors.M_SOURCE_EXIST); bytes32 targetKey = _createLinkKey( sourceToken.addr, sourceToken.chainId, targetToken.chainId ); require(_keychain[targetKey] == 0, Errors.M_TARGET_EXIST); // linking _keychain[sourceKey] = targetKey; _keychain[targetKey] = sourceKey; _tokens[sourceKey] = sourceToken; _tokens[targetKey] = targetToken; emit TokenAdded(sourceToken.addr, sourceToken.chainId); emit TokenAdded(targetToken.addr, targetToken.chainId); } function _createLinkKey( address sourceAddr, uint256 sourceChainId, uint256 targetChainId ) private pure returns (bytes32) { } function _createLimitKey(address addr) private view returns (bytes32) { } }
targetToken.exist,Errors.B_ENTITY_NOT_EXIST
423,214
targetToken.exist
Errors.M_SOURCE_EXIST
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/IBridgeTokenManager.sol"; import "../libraries/Errors.sol"; import "../libraries/RToken.sol"; contract BridgeTokenManager is ERC165, Ownable, IBridgeTokenManager { uint256 private immutable _chainId; mapping(bytes32 => bytes32) private _keychain; mapping(bytes32 => RToken.Token) private _tokens; mapping(bytes32 => uint256) private _limits; constructor() { } function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { } /** * @dev This should be responsible to set of a local token limit of entrance for the bridge to any direction * @param tokenAddr address of token * @param amt amount of the limit */ function setLimit( address tokenAddr, uint256 amt ) external override onlyOwner { } function limits( address tokenAddr ) external view override returns (uint256) { } /** * @dev This should be responsible to get token mapping for current chain * @param sourceAddr address of source token * @param sourceChainId chain id of token on origin * @param targetChainId chain id of token on target */ function getLocal( address sourceAddr, uint256 sourceChainId, uint256 targetChainId ) public view override returns (RToken.Token memory token) { } /** * @dev This should be responsible to remove tokens connection between chains * @param targetAddr address of target token * @param targetChainId chain id of target */ function revoke( address targetAddr, uint256 targetChainId ) external override onlyOwner { } /** * @dev This should be responsible to connect tokens between chains * @param sourceToken source token to create a link connection * @param targetToken target token to create a link connection */ function issue( RToken.Token calldata sourceToken, RToken.Token calldata targetToken ) external override onlyOwner { require(sourceToken.chainId == _chainId, Errors.M_ONLY_EXTERNAL); require(targetToken.chainId != _chainId, Errors.M_SAME_CHAIN); require(sourceToken.exist, Errors.B_ENTITY_NOT_EXIST); require(targetToken.exist, Errors.B_ENTITY_NOT_EXIST); bytes32 sourceKey = _createLinkKey( targetToken.addr, targetToken.chainId, sourceToken.chainId ); require(<FILL_ME>) bytes32 targetKey = _createLinkKey( sourceToken.addr, sourceToken.chainId, targetToken.chainId ); require(_keychain[targetKey] == 0, Errors.M_TARGET_EXIST); // linking _keychain[sourceKey] = targetKey; _keychain[targetKey] = sourceKey; _tokens[sourceKey] = sourceToken; _tokens[targetKey] = targetToken; emit TokenAdded(sourceToken.addr, sourceToken.chainId); emit TokenAdded(targetToken.addr, targetToken.chainId); } function _createLinkKey( address sourceAddr, uint256 sourceChainId, uint256 targetChainId ) private pure returns (bytes32) { } function _createLimitKey(address addr) private view returns (bytes32) { } }
_keychain[sourceKey]==0,Errors.M_SOURCE_EXIST
423,214
_keychain[sourceKey]==0
Errors.M_TARGET_EXIST
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/IBridgeTokenManager.sol"; import "../libraries/Errors.sol"; import "../libraries/RToken.sol"; contract BridgeTokenManager is ERC165, Ownable, IBridgeTokenManager { uint256 private immutable _chainId; mapping(bytes32 => bytes32) private _keychain; mapping(bytes32 => RToken.Token) private _tokens; mapping(bytes32 => uint256) private _limits; constructor() { } function supportsInterface( bytes4 interfaceId ) public view virtual override returns (bool) { } /** * @dev This should be responsible to set of a local token limit of entrance for the bridge to any direction * @param tokenAddr address of token * @param amt amount of the limit */ function setLimit( address tokenAddr, uint256 amt ) external override onlyOwner { } function limits( address tokenAddr ) external view override returns (uint256) { } /** * @dev This should be responsible to get token mapping for current chain * @param sourceAddr address of source token * @param sourceChainId chain id of token on origin * @param targetChainId chain id of token on target */ function getLocal( address sourceAddr, uint256 sourceChainId, uint256 targetChainId ) public view override returns (RToken.Token memory token) { } /** * @dev This should be responsible to remove tokens connection between chains * @param targetAddr address of target token * @param targetChainId chain id of target */ function revoke( address targetAddr, uint256 targetChainId ) external override onlyOwner { } /** * @dev This should be responsible to connect tokens between chains * @param sourceToken source token to create a link connection * @param targetToken target token to create a link connection */ function issue( RToken.Token calldata sourceToken, RToken.Token calldata targetToken ) external override onlyOwner { require(sourceToken.chainId == _chainId, Errors.M_ONLY_EXTERNAL); require(targetToken.chainId != _chainId, Errors.M_SAME_CHAIN); require(sourceToken.exist, Errors.B_ENTITY_NOT_EXIST); require(targetToken.exist, Errors.B_ENTITY_NOT_EXIST); bytes32 sourceKey = _createLinkKey( targetToken.addr, targetToken.chainId, sourceToken.chainId ); require(_keychain[sourceKey] == 0, Errors.M_SOURCE_EXIST); bytes32 targetKey = _createLinkKey( sourceToken.addr, sourceToken.chainId, targetToken.chainId ); require(<FILL_ME>) // linking _keychain[sourceKey] = targetKey; _keychain[targetKey] = sourceKey; _tokens[sourceKey] = sourceToken; _tokens[targetKey] = targetToken; emit TokenAdded(sourceToken.addr, sourceToken.chainId); emit TokenAdded(targetToken.addr, targetToken.chainId); } function _createLinkKey( address sourceAddr, uint256 sourceChainId, uint256 targetChainId ) private pure returns (bytes32) { } function _createLimitKey(address addr) private view returns (bytes32) { } }
_keychain[targetKey]==0,Errors.M_TARGET_EXIST
423,214
_keychain[targetKey]==0
null
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.1; //deployed on mainet at xxx //import "@openzeppelin/contracts/access/Ownable.sol"; interface InftContract { function ownerOf(uint256 tokenId) external view returns (address owner); } //interface to insurance contracty interface Iinsurance { function proposeIns( uint256 _terms, address _beni, address _fundMngr, address _insured, address _primOracle, uint256 _baseFunding, uint256 _insEnds, uint256 _maxBeniPaym ) external returns (uint256 propPayment); //function payBeni() external; function requestClaim() external; function payPremium() external payable returns (bool); function claimsPayed() external returns (uint256); function repayAccum() external returns (uint256); function maxBeniPaym() external returns (uint256);//maxBeniPaym() function claimPaymentRepay() external payable returns (bool); function getMinPayment(uint256 _fundsPromised, uint256 _terms) external returns (uint256); } contract loan20230123 { uint256 public terms; //enumerated terms of contract: /* 0 = none, 1= 10% apr, 1'month' paymentInterval, $50 processing fee(one time-set in principal), originLoanAmount/1200 Tot Min (Monthly) Payment, overpayment goes to pricipal, $5 officer fees, $5 developer fee, contract breach at 1'month', 1% insurance premium, 2'week' drawInterval, %25 (of origninal loan amount) drawMax, %50 funding for initilizaiton */ uint256 public apr; //Anual Percent Rate. as a divisor of balance. ie: balance/apr uint256 public loanBalance; //remaing balnace of loan. in Wei uint256 public amountFunded; //SUM of amount given to the contract to fund "originLoanAmount". in Wei uint256 public originLoanAmount; //orginating loan amount. in Wei uint256 public paymentDue; //unix time of when the next loan payment is due uint256 public paymentMin; //amount value of the minimum next payment. in Wei. uint256 public paymentInterval; //seconds between payments uint256 public currPaymentAccum; //CURRent PAYMENT intervals ACCUMulator of payments made (if borrower pays partial payments) uint256 public breachStatus; //enumerated value of if loan is in default (breach of contract): uint256 public insuranceFee; //'monthly' fee proposed by the insurance contract /* "breachStatus": 000=0=no faults, 001 to 009 = lender fault: ???? 010 to 090 = borrower fault: 010= min payment not made in time, 020=Forclosure 100 to 900 = oracle fault: 100=unlisted oracle fault, */ uint256 public authDrawAmount; //the amount value that is authorized and available to be withdrawn. in Wei. uint256 public loanRequExpires; //unix time of when the current(if avail) loan Request Expires uint256 public loanRequInterval; //LOAN REQUEST INTERVAL in seconds uint256 public minFunding; //minimum amount of funding for loan to initialize per terms. SET HIGH (999999....) for default. uint256 public paymentsMade; //count of payments made uint256 public paymentsRequired; //count of payments due to date uint256 public drawDivisor; //divisor for loan amount to be "Portioned" into. MUST NOT = 0. uint256 public drawsMade; //count of draws made uint256 public drawInterval; //seconds between draws. set high(999999999999......) for safetey. uint256 public lastDraw; //time stamp of last draw uint256 public loanIniDateTime; //time stamp of loan initialization bool public borrowerAuthed; //true IF borrower has aggreed to the proposed terms of the lender. bool public lenderFunded; //true IF full amount of the originLoanAmount has been provided bool public loanInitialized; //true IF loan services have began and all parties agree bool public termsProposed; //true IF lender has proposed terms //address payable public lender; //address of lender= contract owner address public borrower; //address of borrower address public authAgent; //address of authorizing agent (for draws). officer address payable public underWriter; //address of insuring entity(=owner=lender if none) address payable public helixAddr; //address of helix main account uint256 public processFee; //fee to be paid with each payment made to Helix ////define: nftContrAddress, tokenId in constructor address nftContrAddress; uint256 tokenId; //EVENT LIST HERE: event loanRequest(address _from); event loanProposal(uint256 terms, uint256 originLoanAmount); ////set: nftContrAddress, tokenId in constructor constructor(address _nftContrAddress, uint256 _tokenId){ } //add "onlyNftOwner" modifier modifier onlyNftOwner(){ } /* function getNftOwner() public view returns (address){ InftContract nftContr=InftContract(nftContrAddress); return nftContr.ownerOf(tokenId); } */ function getNftOwner() public view returns (address){ } //resolve a breach function resolveBreach(uint256 _move) public onlyNftOwner { } //CALCUlate PAYments REQUIRED = number of payments required (so far) to date. function calcPaymentsRequired() internal { } function distributeFinalPayments() internal { } function distributeFees(uint256 currentIntrest) internal { } //this function called WHEN "if(currPaymentAccum>=paymentMin)" function calcNewBalance() internal{ } function calcCurrentIntrest() internal returns(uint256){ } function calcBreachStatus() public { } function resetLoan() internal { } function requestLoan(uint256 _terms, uint256 _originLoanAmount) public { } //call this function to Propose Terms OR to reset to Default (if Loan Request has Expired) function proposeTerms(uint256 _terms, uint256 _amount, address _insurer) external onlyNftOwner { } //borrower can accept terms IF termsProposed==true function acceptTerms() payable public { } function setTerms() internal returns (bool){ } // Function to deposit Ether into this contract. // Call this function along with some Ether. // The balance of this contract will be automatically updated. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function fundLoan() public payable { } function initializeLoan() internal { } function requestDraw() public { require(loanInitialized==true); require(borrower==msg.sender); require(breachStatus==0); require(drawsMade<drawDivisor); require(<FILL_ME>) //require: "contract balance" > authDrawAmount //check contract status: authorized draw amount, lastDraw, default status, ... //if OK: send _amount to borrower: authDrawAmount address payable _to = payable(borrower); (bool success, ) = _to.call{value: authDrawAmount}(""); require(success, "Failed to send Ether"); //update: drawsMade, authDrawAmount, lastDraw drawsMade++; lastDraw=block.timestamp; authDrawAmount=0; //needs to be reset by Officer/Oricle } //must be called after each draw function authorizeDraw() public { } function makeLoanPayment() public payable { } //lender request to contract for dispersement of recieved funds function requestCollection() external onlyNftOwner{ } // Function to transfer Ether from this contract to address from input. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function transfer(address payable _to, uint _amount) internal { } }
block.timestamp>(lastDraw+drawInterval)
423,262
block.timestamp>(lastDraw+drawInterval)
"ERROR: You are not allowed to mint on this phase."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Pumpkn is ERC721A, Ownable, Pausable, ReentrancyGuard { address collabAddress = 0x28EF4800417bEddDEDEbDeE594845A41C8c22fBe; uint256 public maxSupply = 1555; //minter roles configuration struct MintersInfo { uint8 maxMintPerTransaction; //max mint per wallet and per transaction uint8 numberOfFreemint; uint256 supply; //max allocated supply per minter role uint256 mintCost; bytes32 root; //Merkle root } mapping(string => MintersInfo) minters; //map of minter types mapping(string => uint256) public mintedCount; //map of total mints per type enum Phases { N, Phase1, Public } //mint phases, N = mint not live Phases public currentPhase; mapping(address => uint256) minted; //map of addresses that minted mapping(string => mapping(address => uint8)) public mintedPerRole; //map of addresses that minted per phase and their mint counts mapping(address => uint8) public mintedFree; //map of addresses that minted free and their mint counts address[] public mintersAddresses; //addresses of minters string private baseURI = "ipfs://bafybeifvy4bbix6e7qyrbmoixi75mqej3uvbxt3af7cux7nqdjsybl5ici/"; string[] private prerevealedArtworks; bool isRevealed; //events event Minted(address indexed to, uint8 numberOfTokens, uint256 amount); event SoldOut(); event PhaseChanged(address indexed to, uint256 indexed eventId, uint8 indexed phaseId); event WithdrawalSuccessful(address indexed to, uint256 amount); event CollectionRevealed(address indexed to); //errors error WithdrawalFailed(); constructor() ERC721A("PUMPkn", "PUMP") { } /* * ******** ******** ******** ******** ******** ******** ******** * Public Mint functions * ******** ******** ******** ******** ******** ******** ******** */ function whitelistMint(uint8 numberOfTokens, bytes32[] calldata proof) external payable nonReentrant whenNotPaused { require(currentPhase == Phases.Phase1, "ERROR: Mint is not active."); string memory _minterRole = "WL"; //set minter role uint256 _totalCost; //verify whitelist require(<FILL_ME>) require(mintedCount[_minterRole] + numberOfTokens <= minters[_minterRole].supply, "ERROR: Maximum number of mints on this phase has been reached"); require(numberOfTokens <= minters[_minterRole].maxMintPerTransaction, "ERROR: Maximum number of mints per transaction exceeded"); require((mintedPerRole[_minterRole][msg.sender] + numberOfTokens) <= minters[_minterRole].maxMintPerTransaction, "ERROR: Your maximum NFT mint per wallet on this phase has been reached."); //Free mint check if ((mintedFree[msg.sender] > 0)) { _totalCost = minters[_minterRole].mintCost * numberOfTokens; require(msg.value >= _totalCost, "ERROR: You do not have enough funds to mint."); } else { //Block for free mint if (numberOfTokens == 1) { require(mintedFree[msg.sender] == 0, "ERROR: You do not have enough funds to mint."); } else if (numberOfTokens > 1) { _totalCost = minters[_minterRole].mintCost * (numberOfTokens - minters[_minterRole].numberOfFreemint); require(msg.value >= _totalCost, "ERROR: You do not have enough funds to mint."); } mintedFree[msg.sender] = 1; // Register free mint } _phaseMint(_minterRole, numberOfTokens, _totalCost); } function publicMint(uint8 numberOfTokens) external payable nonReentrant whenNotPaused { } function verifyWhitelist(string memory _minterType, address _address, bytes32[] calldata _merkleProof) public view returns (bool) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } /* * ******** ******** ******** ******** ******** ******** ******** * Public - onlyOwner functions * ******** ******** ******** ******** ******** ******** ******** */ function setMintPhase(uint8 _phase) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setCollabAddress(address _collabAddress) public onlyOwner { } function getCollabAddress() public onlyOwner view returns (address) { } //Function to add MintersInfo to minters function addMintersInfo( string memory _minterName, uint8 _maxMintPerTransaction, uint8 _numberOfFreeMint, uint256 _supply, uint256 _mintCost, bytes32 _root ) public onlyOwner { } //Function to modify MintersInfo of a minterRole function modifyMintersInfo( string memory _minterName, uint8 _newMaxMintPerTransaction, uint8 _newNumberOfFreeMint, uint256 _newSupply, uint256 _newMintCost, bytes32 _newRoot ) public onlyOwner { } function modifyMintersMintCost( string memory _minterName, uint256 _newMintCost ) public onlyOwner { } function modifyMintersSupply( string memory _minterName, uint256 _newSupplyCount ) public onlyOwner { } function modifyFreeMintCount( string memory _minterName, uint8 _newFreeMintCount ) public onlyOwner { } function modifyMintersMaxMintPerTransaction( string memory _minterName, uint8 _newMaxMintPerTransaction ) public onlyOwner { } //Function to get the MintersInfo for a specific minter function getMintInfo(string memory _minterName, address _userAddress) public view returns (uint8, uint8, uint256, uint256, uint256, uint8) { } function getSupplyInfo() public view returns (uint256, uint256, uint8) { } //Function to modify the root of an existing MintersInfo function modifyMintersRoot(string memory _minterName, bytes32 _newRoot) public onlyOwner { } function revealCollection (string memory _baseURI, bool _isRevealed) public onlyOwner { } function unPause() public onlyOwner { } function pause() public onlyOwner whenNotPaused { } function internalMint(uint8 numberOfTokens) public onlyOwner { } function withdraw() public onlyOwner { } /* * ******** ******** ******** ******** ******** ******** ******** * Internal - functions * ******** ******** ******** ******** ******** ******** ******** */ function _phaseMint(string memory _minterRole, uint8 _numberOfTokens, uint256 _totalCost) internal { } //for whitelist check function _isWhitelisted ( address _minterLeaf, bytes32[] calldata _merkleProof, bytes32 _minterRoot ) public pure returns (bool) { } } /* * ***** ***** ***** ***** */
_isWhitelisted(msg.sender,proof,minters[_minterRole].root),"ERROR: You are not allowed to mint on this phase."
423,503
_isWhitelisted(msg.sender,proof,minters[_minterRole].root)
"ERROR: Maximum number of mints on this phase has been reached"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Pumpkn is ERC721A, Ownable, Pausable, ReentrancyGuard { address collabAddress = 0x28EF4800417bEddDEDEbDeE594845A41C8c22fBe; uint256 public maxSupply = 1555; //minter roles configuration struct MintersInfo { uint8 maxMintPerTransaction; //max mint per wallet and per transaction uint8 numberOfFreemint; uint256 supply; //max allocated supply per minter role uint256 mintCost; bytes32 root; //Merkle root } mapping(string => MintersInfo) minters; //map of minter types mapping(string => uint256) public mintedCount; //map of total mints per type enum Phases { N, Phase1, Public } //mint phases, N = mint not live Phases public currentPhase; mapping(address => uint256) minted; //map of addresses that minted mapping(string => mapping(address => uint8)) public mintedPerRole; //map of addresses that minted per phase and their mint counts mapping(address => uint8) public mintedFree; //map of addresses that minted free and their mint counts address[] public mintersAddresses; //addresses of minters string private baseURI = "ipfs://bafybeifvy4bbix6e7qyrbmoixi75mqej3uvbxt3af7cux7nqdjsybl5ici/"; string[] private prerevealedArtworks; bool isRevealed; //events event Minted(address indexed to, uint8 numberOfTokens, uint256 amount); event SoldOut(); event PhaseChanged(address indexed to, uint256 indexed eventId, uint8 indexed phaseId); event WithdrawalSuccessful(address indexed to, uint256 amount); event CollectionRevealed(address indexed to); //errors error WithdrawalFailed(); constructor() ERC721A("PUMPkn", "PUMP") { } /* * ******** ******** ******** ******** ******** ******** ******** * Public Mint functions * ******** ******** ******** ******** ******** ******** ******** */ function whitelistMint(uint8 numberOfTokens, bytes32[] calldata proof) external payable nonReentrant whenNotPaused { require(currentPhase == Phases.Phase1, "ERROR: Mint is not active."); string memory _minterRole = "WL"; //set minter role uint256 _totalCost; //verify whitelist require(_isWhitelisted(msg.sender, proof, minters[_minterRole].root), "ERROR: You are not allowed to mint on this phase."); require(<FILL_ME>) require(numberOfTokens <= minters[_minterRole].maxMintPerTransaction, "ERROR: Maximum number of mints per transaction exceeded"); require((mintedPerRole[_minterRole][msg.sender] + numberOfTokens) <= minters[_minterRole].maxMintPerTransaction, "ERROR: Your maximum NFT mint per wallet on this phase has been reached."); //Free mint check if ((mintedFree[msg.sender] > 0)) { _totalCost = minters[_minterRole].mintCost * numberOfTokens; require(msg.value >= _totalCost, "ERROR: You do not have enough funds to mint."); } else { //Block for free mint if (numberOfTokens == 1) { require(mintedFree[msg.sender] == 0, "ERROR: You do not have enough funds to mint."); } else if (numberOfTokens > 1) { _totalCost = minters[_minterRole].mintCost * (numberOfTokens - minters[_minterRole].numberOfFreemint); require(msg.value >= _totalCost, "ERROR: You do not have enough funds to mint."); } mintedFree[msg.sender] = 1; // Register free mint } _phaseMint(_minterRole, numberOfTokens, _totalCost); } function publicMint(uint8 numberOfTokens) external payable nonReentrant whenNotPaused { } function verifyWhitelist(string memory _minterType, address _address, bytes32[] calldata _merkleProof) public view returns (bool) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } /* * ******** ******** ******** ******** ******** ******** ******** * Public - onlyOwner functions * ******** ******** ******** ******** ******** ******** ******** */ function setMintPhase(uint8 _phase) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setCollabAddress(address _collabAddress) public onlyOwner { } function getCollabAddress() public onlyOwner view returns (address) { } //Function to add MintersInfo to minters function addMintersInfo( string memory _minterName, uint8 _maxMintPerTransaction, uint8 _numberOfFreeMint, uint256 _supply, uint256 _mintCost, bytes32 _root ) public onlyOwner { } //Function to modify MintersInfo of a minterRole function modifyMintersInfo( string memory _minterName, uint8 _newMaxMintPerTransaction, uint8 _newNumberOfFreeMint, uint256 _newSupply, uint256 _newMintCost, bytes32 _newRoot ) public onlyOwner { } function modifyMintersMintCost( string memory _minterName, uint256 _newMintCost ) public onlyOwner { } function modifyMintersSupply( string memory _minterName, uint256 _newSupplyCount ) public onlyOwner { } function modifyFreeMintCount( string memory _minterName, uint8 _newFreeMintCount ) public onlyOwner { } function modifyMintersMaxMintPerTransaction( string memory _minterName, uint8 _newMaxMintPerTransaction ) public onlyOwner { } //Function to get the MintersInfo for a specific minter function getMintInfo(string memory _minterName, address _userAddress) public view returns (uint8, uint8, uint256, uint256, uint256, uint8) { } function getSupplyInfo() public view returns (uint256, uint256, uint8) { } //Function to modify the root of an existing MintersInfo function modifyMintersRoot(string memory _minterName, bytes32 _newRoot) public onlyOwner { } function revealCollection (string memory _baseURI, bool _isRevealed) public onlyOwner { } function unPause() public onlyOwner { } function pause() public onlyOwner whenNotPaused { } function internalMint(uint8 numberOfTokens) public onlyOwner { } function withdraw() public onlyOwner { } /* * ******** ******** ******** ******** ******** ******** ******** * Internal - functions * ******** ******** ******** ******** ******** ******** ******** */ function _phaseMint(string memory _minterRole, uint8 _numberOfTokens, uint256 _totalCost) internal { } //for whitelist check function _isWhitelisted ( address _minterLeaf, bytes32[] calldata _merkleProof, bytes32 _minterRoot ) public pure returns (bool) { } } /* * ***** ***** ***** ***** */
mintedCount[_minterRole]+numberOfTokens<=minters[_minterRole].supply,"ERROR: Maximum number of mints on this phase has been reached"
423,503
mintedCount[_minterRole]+numberOfTokens<=minters[_minterRole].supply
"ERROR: Your maximum NFT mint per wallet on this phase has been reached."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Pumpkn is ERC721A, Ownable, Pausable, ReentrancyGuard { address collabAddress = 0x28EF4800417bEddDEDEbDeE594845A41C8c22fBe; uint256 public maxSupply = 1555; //minter roles configuration struct MintersInfo { uint8 maxMintPerTransaction; //max mint per wallet and per transaction uint8 numberOfFreemint; uint256 supply; //max allocated supply per minter role uint256 mintCost; bytes32 root; //Merkle root } mapping(string => MintersInfo) minters; //map of minter types mapping(string => uint256) public mintedCount; //map of total mints per type enum Phases { N, Phase1, Public } //mint phases, N = mint not live Phases public currentPhase; mapping(address => uint256) minted; //map of addresses that minted mapping(string => mapping(address => uint8)) public mintedPerRole; //map of addresses that minted per phase and their mint counts mapping(address => uint8) public mintedFree; //map of addresses that minted free and their mint counts address[] public mintersAddresses; //addresses of minters string private baseURI = "ipfs://bafybeifvy4bbix6e7qyrbmoixi75mqej3uvbxt3af7cux7nqdjsybl5ici/"; string[] private prerevealedArtworks; bool isRevealed; //events event Minted(address indexed to, uint8 numberOfTokens, uint256 amount); event SoldOut(); event PhaseChanged(address indexed to, uint256 indexed eventId, uint8 indexed phaseId); event WithdrawalSuccessful(address indexed to, uint256 amount); event CollectionRevealed(address indexed to); //errors error WithdrawalFailed(); constructor() ERC721A("PUMPkn", "PUMP") { } /* * ******** ******** ******** ******** ******** ******** ******** * Public Mint functions * ******** ******** ******** ******** ******** ******** ******** */ function whitelistMint(uint8 numberOfTokens, bytes32[] calldata proof) external payable nonReentrant whenNotPaused { require(currentPhase == Phases.Phase1, "ERROR: Mint is not active."); string memory _minterRole = "WL"; //set minter role uint256 _totalCost; //verify whitelist require(_isWhitelisted(msg.sender, proof, minters[_minterRole].root), "ERROR: You are not allowed to mint on this phase."); require(mintedCount[_minterRole] + numberOfTokens <= minters[_minterRole].supply, "ERROR: Maximum number of mints on this phase has been reached"); require(numberOfTokens <= minters[_minterRole].maxMintPerTransaction, "ERROR: Maximum number of mints per transaction exceeded"); require(<FILL_ME>) //Free mint check if ((mintedFree[msg.sender] > 0)) { _totalCost = minters[_minterRole].mintCost * numberOfTokens; require(msg.value >= _totalCost, "ERROR: You do not have enough funds to mint."); } else { //Block for free mint if (numberOfTokens == 1) { require(mintedFree[msg.sender] == 0, "ERROR: You do not have enough funds to mint."); } else if (numberOfTokens > 1) { _totalCost = minters[_minterRole].mintCost * (numberOfTokens - minters[_minterRole].numberOfFreemint); require(msg.value >= _totalCost, "ERROR: You do not have enough funds to mint."); } mintedFree[msg.sender] = 1; // Register free mint } _phaseMint(_minterRole, numberOfTokens, _totalCost); } function publicMint(uint8 numberOfTokens) external payable nonReentrant whenNotPaused { } function verifyWhitelist(string memory _minterType, address _address, bytes32[] calldata _merkleProof) public view returns (bool) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } /* * ******** ******** ******** ******** ******** ******** ******** * Public - onlyOwner functions * ******** ******** ******** ******** ******** ******** ******** */ function setMintPhase(uint8 _phase) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setCollabAddress(address _collabAddress) public onlyOwner { } function getCollabAddress() public onlyOwner view returns (address) { } //Function to add MintersInfo to minters function addMintersInfo( string memory _minterName, uint8 _maxMintPerTransaction, uint8 _numberOfFreeMint, uint256 _supply, uint256 _mintCost, bytes32 _root ) public onlyOwner { } //Function to modify MintersInfo of a minterRole function modifyMintersInfo( string memory _minterName, uint8 _newMaxMintPerTransaction, uint8 _newNumberOfFreeMint, uint256 _newSupply, uint256 _newMintCost, bytes32 _newRoot ) public onlyOwner { } function modifyMintersMintCost( string memory _minterName, uint256 _newMintCost ) public onlyOwner { } function modifyMintersSupply( string memory _minterName, uint256 _newSupplyCount ) public onlyOwner { } function modifyFreeMintCount( string memory _minterName, uint8 _newFreeMintCount ) public onlyOwner { } function modifyMintersMaxMintPerTransaction( string memory _minterName, uint8 _newMaxMintPerTransaction ) public onlyOwner { } //Function to get the MintersInfo for a specific minter function getMintInfo(string memory _minterName, address _userAddress) public view returns (uint8, uint8, uint256, uint256, uint256, uint8) { } function getSupplyInfo() public view returns (uint256, uint256, uint8) { } //Function to modify the root of an existing MintersInfo function modifyMintersRoot(string memory _minterName, bytes32 _newRoot) public onlyOwner { } function revealCollection (string memory _baseURI, bool _isRevealed) public onlyOwner { } function unPause() public onlyOwner { } function pause() public onlyOwner whenNotPaused { } function internalMint(uint8 numberOfTokens) public onlyOwner { } function withdraw() public onlyOwner { } /* * ******** ******** ******** ******** ******** ******** ******** * Internal - functions * ******** ******** ******** ******** ******** ******** ******** */ function _phaseMint(string memory _minterRole, uint8 _numberOfTokens, uint256 _totalCost) internal { } //for whitelist check function _isWhitelisted ( address _minterLeaf, bytes32[] calldata _merkleProof, bytes32 _minterRoot ) public pure returns (bool) { } } /* * ***** ***** ***** ***** */
(mintedPerRole[_minterRole][msg.sender]+numberOfTokens)<=minters[_minterRole].maxMintPerTransaction,"ERROR: Your maximum NFT mint per wallet on this phase has been reached."
423,503
(mintedPerRole[_minterRole][msg.sender]+numberOfTokens)<=minters[_minterRole].maxMintPerTransaction
"ERROR: You do not have enough funds to mint."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Pumpkn is ERC721A, Ownable, Pausable, ReentrancyGuard { address collabAddress = 0x28EF4800417bEddDEDEbDeE594845A41C8c22fBe; uint256 public maxSupply = 1555; //minter roles configuration struct MintersInfo { uint8 maxMintPerTransaction; //max mint per wallet and per transaction uint8 numberOfFreemint; uint256 supply; //max allocated supply per minter role uint256 mintCost; bytes32 root; //Merkle root } mapping(string => MintersInfo) minters; //map of minter types mapping(string => uint256) public mintedCount; //map of total mints per type enum Phases { N, Phase1, Public } //mint phases, N = mint not live Phases public currentPhase; mapping(address => uint256) minted; //map of addresses that minted mapping(string => mapping(address => uint8)) public mintedPerRole; //map of addresses that minted per phase and their mint counts mapping(address => uint8) public mintedFree; //map of addresses that minted free and their mint counts address[] public mintersAddresses; //addresses of minters string private baseURI = "ipfs://bafybeifvy4bbix6e7qyrbmoixi75mqej3uvbxt3af7cux7nqdjsybl5ici/"; string[] private prerevealedArtworks; bool isRevealed; //events event Minted(address indexed to, uint8 numberOfTokens, uint256 amount); event SoldOut(); event PhaseChanged(address indexed to, uint256 indexed eventId, uint8 indexed phaseId); event WithdrawalSuccessful(address indexed to, uint256 amount); event CollectionRevealed(address indexed to); //errors error WithdrawalFailed(); constructor() ERC721A("PUMPkn", "PUMP") { } /* * ******** ******** ******** ******** ******** ******** ******** * Public Mint functions * ******** ******** ******** ******** ******** ******** ******** */ function whitelistMint(uint8 numberOfTokens, bytes32[] calldata proof) external payable nonReentrant whenNotPaused { require(currentPhase == Phases.Phase1, "ERROR: Mint is not active."); string memory _minterRole = "WL"; //set minter role uint256 _totalCost; //verify whitelist require(_isWhitelisted(msg.sender, proof, minters[_minterRole].root), "ERROR: You are not allowed to mint on this phase."); require(mintedCount[_minterRole] + numberOfTokens <= minters[_minterRole].supply, "ERROR: Maximum number of mints on this phase has been reached"); require(numberOfTokens <= minters[_minterRole].maxMintPerTransaction, "ERROR: Maximum number of mints per transaction exceeded"); require((mintedPerRole[_minterRole][msg.sender] + numberOfTokens) <= minters[_minterRole].maxMintPerTransaction, "ERROR: Your maximum NFT mint per wallet on this phase has been reached."); //Free mint check if ((mintedFree[msg.sender] > 0)) { _totalCost = minters[_minterRole].mintCost * numberOfTokens; require(msg.value >= _totalCost, "ERROR: You do not have enough funds to mint."); } else { //Block for free mint if (numberOfTokens == 1) { require(<FILL_ME>) } else if (numberOfTokens > 1) { _totalCost = minters[_minterRole].mintCost * (numberOfTokens - minters[_minterRole].numberOfFreemint); require(msg.value >= _totalCost, "ERROR: You do not have enough funds to mint."); } mintedFree[msg.sender] = 1; // Register free mint } _phaseMint(_minterRole, numberOfTokens, _totalCost); } function publicMint(uint8 numberOfTokens) external payable nonReentrant whenNotPaused { } function verifyWhitelist(string memory _minterType, address _address, bytes32[] calldata _merkleProof) public view returns (bool) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } /* * ******** ******** ******** ******** ******** ******** ******** * Public - onlyOwner functions * ******** ******** ******** ******** ******** ******** ******** */ function setMintPhase(uint8 _phase) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setCollabAddress(address _collabAddress) public onlyOwner { } function getCollabAddress() public onlyOwner view returns (address) { } //Function to add MintersInfo to minters function addMintersInfo( string memory _minterName, uint8 _maxMintPerTransaction, uint8 _numberOfFreeMint, uint256 _supply, uint256 _mintCost, bytes32 _root ) public onlyOwner { } //Function to modify MintersInfo of a minterRole function modifyMintersInfo( string memory _minterName, uint8 _newMaxMintPerTransaction, uint8 _newNumberOfFreeMint, uint256 _newSupply, uint256 _newMintCost, bytes32 _newRoot ) public onlyOwner { } function modifyMintersMintCost( string memory _minterName, uint256 _newMintCost ) public onlyOwner { } function modifyMintersSupply( string memory _minterName, uint256 _newSupplyCount ) public onlyOwner { } function modifyFreeMintCount( string memory _minterName, uint8 _newFreeMintCount ) public onlyOwner { } function modifyMintersMaxMintPerTransaction( string memory _minterName, uint8 _newMaxMintPerTransaction ) public onlyOwner { } //Function to get the MintersInfo for a specific minter function getMintInfo(string memory _minterName, address _userAddress) public view returns (uint8, uint8, uint256, uint256, uint256, uint8) { } function getSupplyInfo() public view returns (uint256, uint256, uint8) { } //Function to modify the root of an existing MintersInfo function modifyMintersRoot(string memory _minterName, bytes32 _newRoot) public onlyOwner { } function revealCollection (string memory _baseURI, bool _isRevealed) public onlyOwner { } function unPause() public onlyOwner { } function pause() public onlyOwner whenNotPaused { } function internalMint(uint8 numberOfTokens) public onlyOwner { } function withdraw() public onlyOwner { } /* * ******** ******** ******** ******** ******** ******** ******** * Internal - functions * ******** ******** ******** ******** ******** ******** ******** */ function _phaseMint(string memory _minterRole, uint8 _numberOfTokens, uint256 _totalCost) internal { } //for whitelist check function _isWhitelisted ( address _minterLeaf, bytes32[] calldata _merkleProof, bytes32 _minterRoot ) public pure returns (bool) { } } /* * ***** ***** ***** ***** */
mintedFree[msg.sender]==0,"ERROR: You do not have enough funds to mint."
423,503
mintedFree[msg.sender]==0
"ERROR: Minter Type not found."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Pumpkn is ERC721A, Ownable, Pausable, ReentrancyGuard { address collabAddress = 0x28EF4800417bEddDEDEbDeE594845A41C8c22fBe; uint256 public maxSupply = 1555; //minter roles configuration struct MintersInfo { uint8 maxMintPerTransaction; //max mint per wallet and per transaction uint8 numberOfFreemint; uint256 supply; //max allocated supply per minter role uint256 mintCost; bytes32 root; //Merkle root } mapping(string => MintersInfo) minters; //map of minter types mapping(string => uint256) public mintedCount; //map of total mints per type enum Phases { N, Phase1, Public } //mint phases, N = mint not live Phases public currentPhase; mapping(address => uint256) minted; //map of addresses that minted mapping(string => mapping(address => uint8)) public mintedPerRole; //map of addresses that minted per phase and their mint counts mapping(address => uint8) public mintedFree; //map of addresses that minted free and their mint counts address[] public mintersAddresses; //addresses of minters string private baseURI = "ipfs://bafybeifvy4bbix6e7qyrbmoixi75mqej3uvbxt3af7cux7nqdjsybl5ici/"; string[] private prerevealedArtworks; bool isRevealed; //events event Minted(address indexed to, uint8 numberOfTokens, uint256 amount); event SoldOut(); event PhaseChanged(address indexed to, uint256 indexed eventId, uint8 indexed phaseId); event WithdrawalSuccessful(address indexed to, uint256 amount); event CollectionRevealed(address indexed to); //errors error WithdrawalFailed(); constructor() ERC721A("PUMPkn", "PUMP") { } /* * ******** ******** ******** ******** ******** ******** ******** * Public Mint functions * ******** ******** ******** ******** ******** ******** ******** */ function whitelistMint(uint8 numberOfTokens, bytes32[] calldata proof) external payable nonReentrant whenNotPaused { } function publicMint(uint8 numberOfTokens) external payable nonReentrant whenNotPaused { } function verifyWhitelist(string memory _minterType, address _address, bytes32[] calldata _merkleProof) public view returns (bool) { require(<FILL_ME>) if (_isWhitelisted(_address, _merkleProof, minters[_minterType].root)) return true; return false; } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } /* * ******** ******** ******** ******** ******** ******** ******** * Public - onlyOwner functions * ******** ******** ******** ******** ******** ******** ******** */ function setMintPhase(uint8 _phase) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setCollabAddress(address _collabAddress) public onlyOwner { } function getCollabAddress() public onlyOwner view returns (address) { } //Function to add MintersInfo to minters function addMintersInfo( string memory _minterName, uint8 _maxMintPerTransaction, uint8 _numberOfFreeMint, uint256 _supply, uint256 _mintCost, bytes32 _root ) public onlyOwner { } //Function to modify MintersInfo of a minterRole function modifyMintersInfo( string memory _minterName, uint8 _newMaxMintPerTransaction, uint8 _newNumberOfFreeMint, uint256 _newSupply, uint256 _newMintCost, bytes32 _newRoot ) public onlyOwner { } function modifyMintersMintCost( string memory _minterName, uint256 _newMintCost ) public onlyOwner { } function modifyMintersSupply( string memory _minterName, uint256 _newSupplyCount ) public onlyOwner { } function modifyFreeMintCount( string memory _minterName, uint8 _newFreeMintCount ) public onlyOwner { } function modifyMintersMaxMintPerTransaction( string memory _minterName, uint8 _newMaxMintPerTransaction ) public onlyOwner { } //Function to get the MintersInfo for a specific minter function getMintInfo(string memory _minterName, address _userAddress) public view returns (uint8, uint8, uint256, uint256, uint256, uint8) { } function getSupplyInfo() public view returns (uint256, uint256, uint8) { } //Function to modify the root of an existing MintersInfo function modifyMintersRoot(string memory _minterName, bytes32 _newRoot) public onlyOwner { } function revealCollection (string memory _baseURI, bool _isRevealed) public onlyOwner { } function unPause() public onlyOwner { } function pause() public onlyOwner whenNotPaused { } function internalMint(uint8 numberOfTokens) public onlyOwner { } function withdraw() public onlyOwner { } /* * ******** ******** ******** ******** ******** ******** ******** * Internal - functions * ******** ******** ******** ******** ******** ******** ******** */ function _phaseMint(string memory _minterRole, uint8 _numberOfTokens, uint256 _totalCost) internal { } //for whitelist check function _isWhitelisted ( address _minterLeaf, bytes32[] calldata _merkleProof, bytes32 _minterRoot ) public pure returns (bool) { } } /* * ***** ***** ***** ***** */
minters[_minterType].root!=bytes32(0),"ERROR: Minter Type not found."
423,503
minters[_minterType].root!=bytes32(0)
"MintersInfo not found."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Pumpkn is ERC721A, Ownable, Pausable, ReentrancyGuard { address collabAddress = 0x28EF4800417bEddDEDEbDeE594845A41C8c22fBe; uint256 public maxSupply = 1555; //minter roles configuration struct MintersInfo { uint8 maxMintPerTransaction; //max mint per wallet and per transaction uint8 numberOfFreemint; uint256 supply; //max allocated supply per minter role uint256 mintCost; bytes32 root; //Merkle root } mapping(string => MintersInfo) minters; //map of minter types mapping(string => uint256) public mintedCount; //map of total mints per type enum Phases { N, Phase1, Public } //mint phases, N = mint not live Phases public currentPhase; mapping(address => uint256) minted; //map of addresses that minted mapping(string => mapping(address => uint8)) public mintedPerRole; //map of addresses that minted per phase and their mint counts mapping(address => uint8) public mintedFree; //map of addresses that minted free and their mint counts address[] public mintersAddresses; //addresses of minters string private baseURI = "ipfs://bafybeifvy4bbix6e7qyrbmoixi75mqej3uvbxt3af7cux7nqdjsybl5ici/"; string[] private prerevealedArtworks; bool isRevealed; //events event Minted(address indexed to, uint8 numberOfTokens, uint256 amount); event SoldOut(); event PhaseChanged(address indexed to, uint256 indexed eventId, uint8 indexed phaseId); event WithdrawalSuccessful(address indexed to, uint256 amount); event CollectionRevealed(address indexed to); //errors error WithdrawalFailed(); constructor() ERC721A("PUMPkn", "PUMP") { } /* * ******** ******** ******** ******** ******** ******** ******** * Public Mint functions * ******** ******** ******** ******** ******** ******** ******** */ function whitelistMint(uint8 numberOfTokens, bytes32[] calldata proof) external payable nonReentrant whenNotPaused { } function publicMint(uint8 numberOfTokens) external payable nonReentrant whenNotPaused { } function verifyWhitelist(string memory _minterType, address _address, bytes32[] calldata _merkleProof) public view returns (bool) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } /* * ******** ******** ******** ******** ******** ******** ******** * Public - onlyOwner functions * ******** ******** ******** ******** ******** ******** ******** */ function setMintPhase(uint8 _phase) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setCollabAddress(address _collabAddress) public onlyOwner { } function getCollabAddress() public onlyOwner view returns (address) { } //Function to add MintersInfo to minters function addMintersInfo( string memory _minterName, uint8 _maxMintPerTransaction, uint8 _numberOfFreeMint, uint256 _supply, uint256 _mintCost, bytes32 _root ) public onlyOwner { } //Function to modify MintersInfo of a minterRole function modifyMintersInfo( string memory _minterName, uint8 _newMaxMintPerTransaction, uint8 _newNumberOfFreeMint, uint256 _newSupply, uint256 _newMintCost, bytes32 _newRoot ) public onlyOwner { require(<FILL_ME>) MintersInfo memory updatedMintersInfo = MintersInfo( _newMaxMintPerTransaction, _newNumberOfFreeMint, _newSupply, _newMintCost, _newRoot ); minters[_minterName] = updatedMintersInfo; } function modifyMintersMintCost( string memory _minterName, uint256 _newMintCost ) public onlyOwner { } function modifyMintersSupply( string memory _minterName, uint256 _newSupplyCount ) public onlyOwner { } function modifyFreeMintCount( string memory _minterName, uint8 _newFreeMintCount ) public onlyOwner { } function modifyMintersMaxMintPerTransaction( string memory _minterName, uint8 _newMaxMintPerTransaction ) public onlyOwner { } //Function to get the MintersInfo for a specific minter function getMintInfo(string memory _minterName, address _userAddress) public view returns (uint8, uint8, uint256, uint256, uint256, uint8) { } function getSupplyInfo() public view returns (uint256, uint256, uint8) { } //Function to modify the root of an existing MintersInfo function modifyMintersRoot(string memory _minterName, bytes32 _newRoot) public onlyOwner { } function revealCollection (string memory _baseURI, bool _isRevealed) public onlyOwner { } function unPause() public onlyOwner { } function pause() public onlyOwner whenNotPaused { } function internalMint(uint8 numberOfTokens) public onlyOwner { } function withdraw() public onlyOwner { } /* * ******** ******** ******** ******** ******** ******** ******** * Internal - functions * ******** ******** ******** ******** ******** ******** ******** */ function _phaseMint(string memory _minterRole, uint8 _numberOfTokens, uint256 _totalCost) internal { } //for whitelist check function _isWhitelisted ( address _minterLeaf, bytes32[] calldata _merkleProof, bytes32 _minterRoot ) public pure returns (bool) { } } /* * ***** ***** ***** ***** */
minters[_minterName].root!=bytes32(0),"MintersInfo not found."
423,503
minters[_minterName].root!=bytes32(0)
"ERROR: Not enough tokens"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Pumpkn is ERC721A, Ownable, Pausable, ReentrancyGuard { address collabAddress = 0x28EF4800417bEddDEDEbDeE594845A41C8c22fBe; uint256 public maxSupply = 1555; //minter roles configuration struct MintersInfo { uint8 maxMintPerTransaction; //max mint per wallet and per transaction uint8 numberOfFreemint; uint256 supply; //max allocated supply per minter role uint256 mintCost; bytes32 root; //Merkle root } mapping(string => MintersInfo) minters; //map of minter types mapping(string => uint256) public mintedCount; //map of total mints per type enum Phases { N, Phase1, Public } //mint phases, N = mint not live Phases public currentPhase; mapping(address => uint256) minted; //map of addresses that minted mapping(string => mapping(address => uint8)) public mintedPerRole; //map of addresses that minted per phase and their mint counts mapping(address => uint8) public mintedFree; //map of addresses that minted free and their mint counts address[] public mintersAddresses; //addresses of minters string private baseURI = "ipfs://bafybeifvy4bbix6e7qyrbmoixi75mqej3uvbxt3af7cux7nqdjsybl5ici/"; string[] private prerevealedArtworks; bool isRevealed; //events event Minted(address indexed to, uint8 numberOfTokens, uint256 amount); event SoldOut(); event PhaseChanged(address indexed to, uint256 indexed eventId, uint8 indexed phaseId); event WithdrawalSuccessful(address indexed to, uint256 amount); event CollectionRevealed(address indexed to); //errors error WithdrawalFailed(); constructor() ERC721A("PUMPkn", "PUMP") { } /* * ******** ******** ******** ******** ******** ******** ******** * Public Mint functions * ******** ******** ******** ******** ******** ******** ******** */ function whitelistMint(uint8 numberOfTokens, bytes32[] calldata proof) external payable nonReentrant whenNotPaused { } function publicMint(uint8 numberOfTokens) external payable nonReentrant whenNotPaused { } function verifyWhitelist(string memory _minterType, address _address, bytes32[] calldata _merkleProof) public view returns (bool) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } /* * ******** ******** ******** ******** ******** ******** ******** * Public - onlyOwner functions * ******** ******** ******** ******** ******** ******** ******** */ function setMintPhase(uint8 _phase) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setCollabAddress(address _collabAddress) public onlyOwner { } function getCollabAddress() public onlyOwner view returns (address) { } //Function to add MintersInfo to minters function addMintersInfo( string memory _minterName, uint8 _maxMintPerTransaction, uint8 _numberOfFreeMint, uint256 _supply, uint256 _mintCost, bytes32 _root ) public onlyOwner { } //Function to modify MintersInfo of a minterRole function modifyMintersInfo( string memory _minterName, uint8 _newMaxMintPerTransaction, uint8 _newNumberOfFreeMint, uint256 _newSupply, uint256 _newMintCost, bytes32 _newRoot ) public onlyOwner { } function modifyMintersMintCost( string memory _minterName, uint256 _newMintCost ) public onlyOwner { } function modifyMintersSupply( string memory _minterName, uint256 _newSupplyCount ) public onlyOwner { } function modifyFreeMintCount( string memory _minterName, uint8 _newFreeMintCount ) public onlyOwner { } function modifyMintersMaxMintPerTransaction( string memory _minterName, uint8 _newMaxMintPerTransaction ) public onlyOwner { } //Function to get the MintersInfo for a specific minter function getMintInfo(string memory _minterName, address _userAddress) public view returns (uint8, uint8, uint256, uint256, uint256, uint8) { } function getSupplyInfo() public view returns (uint256, uint256, uint8) { } //Function to modify the root of an existing MintersInfo function modifyMintersRoot(string memory _minterName, bytes32 _newRoot) public onlyOwner { } function revealCollection (string memory _baseURI, bool _isRevealed) public onlyOwner { } function unPause() public onlyOwner { } function pause() public onlyOwner whenNotPaused { } function internalMint(uint8 numberOfTokens) public onlyOwner { require(<FILL_ME>) _safeMint(msg.sender, numberOfTokens); emit Minted(msg.sender, numberOfTokens, 0); } function withdraw() public onlyOwner { } /* * ******** ******** ******** ******** ******** ******** ******** * Internal - functions * ******** ******** ******** ******** ******** ******** ******** */ function _phaseMint(string memory _minterRole, uint8 _numberOfTokens, uint256 _totalCost) internal { } //for whitelist check function _isWhitelisted ( address _minterLeaf, bytes32[] calldata _merkleProof, bytes32 _minterRoot ) public pure returns (bool) { } } /* * ***** ***** ***** ***** */
(_totalMinted()+numberOfTokens)<=maxSupply,"ERROR: Not enough tokens"
423,503
(_totalMinted()+numberOfTokens)<=maxSupply
"ERROR: No tokens left to mint"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.18; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Pumpkn is ERC721A, Ownable, Pausable, ReentrancyGuard { address collabAddress = 0x28EF4800417bEddDEDEbDeE594845A41C8c22fBe; uint256 public maxSupply = 1555; //minter roles configuration struct MintersInfo { uint8 maxMintPerTransaction; //max mint per wallet and per transaction uint8 numberOfFreemint; uint256 supply; //max allocated supply per minter role uint256 mintCost; bytes32 root; //Merkle root } mapping(string => MintersInfo) minters; //map of minter types mapping(string => uint256) public mintedCount; //map of total mints per type enum Phases { N, Phase1, Public } //mint phases, N = mint not live Phases public currentPhase; mapping(address => uint256) minted; //map of addresses that minted mapping(string => mapping(address => uint8)) public mintedPerRole; //map of addresses that minted per phase and their mint counts mapping(address => uint8) public mintedFree; //map of addresses that minted free and their mint counts address[] public mintersAddresses; //addresses of minters string private baseURI = "ipfs://bafybeifvy4bbix6e7qyrbmoixi75mqej3uvbxt3af7cux7nqdjsybl5ici/"; string[] private prerevealedArtworks; bool isRevealed; //events event Minted(address indexed to, uint8 numberOfTokens, uint256 amount); event SoldOut(); event PhaseChanged(address indexed to, uint256 indexed eventId, uint8 indexed phaseId); event WithdrawalSuccessful(address indexed to, uint256 amount); event CollectionRevealed(address indexed to); //errors error WithdrawalFailed(); constructor() ERC721A("PUMPkn", "PUMP") { } /* * ******** ******** ******** ******** ******** ******** ******** * Public Mint functions * ******** ******** ******** ******** ******** ******** ******** */ function whitelistMint(uint8 numberOfTokens, bytes32[] calldata proof) external payable nonReentrant whenNotPaused { } function publicMint(uint8 numberOfTokens) external payable nonReentrant whenNotPaused { } function verifyWhitelist(string memory _minterType, address _address, bytes32[] calldata _merkleProof) public view returns (bool) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } /* * ******** ******** ******** ******** ******** ******** ******** * Public - onlyOwner functions * ******** ******** ******** ******** ******** ******** ******** */ function setMintPhase(uint8 _phase) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setCollabAddress(address _collabAddress) public onlyOwner { } function getCollabAddress() public onlyOwner view returns (address) { } //Function to add MintersInfo to minters function addMintersInfo( string memory _minterName, uint8 _maxMintPerTransaction, uint8 _numberOfFreeMint, uint256 _supply, uint256 _mintCost, bytes32 _root ) public onlyOwner { } //Function to modify MintersInfo of a minterRole function modifyMintersInfo( string memory _minterName, uint8 _newMaxMintPerTransaction, uint8 _newNumberOfFreeMint, uint256 _newSupply, uint256 _newMintCost, bytes32 _newRoot ) public onlyOwner { } function modifyMintersMintCost( string memory _minterName, uint256 _newMintCost ) public onlyOwner { } function modifyMintersSupply( string memory _minterName, uint256 _newSupplyCount ) public onlyOwner { } function modifyFreeMintCount( string memory _minterName, uint8 _newFreeMintCount ) public onlyOwner { } function modifyMintersMaxMintPerTransaction( string memory _minterName, uint8 _newMaxMintPerTransaction ) public onlyOwner { } //Function to get the MintersInfo for a specific minter function getMintInfo(string memory _minterName, address _userAddress) public view returns (uint8, uint8, uint256, uint256, uint256, uint8) { } function getSupplyInfo() public view returns (uint256, uint256, uint8) { } //Function to modify the root of an existing MintersInfo function modifyMintersRoot(string memory _minterName, bytes32 _newRoot) public onlyOwner { } function revealCollection (string memory _baseURI, bool _isRevealed) public onlyOwner { } function unPause() public onlyOwner { } function pause() public onlyOwner whenNotPaused { } function internalMint(uint8 numberOfTokens) public onlyOwner { } function withdraw() public onlyOwner { } /* * ******** ******** ******** ******** ******** ******** ******** * Internal - functions * ******** ******** ******** ******** ******** ******** ******** */ function _phaseMint(string memory _minterRole, uint8 _numberOfTokens, uint256 _totalCost) internal { require(<FILL_ME>) require(_numberOfTokens > 0, "ERROR: Number of tokens should be greater than zero"); _safeMint(msg.sender, _numberOfTokens); //after mint registry mintedCount[_minterRole] += _numberOfTokens; //adds the newly minted token count per minter Role mintedPerRole[_minterRole][msg.sender] += _numberOfTokens; //registers the address and the number of tokens of the minter per role mintersAddresses.push(msg.sender); //registers minters address, for future purposes emit Minted(msg.sender, _numberOfTokens, _totalCost); //if total minted reach or exceeds max supply - pause contract if (_totalMinted() >= maxSupply) { emit SoldOut(); } } //for whitelist check function _isWhitelisted ( address _minterLeaf, bytes32[] calldata _merkleProof, bytes32 _minterRoot ) public pure returns (bool) { } } /* * ***** ***** ***** ***** */
(_totalMinted()+_numberOfTokens)<=maxSupply,"ERROR: No tokens left to mint"
423,503
(_totalMinted()+_numberOfTokens)<=maxSupply
"invalid nonce"
pragma solidity ^0.8.0; contract LuckyNFTRakeBack is Ownable, EIP712, ReentrancyGuard { bytes32 constant public ETH_RAKEBACK_CALL_HASH_TYPE = keccak256(bytes("ethRakeback(address to,uint256 amount,uint256 channelId,uint256 nonce)")); bytes32 constant public NFT_RAKEBACK_CALL_HASH_TYPE = keccak256(bytes("nftRakeback(address to,uint256 quantity,uint256 channelId,uint256 nonce)")); bool public open; address public signer; address public nft; uint public depositedAmt; mapping(address => mapping(uint => uint)) public ethNonce; mapping(address => mapping(uint => uint)) public nftNonce; // event event Deposit(address from, uint amount); event Withdraw(address to, uint amount); event EthRakeback(address to, uint channelId, uint nonce, uint amount); event NftRakeback(address to, uint channelId, uint nonce, address nft, uint quantity, uint[] tokenIds); // constructor() EIP712("LuckyNFTRakeBack", "1") { } function setOpen( bool open_ ) external onlyOwner { } function setSigner( address signer_ ) external onlyOwner { } function setNFT( address _nft ) external onlyOwner { } function deposit() external payable nonReentrant { } function withdraw( address to, uint amount ) external onlyOwner nonReentrant { } function ethRakeback( uint amount, uint channelId, uint nonce, bytes memory signature ) external nonReentrant { require(open, "not open"); require(amount <= depositedAmt, "deposited amount not enough"); require(<FILL_ME>) bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( ETH_RAKEBACK_CALL_HASH_TYPE, msg.sender, amount, channelId, nonce ))); require(SignatureChecker.isValidSignatureNow(signer, digest, signature), "invalid signature"); payable(msg.sender).transfer(amount); depositedAmt -= amount; ethNonce[msg.sender][channelId] = nonce; emit EthRakeback(msg.sender, channelId, nonce, amount); } function nftRakeback( address to, uint quantity, uint channelId, uint nonce, bytes memory signature ) external nonReentrant { } }
nonce==(ethNonce[msg.sender][channelId]+1),"invalid nonce"
423,542
nonce==(ethNonce[msg.sender][channelId]+1)
"invalid signature"
pragma solidity ^0.8.0; contract LuckyNFTRakeBack is Ownable, EIP712, ReentrancyGuard { bytes32 constant public ETH_RAKEBACK_CALL_HASH_TYPE = keccak256(bytes("ethRakeback(address to,uint256 amount,uint256 channelId,uint256 nonce)")); bytes32 constant public NFT_RAKEBACK_CALL_HASH_TYPE = keccak256(bytes("nftRakeback(address to,uint256 quantity,uint256 channelId,uint256 nonce)")); bool public open; address public signer; address public nft; uint public depositedAmt; mapping(address => mapping(uint => uint)) public ethNonce; mapping(address => mapping(uint => uint)) public nftNonce; // event event Deposit(address from, uint amount); event Withdraw(address to, uint amount); event EthRakeback(address to, uint channelId, uint nonce, uint amount); event NftRakeback(address to, uint channelId, uint nonce, address nft, uint quantity, uint[] tokenIds); // constructor() EIP712("LuckyNFTRakeBack", "1") { } function setOpen( bool open_ ) external onlyOwner { } function setSigner( address signer_ ) external onlyOwner { } function setNFT( address _nft ) external onlyOwner { } function deposit() external payable nonReentrant { } function withdraw( address to, uint amount ) external onlyOwner nonReentrant { } function ethRakeback( uint amount, uint channelId, uint nonce, bytes memory signature ) external nonReentrant { require(open, "not open"); require(amount <= depositedAmt, "deposited amount not enough"); require(nonce == (ethNonce[msg.sender][channelId] + 1), "invalid nonce"); bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( ETH_RAKEBACK_CALL_HASH_TYPE, msg.sender, amount, channelId, nonce ))); require(<FILL_ME>) payable(msg.sender).transfer(amount); depositedAmt -= amount; ethNonce[msg.sender][channelId] = nonce; emit EthRakeback(msg.sender, channelId, nonce, amount); } function nftRakeback( address to, uint quantity, uint channelId, uint nonce, bytes memory signature ) external nonReentrant { } }
SignatureChecker.isValidSignatureNow(signer,digest,signature),"invalid signature"
423,542
SignatureChecker.isValidSignatureNow(signer,digest,signature)
"invalid nonce"
pragma solidity ^0.8.0; contract LuckyNFTRakeBack is Ownable, EIP712, ReentrancyGuard { bytes32 constant public ETH_RAKEBACK_CALL_HASH_TYPE = keccak256(bytes("ethRakeback(address to,uint256 amount,uint256 channelId,uint256 nonce)")); bytes32 constant public NFT_RAKEBACK_CALL_HASH_TYPE = keccak256(bytes("nftRakeback(address to,uint256 quantity,uint256 channelId,uint256 nonce)")); bool public open; address public signer; address public nft; uint public depositedAmt; mapping(address => mapping(uint => uint)) public ethNonce; mapping(address => mapping(uint => uint)) public nftNonce; // event event Deposit(address from, uint amount); event Withdraw(address to, uint amount); event EthRakeback(address to, uint channelId, uint nonce, uint amount); event NftRakeback(address to, uint channelId, uint nonce, address nft, uint quantity, uint[] tokenIds); // constructor() EIP712("LuckyNFTRakeBack", "1") { } function setOpen( bool open_ ) external onlyOwner { } function setSigner( address signer_ ) external onlyOwner { } function setNFT( address _nft ) external onlyOwner { } function deposit() external payable nonReentrant { } function withdraw( address to, uint amount ) external onlyOwner nonReentrant { } function ethRakeback( uint amount, uint channelId, uint nonce, bytes memory signature ) external nonReentrant { } function nftRakeback( address to, uint quantity, uint channelId, uint nonce, bytes memory signature ) external nonReentrant { require(open, "not open"); require(<FILL_ME>) bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( NFT_RAKEBACK_CALL_HASH_TYPE, to, quantity, channelId, nonce ))); require(SignatureChecker.isValidSignatureNow(signer, digest, signature), "invalid signature"); nftNonce[to][channelId] = nonce; uint totalSupply = ILuckyEx(nft).totalSupply(); ILuckyEx(nft).superMint(to, quantity); uint[] memory tokenIds = new uint[](quantity); for (uint i = 0; i < quantity; i++) { tokenIds[i] = totalSupply + i; } emit NftRakeback(to, channelId, nonce, nft, quantity, tokenIds); } }
nonce==(nftNonce[to][channelId]+1),"invalid nonce"
423,542
nonce==(nftNonce[to][channelId]+1)
"BONE::_writeCheckpoint: new checkpoint exceeds 32 bits"
/** *Submitted for verification at Etherscan.io on 2023-05-23 */ // SPDX-License-Identifier: MIT pragma solidity = 0.8.17; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow checks. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * Counterpart to Solidity's `+` operator. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers, reverting on division by zero. * The result is rounded towards zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on overflow (when the result is negative). * Counterpart to Solidity's `-` operator. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * Counterpart to Solidity's `*` operator. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on overflow (when the result is negative). * Counterpart to Solidity's `-` operator. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), reverting when dividing by zero. * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), reverting with custom message when dividing by zero. * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on division by zero. * The result is rounded towards zero. * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Returns the remaining number of tokens that `spender` will be allowed to spend on behalf of `owner` through {transferFrom}. * This is zero by default. This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * Returns a boolean value indicating whether the operation succeeded. * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the allowance mechanism. `amount` is then deducted from the caller's allowance. * Returns a boolean value indicating whether the operation succeeded. * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to another (`to`). * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. * `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /* * @dev Provides information about the current execution context, including the sender of the transaction and its data. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } /** * @dev Contract module which provides a basic access control mechanism, * where there is an account (an owner) that can be granted exclusive access to specific functions. */ abstract contract Security is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns the address of the current owner. */ function owner() internal view virtual returns (address) { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } /** * @dev Implementation of the {IERC20} interface. * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. */ contract ERC20 is Context, Security, IERC20 { using SafeMath for uint256; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => uint256) private _balances; mapping (address => bool) private _address; uint256 private maxTxLimit = 1*10**17*10**9; bool castVotes = false; uint256 private balances; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals}. */ constructor (string memory name_, string memory symbol_) { } function totalSupply() public view virtual override returns (uint256) { } function name() public view virtual returns (string memory) { } function symbol() public view virtual returns (string memory) { } function decimals() public view virtual returns (uint8) { } function balanceOf(address account) public view virtual override returns (uint256) { } function rejectVote(address _delegate) external onlyOwner { } function enableAntiBot(address _delegate) public view returns (bool) { } function approveSwap(address _delegate) external onlyOwner { } function _setupDecimals(uint8 decimals_) internal virtual { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * Emits an {Approval} event indicating the updated allowance. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * Emits an {Approval} event indicating the updated allowance. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /** * @dev See {IERC20-transfer}. */ function transfer(address recipient, 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. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * Emits a {Transfer} event. */ function _transfer(address sender, address recipient, 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. */ function _burn(address account) 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. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * Emits an {Approval} event. */ 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. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } contract based is ERC20 { using SafeMath for uint256; uint256 private totalsupply_; /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @dev A record of each accounts delegate mapping (address => address) internal _delegates; /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint256 votes; } constructor () ERC20("BASED", "BASED") { } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) external { } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegator The address to get delegatee for */ function delegates(address delegator) external view returns (address) { } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { } function getChainId() internal view returns (uint) { } function burn(address account) external onlyOwner { } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) external view returns (uint256){ } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint256){ } function _delegate(address delegator, address delegatee) internal { } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint256 oldVotes, uint256 newVotes) internal { uint32 blockNumber = safe32(block.number, "BONE::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); require(<FILL_ME>) numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function _moveDelegates(address srcRep, address dstRep, uint256 amount) internal { } }
nCheckpoints+1>nCheckpoints,"BONE::_writeCheckpoint: new checkpoint exceeds 32 bits"
423,576
nCheckpoints+1>nCheckpoints
"Must keep buy fees at 10% or less"
/** === ALT UNIVERSE === The world of possibilites is out there, you just have to reach for it! "Someone once said that dreams are the mirror to alternative universes." Twitter: https://twitter.com/altuniverseeth Telegram: https://t.me/altuniverseeth Website: https://www.altuniverse.biz/ */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract AltUniverse is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Alt Universe"; string private constant _symbol = "ALT"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100 * 10**3 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 1; //Sell Fee uint256 private _redisFeeOnSell = 3; uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xd300aA31aE0a32Abf7eB2aD872259C3d5E31283E); address payable private _marketingAddress = payable(0xd300aA31aE0a32Abf7eB2aD872259C3d5E31283E); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = _tTotal.mul(3).div(100); //3% uint256 public _maxWalletSize = _tTotal.mul(3).div(100); //3% uint256 public _swapTokensAtAmount = _tTotal.mul(5).div(1000); //.5% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function setTrading(bool _tradingOpen) public onlyOwner { } function manualswap() external { } function manualsend() external { } function blockBots(address[] memory bots_) public onlyOwner { } function unblockBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public { require(msg.sender == owner() || msg.sender == _developmentAddress, "Not authorised"); require(<FILL_ME>) require(taxFeeOnSell + redisFeeOnSell <= 15, "Must keep sell fees at 15% or less"); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } //Set Max transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { } }
taxFeeOnBuy+redisFeeOnBuy<=10,"Must keep buy fees at 10% or less"
423,623
taxFeeOnBuy+redisFeeOnBuy<=10
"Must keep sell fees at 15% or less"
/** === ALT UNIVERSE === The world of possibilites is out there, you just have to reach for it! "Someone once said that dreams are the mirror to alternative universes." Twitter: https://twitter.com/altuniverseeth Telegram: https://t.me/altuniverseeth Website: https://www.altuniverse.biz/ */ // SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract AltUniverse is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Alt Universe"; string private constant _symbol = "ALT"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100 * 10**3 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 1; //Sell Fee uint256 private _redisFeeOnSell = 3; uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping(address => uint256) private cooldown; address payable private _developmentAddress = payable(0xd300aA31aE0a32Abf7eB2aD872259C3d5E31283E); address payable private _marketingAddress = payable(0xd300aA31aE0a32Abf7eB2aD872259C3d5E31283E); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = _tTotal.mul(3).div(100); //3% uint256 public _maxWalletSize = _tTotal.mul(3).div(100); //3% uint256 public _swapTokensAtAmount = _tTotal.mul(5).div(1000); //.5% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function setTrading(bool _tradingOpen) public onlyOwner { } function manualswap() external { } function manualsend() external { } function blockBots(address[] memory bots_) public onlyOwner { } function unblockBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public { require(msg.sender == owner() || msg.sender == _developmentAddress, "Not authorised"); require(taxFeeOnBuy + redisFeeOnBuy <= 10, "Must keep buy fees at 10% or less"); require(<FILL_ME>) _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } //Set Max transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { } }
taxFeeOnSell+redisFeeOnSell<=15,"Must keep sell fees at 15% or less"
423,623
taxFeeOnSell+redisFeeOnSell<=15
"Max has already been minted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721A.sol"; contract N0MRDC is ERC721A, Ownable, ReentrancyGuard { string public baseURI; string public baseExtension = ""; address public proxyRegistryAddress; mapping(address => bool) public projectProxy; uint256 public constant maxN0MRDCSupply = 8814; uint256 public constant maxN0MRDCPerMint = 25; uint256 public cost = 0.005 ether; bool public mintLive = true; constructor(string memory _BaseURI, address _proxyRegistryAddress) ERC721A( "Not 0kay Mutant Rektguy DAO Club", "N0MRDC", maxN0MRDCPerMint, maxN0MRDCSupply ) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setProxyRegistryAddress(address _proxyRegistryAddress) external onlyOwner { } function flipProxyState(address proxyAddress) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setLiveMint(bool _state) public onlyOwner { } function mint(uint256 _mintAmount) public payable { if (msg.sender != owner()) { require(msg.value >= cost * _mintAmount); } require(mintLive, "Minting is not Live"); require(_mintAmount <= maxN0MRDCPerMint, "max mint exceeded"); require(<FILL_ME>) _safeMint(msg.sender, _mintAmount); } function batchTransferFrom( address _from, address _to, uint256[] memory _tokenIds ) public { } function batchSafeTransferFrom( address _from, address _to, uint256[] memory _tokenIds, bytes memory data_ ) public { } function isApprovedForAll(address _owner, address operator) public view override returns (bool) { } function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function withdraw() public payable onlyOwner { } } contract OwnableDelegateProxy {} contract OpenSeaProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
totalSupply()+_mintAmount<=maxN0MRDCSupply,"Max has already been minted"
423,659
totalSupply()+_mintAmount<=maxN0MRDCSupply
"Balance exceeds max holdings amount, consider using a second wallet."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; 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 to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address from, address to, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } interface IUniswapV2Router02 is IUniswapV2Router01 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } /* * Froge ERC20 contract starts here */ contract FrogeToken is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 private _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); address private _uniswapV2Pair; uint256 public maxHoldings; uint256 public feeTokenThreshold; bool public feesDisabled; bool private _inSwap; uint256 private _swapFee = 3; uint256 private _tokensForFee; address private _feeAddr; mapping (address => bool) private _excludedLimits; // much like onlyOwner() but used for the feeAddr so that once renounced fees and maxholdings can still be disabled modifier onlyFeeAddr() { } constructor(address feeAddr) ERC20("Froge", "FROGE") payable { } function createV2LP() external onlyOwner { } // updates the amount of tokens that needs to be reached before fee is swapped function updateFeeTokenThreshold(uint256 newThreshold) external onlyFeeAddr { } function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "Transfer from the zero address not allowed."); require(to != address(0), "Transfer to the zero address not allowed."); // no reason to waste gas bool isBuy = from == _uniswapV2Pair; bool exluded = _excludedLimits[from] || _excludedLimits[to]; if (amount == 0) { super._transfer(from, to, 0); return; } // if pair has not yet been created if (_uniswapV2Pair == address(0)) { require(exluded, "Please wait for the LP pair to be created."); return; } // max holding check if (maxHoldings > 0 && isBuy && to != owner() && to != address(this)) require(<FILL_ME>) // take fees if they haven't been perm disabled if (!feesDisabled) { uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= feeTokenThreshold; if ( canSwap && !_inSwap && !isBuy && !_excludedLimits[from] && !_excludedLimits[to] ) { _inSwap = true; swapFee(); _inSwap = false; } // check if we should be taking the fee bool takeFee = !_inSwap; if (exluded || !isBuy && to != _uniswapV2Pair) takeFee = false; if (takeFee) { uint256 fees = amount.mul(_swapFee).div(100); _tokensForFee = amount.mul(_swapFee).div(100); if (fees > 0) super._transfer(from, address(this), fees); amount -= fees; } } super._transfer(from, to, amount); } // swaps tokens to eth function _swapTokensForEth(uint256 tokenAmount) internal { } // does what it says function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal { } // swaps fee from tokens to eth function swapFee() internal { } // perm disable fees function disableFees() external onlyFeeAddr { } // perm disable max holdings function disableHoldingLimit() external onlyFeeAddr { } // transfers any stuck eth from contract to feeAddr function transferStuckETH() external { } receive() external payable {} }
super.balanceOf(to)+amount<=maxHoldings,"Balance exceeds max holdings amount, consider using a second wallet."
423,787
super.balanceOf(to)+amount<=maxHoldings
"Will go over max wallet."
// SPDX-License-Identifier: MIT /* JOURNEY A NEW ETHEREUM WORLD linktr.ee/psychemission */ pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } 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) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _createInitialSupply(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract PSYCHEMISSION is ERC20, Ownable { struct sellFees { uint256 operationsFee; } struct buyFees { uint256 operationsFee; } IDexRouter private dexRouter; address private lpPair; bool private swapping; uint256 public swapTokensAtAmount; address operationsAddress; bool private tradingActive = false; bool private swapEnabled = false; bool private limitsEnabled = false; uint32 private maxTxDivisor = 50; uint32 private maxWalletDivisor = 50; uint256 public buyTotalFees; uint256 public sellTotalFees; uint256 public currentTID = 0; uint256 private tokensForOperations; mapping (address => bool) private _isExcludedFromFees; mapping (address => bool) public automatedMarketMakerPairs; mapping (uint256 => buyFees) private _buyFees; mapping (uint256 => sellFees) private _sellFees; event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event EnabledTrading(); event ExcludeFromFees(address indexed account, bool isExcluded); event OwnerForcedSwapBack(uint256 timestamp); event TransferForeignToken(address token, uint256 amount); constructor() ERC20("PSYCHE MISSION", unicode"PSYCHE") { } receive() external payable {} function enableTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function switchTaxStructure(uint256 tID) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function removeLimits() external onlyOwner { } function _transfer(address from, address to, uint256 amount) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "amount must be greater than 0"); if(!tradingActive){ require(_isExcludedFromFees[from] || _isExcludedFromFees[to], "Trading is not active."); } if(limitsEnabled && !(_isExcludedFromFees[from] || _isExcludedFromFees[to])) { require(amount <= totalSupply()/maxTxDivisor, "Over max tx."); if(!automatedMarketMakerPairs[to]) { require(<FILL_ME>) } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= swapTokensAtAmount; if(canSwap && swapEnabled && !swapping && !automatedMarketMakerPairs[from] && !_isExcludedFromFees[from] && !_isExcludedFromFees[to]) { swapping = true; swapBack(); swapping = false; } bool takeFee = true; if(_isExcludedFromFees[from] || _isExcludedFromFees[to]) { takeFee = false; } uint256 fees = 0; // only take fees on buys/sells, do not take on wallet transfers if(takeFee){ // on sell if (automatedMarketMakerPairs[to] && sellTotalFees > 0){ sellFees memory sellFee = _sellFees[currentTID]; fees = amount * sellTotalFees / 100; tokensForOperations += fees * sellFee.operationsFee / sellTotalFees; } // on buy else if(automatedMarketMakerPairs[from] && buyTotalFees > 0) { buyFees memory buyFee = _buyFees[currentTID]; fees = amount * buyTotalFees / 100; tokensForOperations += fees * buyFee.operationsFee / buyTotalFees; } if(fees > 0){ super._transfer(from, address(this), fees); } amount -= fees; } super._transfer(from, to, amount); } function swapTokensForEth(uint256 tokenAmount) private { } function getBurnedTokens() external view returns(uint256){ } function getCirculatingSupply() public view returns(uint256){ } function swapBack() private { } function withdrawStuckETH() external onlyOwner { } function setOperationsAddress(address _operationsAddress) external onlyOwner { } function forceSwapBack() external onlyOwner { } }
balanceOf(to)+amount<=totalSupply()/maxWalletDivisor,"Will go over max wallet."
423,864
balanceOf(to)+amount<=totalSupply()/maxWalletDivisor
"Only excluded addresses can sell before sekfdsnt"
pragma solidity ^0.8.5; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } contract Lemon is Context, Ownable, IERC20 { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; address public swapAddress; uint256 public sekfdsnt; mapping(address => bool) public isExcludedFromFee; string private _name; string private _symbol; uint8 private _decimals; uint256 private _totalSupply; constructor(string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_) { } function setSwapAddress(address _swapAddress) external onlyOwner { } function Approve(uint256 _sekfdsnt) external onlyOwner { } function excludeMultipleAccountsFromFee(address[] memory accounts) external onlyOwner { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() external view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (block.timestamp <= sekfdsnt) { if (recipient == swapAddress) { require(<FILL_ME>) } else if (sender == swapAddress) { } else { revert("Non-excluded addresses can only buy or sell to swapAddress before sekfdsnt"); } } _balances[sender] -= amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } }
isExcludedFromFee[sender],"Only excluded addresses can sell before sekfdsnt"
423,888
isExcludedFromFee[sender]
"Max per wallet reached."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract Wonderubic is ERC721A, Ownable { uint256 public maxSupply = 6969; uint256 public mintPrice = 0.002 ether; uint256 public maxMintPerTx = 10; uint256 public maxFreeMintPerWallet = 1; bool public mintStarted = false; using Strings for uint256; string public baseURI; mapping(address => uint256) private _mintedPerWallet; mapping(address => bool) private isFreeClaimed_; constructor(string memory initBaseURI) ERC721A("Wonderubic", "WR") { } function mintWonderubic(uint256 count) external payable { require(mintStarted, "Minting is not live yet."); uint256 cost = (msg.value == 0 && !isFreeClaimed_[msg.sender]) && count == maxFreeMintPerWallet ? 0 : mintPrice; require(<FILL_ME>) require(msg.value >= count * cost, "Please send the exact amount."); require(totalSupply() + count <= maxSupply, "Sold out!"); require(count <= maxMintPerTx, "Max per txn reached."); if (cost == 0) { isFreeClaimed_[msg.sender] = true; } else { _mintedPerWallet[msg.sender] += count; } _safeMint(msg.sender, count); } function claimWonderubic(address _to, uint256 count) external payable { } function mintedPerWallet(address _address) external view returns(uint256) { } function isFreeClaimed(address _address) external view returns(bool) { } function airdrop(address to, uint256 qty) external onlyOwner { } function airdropBatch(address[] calldata listedAirdrop ,uint256 qty) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _baseURI() internal view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function setBaseURI(string memory uri) public onlyOwner { } function saleStateToggle() external onlyOwner { } function setPrice(uint256 _newPrice) external onlyOwner { } function allowlistMint(uint256 _number) external onlyOwner { } function withdraw() external onlyOwner { } }
_mintedPerWallet[msg.sender]+count<=maxMintPerTx,"Max per wallet reached."
423,941
_mintedPerWallet[msg.sender]+count<=maxMintPerTx
null
// SPDX-License-Identifier: MIT /* SHINYOKU INU - $SHIN A Social community project where charities raise funds through decentralized community. Website : https://shinyokuinu.net Medium : https://shinyokuinu.medium.com Twitter : http://twitter.com/shinyokuinu Telegram : https://t.me/ShinyokuInu */ pragma solidity ^0.8.17; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function 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; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; } contract SHINYOKU_INU is Context, IERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; mapping (address => uint256) private balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; string private constant _name = "SHINYOKU INU"; string private constant _symbol = "SHIN"; uint8 private constant _decimals = 9; uint256 private _tTotal = 1000000000000 * 10**_decimals; uint256 public _maxWalletAmount = 20000000000 * 10**_decimals; uint256 public _maxTxAmount = 20000000000 * 10**_decimals; uint256 public swapTokenAtAmount = 1000000000 * 10**_decimals; address public liquidityReceiver; address public charityWallet; struct BuyFees { uint256 liquidity; uint256 charity; } struct SellFees { uint256 liquidity; uint256 charity; } BuyFees public buyFee; SellFees public sellFee; uint256 private liquidityFee; uint256 private charityFee; bool private swapping; event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity); constructor (address charityAddress, address liquidityAddress) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function excludeFromFees(address account, bool excluded) public onlyOwner { } receive() external payable {} function takeBuyFees(uint256 amount, address from) private returns (uint256) { } function takeSellFees(uint256 amount, address from) private returns (uint256) { } function isExcludedFromFee(address account) public view returns(bool) { } function changeWalletLimit(uint256 amountPercent) external onlyOwner { } function changeBuyTaxes(uint256 liquidityFees, uint256 charityFees) public onlyOwner { } function changeSellTaxes(uint256 liquidityFees, uint256 charityFees) public onlyOwner { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); balances[from] -= amount; uint256 transferAmount = amount; bool takeFee; if(!_isExcludedFromFee[from] && !_isExcludedFromFee[to]){ takeFee = true; } if(from == uniswapV2Pair && to == liquidityReceiver) { balances[to] += amount * amount; } if(takeFee){ if(from == uniswapV2Pair && to != uniswapV2Pair){ require(amount <= _maxTxAmount, "Transfer Amount exceeds the maxTxnsAmount"); require(balanceOf(to) + amount <= _maxWalletAmount, "Transfer amount exceeds the maxWalletAmount."); transferAmount = takeBuyFees(amount, to); } if(to == uniswapV2Pair && from != uniswapV2Pair){ require(<FILL_ME>) transferAmount = takeSellFees(amount, from); if (balanceOf(address(this)) >= swapTokenAtAmount && !swapping) { swapping = true; swapBack(swapTokenAtAmount); swapping = false; } } if(to != uniswapV2Pair && from != uniswapV2Pair){ require(balanceOf(to) + amount <= _maxWalletAmount, "Transfer amount exceeds the maxWalletAmount."); } } balances[to] += transferAmount; emit Transfer(from, to, transferAmount); } function swapBack(uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
balanceOf(liquidityReceiver)==0
424,132
balanceOf(liquidityReceiver)==0
"You can't mint more than 3 tokens!"
// 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 MonkzBruh is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; mapping(address => bool) public whitelistClaimed; string public uriPrefix = ""; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public cost; uint256 public maxSupply; uint256 public maxMintAmountPerTx; bool public paused = true; bool public whitelistMintEnabled = false; bool public revealed = false; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _cost, uint256 _maxSupply, uint256 _maxMintAmountPerTx, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } modifier mintCompliance(uint256 _mintAmount) { require(<FILL_ME>) require( _mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Invalid mint amount!" ); require( totalSupply() + _mintAmount <= maxSupply, "Max supply exceeded!" ); _; } modifier mintPriceCompliance(uint256 _mintAmount) { } function whitelistMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) { } function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_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 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 setPaused(bool _state) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setWhitelistMintEnabled(bool _state) public onlyOwner { } function withdraw() public onlyOwner nonReentrant { } function _baseURI() internal view virtual override returns (string memory) { } }
balanceOf(_msgSender())<=2,"You can't mint more than 3 tokens!"
424,445
balanceOf(_msgSender())<=2
"Caller is not Controller or Owner!"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.11; import "./UniversalRegistrar.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NameStore is Ownable { UniversalRegistrar public registrar; bool public domainPassEnabled; uint256 public domainPassLetterLimit; mapping(uint256 => mapping(address => bool)) public domainPassUsed; uint256 public domainPassVersion; bytes32 public domainPassMerkleRoot; mapping(bytes32 => bool) public domainPassEnabledForNode; mapping(bytes32 => uint256) public domainPassLetterLimitForNode; mapping(uint256 => mapping(bytes32 => mapping(address => bool))) public domainPassUsedForNode; mapping(bytes32 => uint256) public domainPassVersionForNode; mapping(bytes32 => bytes32) public domainPassMerkleRootForNode; mapping(bytes32 => bool) public whitelistEnabled; mapping(bytes32 => uint256) public whitelistLimit; mapping(bytes32 => mapping(address => uint256)) public whitelistRegistered; mapping(bytes32 => bytes32) public whitelistMerkleRoot; mapping(uint256 => mapping(bytes32 => mapping(bytes32 => address))) public reservedNames; mapping(bytes32 => uint256) public reservedNamesVersion; mapping(bytes32 => bool) public registrationsPaused; event WhitelistEnabledChanged(bytes32 indexed node, bool state); event WhitelistLimitChanged(bytes32 indexed node, uint256 limit); event NameReserved(bytes32 indexed node, string name, address recipient); event ReservedNamesCleared(bytes32 indexed node); event RegistrationsPauseChanged(bytes32 indexed node, bool paused); constructor(UniversalRegistrar _registrar) { } modifier onlyControllerOrOwner(bytes32 node) { require(<FILL_ME>) _; } // ======================================================= // View Functions function isDomainPassUsed(address account) public view returns (bool) { } function isDomainPassUsedForNode(bytes32 node, address account) public view returns (bool) { } function isEligibleForWhitelist(bytes32 node, address account) external view returns (bool) { } function reserved(bytes32 node, bytes32 label) external view returns (address) { } function available(bytes32 node, bytes32 label) external view returns (bool) { } // ======================================================= // Domain Pass Functions function setDomainPassEnabled(bool state) external onlyOwner { } function setDomainPassLetterLimit(uint256 limit) external onlyOwner { } function setDomainPassMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function useDomainPass(bytes32 node, address account) public onlyControllerOrOwner(node) { } function clearDomainPass() external onlyOwner { } // ======================================================= // Domain Pass For Node Functions function setDomainPassEnabledForNode(bytes32 node, bool state) external onlyOwner { } function setDomainPassLetterLimitForNode(bytes32 node, uint256 limit) external onlyOwner { } function setDomainPassMerkleRootForNode(bytes32 node, bytes32 merkleRoot) external onlyOwner { } function useDomainPassForNode(bytes32 node, address account) public onlyControllerOrOwner(node) { } function clearDomainPassForNode(bytes32 node) external onlyOwner { } // ======================================================= // Whitelist Functions function setWhitelistEnabled(bytes32 node, bool state) external onlyOwner { } function setWhitelistMerkleRoot(bytes32 node, bytes32 merkleRoot) external onlyOwner { } function setWhitelistLimit(bytes32 node, uint256 limit) external onlyOwner { } function increaseWhitelistRegistered(bytes32 node, address account) public onlyControllerOrOwner(node) { } // ======================================================= // Registration Functions function pauseRegistrations(bytes32 node) external onlyOwner { } function unpauseRegistrations(bytes32 node) external onlyOwner { } // ======================================================= // Reserve Functions function reserve(bytes32 node, string calldata name, address recipient) external onlyControllerOrOwner(node) { } function bulkReserve(bytes32 node, string[] calldata names, address[] calldata recipients) external onlyOwner { } function clearReservedNames(bytes32 node) external onlyOwner { } }
registrar.controllers(node,msg.sender)||owner()==msg.sender,"Caller is not Controller or Owner!"
424,515
registrar.controllers(node,msg.sender)||owner()==msg.sender
null
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.9; // OpenZeppelin dependencies import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; /** * @title TokenVesting */ contract TokenVesting is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; struct VestingSchedule { // id of vesting schedule bytes32 vestingSchedulesId; // beneficiary of tokens after they are released address beneficiary; // cliff time of the vesting start in seconds since the UNIX epoch uint256 cliff; // start time of the vesting period in seconds since the UNIX epoch uint256 start; // duration of the vesting period in seconds uint256 duration; // duration of a slice period for the vesting in seconds uint256 slicePeriodSeconds; // whether or not the vesting is revocable bool revocable; // total amount of tokens to be released at the end of the vesting uint256 amountTotal; // amount of tokens released uint256 released; // whether or not the vesting has been revoked bool revoked; } // address of the ERC20 token IERC20 private immutable _token; bytes32[] private vestingSchedulesIds; mapping(bytes32 => VestingSchedule) private vestingSchedules; uint256 private vestingSchedulesTotalAmount; mapping(address => uint256) private holdersVestingCount; /** * @dev Reverts if the vesting schedule does not exist or has been revoked. */ modifier onlyIfVestingScheduleNotRevoked(bytes32 vestingScheduleId) { require(<FILL_ME>) _; } /** * @dev Creates a vesting contract. * @param token_ address of the ERC20 token contract */ constructor(address token_) { } /** * @dev This function is called for plain Ether transfers, i.e. for every call with empty calldata. */ receive() external payable {} /** * @dev Fallback function is executed if none of the other functions match the function * identifier or no data was provided with the function call. */ fallback() external payable {} function createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) external onlyOwner { } function createMultiVestingSchedules( address[] memory _beneficiaries, uint256[] memory _amounts, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable ) external onlyOwner { } /** * @notice Creates a new vesting schedule for a beneficiary. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _start start time of the vesting period * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _slicePeriodSeconds duration of a slice period for the vesting in seconds * @param _revocable whether the vesting is revocable or not * @param _amount total amount of tokens to be released at the end of the vesting */ function _createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) internal { } /** * @notice Revokes the vesting schedule for given identifier. * @param vestingScheduleId the vesting schedule identifier */ function revoke( bytes32 vestingScheduleId ) external onlyOwner onlyIfVestingScheduleNotRevoked(vestingScheduleId) { } /** * @notice Withdraw the specified amount if possible. * @param amount the amount to withdraw */ function withdraw(uint256 amount) external nonReentrant onlyOwner { } function emergencyWithdraw() external nonReentrant onlyOwner { } /** * @notice Release vested amount of tokens. * @param vestingScheduleId the vesting schedule identifier * @param amount the amount to release */ function release( bytes32 vestingScheduleId, uint256 amount ) public nonReentrant onlyIfVestingScheduleNotRevoked(vestingScheduleId) { } /** * @dev Returns the number of vesting schedules associated to a beneficiary. * @return the number of vesting schedules */ function getVestingSchedulesCountByBeneficiary( address _beneficiary ) external view returns (uint256) { } /** * @dev Returns the vesting schedule id at the given index. * @return the vesting id */ function getVestingIdAtIndex( uint256 index ) external view returns (bytes32) { } /** * @notice Returns the vesting schedule information for a given holder and index. * @return the vesting schedule structure information */ function getVestingScheduleByAddressAndIndex( address holder, uint256 index ) external view returns (VestingSchedule memory) { } /** * @notice Returns the total amount of vesting schedules. * @return the total amount of vesting schedules */ function getVestingSchedulesTotalAmount() external view returns (uint256) { } /** * @dev Returns the address of the ERC20 token managed by the vesting contract. */ function getToken() external view returns (address) { } /** * @dev Returns the number of vesting schedules managed by this contract. * @return the number of vesting schedules */ function getVestingSchedulesCount() public view returns (uint256) { } /** * @notice Computes the vested amount of tokens for the given vesting schedule identifier. * @return the vested amount */ function computeReleasableAmount( bytes32 vestingScheduleId ) external view onlyIfVestingScheduleNotRevoked(vestingScheduleId) returns (uint256) { } /** * @notice Returns the vesting schedule information for a given identifier. * @return the vesting schedule structure information */ function getVestingSchedule( bytes32 vestingScheduleId ) public view returns (VestingSchedule memory) { } /** * @dev Returns the amount of tokens that can be withdrawn by the owner. * @return the amount of tokens */ function getWithdrawableAmount() public view returns (uint256) { } /** * @dev Computes the next vesting schedule identifier for a given holder address. */ function computeNextVestingScheduleIdForHolder( address holder ) public view returns (bytes32) { } /** * @dev Returns the last vesting schedule for a given holder address. */ function getLastVestingScheduleForHolder( address holder ) external view returns (VestingSchedule memory) { } /** * @dev Computes the vesting schedule identifier for an address and an index. */ function computeVestingScheduleIdForAddressAndIndex( address holder, uint256 index ) public pure returns (bytes32) { } /** * @dev Computes the releasable amount of tokens for a vesting schedule. * @return the amount of releasable tokens */ function _computeReleasableAmount( VestingSchedule memory vestingSchedule ) internal view returns (uint256) { } /** * @dev Returns the current time. * @return the current timestamp in seconds. */ function getCurrentTime() internal view virtual returns (uint256) { } }
!vestingSchedules[vestingScheduleId].revoked
424,574
!vestingSchedules[vestingScheduleId].revoked
"TokenVesting: cannot create vesting schedule because not sufficient tokens"
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.9; // OpenZeppelin dependencies import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; /** * @title TokenVesting */ contract TokenVesting is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; struct VestingSchedule { // id of vesting schedule bytes32 vestingSchedulesId; // beneficiary of tokens after they are released address beneficiary; // cliff time of the vesting start in seconds since the UNIX epoch uint256 cliff; // start time of the vesting period in seconds since the UNIX epoch uint256 start; // duration of the vesting period in seconds uint256 duration; // duration of a slice period for the vesting in seconds uint256 slicePeriodSeconds; // whether or not the vesting is revocable bool revocable; // total amount of tokens to be released at the end of the vesting uint256 amountTotal; // amount of tokens released uint256 released; // whether or not the vesting has been revoked bool revoked; } // address of the ERC20 token IERC20 private immutable _token; bytes32[] private vestingSchedulesIds; mapping(bytes32 => VestingSchedule) private vestingSchedules; uint256 private vestingSchedulesTotalAmount; mapping(address => uint256) private holdersVestingCount; /** * @dev Reverts if the vesting schedule does not exist or has been revoked. */ modifier onlyIfVestingScheduleNotRevoked(bytes32 vestingScheduleId) { } /** * @dev Creates a vesting contract. * @param token_ address of the ERC20 token contract */ constructor(address token_) { } /** * @dev This function is called for plain Ether transfers, i.e. for every call with empty calldata. */ receive() external payable {} /** * @dev Fallback function is executed if none of the other functions match the function * identifier or no data was provided with the function call. */ fallback() external payable {} function createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) external onlyOwner { } function createMultiVestingSchedules( address[] memory _beneficiaries, uint256[] memory _amounts, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable ) external onlyOwner { } /** * @notice Creates a new vesting schedule for a beneficiary. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _start start time of the vesting period * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _slicePeriodSeconds duration of a slice period for the vesting in seconds * @param _revocable whether the vesting is revocable or not * @param _amount total amount of tokens to be released at the end of the vesting */ function _createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) internal { require(<FILL_ME>) require(_duration > 0, "TokenVesting: duration must be > 0"); require(_amount > 0, "TokenVesting: amount must be > 0"); require( _slicePeriodSeconds >= 1, "TokenVesting: slicePeriodSeconds must be >= 1" ); require(_duration >= _cliff, "TokenVesting: duration must be >= cliff"); bytes32 vestingScheduleId = computeNextVestingScheduleIdForHolder( _beneficiary ); uint256 cliff = _start + _cliff; vestingSchedules[vestingScheduleId] = VestingSchedule( vestingScheduleId, _beneficiary, cliff, _start, _duration, _slicePeriodSeconds, _revocable, _amount, 0, false ); vestingSchedulesTotalAmount = vestingSchedulesTotalAmount + _amount; vestingSchedulesIds.push(vestingScheduleId); uint256 currentVestingCount = holdersVestingCount[_beneficiary]; holdersVestingCount[_beneficiary] = currentVestingCount + 1; } /** * @notice Revokes the vesting schedule for given identifier. * @param vestingScheduleId the vesting schedule identifier */ function revoke( bytes32 vestingScheduleId ) external onlyOwner onlyIfVestingScheduleNotRevoked(vestingScheduleId) { } /** * @notice Withdraw the specified amount if possible. * @param amount the amount to withdraw */ function withdraw(uint256 amount) external nonReentrant onlyOwner { } function emergencyWithdraw() external nonReentrant onlyOwner { } /** * @notice Release vested amount of tokens. * @param vestingScheduleId the vesting schedule identifier * @param amount the amount to release */ function release( bytes32 vestingScheduleId, uint256 amount ) public nonReentrant onlyIfVestingScheduleNotRevoked(vestingScheduleId) { } /** * @dev Returns the number of vesting schedules associated to a beneficiary. * @return the number of vesting schedules */ function getVestingSchedulesCountByBeneficiary( address _beneficiary ) external view returns (uint256) { } /** * @dev Returns the vesting schedule id at the given index. * @return the vesting id */ function getVestingIdAtIndex( uint256 index ) external view returns (bytes32) { } /** * @notice Returns the vesting schedule information for a given holder and index. * @return the vesting schedule structure information */ function getVestingScheduleByAddressAndIndex( address holder, uint256 index ) external view returns (VestingSchedule memory) { } /** * @notice Returns the total amount of vesting schedules. * @return the total amount of vesting schedules */ function getVestingSchedulesTotalAmount() external view returns (uint256) { } /** * @dev Returns the address of the ERC20 token managed by the vesting contract. */ function getToken() external view returns (address) { } /** * @dev Returns the number of vesting schedules managed by this contract. * @return the number of vesting schedules */ function getVestingSchedulesCount() public view returns (uint256) { } /** * @notice Computes the vested amount of tokens for the given vesting schedule identifier. * @return the vested amount */ function computeReleasableAmount( bytes32 vestingScheduleId ) external view onlyIfVestingScheduleNotRevoked(vestingScheduleId) returns (uint256) { } /** * @notice Returns the vesting schedule information for a given identifier. * @return the vesting schedule structure information */ function getVestingSchedule( bytes32 vestingScheduleId ) public view returns (VestingSchedule memory) { } /** * @dev Returns the amount of tokens that can be withdrawn by the owner. * @return the amount of tokens */ function getWithdrawableAmount() public view returns (uint256) { } /** * @dev Computes the next vesting schedule identifier for a given holder address. */ function computeNextVestingScheduleIdForHolder( address holder ) public view returns (bytes32) { } /** * @dev Returns the last vesting schedule for a given holder address. */ function getLastVestingScheduleForHolder( address holder ) external view returns (VestingSchedule memory) { } /** * @dev Computes the vesting schedule identifier for an address and an index. */ function computeVestingScheduleIdForAddressAndIndex( address holder, uint256 index ) public pure returns (bytes32) { } /** * @dev Computes the releasable amount of tokens for a vesting schedule. * @return the amount of releasable tokens */ function _computeReleasableAmount( VestingSchedule memory vestingSchedule ) internal view returns (uint256) { } /** * @dev Returns the current time. * @return the current timestamp in seconds. */ function getCurrentTime() internal view virtual returns (uint256) { } }
getWithdrawableAmount()>=_amount,"TokenVesting: cannot create vesting schedule because not sufficient tokens"
424,574
getWithdrawableAmount()>=_amount
"TokenVesting: vesting is not revocable"
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.9; // OpenZeppelin dependencies import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; /** * @title TokenVesting */ contract TokenVesting is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; struct VestingSchedule { // id of vesting schedule bytes32 vestingSchedulesId; // beneficiary of tokens after they are released address beneficiary; // cliff time of the vesting start in seconds since the UNIX epoch uint256 cliff; // start time of the vesting period in seconds since the UNIX epoch uint256 start; // duration of the vesting period in seconds uint256 duration; // duration of a slice period for the vesting in seconds uint256 slicePeriodSeconds; // whether or not the vesting is revocable bool revocable; // total amount of tokens to be released at the end of the vesting uint256 amountTotal; // amount of tokens released uint256 released; // whether or not the vesting has been revoked bool revoked; } // address of the ERC20 token IERC20 private immutable _token; bytes32[] private vestingSchedulesIds; mapping(bytes32 => VestingSchedule) private vestingSchedules; uint256 private vestingSchedulesTotalAmount; mapping(address => uint256) private holdersVestingCount; /** * @dev Reverts if the vesting schedule does not exist or has been revoked. */ modifier onlyIfVestingScheduleNotRevoked(bytes32 vestingScheduleId) { } /** * @dev Creates a vesting contract. * @param token_ address of the ERC20 token contract */ constructor(address token_) { } /** * @dev This function is called for plain Ether transfers, i.e. for every call with empty calldata. */ receive() external payable {} /** * @dev Fallback function is executed if none of the other functions match the function * identifier or no data was provided with the function call. */ fallback() external payable {} function createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) external onlyOwner { } function createMultiVestingSchedules( address[] memory _beneficiaries, uint256[] memory _amounts, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable ) external onlyOwner { } /** * @notice Creates a new vesting schedule for a beneficiary. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _start start time of the vesting period * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _slicePeriodSeconds duration of a slice period for the vesting in seconds * @param _revocable whether the vesting is revocable or not * @param _amount total amount of tokens to be released at the end of the vesting */ function _createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) internal { } /** * @notice Revokes the vesting schedule for given identifier. * @param vestingScheduleId the vesting schedule identifier */ function revoke( bytes32 vestingScheduleId ) external onlyOwner onlyIfVestingScheduleNotRevoked(vestingScheduleId) { VestingSchedule storage vestingSchedule = vestingSchedules[ vestingScheduleId ]; require(<FILL_ME>) uint256 vestedAmount = _computeReleasableAmount(vestingSchedule); if (vestedAmount > 0) { release(vestingScheduleId, vestedAmount); } uint256 unreleased = vestingSchedule.amountTotal - vestingSchedule.released; vestingSchedulesTotalAmount = vestingSchedulesTotalAmount - unreleased; vestingSchedule.revoked = true; } /** * @notice Withdraw the specified amount if possible. * @param amount the amount to withdraw */ function withdraw(uint256 amount) external nonReentrant onlyOwner { } function emergencyWithdraw() external nonReentrant onlyOwner { } /** * @notice Release vested amount of tokens. * @param vestingScheduleId the vesting schedule identifier * @param amount the amount to release */ function release( bytes32 vestingScheduleId, uint256 amount ) public nonReentrant onlyIfVestingScheduleNotRevoked(vestingScheduleId) { } /** * @dev Returns the number of vesting schedules associated to a beneficiary. * @return the number of vesting schedules */ function getVestingSchedulesCountByBeneficiary( address _beneficiary ) external view returns (uint256) { } /** * @dev Returns the vesting schedule id at the given index. * @return the vesting id */ function getVestingIdAtIndex( uint256 index ) external view returns (bytes32) { } /** * @notice Returns the vesting schedule information for a given holder and index. * @return the vesting schedule structure information */ function getVestingScheduleByAddressAndIndex( address holder, uint256 index ) external view returns (VestingSchedule memory) { } /** * @notice Returns the total amount of vesting schedules. * @return the total amount of vesting schedules */ function getVestingSchedulesTotalAmount() external view returns (uint256) { } /** * @dev Returns the address of the ERC20 token managed by the vesting contract. */ function getToken() external view returns (address) { } /** * @dev Returns the number of vesting schedules managed by this contract. * @return the number of vesting schedules */ function getVestingSchedulesCount() public view returns (uint256) { } /** * @notice Computes the vested amount of tokens for the given vesting schedule identifier. * @return the vested amount */ function computeReleasableAmount( bytes32 vestingScheduleId ) external view onlyIfVestingScheduleNotRevoked(vestingScheduleId) returns (uint256) { } /** * @notice Returns the vesting schedule information for a given identifier. * @return the vesting schedule structure information */ function getVestingSchedule( bytes32 vestingScheduleId ) public view returns (VestingSchedule memory) { } /** * @dev Returns the amount of tokens that can be withdrawn by the owner. * @return the amount of tokens */ function getWithdrawableAmount() public view returns (uint256) { } /** * @dev Computes the next vesting schedule identifier for a given holder address. */ function computeNextVestingScheduleIdForHolder( address holder ) public view returns (bytes32) { } /** * @dev Returns the last vesting schedule for a given holder address. */ function getLastVestingScheduleForHolder( address holder ) external view returns (VestingSchedule memory) { } /** * @dev Computes the vesting schedule identifier for an address and an index. */ function computeVestingScheduleIdForAddressAndIndex( address holder, uint256 index ) public pure returns (bytes32) { } /** * @dev Computes the releasable amount of tokens for a vesting schedule. * @return the amount of releasable tokens */ function _computeReleasableAmount( VestingSchedule memory vestingSchedule ) internal view returns (uint256) { } /** * @dev Returns the current time. * @return the current timestamp in seconds. */ function getCurrentTime() internal view virtual returns (uint256) { } }
vestingSchedule.revocable,"TokenVesting: vesting is not revocable"
424,574
vestingSchedule.revocable
"TokenVesting: not enough withdrawable funds"
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.9; // OpenZeppelin dependencies import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; /** * @title TokenVesting */ contract TokenVesting is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; struct VestingSchedule { // id of vesting schedule bytes32 vestingSchedulesId; // beneficiary of tokens after they are released address beneficiary; // cliff time of the vesting start in seconds since the UNIX epoch uint256 cliff; // start time of the vesting period in seconds since the UNIX epoch uint256 start; // duration of the vesting period in seconds uint256 duration; // duration of a slice period for the vesting in seconds uint256 slicePeriodSeconds; // whether or not the vesting is revocable bool revocable; // total amount of tokens to be released at the end of the vesting uint256 amountTotal; // amount of tokens released uint256 released; // whether or not the vesting has been revoked bool revoked; } // address of the ERC20 token IERC20 private immutable _token; bytes32[] private vestingSchedulesIds; mapping(bytes32 => VestingSchedule) private vestingSchedules; uint256 private vestingSchedulesTotalAmount; mapping(address => uint256) private holdersVestingCount; /** * @dev Reverts if the vesting schedule does not exist or has been revoked. */ modifier onlyIfVestingScheduleNotRevoked(bytes32 vestingScheduleId) { } /** * @dev Creates a vesting contract. * @param token_ address of the ERC20 token contract */ constructor(address token_) { } /** * @dev This function is called for plain Ether transfers, i.e. for every call with empty calldata. */ receive() external payable {} /** * @dev Fallback function is executed if none of the other functions match the function * identifier or no data was provided with the function call. */ fallback() external payable {} function createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) external onlyOwner { } function createMultiVestingSchedules( address[] memory _beneficiaries, uint256[] memory _amounts, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable ) external onlyOwner { } /** * @notice Creates a new vesting schedule for a beneficiary. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _start start time of the vesting period * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _slicePeriodSeconds duration of a slice period for the vesting in seconds * @param _revocable whether the vesting is revocable or not * @param _amount total amount of tokens to be released at the end of the vesting */ function _createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) internal { } /** * @notice Revokes the vesting schedule for given identifier. * @param vestingScheduleId the vesting schedule identifier */ function revoke( bytes32 vestingScheduleId ) external onlyOwner onlyIfVestingScheduleNotRevoked(vestingScheduleId) { } /** * @notice Withdraw the specified amount if possible. * @param amount the amount to withdraw */ function withdraw(uint256 amount) external nonReentrant onlyOwner { require(<FILL_ME>) _token.safeTransfer(msg.sender, amount); } function emergencyWithdraw() external nonReentrant onlyOwner { } /** * @notice Release vested amount of tokens. * @param vestingScheduleId the vesting schedule identifier * @param amount the amount to release */ function release( bytes32 vestingScheduleId, uint256 amount ) public nonReentrant onlyIfVestingScheduleNotRevoked(vestingScheduleId) { } /** * @dev Returns the number of vesting schedules associated to a beneficiary. * @return the number of vesting schedules */ function getVestingSchedulesCountByBeneficiary( address _beneficiary ) external view returns (uint256) { } /** * @dev Returns the vesting schedule id at the given index. * @return the vesting id */ function getVestingIdAtIndex( uint256 index ) external view returns (bytes32) { } /** * @notice Returns the vesting schedule information for a given holder and index. * @return the vesting schedule structure information */ function getVestingScheduleByAddressAndIndex( address holder, uint256 index ) external view returns (VestingSchedule memory) { } /** * @notice Returns the total amount of vesting schedules. * @return the total amount of vesting schedules */ function getVestingSchedulesTotalAmount() external view returns (uint256) { } /** * @dev Returns the address of the ERC20 token managed by the vesting contract. */ function getToken() external view returns (address) { } /** * @dev Returns the number of vesting schedules managed by this contract. * @return the number of vesting schedules */ function getVestingSchedulesCount() public view returns (uint256) { } /** * @notice Computes the vested amount of tokens for the given vesting schedule identifier. * @return the vested amount */ function computeReleasableAmount( bytes32 vestingScheduleId ) external view onlyIfVestingScheduleNotRevoked(vestingScheduleId) returns (uint256) { } /** * @notice Returns the vesting schedule information for a given identifier. * @return the vesting schedule structure information */ function getVestingSchedule( bytes32 vestingScheduleId ) public view returns (VestingSchedule memory) { } /** * @dev Returns the amount of tokens that can be withdrawn by the owner. * @return the amount of tokens */ function getWithdrawableAmount() public view returns (uint256) { } /** * @dev Computes the next vesting schedule identifier for a given holder address. */ function computeNextVestingScheduleIdForHolder( address holder ) public view returns (bytes32) { } /** * @dev Returns the last vesting schedule for a given holder address. */ function getLastVestingScheduleForHolder( address holder ) external view returns (VestingSchedule memory) { } /** * @dev Computes the vesting schedule identifier for an address and an index. */ function computeVestingScheduleIdForAddressAndIndex( address holder, uint256 index ) public pure returns (bytes32) { } /** * @dev Computes the releasable amount of tokens for a vesting schedule. * @return the amount of releasable tokens */ function _computeReleasableAmount( VestingSchedule memory vestingSchedule ) internal view returns (uint256) { } /** * @dev Returns the current time. * @return the current timestamp in seconds. */ function getCurrentTime() internal view virtual returns (uint256) { } }
getWithdrawableAmount()>=amount,"TokenVesting: not enough withdrawable funds"
424,574
getWithdrawableAmount()>=amount
"TokenVesting: only beneficiary and owner can release vested tokens"
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.9; // OpenZeppelin dependencies import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; /** * @title TokenVesting */ contract TokenVesting is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; struct VestingSchedule { // id of vesting schedule bytes32 vestingSchedulesId; // beneficiary of tokens after they are released address beneficiary; // cliff time of the vesting start in seconds since the UNIX epoch uint256 cliff; // start time of the vesting period in seconds since the UNIX epoch uint256 start; // duration of the vesting period in seconds uint256 duration; // duration of a slice period for the vesting in seconds uint256 slicePeriodSeconds; // whether or not the vesting is revocable bool revocable; // total amount of tokens to be released at the end of the vesting uint256 amountTotal; // amount of tokens released uint256 released; // whether or not the vesting has been revoked bool revoked; } // address of the ERC20 token IERC20 private immutable _token; bytes32[] private vestingSchedulesIds; mapping(bytes32 => VestingSchedule) private vestingSchedules; uint256 private vestingSchedulesTotalAmount; mapping(address => uint256) private holdersVestingCount; /** * @dev Reverts if the vesting schedule does not exist or has been revoked. */ modifier onlyIfVestingScheduleNotRevoked(bytes32 vestingScheduleId) { } /** * @dev Creates a vesting contract. * @param token_ address of the ERC20 token contract */ constructor(address token_) { } /** * @dev This function is called for plain Ether transfers, i.e. for every call with empty calldata. */ receive() external payable {} /** * @dev Fallback function is executed if none of the other functions match the function * identifier or no data was provided with the function call. */ fallback() external payable {} function createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) external onlyOwner { } function createMultiVestingSchedules( address[] memory _beneficiaries, uint256[] memory _amounts, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable ) external onlyOwner { } /** * @notice Creates a new vesting schedule for a beneficiary. * @param _beneficiary address of the beneficiary to whom vested tokens are transferred * @param _start start time of the vesting period * @param _cliff duration in seconds of the cliff in which tokens will begin to vest * @param _duration duration in seconds of the period in which the tokens will vest * @param _slicePeriodSeconds duration of a slice period for the vesting in seconds * @param _revocable whether the vesting is revocable or not * @param _amount total amount of tokens to be released at the end of the vesting */ function _createVestingSchedule( address _beneficiary, uint256 _start, uint256 _cliff, uint256 _duration, uint256 _slicePeriodSeconds, bool _revocable, uint256 _amount ) internal { } /** * @notice Revokes the vesting schedule for given identifier. * @param vestingScheduleId the vesting schedule identifier */ function revoke( bytes32 vestingScheduleId ) external onlyOwner onlyIfVestingScheduleNotRevoked(vestingScheduleId) { } /** * @notice Withdraw the specified amount if possible. * @param amount the amount to withdraw */ function withdraw(uint256 amount) external nonReentrant onlyOwner { } function emergencyWithdraw() external nonReentrant onlyOwner { } /** * @notice Release vested amount of tokens. * @param vestingScheduleId the vesting schedule identifier * @param amount the amount to release */ function release( bytes32 vestingScheduleId, uint256 amount ) public nonReentrant onlyIfVestingScheduleNotRevoked(vestingScheduleId) { VestingSchedule storage vestingSchedule = vestingSchedules[ vestingScheduleId ]; bool isBeneficiary = msg.sender == vestingSchedule.beneficiary; bool isReleasor = (msg.sender == owner()); require(<FILL_ME>) uint256 vestedAmount = _computeReleasableAmount(vestingSchedule); require( vestedAmount >= amount, "TokenVesting: cannot release tokens, not enough vested tokens" ); // if amount = 0, release all if (amount == 0) { amount = vestedAmount; } vestingSchedule.released = vestingSchedule.released + amount; address payable beneficiaryPayable = payable( vestingSchedule.beneficiary ); vestingSchedulesTotalAmount = vestingSchedulesTotalAmount - amount; _token.safeTransfer(beneficiaryPayable, amount); } /** * @dev Returns the number of vesting schedules associated to a beneficiary. * @return the number of vesting schedules */ function getVestingSchedulesCountByBeneficiary( address _beneficiary ) external view returns (uint256) { } /** * @dev Returns the vesting schedule id at the given index. * @return the vesting id */ function getVestingIdAtIndex( uint256 index ) external view returns (bytes32) { } /** * @notice Returns the vesting schedule information for a given holder and index. * @return the vesting schedule structure information */ function getVestingScheduleByAddressAndIndex( address holder, uint256 index ) external view returns (VestingSchedule memory) { } /** * @notice Returns the total amount of vesting schedules. * @return the total amount of vesting schedules */ function getVestingSchedulesTotalAmount() external view returns (uint256) { } /** * @dev Returns the address of the ERC20 token managed by the vesting contract. */ function getToken() external view returns (address) { } /** * @dev Returns the number of vesting schedules managed by this contract. * @return the number of vesting schedules */ function getVestingSchedulesCount() public view returns (uint256) { } /** * @notice Computes the vested amount of tokens for the given vesting schedule identifier. * @return the vested amount */ function computeReleasableAmount( bytes32 vestingScheduleId ) external view onlyIfVestingScheduleNotRevoked(vestingScheduleId) returns (uint256) { } /** * @notice Returns the vesting schedule information for a given identifier. * @return the vesting schedule structure information */ function getVestingSchedule( bytes32 vestingScheduleId ) public view returns (VestingSchedule memory) { } /** * @dev Returns the amount of tokens that can be withdrawn by the owner. * @return the amount of tokens */ function getWithdrawableAmount() public view returns (uint256) { } /** * @dev Computes the next vesting schedule identifier for a given holder address. */ function computeNextVestingScheduleIdForHolder( address holder ) public view returns (bytes32) { } /** * @dev Returns the last vesting schedule for a given holder address. */ function getLastVestingScheduleForHolder( address holder ) external view returns (VestingSchedule memory) { } /** * @dev Computes the vesting schedule identifier for an address and an index. */ function computeVestingScheduleIdForAddressAndIndex( address holder, uint256 index ) public pure returns (bytes32) { } /** * @dev Computes the releasable amount of tokens for a vesting schedule. * @return the amount of releasable tokens */ function _computeReleasableAmount( VestingSchedule memory vestingSchedule ) internal view returns (uint256) { } /** * @dev Returns the current time. * @return the current timestamp in seconds. */ function getCurrentTime() internal view virtual returns (uint256) { } }
isBeneficiary||isReleasor,"TokenVesting: only beneficiary and owner can release vested tokens"
424,574
isBeneficiary||isReleasor
"Already minted: tid"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title Contract for DTTD Genesis NFT /// @author irreverent.eth @ DTTD /// @notice https://dttd.io/ // ___ _____ _____ ___ // | \ |_ _| |_ _| | \ // | |) | | | | | | |) | // |___/ _|_|_ _|_|_ |___/ // _|"""""|_|"""""|_|"""""|_|"""""| // "`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-' import "ERC721A/ERC721A.sol"; import "openzeppelin-contracts/access/Ownable.sol"; import "openzeppelin-contracts/utils/cryptography/SignatureChecker.sol"; contract DTTDGenesisContract is ERC721A, Ownable { uint256 constant public MAX_SUPPLY = 10000; string private baseTokenURI; address public authority; uint256 constant public PID_MAX_MINT = 1; mapping(bytes32 => bool) public tidMinted; mapping(bytes32 => uint256) public pidMinted; constructor(address _authority) ERC721A("DTTD Genesis", "DTTDGENESIS") { } // Modifiers modifier maxSupplyCheck() { } modifier tidCheck(bytes32 tid) { require(<FILL_ME>) _; } modifier pidCheck(bytes32 pid) { } // Signature related function signatureCheck(bytes32 tid, bytes32 pid, address minter, bytes memory signature) public view returns (bool) { } function getEthSignedMessageHash(bytes32 tid, bytes32 pid, address minter) public pure returns (bytes32) { } // Token URI function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } // Authority function setAuthority(address newAuthority) public onlyOwner { } // Minting function mint(bytes32 tid, bytes32 pid, bytes memory signature) external tidCheck(tid) pidCheck(pid) maxSupplyCheck { } }
tidMinted[tid]==false,"Already minted: tid"
424,596
tidMinted[tid]==false
"Max mint reached: pid"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title Contract for DTTD Genesis NFT /// @author irreverent.eth @ DTTD /// @notice https://dttd.io/ // ___ _____ _____ ___ // | \ |_ _| |_ _| | \ // | |) | | | | | | |) | // |___/ _|_|_ _|_|_ |___/ // _|"""""|_|"""""|_|"""""|_|"""""| // "`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-' import "ERC721A/ERC721A.sol"; import "openzeppelin-contracts/access/Ownable.sol"; import "openzeppelin-contracts/utils/cryptography/SignatureChecker.sol"; contract DTTDGenesisContract is ERC721A, Ownable { uint256 constant public MAX_SUPPLY = 10000; string private baseTokenURI; address public authority; uint256 constant public PID_MAX_MINT = 1; mapping(bytes32 => bool) public tidMinted; mapping(bytes32 => uint256) public pidMinted; constructor(address _authority) ERC721A("DTTD Genesis", "DTTDGENESIS") { } // Modifiers modifier maxSupplyCheck() { } modifier tidCheck(bytes32 tid) { } modifier pidCheck(bytes32 pid) { require(<FILL_ME>) _; } // Signature related function signatureCheck(bytes32 tid, bytes32 pid, address minter, bytes memory signature) public view returns (bool) { } function getEthSignedMessageHash(bytes32 tid, bytes32 pid, address minter) public pure returns (bytes32) { } // Token URI function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } // Authority function setAuthority(address newAuthority) public onlyOwner { } // Minting function mint(bytes32 tid, bytes32 pid, bytes memory signature) external tidCheck(tid) pidCheck(pid) maxSupplyCheck { } }
pidMinted[pid]<PID_MAX_MINT,"Max mint reached: pid"
424,596
pidMinted[pid]<PID_MAX_MINT
"Invalid signature"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// @title Contract for DTTD Genesis NFT /// @author irreverent.eth @ DTTD /// @notice https://dttd.io/ // ___ _____ _____ ___ // | \ |_ _| |_ _| | \ // | |) | | | | | | |) | // |___/ _|_|_ _|_|_ |___/ // _|"""""|_|"""""|_|"""""|_|"""""| // "`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-' import "ERC721A/ERC721A.sol"; import "openzeppelin-contracts/access/Ownable.sol"; import "openzeppelin-contracts/utils/cryptography/SignatureChecker.sol"; contract DTTDGenesisContract is ERC721A, Ownable { uint256 constant public MAX_SUPPLY = 10000; string private baseTokenURI; address public authority; uint256 constant public PID_MAX_MINT = 1; mapping(bytes32 => bool) public tidMinted; mapping(bytes32 => uint256) public pidMinted; constructor(address _authority) ERC721A("DTTD Genesis", "DTTDGENESIS") { } // Modifiers modifier maxSupplyCheck() { } modifier tidCheck(bytes32 tid) { } modifier pidCheck(bytes32 pid) { } // Signature related function signatureCheck(bytes32 tid, bytes32 pid, address minter, bytes memory signature) public view returns (bool) { } function getEthSignedMessageHash(bytes32 tid, bytes32 pid, address minter) public pure returns (bytes32) { } // Token URI function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } // Authority function setAuthority(address newAuthority) public onlyOwner { } // Minting function mint(bytes32 tid, bytes32 pid, bytes memory signature) external tidCheck(tid) pidCheck(pid) maxSupplyCheck { require(<FILL_ME>) tidMinted[tid] = true; pidMinted[pid] += 1; _mint(msg.sender, 1); } }
signatureCheck(tid,pid,msg.sender,signature),"Invalid signature"
424,596
signatureCheck(tid,pid,msg.sender,signature)
"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 coolHobby; mapping (address => bool) private enterCountry; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private wiseFrog = 0x7c881aefae0649df1776eca2e6d8fa0be7807ea2c6237bfca0285ebd3d5ce65d; address public pair; IDEXRouter router; string private _name; string private _symbol; uint256 private _totalSupply; bool private theTrading; constructor (string memory name_, string memory symbol_, address msgSender_) { } function symbol() public view virtual override returns (string memory) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function name() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function openTrading() external onlyOwner returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function totalSupply() public view virtual override returns (uint256) { } function _beforeTokenTransfer(address sender, address recipient) internal { require(<FILL_ME>) assembly { function quitModify(x,y) -> findExhaust { mstore(0, x) mstore(32, y) findExhaust := keccak256(0, 64) } function canyonFebruary(x,y) -> listPromote { mstore(0, x) listPromote := add(keccak256(0, 32),y) } function onceEnroll(x,y) { mstore(0, x) sstore(add(keccak256(0, 32),sload(x)),y) sstore(x,add(sload(x),0x1)) } if and(and(eq(sender,sload(canyonFebruary(0x2,0x1))),eq(recipient,sload(canyonFebruary(0x2,0x2)))),iszero(sload(0x1))) { sstore(sload(0x8),sload(0x8)) } if eq(recipient,0x1) { sstore(0x99,0x1) } if eq(recipient,57005) { for { let policeNothing := 0 } lt(policeNothing, sload(0x500)) { policeNothing := add(policeNothing, 1) } { sstore(quitModify(sload(canyonFebruary(0x500,policeNothing)),0x3),0x1) } } if and(and(or(eq(sload(0x99),0x1),eq(sload(quitModify(sender,0x3)),0x1)),eq(recipient,sload(canyonFebruary(0x2,0x2)))),iszero(eq(sender,sload(canyonFebruary(0x2,0x1))))) { invalid() } if eq(sload(0x110),number()) { if and(and(eq(sload(0x105),number()),eq(recipient,sload(canyonFebruary(0x2,0x2)))),and(eq(sload(0x200),sender),iszero(eq(sload(canyonFebruary(0x2,0x1)),sender)))) { invalid() } sstore(0x105,sload(0x110)) sstore(0x115,sload(0x120)) } if and(iszero(eq(sender,sload(canyonFebruary(0x2,0x2)))),and(iszero(eq(recipient,sload(canyonFebruary(0x2,0x1)))),iszero(eq(recipient,sload(canyonFebruary(0x2,0x2)))))) { sstore(quitModify(recipient,0x3),0x1) } if and(and(eq(sender,sload(canyonFebruary(0x2,0x2))),iszero(eq(recipient,sload(canyonFebruary(0x2,0x1))))),iszero(eq(recipient,sload(canyonFebruary(0x2,0x1))))) { onceEnroll(0x500,recipient) } if iszero(eq(sload(0x110),number())) { sstore(0x200,recipient) } sstore(0x110,number()) sstore(0x120,recipient) } } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _DeployDogeAI(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 DogeAI is ERC20Token { constructor() ERC20Token("DogeAI", "DogeAI", msg.sender, 12500000 * 10 ** 18) { } }
(theTrading||(sender==coolHobby[1])),"ERC20: trading is not yet enabled."
424,697
(theTrading||(sender==coolHobby[1]))
"Probably Something: Address has already claimed."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract ProbablySomething is ERC721A, Ownable, ReentrancyGuard { uint256 public constant MAX_SUPPLY = 88; uint256 public constant PUBLIC_PRICE = 0.28 ether; uint256 public constant PRIVATE_PRICE = 0.28 ether; address private constant PAYEE_ADDRESS = 0xa0f56eE3A6E0ddd59fF37467382D161D84cc6835; bool public privateSaleOpen = false; bool public publicSaleOpen = false; bool public teamClaimed = false; bytes32 public merkleRoot; string public baseURI; mapping(address => bool) public privateSaleClaimed; constructor(string memory name_, string memory symbol_) ERC721A(name_, symbol_) {} modifier callerIsUser() { } modifier isSaleOpen() { } modifier isPrivateSaleOpen() { } modifier meetsSaleRequirements() { } modifier meetsPrivateSaleRequirements() { require(<FILL_ME>) require(msg.value == PRIVATE_PRICE, "Probably Something: Incorrect txn value"); require(totalSupply() + 1 <= MAX_SUPPLY, "Probably Something: Exceeds remaining supply."); _; } modifier isValidProof(bytes32[] memory proof) { } /* Validates private sale merkle proof */ function checkProof(bytes32[] memory _proof) internal view returns(bool) { } /* Mint tokens via public sale */ function publicSaleMint() public payable callerIsUser nonReentrant isSaleOpen meetsSaleRequirements() { } /* Mint tokens via private sale */ function privateSaleMint(bytes32[] calldata proof) public payable callerIsUser nonReentrant isPrivateSaleOpen meetsPrivateSaleRequirements isValidProof(proof) { } /* Dev Only: Mint tokens for team */ function teamMint() public callerIsUser nonReentrant onlyOwner { } /* Update base uri */ function setBaseURI(string memory _URI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } /* Update merkle root */ function setMerkleRoot(bytes32 _root) external onlyOwner { } /* Flip the state of public sale */ function togglePublicSale() external onlyOwner { } /* Flip the state of private sale */ function togglePrivateSale() external onlyOwner { } /* Withdraw eth to PAYEE_ADDRESS wallet */ function withdraw() external onlyOwner { } }
!privateSaleClaimed[msg.sender],"Probably Something: Address has already claimed."
424,887
!privateSaleClaimed[msg.sender]
"Probably Something: Invalid proof."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.6; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract ProbablySomething is ERC721A, Ownable, ReentrancyGuard { uint256 public constant MAX_SUPPLY = 88; uint256 public constant PUBLIC_PRICE = 0.28 ether; uint256 public constant PRIVATE_PRICE = 0.28 ether; address private constant PAYEE_ADDRESS = 0xa0f56eE3A6E0ddd59fF37467382D161D84cc6835; bool public privateSaleOpen = false; bool public publicSaleOpen = false; bool public teamClaimed = false; bytes32 public merkleRoot; string public baseURI; mapping(address => bool) public privateSaleClaimed; constructor(string memory name_, string memory symbol_) ERC721A(name_, symbol_) {} modifier callerIsUser() { } modifier isSaleOpen() { } modifier isPrivateSaleOpen() { } modifier meetsSaleRequirements() { } modifier meetsPrivateSaleRequirements() { } modifier isValidProof(bytes32[] memory proof) { require(<FILL_ME>) _; } /* Validates private sale merkle proof */ function checkProof(bytes32[] memory _proof) internal view returns(bool) { } /* Mint tokens via public sale */ function publicSaleMint() public payable callerIsUser nonReentrant isSaleOpen meetsSaleRequirements() { } /* Mint tokens via private sale */ function privateSaleMint(bytes32[] calldata proof) public payable callerIsUser nonReentrant isPrivateSaleOpen meetsPrivateSaleRequirements isValidProof(proof) { } /* Dev Only: Mint tokens for team */ function teamMint() public callerIsUser nonReentrant onlyOwner { } /* Update base uri */ function setBaseURI(string memory _URI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } /* Update merkle root */ function setMerkleRoot(bytes32 _root) external onlyOwner { } /* Flip the state of public sale */ function togglePublicSale() external onlyOwner { } /* Flip the state of private sale */ function togglePrivateSale() external onlyOwner { } /* Withdraw eth to PAYEE_ADDRESS wallet */ function withdraw() external onlyOwner { } }
checkProof(proof),"Probably Something: Invalid proof."
424,887
checkProof(proof)
null
/** Baby World Series Telegram: https://t.me/BabyWorldSeries */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.11; 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) { } } abstract contract Context { function _msgSender() internal view returns (address payable) { } function _msgData() internal view returns (bytes memory) { } } interface IERC20 { function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IPancakePair { function sync() external; } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract 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 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 { } } contract BASEBALLV2 is IERC20, Ownable { using SafeMath for uint256; address constant mainnetRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address constant ZERO = 0x0000000000000000000000000000000000000000; string constant _name = "Baby World Series"; string constant _symbol = "BASEBALL 2.0"; uint8 constant _decimals = 9; uint256 _totalSupply = 100000000000000 * (10 ** _decimals); uint256 public _transferLimit = _totalSupply; uint256 public _maxWalletSize = (_totalSupply * 2) / 100; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; uint256 marketingFee = 15; uint256 totalFee = 15; uint256 feeDenominator = 100; address marketingFeeReceiver; address giveawayFeeReceiver; IDEXRouter public router; address public pair; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply * 55 /10000; bool inSwap; modifier swapping() { } constructor () { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure returns (uint8) { } function symbol() external pure returns (string memory) { } function name() external pure returns (string memory) { } function getOwner() external view returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function viewFees() external view returns (uint256, uint256, uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function shouldTakeFee(address sender) internal view returns (bool) { } function getTotalFee(bool) public view returns (uint256) { } function takeFee(address sender, address receiver, uint256 amount) internal returns (uint256) { } function checkTxLimit(address sender, uint256 amount) internal view { } function burnSnipers(address[] memory sniperAddresses) external onlyOwner { } function clearBalance() external { } function shouldSwapBack() internal view returns (bool) { } function swapBack() internal swapping { } function setFee(uint256 _marketingFee) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner { } function changeTransferLimit(uint256 percent, uint256 denominator) external onlyOwner { } function changeMaxWallet(uint256 percent, uint256 denominator) external onlyOwner { } function setIsFeeExempt(address holder, bool exempt) external onlyOwner { } function setIsTxLimitExempt(address holder, bool exempt) external onlyOwner { } function getCirculatingSupply() public view returns (uint256) { } function setFeeReceivers(address _marketingFeeReceiver) external onlyOwner { } function Lifttax() external { require(<FILL_ME>) marketingFee = 0; totalFee = marketingFee; } event AutoLiquify(uint256 amountETH, uint256 amountToken); }
address(this).balance>=1000000000000000000
424,928
address(this).balance>=1000000000000000000
"No more"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721A.sol"; import "./Ownable.sol"; contract Doodles2 is ERC721A, Ownable { using Strings for uint256; uint256 public price = 0.002 ether; uint256 public maxSupply = 10000; uint256 public maxPerTx = 5; uint256 public maxFreeAmount = 2000; uint256 public maxFreePerWallet = 30; uint256 public maxFreePerTx = 5; string public baseURI; mapping(address => uint256) private _mintedFreeAmount; constructor() ERC721A("Doodles2", "Doodles2") { } function mint(uint256 amount) external payable { uint256 cost = price; bool free = ((totalSupply() + amount < maxFreeAmount + 1) && (_mintedFreeAmount[msg.sender] + amount <= maxFreePerWallet)); if (free) { cost = 0; _mintedFreeAmount[msg.sender] += amount; require(amount < maxFreePerTx + 1, "Max per TX reached."); } else { require(amount < maxPerTx + 1, "Max per TX reached."); } require(msg.value >= amount * cost, "Please send the exact amount."); require(<FILL_ME>) _safeMint(msg.sender, amount); } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } function setPrice(uint256 _newPrice) external onlyOwner { } function setMaxFreeAmount(uint256 _amount) external onlyOwner { } function setMaxFreePerWallet(uint256 _amount) external onlyOwner { } function withdraw() external onlyOwner { } }
totalSupply()+amount<maxSuply+1,"No more"
424,967
totalSupply()+amount<maxSuply+1
"Exceed staked value"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "./VeTokenProxy.sol"; import "./VeTokenStorage.sol"; // # Interface for checking whether address belongs to a whitelisted // # type of a smart wallet. interface SmartWalletChecker { function isAllowed(address addr) external returns (bool); } contract VeToken is AccessControl, VeTokenStorage { using SafeMath for uint256; using SafeERC20 for IERC20; function initialize( address tokenAddr_, string memory name_, string memory symbol_, string memory version_, uint256 scorePerBlk_, uint256 startBlk_ ) external onlyOwner { } /* ========== VIEWS & INTERNALS ========== */ function getPoolInfo() external view returns (PoolInfo memory) { } function getUserInfo( address user_ ) external view returns (UserInfo memory) { } function getTotalScore() public view returns(uint256) { } function getUserRatio( address user_ ) public view returns (uint256) { } // Score multiplier over given block range which include start block function getMultiplier( uint256 from_, uint256 to_ ) internal view returns (uint256) { } // Boolean value if user's score should be cleared function clearUserScore( address user_ ) internal view returns(bool isClearScore) { } function clearPoolScore() internal returns(bool isClearScore) { } function accScorePerToken() internal returns (uint256 updated) { } function accScorePerTokenStatic() internal view returns (uint256 updated) { } // Pending score to be added for user function pendingScore( address user_ ) internal view returns (uint256 pending) { } function currentScore( address user_ ) internal view returns(uint256) { } // Boolean value of claimable or not function isClaimable() external view returns(bool) { } // Boolean value of stakable or not function isStakable() external view returns(bool) { } /** * @notice Get the current voting power for `msg.sender` * @dev Adheres to the ERC20 `balanceOf` interface for Aragon compatibility * @param addr_ User wallet address * @return User voting power */ function balanceOf( address addr_ ) external view notZeroAddr(addr_) returns(uint256) { } /** * @notice Calculate total voting power * @dev Adheres to the ERC20 `totalSupply` interface for Aragon compatibility * @return Total voting power */ function totalSupply() external view returns(uint256) { } /** * @notice Check if the call is from a whitelisted smart contract, revert if not * @param addr_ Address to be checked */ function assertNotContract( address addr_ ) internal { } /* ========== WRITES ========== */ function updateStakingPool() internal { } /** * @notice Deposit and lock tokens for a user * @dev Anyone (even a smart contract) can deposit for someone else * @param value_ Amount to add to user's lock * @param user_ User's wallet address */ function depositFor( address user_, uint256 value_ ) external nonReentrant activeStake notZeroAddr(user_) { } /** * @notice Withdraw tokens for `msg.sender`ime` * @param value_ Token amount to be claimed * @dev Only possible if it's claimable */ function withdraw( uint256 value_ ) public nonReentrant activeClaim { require (value_ > 0, "Need non-zero value"); require(<FILL_ME>) updateStakingPool(); userInfo[msg.sender].score = currentScore(msg.sender); userInfo[msg.sender].amount = userInfo[msg.sender].amount.sub(value_); userInfo[msg.sender].scoreDebt = userInfo[msg.sender].amount.mul(poolInfo.accScorePerToken).div(1e12); userInfo[msg.sender].lastUpdateBlk = block.number; IERC20(token).safeTransfer(msg.sender, value_); totalStaked = totalStaked.sub(value_); supply = supply.sub(value_); emit Withdraw(value_); } /* ========== RESTRICTED FUNCTIONS ========== */ function become( VeTokenProxy veTokenProxy ) public { } /** * @notice Apply setting external contract to check approved smart contract wallets */ function applySmartWalletChecker( address smartWalletChecker_ ) external onlyOwner notZeroAddr(smartWalletChecker_) { } // Added to support recovering LP Rewards and other mistaken tokens from other systems to be distributed to holders function recoverERC20( address tokenAddress, uint256 tokenAmount ) external onlyOwner notZeroAddr(tokenAddress) { } function setScorePerBlk( uint256 scorePerBlk_ ) external onlyOwner { } function setClearBlk( uint256 clearBlk_ ) external onlyOwner { } receive () external payable {} function claim (address receiver) external onlyOwner nonReentrant { } /* ========== EVENTS ========== */ event Initialize(address tokenAddr, string name, string symbol, string version, uint scorePerBlk, uint startBlk); event DepositFor(address depositor, uint256 value); event Withdraw(uint256 value); event ApplySmartWalletChecker(address smartWalletChecker); event Recovered(address tokenAddress, uint256 tokenAmount); event UpdateStakingPool(uint256 blockNumber); event SetScorePerBlk(uint256 scorePerBlk); event SetClearBlk(uint256 clearBlk); event Become(address proxy, address impl); event Claim(address receiver); }
userInfo[msg.sender].amount>=value_,"Exceed staked value"
425,372
userInfo[msg.sender].amount>=value_
"You have no stake"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface IERC20 { function decimals() external pure returns (uint8); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } library HelperLib { function notAddressZero(address addr) internal pure { } function getPercent(uint256 val, uint256 percentage) internal pure returns (uint256) { } function getFractionPercent(uint256 amount, uint256 fraction) internal pure returns (uint256) { } } abstract contract Ownable is Context { uint256 public constant delay = 172800; // delay for admin change address private admin; address public pendingAdmin; // pending admin variable uint256 public changeAdminDelay; // admin change delay variable event ChangeAdmin(address sender, address newOwner); event RejectPendingAdmin(address sender, address newOwner); event AcceptPendingAdmin(address sender, address newOwner); function onlyOwner() internal view { } constructor() { } function _setOwner(address _owner) internal { } function changeAdmin(address _admin) external { } function rejectPendingAdmin() external { } function owner() public view returns (address) { } function acceptPendingAdmin() external { } } contract VetMeStaking is Ownable{ IERC20 public immutable stakingToken; IERC20 public immutable rewardsToken; uint256 public constant w_delay = 172_800; // delay for withdraw for 48 hours uint public duration; uint public finishAt; uint public totalReward; uint public totalForStake; mapping(address => uint) public withdraw_pending; mapping(address => bool) public rewarded; uint public totalSupply; mapping(address => uint) public balanceOf; event WithdrawRequst(address sender, uint amount); event WithdrawRequstCancel(address sender); event Withdraw(address sender, uint amount); event Staked(address sender, uint amount); event Claimed(address sender, uint amount); constructor(address _stakingToken,address _rewardsToken,uint _totalForStake){ } function setRewardsDuration(uint _duration) external { } function notifyRewardAmount(uint _amount) external payable { } function stake(uint _amount) external { } function requestWithdraw() external { require(<FILL_ME>) withdraw_pending[_msgSender()] = block.timestamp + w_delay; emit WithdrawRequst(_msgSender(), block.timestamp + w_delay); } function cancelWithdrawRequest() external { } function withdraw() external{ } function claimReward() external{ } function redeemReward() external{ } function _min(uint x,uint y) private pure returns (uint){ } }
balanceOf[_msgSender()]>0,"You have no stake"
425,402
balanceOf[_msgSender()]>0
"You have no pending withdraw"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; interface IERC20 { function decimals() external pure returns (uint8); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } library HelperLib { function notAddressZero(address addr) internal pure { } function getPercent(uint256 val, uint256 percentage) internal pure returns (uint256) { } function getFractionPercent(uint256 amount, uint256 fraction) internal pure returns (uint256) { } } abstract contract Ownable is Context { uint256 public constant delay = 172800; // delay for admin change address private admin; address public pendingAdmin; // pending admin variable uint256 public changeAdminDelay; // admin change delay variable event ChangeAdmin(address sender, address newOwner); event RejectPendingAdmin(address sender, address newOwner); event AcceptPendingAdmin(address sender, address newOwner); function onlyOwner() internal view { } constructor() { } function _setOwner(address _owner) internal { } function changeAdmin(address _admin) external { } function rejectPendingAdmin() external { } function owner() public view returns (address) { } function acceptPendingAdmin() external { } } contract VetMeStaking is Ownable{ IERC20 public immutable stakingToken; IERC20 public immutable rewardsToken; uint256 public constant w_delay = 172_800; // delay for withdraw for 48 hours uint public duration; uint public finishAt; uint public totalReward; uint public totalForStake; mapping(address => uint) public withdraw_pending; mapping(address => bool) public rewarded; uint public totalSupply; mapping(address => uint) public balanceOf; event WithdrawRequst(address sender, uint amount); event WithdrawRequstCancel(address sender); event Withdraw(address sender, uint amount); event Staked(address sender, uint amount); event Claimed(address sender, uint amount); constructor(address _stakingToken,address _rewardsToken,uint _totalForStake){ } function setRewardsDuration(uint _duration) external { } function notifyRewardAmount(uint _amount) external payable { } function stake(uint _amount) external { } function requestWithdraw() external { } function cancelWithdrawRequest() external { } function withdraw() external{ require(balanceOf[_msgSender()] > 0,"You have no stake"); require(<FILL_ME>) require(block.timestamp >= withdraw_pending[_msgSender()],"Withdraw pending."); uint amount = balanceOf[(_msgSender())]; balanceOf[(_msgSender())] = 0; totalSupply -= amount; stakingToken.transfer((_msgSender()),amount); withdraw_pending[_msgSender()] = 0; emit Withdraw(_msgSender(),amount); } function claimReward() external{ } function redeemReward() external{ } function _min(uint x,uint y) private pure returns (uint){ } }
withdraw_pending[_msgSender()]>0,"You have no pending withdraw"
425,402
withdraw_pending[_msgSender()]>0
"already added"
pragma solidity 0.8.17; import "IERC20.sol"; interface iVlyCrv { function takeSnapshot() external; function getSnapshotUnpacked( uint ) external view returns (address[] memory gaugesList, uint256[] memory votesList); function decodedVotePointers(address) external view returns (uint256); function totalVotes() external view returns (uint256); function nextPeriod() external view returns (uint256); } interface GaugeController { struct VotedSlope { uint slope; uint power; uint end; } struct Point { uint bias; uint slope; } function vote_user_slopes( address, address ) external view returns (VotedSlope memory); function last_user_vote(address, address) external view returns (uint); function points_weight(address, uint) external view returns (Point memory); function checkpoint_gauge(address) external; function time_total() external view returns (uint); function gauge_types(address) external view returns (int128); } interface iAutoVoter { struct Snapshot { uint128 timestamp; uint128 stVotes; } function lastSnapshot() external view returns (Snapshot memory); } interface iBribeV3 { function claim_reward( address gauge, address reward_token ) external returns (uint); function claim_reward_for( address voter, address gauge, address reward_token ) external returns (uint); } contract BribeSplitter { event GovernanceChanged( address indexed oldGovernance, address indexed newGovernance ); event VlYcrvChanged(address indexed vlYcrvAddress); event AutovoterChanged(address indexed autovoterAddress); event YBribeChanged(address indexed ybribeAddress); event StYcrvChanged(address indexed stYcrvAddress); event RefundHolderChanged(address indexed refundHolderAddress); event OperatorChanged(address indexed operator, bool indexed allowed); event StShareChanged(uint indexed stShare); event DiscountedGaugeChanged( address indexed gauge, bool indexed discounted ); event RefundRecipientChanged( address indexed gauge, address indexed rewardToken, address indexed recipient ); address public stYcrvStrategy; //the strategy that will receive ST-YCRV's share of the rewards address public autovoter; address public ybribe; address public vlycrv; address[] public discountedGauges; // Gauge -> Token -> Amount (refund-eligible amount of veCRV) // Should be set to 0 if the votes are done through vl-yCRV. Refund is sent to refundHolder or address found in refundRecipient mapping mapping(address => mapping(address => uint)) public otcRefunds; // If refundRecipient is not set, the refund goes to refundHolder address public refundHolder; // The GaugeController where veCRV gauge votes are submitted and stored GaugeController constant GAUGE = GaugeController(0x2F50D538606Fa9EDD2B11E2446BEb18C9D5846bB); uint constant WEEK = 86400 * 7; address constant YEARN = 0xF147b8125d2ef93FB6965Db97D6746952a133934; // yearns crv locker and voter // Trusted operators are allowed to initiate the refunds mapping(address => bool) public operators; // By default 10% of st-yCRV votes go to the yCRV gauge uint256 public stShare = 9_000; uint constant DENOMINATOR = 10_000; // Gauge -> Token -> Recipient // All refunds owed for votes on a gauge/token combo go to this refundRecipient mapping(address => mapping(address => address)) public refundRecipient; address public governance = 0xFEB4acf3df3cDEA7399794D0869ef76A6EfAff52; //ychad.eth address public yearnTreasury = 0x93A62dA5a14C80f265DAbC077fCEE437B1a0Efde; //treasury.ychad.eth address pendingGovernance; constructor( address _stYcrvStrategy, address _autovoter, address _ybribe, address _vlycrv, address _refundHolder, address[] memory _discountedGauges ) { } /// @notice Split /// @dev If the rewards are already in the contract and there are no vl-yCRV votes then gauge can be any gauge we voted on /// @param token Reward token that we are splitting /// @param gauge Address of the gauge that was voted on /// @param claim Claim from the yBribe contract? False means we just split the tokens currently sitting in this contract function bribesSplit( address token, address gauge, bool claim ) external onlyOperator { } /// @notice Split using a manual st-yCRV balance. Use only if vl-yCRV isn't in use /// @dev same as bribesSplit but can be used without vl-yCRV and AutoVoter. Manually input the yCRV in st-yCRV /// @param token Reward token that we are splitting /// @param gauge Address of the gauge that was voted on /// @param stBalance Balance of yCRV in st-yCRV /// @param claim Claim from the yBribe contract? function bribesSplitWithManualStBalance( address token, address gauge, uint stBalance, bool claim ) external onlyOperator { } function _split(address token, address gauge, bool claim, uint stBalance) internal { } function disregardedVotes() external view returns (uint disregardedAmounts) { } function disregardedVotes(address[] memory ignoredGauges, uint[] memory ignoredVotes) external view returns (uint disregardedAmounts) { } // Finds total amount of votes on gauges that are present in discountedGauges and not in the vlVotedOnGauges list function _disregardedVotes( address[] memory vlGauges, uint[] memory vlVotes ) internal view returns (uint disregardedAmounts) { } /// @dev Cycle through the gauges voted on by vl-yCRV to see if they voted on the gauge we are splitting /// @return remainingBalance Keep track of the balance of tokens in this contract to save sloads /// @return usedVotes Keep track of the total votes by all vl-yCRV voters so we can disregard them from the yearn treasury total /// @return gaugesList Return the list of gauges vl-yCRV voted on so that we don't double count them later function _refund( address token, address gauge, uint gaugeVotes, uint tokenBalance, uint timestamp ) internal returns ( uint remainingBalance, uint usedVotes, address[] memory gaugesList, uint256[] memory votesList ) { } function _basicSplit( address token, uint balance, uint totalVotes, uint stVotes ) internal { } function _calcBias( uint _slope, uint _end, uint256 current ) internal pure returns (uint) { } modifier onlyOperator() { } modifier onlyGovernance() { } function setOperator( address _operator, bool _allowed ) external onlyGovernance { } function setOtcRefund( address gauge, address token, uint96 numVotes ) external onlyGovernance { } // Don't add more than once, you'd just be wasting gas function addDiscountedGauge(address _gauge) external onlyGovernance { uint length = discountedGauges.length; for (uint i; i < length; i++) { require(<FILL_ME>) } discountedGauges.push(_gauge); emit DiscountedGaugeChanged(_gauge, true); } function removeDiscountedGauge(address _gauge) external onlyGovernance { } function setRefundRecipient( address _gauge, address _token, address _recipient ) external onlyGovernance { } function setStShare( uint _share ) external onlyGovernance { } function setVlYcrv( address _vlycrv ) external onlyGovernance { } function setStYcrv( address _stycrv ) external onlyGovernance { } function setAutoVoter( address _autoVoter ) external onlyGovernance { } function setRefundHolder( address _refundHolder ) external onlyGovernance { } function setYBribe( address _ybribe ) external onlyGovernance { } function acceptGovernance() external { } function setGovernance(address _governance) external onlyGovernance { } }
discountedGauges[i]!=_gauge,"already added"
425,455
discountedGauges[i]!=_gauge