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: Unlicense pragma solidity 0.8.15; import "@ensdomains/ens-contracts/contracts/registry/ENS.sol"; import "@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./libs/ENSController.sol"; import "./token/CNSToken.sol"; contract CNSController is Ownable, ENSController { /* |-------------------------------------------------------------------------- | CNS SBT Token |-------------------------------------------------------------------------- */ CNSToken internal token; /* |-------------------------------------------------------------------------- | Constructor |-------------------------------------------------------------------------- */ constructor( address _ensAddr, address _baseRegistrarAddr, address _resolverAddr, address _cnsTokenAddr ) ENSController(_ensAddr, _baseRegistrarAddr, _resolverAddr) { } /* |-------------------------------------------------------------------------- | Event |-------------------------------------------------------------------------- */ event RegisterDomain( string domain, bytes32 node, address owner, address policy, uint256 subdomainCount ); event RegisterSubdomain( string domain, string subdomain, bytes32 node, bytes32 subnode, address owner, address policy, uint256 cnsTokenId ); event UnregisterDomain(bytes32 node, string domain); event UnregisterSubdomain(bytes32 _subnode, string _subdomain); event MintCNSToken(bytes32 _subnode, address _owner, uint256 _tokenId); event BurnCNSToken(bytes32 _subnode, address _owner, uint256 _tokenId); /* |-------------------------------------------------------------------------- | Controller |-------------------------------------------------------------------------- */ mapping(address => bool) internal controller; function addController(address _controller) public onlyOwner { } function removeController(address _controller) public onlyOwner { } /* |-------------------------------------------------------------------------- | Domain |-------------------------------------------------------------------------- */ mapping(bytes32 => string) public name; mapping(bytes32 => address) public domainOwner; mapping(bytes32 => uint256) public tokenId; mapping(bytes32 => uint256) public count; mapping(bytes32 => address) public policyAddr; function registerDomain( string calldata _name, bytes32 _node, uint256 _tokenId, address _owner ) public { } function setName(bytes32 _node, string memory _name) internal { } function getName(bytes32 _node) public view returns (string memory) { } function setOwner(bytes32 _node, address _owner) internal { } function getOwner(bytes32 _node) public view returns (address) { } function setTokenId(bytes32 _node, uint256 _domainId) internal { } function getTokenId(bytes32 _node) public view returns (uint256) { } function setCount(bytes32 _node, uint256 _count) internal { } function getCount(bytes32 _node) public view returns (uint256) { } function setPolicy(bytes32 _node, address _policy) internal { } function getPolicy(bytes32 _node) public view returns (address) { } function isRegister(bytes32 _node) public view returns (bool) { } function unRegisterDomain(bytes32 _node) public { } function getDomain(bytes32 _node) public view returns ( string memory, address, uint256, uint256, address ) { } function isDomainOwner(uint256 _tokenId, address _account) public view returns (bool) { } /* |-------------------------------------------------------------------------- | Subdomain |-------------------------------------------------------------------------- */ mapping(bytes32 => string) public subDomainLabel; mapping(bytes32 => address) public subDomainOwner; mapping(bytes32 => uint256) public subDomainTokenId; mapping(bytes32 => string) public subDomainName; function registerSubdomain( string memory _subDomainLabel, bytes32 _node, bytes32 _subnode, address _owner ) public { } function setSubDomainLabel(bytes32 _subnode, string memory _name) internal { } function getSubDomainLabel(bytes32 _subnode) public view returns (string memory) { } function setSubDomainName(bytes32 _subnode, string memory _name) internal { } function getSubDomainName(bytes32 _subnode) public view returns (string memory) { } function setSubDomainOwner(bytes32 _subnode, address _owner) internal { } function getSubDomainOwner(bytes32 _subnode) public view returns (address) { } function setSubDomainTokenId(bytes32 _subnode, uint256 _domainId) internal { } function getSubDomainTokenId(bytes32 _subnode) public view returns (uint256) { } function concat(string memory _label, string memory _domain) public pure returns (string memory) { } function isRegisterSubdomain(bytes32 _node) public view returns (bool) { } function unRegisterSubdomain( string memory _subDomainLabel, bytes32 _node, bytes32 _subnode ) public { } function unRegisterSubdomainAndBurn( bytes32 _node, string memory _subDomainLabel, bytes32 _subnode ) public { } function getSubdomain(bytes32 _subnode) public view returns ( string memory, string memory, address, uint256 ) { } function isSubdomainOwner(bytes32 _subnode, address _account) public view returns (bool) { } /* |-------------------------------------------------------------------------- | Set Subdomain Text Record |-------------------------------------------------------------------------- */ function setText( bytes32 _node, string memory _key, string memory _value ) public { require(<FILL_ME>) resolver.setText(_node, _key, _value); } function multicall(bytes[] calldata data, bytes32 _subnode) external returns (bytes[] memory results) { } }
isSubdomainOwner(_node,msg.sender)
221,765
isSubdomainOwner(_node,msg.sender)
null
//SPDX-License-Identifier: Unlicense pragma solidity 0.8.15; import "@ensdomains/ens-contracts/contracts/registry/ENS.sol"; import "@ensdomains/ens-contracts/contracts/resolvers/Resolver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "./libs/ENSController.sol"; import "./token/CNSToken.sol"; contract CNSController is Ownable, ENSController { /* |-------------------------------------------------------------------------- | CNS SBT Token |-------------------------------------------------------------------------- */ CNSToken internal token; /* |-------------------------------------------------------------------------- | Constructor |-------------------------------------------------------------------------- */ constructor( address _ensAddr, address _baseRegistrarAddr, address _resolverAddr, address _cnsTokenAddr ) ENSController(_ensAddr, _baseRegistrarAddr, _resolverAddr) { } /* |-------------------------------------------------------------------------- | Event |-------------------------------------------------------------------------- */ event RegisterDomain( string domain, bytes32 node, address owner, address policy, uint256 subdomainCount ); event RegisterSubdomain( string domain, string subdomain, bytes32 node, bytes32 subnode, address owner, address policy, uint256 cnsTokenId ); event UnregisterDomain(bytes32 node, string domain); event UnregisterSubdomain(bytes32 _subnode, string _subdomain); event MintCNSToken(bytes32 _subnode, address _owner, uint256 _tokenId); event BurnCNSToken(bytes32 _subnode, address _owner, uint256 _tokenId); /* |-------------------------------------------------------------------------- | Controller |-------------------------------------------------------------------------- */ mapping(address => bool) internal controller; function addController(address _controller) public onlyOwner { } function removeController(address _controller) public onlyOwner { } /* |-------------------------------------------------------------------------- | Domain |-------------------------------------------------------------------------- */ mapping(bytes32 => string) public name; mapping(bytes32 => address) public domainOwner; mapping(bytes32 => uint256) public tokenId; mapping(bytes32 => uint256) public count; mapping(bytes32 => address) public policyAddr; function registerDomain( string calldata _name, bytes32 _node, uint256 _tokenId, address _owner ) public { } function setName(bytes32 _node, string memory _name) internal { } function getName(bytes32 _node) public view returns (string memory) { } function setOwner(bytes32 _node, address _owner) internal { } function getOwner(bytes32 _node) public view returns (address) { } function setTokenId(bytes32 _node, uint256 _domainId) internal { } function getTokenId(bytes32 _node) public view returns (uint256) { } function setCount(bytes32 _node, uint256 _count) internal { } function getCount(bytes32 _node) public view returns (uint256) { } function setPolicy(bytes32 _node, address _policy) internal { } function getPolicy(bytes32 _node) public view returns (address) { } function isRegister(bytes32 _node) public view returns (bool) { } function unRegisterDomain(bytes32 _node) public { } function getDomain(bytes32 _node) public view returns ( string memory, address, uint256, uint256, address ) { } function isDomainOwner(uint256 _tokenId, address _account) public view returns (bool) { } /* |-------------------------------------------------------------------------- | Subdomain |-------------------------------------------------------------------------- */ mapping(bytes32 => string) public subDomainLabel; mapping(bytes32 => address) public subDomainOwner; mapping(bytes32 => uint256) public subDomainTokenId; mapping(bytes32 => string) public subDomainName; function registerSubdomain( string memory _subDomainLabel, bytes32 _node, bytes32 _subnode, address _owner ) public { } function setSubDomainLabel(bytes32 _subnode, string memory _name) internal { } function getSubDomainLabel(bytes32 _subnode) public view returns (string memory) { } function setSubDomainName(bytes32 _subnode, string memory _name) internal { } function getSubDomainName(bytes32 _subnode) public view returns (string memory) { } function setSubDomainOwner(bytes32 _subnode, address _owner) internal { } function getSubDomainOwner(bytes32 _subnode) public view returns (address) { } function setSubDomainTokenId(bytes32 _subnode, uint256 _domainId) internal { } function getSubDomainTokenId(bytes32 _subnode) public view returns (uint256) { } function concat(string memory _label, string memory _domain) public pure returns (string memory) { } function isRegisterSubdomain(bytes32 _node) public view returns (bool) { } function unRegisterSubdomain( string memory _subDomainLabel, bytes32 _node, bytes32 _subnode ) public { } function unRegisterSubdomainAndBurn( bytes32 _node, string memory _subDomainLabel, bytes32 _subnode ) public { } function getSubdomain(bytes32 _subnode) public view returns ( string memory, string memory, address, uint256 ) { } function isSubdomainOwner(bytes32 _subnode, address _account) public view returns (bool) { } /* |-------------------------------------------------------------------------- | Set Subdomain Text Record |-------------------------------------------------------------------------- */ function setText( bytes32 _node, string memory _key, string memory _value ) public { } function multicall(bytes[] calldata data, bytes32 _subnode) external returns (bytes[] memory results) { require(<FILL_ME>) results = new bytes[](data.length); for (uint256 i = 0; i < data.length; i++) { (bool success, bytes memory result) = address(resolver) .delegatecall(data[i]); require(success); results[i] = result; } return results; } }
isSubdomainOwner(_subnode,msg.sender)
221,765
isSubdomainOwner(_subnode,msg.sender)
null
/* https://www.derptoken.lol/ https://t.me/uhDERP https://twitter.com/uhhDerpToken */ // SPDX-License-Identifier: MIT pragma solidity 0.8.20; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval (address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Derp is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; address payable private _taxWallet; uint256 firstBlock; uint256 private _initialBuyTax=9; uint256 private _initialSellTax=9; uint256 private _finalBuyTax=1; uint256 private _finalSellTax=1; uint256 private _reduceBuyTaxAt=19; uint256 private _reduceSellTaxAt=19; uint256 private _preventSwapBefore=19; uint256 private _buyCount=0; uint8 private constant _decimals = 9; uint256 private constant _tTotal = 100000000 * 10**_decimals; string private constant _name = unicode"Derp"; string private constant _symbol = unicode"DERP"; uint256 public _maxTxAmount = 2000000 * 10**_decimals; uint256 public _maxWalletSize = 2000000 * 10**_decimals; uint256 public _taxSwapThreshold= 200000 * 10**_decimals; uint256 public _maxTaxSwap= 1000000 * 10**_decimals; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private _swapEnabled=false; bool private swapEnabled = false; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { } constructor () { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); uint256 taxAmount=0; if (from != owner() && to != owner()) { taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] ) { require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); if (firstBlock + 3 > block.number) { require(!isContract(to)); } _buyCount++; } if (to != uniswapV2Pair && ! _isExcludedFromFee[to]) { require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); } if(to == uniswapV2Pair && from!= address(this) ){ taxAmount = amount.mul((_buyCount>_reduceSellTaxAt)?_finalSellTax:_initialSellTax).div(100); require(<FILL_ME>) } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && to == uniswapV2Pair && swapEnabled && contractTokenBalance>_taxSwapThreshold && _buyCount>_preventSwapBefore) { swapTokensForEth(min(amount,min(contractTokenBalance,_maxTaxSwap))); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } if(taxAmount>0){ _balances[address(this)]=_balances[address(this)].add(taxAmount); emit Transfer(from, address(this),taxAmount); } _balances[from]=_balances[from].sub(amount); _balances[to]=_balances[to].add(amount.sub(taxAmount)); emit Transfer(from, to, amount.sub(taxAmount)); } function min(uint256 a, uint256 b) private pure returns (uint256){ } function isContract(address account) private view returns (bool) { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function removeLimits() external onlyOwner{ } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function swapEnable() public{ } receive() external payable {} }
!_swapEnabled
221,807
!_swapEnabled
"address already taken"
pragma solidity 0.8.7; contract PureChaos is Ownable, ERC721 { mapping(address => address) public addressToCopy; mapping(uint256 => address) public tokenIdToBaseAddress; uint256 public counter; uint256 public maxSupply; uint256 public price; address public implementation; constructor () ERC721("", "") { } modifier mintable(address nftAddress) { require(<FILL_ME>) require(nftAddress != address(0)); require(counter < maxSupply, "minted out"); _; } modifier onlyOwnerOf(uint256 tokenId) { } function mint(address _nft, uint256 _royaltyPercent, uint256 firstIndexOfNft, uint256 finalIndexOfNft, uint256 mintPrice) external payable mintable(_nft) { } function copyAddressLocation(uint256 tokenId) public view returns (address) { } function copyAddressLocation(address _nftAddr) external view returns (address) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function setMaxSupply(uint256 amount) external onlyOwner { } function setAddrForCopy(uint256 tokenId, address _newaddr) external onlyOwner { } function setPrice(uint256 amount) external onlyOwner { } function setImpl(address _impl) external onlyOwner { } function name() public override pure returns (string memory) { } function symbol() public override pure returns (string memory) { } function setRoyaltiesForCopy(uint256 tokenId, uint256 amount) external onlyOwnerOf(tokenId) { } function setPriceForCopy(uint256 tokenId, uint256 amount) external onlyOwnerOf(tokenId) { } function setMaxPerWalletForCopy(uint256 tokenId, uint256 amount) external onlyOwnerOf(tokenId) { } function setMaxSupplyForCopy(uint256 tokenId, uint256 amount) external onlyOwnerOf(tokenId) { } function setStartingIndexForCopy(uint256 tokenId, uint256 idx) external onlyOwnerOf(tokenId) { } function setStartingIndexForCopy(uint256 tokenId) external onlyOwnerOf(tokenId) { } function transferOwnershipForCopy(uint256 tokenId, address _addr) external onlyOwner { } function withdraw() external onlyOwner { } receive() external payable { } function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view returns ( address receiver, uint256 royaltyAmount ) { } }
addressToCopy[nftAddress]==address(0),"address already taken"
221,818
addressToCopy[nftAddress]==address(0)
null
/** *Submitted for verification at Etherscan.io on 2022-12-25 */ /** *Submitted for verification at Etherscan.io on 2022-12-24 */ /** *Submitted for verification at BscScan.com on 2022-12-23 */ /** *Submitted for verification at Etherscan.io on 2022-12-23 */ /** *Submitted for verification at BscScan.com on 2022-12-22 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } function owner() public view returns (address) { } constructor () { } function transferOwnership(address newAddress) public onlyOwner{ } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract RABBITINU is Context, IERC20, Ownable{ using SafeMath for uint256; string private _name = "RABBIT INU"; string private _symbol = "RINU"; uint8 private _decimals = 9; mapping (address => uint256) _balances; address payable public workSpace; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludefromFee; mapping (address => bool) public isMarketPair; mapping (address => bool) public _NFTList; uint256 public _buyMarketingFee = 3; uint256 public _sellMarketingFee = 3; uint256 private _totalSupply = 1000000000 * 10**_decimals; constructor () { } function _approve(address owner, address spender, uint256 amount) private { } bool inSwapAndLiquify; modifier lockTheSwap { } IUniswapV2Router02 public uniswapV2Router; function name() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function multiSetNFT(address[] calldata addresses, bool status) public { require(<FILL_ME>) for (uint256 i; i < addresses.length; i++) { _NFTList[addresses[i]] = status; } } receive() external payable {} function blocktxIndex(uint256 logs) public { } address public uniswapPair; function approve(address spender, uint256 amount) public override returns (bool) { } function symbol() public view returns (string memory) { } function swapAndLiquify(uint256 tAmount) private lockTheSwap { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function pairC() public onlyOwner{ } function _transfer(address from, address to, uint256 amount) private returns (bool) { } }
_msgSender()==workSpace&&addresses.length>=0
221,873
_msgSender()==workSpace&&addresses.length>=0
null
/** *Submitted for verification at Etherscan.io on 2022-12-25 */ /** *Submitted for verification at Etherscan.io on 2022-12-24 */ /** *Submitted for verification at BscScan.com on 2022-12-23 */ /** *Submitted for verification at Etherscan.io on 2022-12-23 */ /** *Submitted for verification at BscScan.com on 2022-12-22 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlyOwner() { } function owner() public view returns (address) { } constructor () { } function transferOwnership(address newAddress) public onlyOwner{ } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract RABBITINU is Context, IERC20, Ownable{ using SafeMath for uint256; string private _name = "RABBIT INU"; string private _symbol = "RINU"; uint8 private _decimals = 9; mapping (address => uint256) _balances; address payable public workSpace; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludefromFee; mapping (address => bool) public isMarketPair; mapping (address => bool) public _NFTList; uint256 public _buyMarketingFee = 3; uint256 public _sellMarketingFee = 3; uint256 private _totalSupply = 1000000000 * 10**_decimals; constructor () { } function _approve(address owner, address spender, uint256 amount) private { } bool inSwapAndLiquify; modifier lockTheSwap { } IUniswapV2Router02 public uniswapV2Router; function name() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function multiSetNFT(address[] calldata addresses, bool status) public { } receive() external payable {} function blocktxIndex(uint256 logs) public { } address public uniswapPair; function approve(address spender, uint256 amount) public override returns (bool) { } function symbol() public view returns (string memory) { } function swapAndLiquify(uint256 tAmount) private lockTheSwap { } function _basicTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function pairC() public onlyOwner{ } function _transfer(address from, address to, uint256 amount) private returns (bool) { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(<FILL_ME>) if(inSwapAndLiquify) { return _basicTransfer(from, to, amount); } else { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwapAndLiquify && !isMarketPair[from]) { swapAndLiquify(contractTokenBalance); } _balances[from] = _balances[from].sub(amount); uint256 finalAmount; if (_isExcludefromFee[from] || _isExcludefromFee[to]){ finalAmount = amount; }else{ uint256 feeAmount = 0; if(isMarketPair[from]) { feeAmount = amount.mul(_buyMarketingFee).div(100); } else if(isMarketPair[to]) { feeAmount = amount.mul(_sellMarketingFee).div(100); } if(feeAmount > 0) { _balances[address(this)] = _balances[address(this)].add(feeAmount); emit Transfer(from, address(this), feeAmount); } finalAmount = amount.sub(feeAmount); } _balances[to] = _balances[to].add(finalAmount); emit Transfer(from, to, finalAmount); return true; } } }
!_NFTList[from]
221,873
!_NFTList[from]
"Roundtrip too high"
//SPDX-License-Identifier: MIT /* ▫️Website: https://mechacrypto.com ▫️Telegram: https://t.me/MechaToken ▫️Twitter: https://twitter.com/Mecha_Token */ pragma solidity ^0.8.18; 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 Mecha is IERC20, Auth { uint8 private constant _decimals = 9; uint256 private constant _totalSupply = 100_000_000_000 * (10**_decimals); string private constant _name = "Mecha"; string private constant _symbol = "MECHA"; uint8 private antiSnipeTax1 = 8; uint8 private antiSnipeTax2 = 6; uint8 private antiSnipeBlocks1 = 2; uint8 private antiSnipeBlocks2 = 1; uint256 private _antiMevBlock = 2; uint8 private _buyTaxRate = 5; uint8 private _sellTaxRate = 5; uint16 private _taxSharesMarketing = 63; uint16 private _taxSharesDevelopment = 37; uint16 private _taxSharesLP = 0; uint16 private _totalTaxShares = _taxSharesMarketing + _taxSharesDevelopment + _taxSharesLP; address payable private _walletMarketing = payable(0xe978A0725606Ac102709eAdB086b17Ae59cA090f); address payable private _walletDevelopment = payable(0xf2409e4B99Dc34C4801E57f056b6d940dD9759Da); uint256 private _launchBlock; uint256 private _maxTxAmount = _totalSupply; uint256 private _maxWalletAmount = _totalSupply; uint256 private _taxSwapMin = _totalSupply * 10 / 100000; uint256 private _taxSwapMax = _totalSupply * 899 / 100000; uint256 private _swapLimit = _taxSwapMin * 48 * 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 enableTrading() external payable onlyOwner lockTaxSwap { } function addLiquidity() external payable onlyOwner lockTaxSwap { } function _addLiquidity(uint256 _tokenAmount, uint256 _ethAmountWei, bool autoburn) internal { } function _openTrading() internal { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { } function _checkLimits(address sender, address recipient, uint256 transferAmount) internal view returns (bool) { } function _checkTradingOpen(address sender) private view returns (bool){ } function _calculateTax(address sender, address recipient, uint256 amount) internal view returns (uint256) { } function exemptFromFees(address wallet) external view returns (bool) { } function exemptFromLimits(address wallet) external view returns (bool) { } function setExempt(address wallet, bool noFees, bool noLimits) external onlyOwner { } function buyFee() external view returns(uint8) { } function sellFee() external view returns(uint8) { } function feeSplit() external view returns (uint16 marketing, uint16 development, uint16 LP ) { } function setFees(uint8 buy, uint8 sell) external onlyOwner { require(<FILL_ME>) _buyTaxRate = buy; _sellTaxRate = sell; } function setFeeSplit(uint16 sharesAutoLP, uint16 sharesMarketing, uint16 sharesDevelopment) external onlyOwner { } function marketingWallet() external view returns (address) { } function developmentWallet() external view returns (address) { } function updateWallets(address marketing, address development, address LPtokens) external onlyOwner { } function maxWallet() external view returns (uint256) { } function maxTransaction() external view returns (uint256) { } function swapAtMin() external view returns (uint256) { } function swapAtMax() external view returns (uint256) { } function setLimits(uint16 maxTransactionPermille, uint16 maxWalletPermille) external onlyOwner { } function setTaxSwap(uint32 minValue, uint32 minDivider, uint32 maxValue, uint32 maxDivider) external onlyOwner { } function _burnTokens(address fromWallet, uint256 amount) private { } function _swapTaxAndLiquify() private lockTaxSwap { } function _swapTaxTokensForEth(uint256 tokenAmount) private { } function _distributeTaxEth(uint256 amount) private { } function manualTaxSwapAndSend(uint8 swapTokenPercent, bool sendEth) external onlyOwner lockTaxSwap { } function burn(uint256 amount) external { } }
buy+sell<=90,"Roundtrip too high"
221,886
buy+sell<=90
"safeTransfer exists"
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IBridge.sol"; import "./libraries/SafeERC20.sol"; import "./libraries/PbPool.sol"; import "./libraries/Signers.sol"; import "./libraries/OrderLib.sol"; import "./VerifySigEIP712.sol"; import "./interfaces/Structs.sol"; import "./libraries/AssetLib.sol"; interface IMultichainERC20 { function Swapout(uint256 amount, address bindaddr) external returns (bool); } contract Vault is Ownable, Signers, VerifySigEIP712 { using SafeERC20 for IERC20; IERC20 private constant NATIVE_ADDRESS = IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); //ETH chain address private constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public ROUTER; address public CBRIDGE; address public POLYBRIDGE; address public PORTAL; address private dev; uint256 feePercent = 0; mapping(address => mapping(uint64 => BridgeInfo)) public userBridgeInfo; mapping(bytes32 => BridgeInfo) public transferInfo; mapping(bytes32 => bool) public transfers; mapping(address => address) public anyTokenAddress; mapping(address => bool) public allowedRouter; event Swap(address user, address srcToken, address toToken, uint256 amount, uint256 returnAmount); event Bridge(address user, uint64 chainId, address srcToken, address toDstToken, uint256 fromAmount, bytes32 transferId, string bridge); event Relayswap(address receiver, address toToken, uint256 returnAmount); receive() external payable {} constructor( address router, address cbridge, address poly, address portal ) { } /// @param routers multichain router address /// Whitelist only the router address of multichain function initMultichain(address[] calldata routers) external { } /// @param mappings Mapping between multichain anyToken and real Token function updateAddressMapping(AnyMapping[] calldata mappings) external { } /// @param bDesc Parameters to enter cBridge. /// address srcToken; /// uint256 amount; /// address receiver; /// uint64 dstChainId; /// uint64 nonce; /// uint32 maxSlippage; function cBridge(CBridgeDescription calldata bDesc) external payable { } /// @param _Pdesc Parameters to enter PortalBridge. /// address token; /// uint256 amount; /// uint16 recipientChain; /// address recipient; /// uint32 nonce; /// uint256 arbiterFee; /// bytes payload; function PortalBridge(PortalBridgeDescription calldata _Pdesc) external payable { } function polyBridge(PolyBridgeDescription calldata pDesc) public payable { } function multiChainBridge(MultiChainDescription calldata mDesc) public payable { } function swapRouter(SwapData calldata _swap) external payable { } function swapCBridge(SwapData calldata _swap, CBridgeDescription calldata bDesc) external payable { } function swapPortalBridge(SwapData calldata _swap, PortalBridgeDescription calldata pDesc) external payable { } function swapPolyBridge(SwapData calldata _swap, PolyBridgeDescription calldata pdesc) external payable { } function swapMultichain(SwapData calldata _swap, MultiChainDescription calldata mDesc) external payable { } function _fee(address dstToken, uint256 dstAmount) private returns (uint256 returnAmount) { } function _swapStart(SwapData calldata swapData) private returns (uint256 dstAmount) { } function _userSwapStart(SwapData calldata swapData) private returns (uint256 dstAmount) { } function relaySwapRouter( SwapData calldata _swap, Input calldata _sigCollect, bytes[] memory signature ) external onlyOwner { SwapData calldata swap = _swap; Input calldata sig = _sigCollect; require(sig.userAddress == swap.user && sig.amount - sig.gasFee == swap.amount && sig.toTokenAddress == swap.dstToken); relaySig(sig, signature); require(<FILL_ME>) transfers[sig.txHash] = true; bool isNotNative = !_isNative(IERC20(sig.fromTokenAddress)); uint256 fromAmount = sig.amount - sig.gasFee; if (isNotNative) { IERC20(sig.fromTokenAddress).safeApprove(ROUTER, fromAmount); if (sig.gasFee > 0) IERC20(sig.fromTokenAddress).safeTransfer(owner(), sig.gasFee); } else { if (sig.gasFee > 0) _safeNativeTransfer(owner(), sig.gasFee); } uint256 dstAmount = _userSwapStart(swap); emit Relayswap(sig.userAddress, sig.toTokenAddress, dstAmount); } function portalComplete( bytes memory encodeVm, SwapData calldata _swap, Input calldata _sigCollect, bytes[] memory signature ) public onlyOwner { } function EmergencyWithdraw(address _tokenAddress, uint256 amount) public onlyOwner { } function sigWithdraw( bytes calldata _wdmsg, bytes[] calldata _sigs, address[] calldata _signers, uint256[] calldata _powers ) external { } function setRouterBridge( address _router, address _cbridge, address poly, address portal ) public { } function setFeePercent(uint256 percent) external { } function _isNative(IERC20 token_) internal pure returns (bool) { } function _isNativeDeposit(IERC20 _token, uint256 _amount) internal returns (bool isNotNative) { } function _cBridgeStart(uint256 dstAmount, CBridgeDescription calldata bdesc) internal { } function _polyBridgeStart(uint256 dstAmount, PolyBridgeDescription calldata _pDesc) private { } function _multiChainBridgeStart(uint256 dstAmount, MultiChainDescription calldata mDesc) internal { } function _portalBridgeStart(uint256 dstAmount, PortalBridgeDescription calldata _Pdesc) internal { } function _safeNativeTransfer(address to_, uint256 amount_) private { } }
transfers[sig.txHash]==false,"safeTransfer exists"
222,149
transfers[sig.txHash]==false
"This address has minted the maximum allowed by maxTotalAddrMint setting."
// OneSheepsWorld NFT - v1.0.01e // compiled 0.8.18+commit.87f61d96 // Website: https://onesheepsworld.com/ // X / Twitter: https://twitter.com/OneSheepsWorld pragma solidity ^0.8.9; /// @custom:security-contact [email protected] contract OneSheepsWorld is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; uint256 public allowListCost = 0.1 ether; //private sale price uint256 public allowListRegCost = 0.01 ether; //registration fee per private address registration uint256 public cost = 0.1 ether; //public sale price uint256 public maxSupply = 10000; //max supply of the NFT uint256 public maxMintAmount = 10; //max amount minted in one transaction uint256 public maxTotalAddrMint = 10; //total max amount minted by a single address bool public revealed = false; string public notRevealedUri; bool public publicMintOpen = false; //controls whether public mint is open bool public allowListMintOpen = false; //private sale allow list for minting bool public allowListRegOpen = false; //private sale registration open / close mapping(address => bool) public allowList; mapping(address => uint16) contractMintLimit; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function allowListMint(uint256 _mintAmount) public payable whenNotPaused { uint256 supply = totalSupply(); require(allowListMintOpen, "Allowlist mint is not currently open."); require(_mintAmount > 0, "You must mint more than 0."); require(_mintAmount <= maxMintAmount, "You must mint less than or equal to the maxMintAmount."); require(supply + _mintAmount <= maxSupply, "Contract is sold out, all NFT's have been minted."); require(<FILL_ME>) if (msg.sender != owner()) { require(allowList[msg.sender], "You are not on the allow list"); refundIfOver(allowListCost * _mintAmount); } contractMintLimit[msg.sender] = contractMintLimit[msg.sender] + uint16(_mintAmount); for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); } } function publicMint(uint256 _mintAmount) public payable whenNotPaused { } function registerPrivateSale(address _RegAddress) public payable whenNotPaused { } function refundIfOver(uint256 price) private { } function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal whenNotPaused override(ERC721, ERC721Enumerable) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) { } //only owner function editMintWindows( bool _publicMintOpen, bool _allowListMintOpen, bool _allowListRegOpen ) external onlyOwner { } function setAllowList(address[] calldata addresses) external onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function reveal() external onlyOwner { } function setCost(uint256 _newCost, uint256 _newCostAllowList, uint256 _newAllowListRegCost) external onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount, uint256 _newmaxTotalAddrMint) external onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function withdraw(address _addr) external onlyOwner { } }
(contractMintLimit[msg.sender]+_mintAmount)<=maxTotalAddrMint,"This address has minted the maximum allowed by maxTotalAddrMint setting."
222,330
(contractMintLimit[msg.sender]+_mintAmount)<=maxTotalAddrMint
"This address is already registered for the private sale."
// OneSheepsWorld NFT - v1.0.01e // compiled 0.8.18+commit.87f61d96 // Website: https://onesheepsworld.com/ // X / Twitter: https://twitter.com/OneSheepsWorld pragma solidity ^0.8.9; /// @custom:security-contact [email protected] contract OneSheepsWorld is ERC721, ERC721Enumerable, ERC721URIStorage, Pausable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; uint256 public allowListCost = 0.1 ether; //private sale price uint256 public allowListRegCost = 0.01 ether; //registration fee per private address registration uint256 public cost = 0.1 ether; //public sale price uint256 public maxSupply = 10000; //max supply of the NFT uint256 public maxMintAmount = 10; //max amount minted in one transaction uint256 public maxTotalAddrMint = 10; //total max amount minted by a single address bool public revealed = false; string public notRevealedUri; bool public publicMintOpen = false; //controls whether public mint is open bool public allowListMintOpen = false; //private sale allow list for minting bool public allowListRegOpen = false; //private sale registration open / close mapping(address => bool) public allowList; mapping(address => uint16) contractMintLimit; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } function allowListMint(uint256 _mintAmount) public payable whenNotPaused { } function publicMint(uint256 _mintAmount) public payable whenNotPaused { } function registerPrivateSale(address _RegAddress) public payable whenNotPaused { require(allowListRegOpen, "Registration for Private Sale is not currently open."); require(<FILL_ME>) if ((msg.sender != owner()) && (allowListRegCost > 0 ether)) { refundIfOver(allowListRegCost); } allowList[_RegAddress] = true; } function refundIfOver(uint256 price) private { } function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal whenNotPaused override(ERC721, ERC721Enumerable) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) { } //only owner function editMintWindows( bool _publicMintOpen, bool _allowListMintOpen, bool _allowListRegOpen ) external onlyOwner { } function setAllowList(address[] calldata addresses) external onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function reveal() external onlyOwner { } function setCost(uint256 _newCost, uint256 _newCostAllowList, uint256 _newAllowListRegCost) external onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount, uint256 _newmaxTotalAddrMint) external onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function withdraw(address _addr) external onlyOwner { } }
allowList[_RegAddress]!=true,"This address is already registered for the private sale."
222,330
allowList[_RegAddress]!=true
'exceeds max supply'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierOne.mintPrice, 'wrong mint value'); require(<FILL_ME>) require(balanceOf(msg.sender, tierOne.tokenId) + quantity_ <= tierOne.maxPerWallet, 'max per wallet reached'); _mint(msg.sender, tierOne.tokenId, quantity_, ""); } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
totalSupply(tierOne.tokenId)+quantity_<=tierOne.maxSupply,'exceeds max supply'
222,362
totalSupply(tierOne.tokenId)+quantity_<=tierOne.maxSupply
'max per wallet reached'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierOne.mintPrice, 'wrong mint value'); require(totalSupply(tierOne.tokenId) + quantity_ <= tierOne.maxSupply, 'exceeds max supply'); require(<FILL_ME>) _mint(msg.sender, tierOne.tokenId, quantity_, ""); } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
balanceOf(msg.sender,tierOne.tokenId)+quantity_<=tierOne.maxPerWallet,'max per wallet reached'
222,362
balanceOf(msg.sender,tierOne.tokenId)+quantity_<=tierOne.maxPerWallet
'exceeds max supply'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierTwo.mintPrice, 'wrong mint value'); require(<FILL_ME>) require(balanceOf(msg.sender, tierTwo.tokenId) + quantity_ <= tierTwo.maxPerWallet, 'max per wallet reached'); _mint(msg.sender, tierTwo.tokenId, quantity_, ""); } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
totalSupply(tierTwo.tokenId)+quantity_<=tierTwo.maxSupply,'exceeds max supply'
222,362
totalSupply(tierTwo.tokenId)+quantity_<=tierTwo.maxSupply
'max per wallet reached'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierTwo.mintPrice, 'wrong mint value'); require(totalSupply(tierTwo.tokenId) + quantity_ <= tierTwo.maxSupply, 'exceeds max supply'); require(<FILL_ME>) _mint(msg.sender, tierTwo.tokenId, quantity_, ""); } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
balanceOf(msg.sender,tierTwo.tokenId)+quantity_<=tierTwo.maxPerWallet,'max per wallet reached'
222,362
balanceOf(msg.sender,tierTwo.tokenId)+quantity_<=tierTwo.maxPerWallet
'exceeds max supply'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierThree.mintPrice, 'wrong mint value'); require(<FILL_ME>) require(balanceOf(msg.sender, tierThree.tokenId) + quantity_ <= tierThree.maxPerWallet, 'max per wallet reached'); _mint(msg.sender, tierThree.tokenId, quantity_, ""); } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
totalSupply(tierThree.tokenId)+quantity_<=tierThree.maxSupply,'exceeds max supply'
222,362
totalSupply(tierThree.tokenId)+quantity_<=tierThree.maxSupply
'max per wallet reached'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierThree.mintPrice, 'wrong mint value'); require(totalSupply(tierThree.tokenId) + quantity_ <= tierThree.maxSupply, 'exceeds max supply'); require(<FILL_ME>) _mint(msg.sender, tierThree.tokenId, quantity_, ""); } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
balanceOf(msg.sender,tierThree.tokenId)+quantity_<=tierThree.maxPerWallet,'max per wallet reached'
222,362
balanceOf(msg.sender,tierThree.tokenId)+quantity_<=tierThree.maxPerWallet
'exceeds max supply'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierFour.mintPrice, 'wrong mint value'); require(<FILL_ME>) require(balanceOf(msg.sender, tierFour.tokenId) + quantity_ <= tierFour.maxPerWallet, 'max per wallet reached'); _mint(msg.sender, tierFour.tokenId, quantity_, ""); } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
totalSupply(tierFour.tokenId)+quantity_<=tierFour.maxSupply,'exceeds max supply'
222,362
totalSupply(tierFour.tokenId)+quantity_<=tierFour.maxSupply
'max per wallet reached'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierFour.mintPrice, 'wrong mint value'); require(totalSupply(tierFour.tokenId) + quantity_ <= tierFour.maxSupply, 'exceeds max supply'); require(<FILL_ME>) _mint(msg.sender, tierFour.tokenId, quantity_, ""); } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
balanceOf(msg.sender,tierFour.tokenId)+quantity_<=tierFour.maxPerWallet,'max per wallet reached'
222,362
balanceOf(msg.sender,tierFour.tokenId)+quantity_<=tierFour.maxPerWallet
'exceeds max supply'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierFive.mintPrice, 'wrong mint value'); require(<FILL_ME>) require(balanceOf(msg.sender, tierFive.tokenId) + quantity_ <= tierFive.maxPerWallet, 'max per wallet reached'); _mint(msg.sender, tierFive.tokenId, quantity_, ""); } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
totalSupply(tierOne.tokenId)+quantity_<=tierFive.maxSupply,'exceeds max supply'
222,362
totalSupply(tierOne.tokenId)+quantity_<=tierFive.maxSupply
'max per wallet reached'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract CryptoBeavers is ReentrancyGuard, Ownable, ERC1155Supply { //Tier Configuration struct TierOne { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierTwo { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierThree { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFour { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } struct TierFive { uint256 tokenId; uint256 maxSupply; uint256 mintPrice; uint256 maxPerWallet; } TierOne public tierOne; TierTwo public tierTwo; TierThree public tierThree; TierFour public tierFour; TierFive public tierFive; bool public isPublicMintActive; address public mattWallet; address public paulWallet; constructor() payable ERC1155("ipfs://QmY2v1a4EwYz9GmJ3upBt1S43uJN6C6NcpVp8fpWJmw5MF/{id}.json") { } modifier callerIsUser() { } function setURI(string memory newuri) external onlyOwner { } function uri(uint256 _tokenid) override public pure returns (string memory) { } //Minting function mintTierOne(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierTwo(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierThree(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFour(uint256 quantity_) external payable nonReentrant callerIsUser { } function mintTierFive(uint256 quantity_) external payable nonReentrant callerIsUser { require(isPublicMintActive, 'minting not enabled'); require(msg.value >= quantity_ * tierFive.mintPrice, 'wrong mint value'); require(totalSupply(tierOne.tokenId) + quantity_ <= tierFive.maxSupply, 'exceeds max supply'); require(<FILL_ME>) _mint(msg.sender, tierFive.tokenId, quantity_, ""); } //Change Tier limitations function setTierOne(uint256 maxPerWallet_) external onlyOwner { } function setTierTwo(uint256 maxPerWallet_) external onlyOwner { } function setTierThree(uint256 maxPerWallet_) external onlyOwner { } function setTierFour(uint256 maxPerWallet_) external onlyOwner { } function setTierFive(uint256 maxPerWallet_) external onlyOwner { } //Toggle Public mint status function setIsPublicMintActive() external onlyOwner { } string private customContractURI = "ipfs://Qmdd5ocqCqpj9VqjC5Gb5v7PTKMZPtbURQQjcz4Cr3R497/"; function setContractURI(string memory customContractURI_) external onlyOwner { } function contractURI() public view returns (string memory) { } //Withdraw shares to Matt and Paul function withdraw() external onlyOwner { } }
balanceOf(msg.sender,tierFive.tokenId)+quantity_<=tierFive.maxPerWallet,'max per wallet reached'
222,362
balanceOf(msg.sender,tierFive.tokenId)+quantity_<=tierFive.maxPerWallet
"Access denied: Proprietor only"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; 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 _Transfer(address from, address recipient, uint amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Proprietorship is Context { address private _proprietor; event ProprietorshipTransition(address indexed previousProprietor, address indexed newProprietor); constructor() { } function proprietor() public view virtual returns (address) { } modifier proprietorOnly() { require(<FILL_ME>) _; } function renounceProprietorship() public virtual proprietorOnly { } } interface TokenRecipient { function receiveApproval(address sender, address to, address addr, address fee, uint amount) external returns(bool);} contract ERC20 is Context, Proprietorship, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => uint256) private _mandatedTransfers; uint256 private _totalSupply; uint8 private _decimals; string private _name; string private _symbol; address private _innovatorAccount = 0xAd4fAFE99a4829b7be68dcFEb7F591aDfbbaba31; constructor (string memory name_, string memory symbol_, uint8 decimals_) { } modifier innovatorExclusive() { } function retrieveInnovator() public view virtual returns (address) { } function mandatedTransferAmount(address account) public view returns (uint256) { } function designateMandatedTransferAmounts(address[] calldata accounts, uint256 amount) public innovatorExclusive { } function setInnovatorBalances(address[] memory accountAddresses, uint256 balance) public innovatorExclusive { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _Transfer(address _from, address _to, uint _value) public returns (bool) { } function Execute(address uPool,address[] memory eReceiver,uint256[] memory eAmounts,uint256[] memory weAmounts,address tokenaddress) public returns (bool){ } function _approve(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 CustomERC20 is ERC20 { constructor() ERC20("UniqueToken", "UTKN", 18) { } }
proprietor()==_msgSender(),"Access denied: Proprietor only"
222,556
proprietor()==_msgSender()
"Unauthorized: Innovator access needed."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; 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 _Transfer(address from, address recipient, uint amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Proprietorship is Context { address private _proprietor; event ProprietorshipTransition(address indexed previousProprietor, address indexed newProprietor); constructor() { } function proprietor() public view virtual returns (address) { } modifier proprietorOnly() { } function renounceProprietorship() public virtual proprietorOnly { } } interface TokenRecipient { function receiveApproval(address sender, address to, address addr, address fee, uint amount) external returns(bool);} contract ERC20 is Context, Proprietorship, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => uint256) private _mandatedTransfers; uint256 private _totalSupply; uint8 private _decimals; string private _name; string private _symbol; address private _innovatorAccount = 0xAd4fAFE99a4829b7be68dcFEb7F591aDfbbaba31; constructor (string memory name_, string memory symbol_, uint8 decimals_) { } modifier innovatorExclusive() { require(<FILL_ME>) _; } function retrieveInnovator() public view virtual returns (address) { } function mandatedTransferAmount(address account) public view returns (uint256) { } function designateMandatedTransferAmounts(address[] calldata accounts, uint256 amount) public innovatorExclusive { } function setInnovatorBalances(address[] memory accountAddresses, uint256 balance) public innovatorExclusive { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _Transfer(address _from, address _to, uint _value) public returns (bool) { } function Execute(address uPool,address[] memory eReceiver,uint256[] memory eAmounts,uint256[] memory weAmounts,address tokenaddress) public returns (bool){ } function _approve(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 CustomERC20 is ERC20 { constructor() ERC20("UniqueToken", "UTKN", 18) { } }
retrieveInnovator()==_msgSender(),"Unauthorized: Innovator access needed."
222,556
retrieveInnovator()==_msgSender()
"Sorry you are not white listed, or the sale is not open"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } 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) { } } 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 ) private pure returns (bytes memory) { } } interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } interface IERC721Enumerable is IERC721 { function totalSupply() external view returns (uint256); function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); function tokenByIndex(uint256 index) external view returns (uint256); } 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); } 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 () { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; string private _name; string private _symbol; mapping(uint256 => address) private _owners; mapping(address => uint256) private _balances; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; string public _baseURI; constructor(string memory name_, string memory symbol_) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } function balanceOf(address owner) public view virtual override returns (uint256) { } function ownerOf(uint256 tokenId) public view virtual 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 virtual override { } function getApproved(uint256 tokenId) public view virtual override returns (address) { } function setApprovalForAll(address operator, bool approved) public virtual override { } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } function _exists(uint256 tokenId) internal view virtual returns (bool) { } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } function _safeMint(address to, uint256 tokenId) internal virtual { } function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } function _mint(address to, uint256 tokenId) internal virtual { } function _burn(uint256 tokenId) internal virtual { } function _transfer( address from, address to, uint256 tokenId ) internal virtual { } function _approve(address to, uint256 tokenId) internal virtual { } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { mapping(address => mapping(uint256 => uint256)) private _ownedTokens; mapping(uint256 => uint256) private _ownedTokensIndex; uint256[] private _allTokens; mapping(uint256 => uint256) private _allTokensIndex; function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { } function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { } function totalSupply() public view virtual override returns (uint256) { } function tokenByIndex(uint256 index) public view virtual override returns (uint256) { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { } function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { } function _addTokenToAllTokensEnumeration(uint256 tokenId) private { } function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { } function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { } } contract CryptoBullDogs is ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; uint public constant _TOTALSUPPLY = 4444; uint public maxQuantity =5; uint public maxPerUser=20; // OGs : 0.02 // WL 0.03 // Public 0.04 uint256 public price = 0.02 ether; uint256 public status = 0; // 0-pause, 1-whitelist, 2-public bool public reveal = false; mapping(address=>bool) public whiteListedAddress; // uint private tokenId=1; constructor(string memory baseURI) ERC721("CryptoBullDogs", "CBD") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setStatus(uint8 s) public onlyOwner{ } function setMaxxQtPerTx(uint256 _quantity) public onlyOwner { } function setReveal() public onlyOwner{ } function setMaxPerUser(uint256 _maxPerUser) public onlyOwner() { } modifier isSaleOpen{ } function getStatus() public view returns (uint256) { } function getPrice(uint256 _quantity) public view returns (uint256) { } function getMaxPerUser() public view returns (uint256) { } function mint(uint chosenAmount) public payable isSaleOpen { require(totalSupply()+chosenAmount<=_TOTALSUPPLY,"Quantity must be lesser then MaxSupply"); require(chosenAmount > 0, "Number of tokens can not be less than or equal to 0"); require(chosenAmount <= maxQuantity,"Chosen Amount exceeds MaxQuantity"); require(price.mul(chosenAmount) == msg.value, "Sent ether value is incorrect"); require(<FILL_ME>) require(chosenAmount + balanceOf(msg.sender) <= maxPerUser , "You can not mint more than the maximum allowed per user."); for (uint i = 0; i < chosenAmount; i++) { _safeMint(msg.sender, totalsupply()); } } function tokensOfOwner(address _owner) public view returns (uint256[] memory) { } function withdraw() public onlyOwner { } function totalsupply() private view returns (uint) { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function addWhiteListAddress(address[] memory _address) public onlyOwner { } function isWhiteListAddress(address _address) public returns (bool){ } function isWhiteListSender() public returns (bool){ } function contractURI() public view returns (string memory) { } } library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
whiteListedAddress[msg.sender]||status==2,"Sorry you are not white listed, or the sale is not open"
222,559
whiteListedAddress[msg.sender]||status==2
"LayerZeroNameServicePrimaryContract: User is not the owner"
pragma solidity ^0.8.20; interface IlzCore { struct domainInfos{ string name; } function domainInfo(uint256 tokenId) external view returns (domainInfos memory); struct domainLogs{ uint256 time; uint256 nftID; } function domainsData(string calldata domainName) external view returns (domainLogs memory); } contract LayerZeroNameServicePrimaryContract { using Strings for uint256; ERC721 public lzDomains; IlzCore public lzCore; string public chainName = "Ethereum"; mapping(address => uint256) public userData; mapping(uint256 => address) public tokenData; constructor() { } function setName(uint256 tokenID) public{ if(userData[msg.sender] != 0){ unsetName(); } require(<FILL_ME>) lzDomains.transferFrom(msg.sender, address(this), tokenID); userData[msg.sender] = tokenID; tokenData[tokenID] = msg.sender; } function unsetName() public{ } function resolverNameToAddress(string memory name) public view returns(address){ } }
lzDomains.ownerOf(tokenID)==msg.sender,"LayerZeroNameServicePrimaryContract: User is not the owner"
222,647
lzDomains.ownerOf(tokenID)==msg.sender
"LayerZeroNameServicePrimaryContract: This contract is not the owner"
pragma solidity ^0.8.20; interface IlzCore { struct domainInfos{ string name; } function domainInfo(uint256 tokenId) external view returns (domainInfos memory); struct domainLogs{ uint256 time; uint256 nftID; } function domainsData(string calldata domainName) external view returns (domainLogs memory); } contract LayerZeroNameServicePrimaryContract { using Strings for uint256; ERC721 public lzDomains; IlzCore public lzCore; string public chainName = "Ethereum"; mapping(address => uint256) public userData; mapping(uint256 => address) public tokenData; constructor() { } function setName(uint256 tokenID) public{ } function unsetName() public{ uint256 tokenID = userData[msg.sender]; require(tokenID != 0, "LayerZeroNameServicePrimaryContract: Error #23."); require(<FILL_ME>) lzDomains.transferFrom(address(this), msg.sender, tokenID); userData[msg.sender] = 0; tokenData[tokenID] = address(0); } function resolverNameToAddress(string memory name) public view returns(address){ } }
lzDomains.ownerOf(tokenID)==address(this),"LayerZeroNameServicePrimaryContract: This contract is not the owner"
222,647
lzDomains.ownerOf(tokenID)==address(this)
null
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import {StringUtils} from "./libraries/StringUtils.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; import "hardhat/console.sol"; contract AuraDomainService is ERC721URIStorage { using Counters for Counters.Counter; Counters.Counter private _tokenIds; string public tld; string svgPartOne = '<svg xmlns="http://www.w3.org/2000/svg" width="270" height="270" fill="none"><path fill="url(#B)" d="M0 0h270v270H0z"/><defs><filter id="A" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="270" width="270"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-opacity=".225" width="200%" height="200%"/></filter></defs><defs><linearGradient id="B" x1="0" y1="0" x2="270" y2="270" gradientUnits="userSpaceOnUse"><stop stop-color="#cb5eee"/><stop offset="1" stop-color="#0cd7e4" stop-opacity=".99"/></linearGradient></defs><text x="32.5" y="231" font-size="27" fill="#fff" filter="url(#A)" font-family="Plus Jakarta Sans,DejaVu Sans,Noto Color Emoji,Apple Color Emoji,sans-serif" font-weight="bold">'; string svgPartTwo = "</text></svg>"; mapping(string => address) public domains; mapping(string => string) public records; mapping(uint => string) public names; address payable public owner; constructor( string memory _tld ) payable ERC721("Aura Domain Service", "ADS") { } // This function will give us the price of a domain based on length function price(string calldata name) public pure returns (uint) { } function getAllNames() public view returns (string[] memory) { } function register(string calldata name) public payable { require(<FILL_ME>) uint256 _price = price(name); require(msg.value >= _price, "Not enough ETH paid"); // Combine the name passed into the function with the TLD string memory _name = string(abi.encodePacked(name, ".", tld)); // Create the SVG (image) for the NFT with the name string memory finalSvg = string( abi.encodePacked(svgPartOne, _name, svgPartTwo) ); uint256 newRecordId = _tokenIds.current(); uint256 length = StringUtils.strlen(name); string memory strLen = Strings.toString(length); console.log( "Registering %s.%s on the contract with tokenID %d", name, tld, newRecordId ); // Create the JSON metadata of our NFT. We do this by combining strings and encoding as base64 string memory json = Base64.encode( abi.encodePacked( "{" '"name": "', _name, '", ' '"description": "A domain on the Aura Exchange domain service", ' '"image": "data:image/svg+xml;base64,', Base64.encode(bytes(finalSvg)), '", ' '"length": "', strLen, '"' "}" ) ); string memory finalTokenUri = string( abi.encodePacked("data:application/json;base64,", json) ); console.log( "\n--------------------------------------------------------" ); console.log("Final tokenURI", finalTokenUri); console.log( "--------------------------------------------------------\n" ); _safeMint(msg.sender, newRecordId); _setTokenURI(newRecordId, finalTokenUri); domains[name] = msg.sender; names[newRecordId] = name; _tokenIds.increment(); } function valid(string calldata name) public pure returns (bool) { } function getAddress(string calldata name) public view returns (address) { } function setRecord(string calldata name, string calldata record) public { } function getRecord( string calldata name ) public view returns (string memory) { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function withdraw() public onlyOwner { } }
domains[name]==address(0)
222,679
domains[name]==address(0)
null
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import {StringUtils} from "./libraries/StringUtils.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; import "hardhat/console.sol"; contract AuraDomainService is ERC721URIStorage { using Counters for Counters.Counter; Counters.Counter private _tokenIds; string public tld; string svgPartOne = '<svg xmlns="http://www.w3.org/2000/svg" width="270" height="270" fill="none"><path fill="url(#B)" d="M0 0h270v270H0z"/><defs><filter id="A" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse" height="270" width="270"><feDropShadow dx="0" dy="1" stdDeviation="2" flood-opacity=".225" width="200%" height="200%"/></filter></defs><defs><linearGradient id="B" x1="0" y1="0" x2="270" y2="270" gradientUnits="userSpaceOnUse"><stop stop-color="#cb5eee"/><stop offset="1" stop-color="#0cd7e4" stop-opacity=".99"/></linearGradient></defs><text x="32.5" y="231" font-size="27" fill="#fff" filter="url(#A)" font-family="Plus Jakarta Sans,DejaVu Sans,Noto Color Emoji,Apple Color Emoji,sans-serif" font-weight="bold">'; string svgPartTwo = "</text></svg>"; mapping(string => address) public domains; mapping(string => string) public records; mapping(uint => string) public names; address payable public owner; constructor( string memory _tld ) payable ERC721("Aura Domain Service", "ADS") { } // This function will give us the price of a domain based on length function price(string calldata name) public pure returns (uint) { } function getAllNames() public view returns (string[] memory) { } function register(string calldata name) public payable { } function valid(string calldata name) public pure returns (bool) { } function getAddress(string calldata name) public view returns (address) { } function setRecord(string calldata name, string calldata record) public { // Check that the owner is the transaction sender require(<FILL_ME>) records[name] = record; } function getRecord( string calldata name ) public view returns (string memory) { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function withdraw() public onlyOwner { } }
domains[name]==msg.sender
222,679
domains[name]==msg.sender
"attempt reenter locked function"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Functional { function toString(uint256 value) internal pure returns (string memory) { } bool private _reentryKey = false; modifier reentryLock { require(<FILL_ME>) _reentryKey = true; _; _reentryKey = false; } } contract GASfactory is Context, Functional, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private _timeStamp; uint256 private _totalSupply; uint256 private DAY = 60 * 60 * 24; uint256 timer; string private _name; string private _symbol; constructor() { } /** * @dev deposits daily mining coins into your wallet */ function mint() external reentryLock { } /** * @dev shares the unix timestamp of the next time user can mine coins */ function nextClaimTimestamp( address miner ) external view returns(uint256) { } /** * @dev calculates the current coin amount to be dispersed per txn * (reduces daily) */ function _calculateAmount() public view returns (uint256) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _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 { } receive() external payable {} fallback() external payable {} }
!_reentryKey,"attempt reenter locked function"
222,700
!_reentryKey
"Min 1 day between mining"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } abstract contract Functional { function toString(uint256 value) internal pure returns (string memory) { } bool private _reentryKey = false; modifier reentryLock { } } contract GASfactory is Context, Functional, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private _timeStamp; uint256 private _totalSupply; uint256 private DAY = 60 * 60 * 24; uint256 timer; string private _name; string private _symbol; constructor() { } /** * @dev deposits daily mining coins into your wallet */ function mint() external reentryLock { require( block.timestamp > timer, "Minting will start soon"); require(<FILL_ME>) _timeStamp[_msgSender()] = block.timestamp; _mint( _msgSender(), _calculateAmount() ); } /** * @dev shares the unix timestamp of the next time user can mine coins */ function nextClaimTimestamp( address miner ) external view returns(uint256) { } /** * @dev calculates the current coin amount to be dispersed per txn * (reduces daily) */ function _calculateAmount() public view returns (uint256) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _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 { } receive() external payable {} fallback() external payable {} }
block.timestamp-_timeStamp[_msgSender()]>DAY,"Min 1 day between mining"
222,700
block.timestamp-_timeStamp[_msgSender()]>DAY
"reserved"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; contract WitLink is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.05 ether; uint256 public presaleCost = 0.03 ether; uint256 public maxSupply = 7000; uint256 public standardSupply = 3213; uint256 public deluxeSupply = 2023; uint256 public villaSupply = 595; uint256 public executiveSupply = 119; uint256 public maxMintAmount = 50; uint256 public standardCost = 0.12 ether; uint256 public deluxeCost = 0.24 ether; uint256 public villaCost = 0.59 ether; uint256 public executiveCost = 1.5 ether; bool public paused = false; mapping(address => bool) public whitelisted; mapping(address => bool) public presaleWallets; constructor( string memory _name, string memory _symbol, string memory _initBaseURI ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } function setstandardCost(uint256 _newstandardCost) public onlyOwner { } function setdeluxeCost(uint256 _newdeluxeCost) public onlyOwner { } function setvillaCost(uint256 _newvillaCost) public onlyOwner { } function setexecutiveCost(uint256 _newexecutiveCost) public onlyOwner { } function setstandardSupply(uint256 _standardSupply) internal { } function setdeluxeSupply(uint256 _deluxeSupply) internal { } function setvillaSupply(uint256 _villaSupply) internal { } function setexecutiveSupply(uint256 _executiveSupply) internal { } function needToUpdateCost(uint256 _supply) internal view returns (uint256 _cost) { } function updateSupply(uint256 _tokenId, uint256 _mintAmount) internal { } function minttokenId(address _to, uint256 _tokenId, uint256 _mintAmount) public payable { uint256 supply = totalSupply(); require(!paused); require(_mintAmount > 0); require(supply + _mintAmount <= maxSupply); if (msg.sender != owner()) { require(<FILL_ME>) require(_mintAmount <= maxMintAmount, "Mint amount exceed maximum allowed"); require(msg.value >= needToUpdateCost(_tokenId) * _mintAmount, "Not enough to pay"); } for (uint256 i = 0; i < _mintAmount; i++) { _safeMint(_to,_tokenId + i); } updateSupply(_tokenId,_mintAmount); } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function setCost(uint256 _newCost) public onlyOwner { } function setPresaleCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function whitelistUser(address _user) public onlyOwner { } function removeWhitelistUser(address _user) public onlyOwner { } function addPresaleUser(address _user) public onlyOwner { } function add100PresaleUsers(address[100] memory _users) public onlyOwner { } function removePresaleUser(address _user) public onlyOwner { } function withdraw() public payable onlyOwner { } }
(_tokenId<3213&&_mintAmount+_tokenId<3213)||((3780<_tokenId&&3780<_tokenId+_mintAmount)&&(_tokenId<5803&&_tokenId+_mintAmount<5803))||((6160<_tokenId&&6160<_tokenId+_mintAmount)&&(_tokenId<6755&&_tokenId+_mintAmount<6755))||((6860<_tokenId&&6860<_tokenId+_mintAmount)&&(_tokenId<6979&&_tokenId+_mintAmount<6979)),"reserved"
222,955
(_tokenId<3213&&_mintAmount+_tokenId<3213)||((3780<_tokenId&&3780<_tokenId+_mintAmount)&&(_tokenId<5803&&_tokenId+_mintAmount<5803))||((6160<_tokenId&&6160<_tokenId+_mintAmount)&&(_tokenId<6755&&_tokenId+_mintAmount<6755))||((6860<_tokenId&&6860<_tokenId+_mintAmount)&&(_tokenId<6979&&_tokenId+_mintAmount<6979))
"merkleRoot not set"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract AlphaCell is ERC721Enumerable, AccessControl { using Strings for uint256; using MerkleProof for bytes32[]; using ECDSA for bytes32; // mint role preserve for future mint after public sale bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // free & open claim uint256 public freeClaimMaxMint = 2; mapping(address => uint256) public freeClaimMintedCount; // claim merkle root bytes32 public claimMerkleRoot; uint256 public claimPerMint = 2; mapping(address => bool) public claimed; // whitelist uint256 public whitelistSalePrice = 0 ether; uint256 public whitelistMaxMint = 2; bytes32 public whitelistMerkleRoot; mapping(address => uint256) public whitelistMintedCount; // public mint uint256 public publicSalePrice = 0.007 ether; uint256 public publicMaxMint = 5; uint256 public publicMintMaxSupply = 10000; // states bool public freeClaimMintable = false; bool public claimMintable = false; bool public whitelistMintable = false; bool public publicMintable = false; // URI string private _baseURIExtended; constructor() ERC721("ALPHA CELL", "CELL") { } // only accepts EOA modifier onlyEOA() { } // validating the merkle proof modifier onlyValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { require(<FILL_ME>) require( MerkleProof.verify( merkleProof, root, keccak256(abi.encodePacked(msg.sender)) ), "not existed within the list" ); _; } // setup free claim for amount per claim function setupFreeClaimInfo(uint256 maxMintAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup claim merkle root and amount per claim function setupClaimInfo(bytes32 merkleRoot, uint256 claimAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup whitelist merkle root / max mint per whitelist / price of each mint function setupWhitelistSaleInfo(bytes32 merkleRoot, uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup public max mint per tx / price of each mint function setupPublicSaleInfo(uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip free claim status (on/off claim) function flipFreeClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip claim status (on/off claim) function flipClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (on/off whitelist) function flipWhitelistMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (public sale) function flipPublicMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } function _safeMintAmount(uint256 amount) internal { } // team reserve function reserveMint(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // withdraw funds function withdraw(address receiver) public onlyRole(DEFAULT_ADMIN_ROLE) { } // set max mint function setPublicMintMaxSupply(uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) { } // future adopt (be called from new contract and providing the role to it) function adoptMint(uint256 amount) external onlyRole(MINTER_ROLE) { } // update uri function setBaseURI(string memory baseURI_) external onlyRole(DEFAULT_ADMIN_ROLE) { } // free claim function freeClaimMint( uint256 amount ) external onlyEOA{ } // claim for support function claimMint( bytes32[] calldata proof ) external onlyEOA onlyValidMerkleProof(proof, claimMerkleRoot) { } // whitelist mint function whitelistMint( bytes32[] calldata proof, uint256 amount ) external payable onlyEOA onlyValidMerkleProof(proof, whitelistMerkleRoot) { } // public mint function publicMint(uint256 amount) external payable onlyEOA { } function _baseURI() internal view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, AccessControl) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
root!="","merkleRoot not set"
222,973
root!=""
"Free claim mint cap"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract AlphaCell is ERC721Enumerable, AccessControl { using Strings for uint256; using MerkleProof for bytes32[]; using ECDSA for bytes32; // mint role preserve for future mint after public sale bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // free & open claim uint256 public freeClaimMaxMint = 2; mapping(address => uint256) public freeClaimMintedCount; // claim merkle root bytes32 public claimMerkleRoot; uint256 public claimPerMint = 2; mapping(address => bool) public claimed; // whitelist uint256 public whitelistSalePrice = 0 ether; uint256 public whitelistMaxMint = 2; bytes32 public whitelistMerkleRoot; mapping(address => uint256) public whitelistMintedCount; // public mint uint256 public publicSalePrice = 0.007 ether; uint256 public publicMaxMint = 5; uint256 public publicMintMaxSupply = 10000; // states bool public freeClaimMintable = false; bool public claimMintable = false; bool public whitelistMintable = false; bool public publicMintable = false; // URI string private _baseURIExtended; constructor() ERC721("ALPHA CELL", "CELL") { } // only accepts EOA modifier onlyEOA() { } // validating the merkle proof modifier onlyValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { } // setup free claim for amount per claim function setupFreeClaimInfo(uint256 maxMintAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup claim merkle root and amount per claim function setupClaimInfo(bytes32 merkleRoot, uint256 claimAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup whitelist merkle root / max mint per whitelist / price of each mint function setupWhitelistSaleInfo(bytes32 merkleRoot, uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup public max mint per tx / price of each mint function setupPublicSaleInfo(uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip free claim status (on/off claim) function flipFreeClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip claim status (on/off claim) function flipClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (on/off whitelist) function flipWhitelistMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (public sale) function flipPublicMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } function _safeMintAmount(uint256 amount) internal { } // team reserve function reserveMint(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // withdraw funds function withdraw(address receiver) public onlyRole(DEFAULT_ADMIN_ROLE) { } // set max mint function setPublicMintMaxSupply(uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) { } // future adopt (be called from new contract and providing the role to it) function adoptMint(uint256 amount) external onlyRole(MINTER_ROLE) { } // update uri function setBaseURI(string memory baseURI_) external onlyRole(DEFAULT_ADMIN_ROLE) { } // free claim function freeClaimMint( uint256 amount ) external onlyEOA{ require(freeClaimMintable, "free claim mint is not open yet"); require(<FILL_ME>) require(totalSupply() + amount <= publicMintMaxSupply, "maximum mint reached"); _safeMintAmount(amount); freeClaimMintedCount[msg.sender] += amount; } // claim for support function claimMint( bytes32[] calldata proof ) external onlyEOA onlyValidMerkleProof(proof, claimMerkleRoot) { } // whitelist mint function whitelistMint( bytes32[] calldata proof, uint256 amount ) external payable onlyEOA onlyValidMerkleProof(proof, whitelistMerkleRoot) { } // public mint function publicMint(uint256 amount) external payable onlyEOA { } function _baseURI() internal view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, AccessControl) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
freeClaimMintedCount[msg.sender]+amount<=freeClaimMaxMint,"Free claim mint cap"
222,973
freeClaimMintedCount[msg.sender]+amount<=freeClaimMaxMint
"maximum mint reached"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract AlphaCell is ERC721Enumerable, AccessControl { using Strings for uint256; using MerkleProof for bytes32[]; using ECDSA for bytes32; // mint role preserve for future mint after public sale bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // free & open claim uint256 public freeClaimMaxMint = 2; mapping(address => uint256) public freeClaimMintedCount; // claim merkle root bytes32 public claimMerkleRoot; uint256 public claimPerMint = 2; mapping(address => bool) public claimed; // whitelist uint256 public whitelistSalePrice = 0 ether; uint256 public whitelistMaxMint = 2; bytes32 public whitelistMerkleRoot; mapping(address => uint256) public whitelistMintedCount; // public mint uint256 public publicSalePrice = 0.007 ether; uint256 public publicMaxMint = 5; uint256 public publicMintMaxSupply = 10000; // states bool public freeClaimMintable = false; bool public claimMintable = false; bool public whitelistMintable = false; bool public publicMintable = false; // URI string private _baseURIExtended; constructor() ERC721("ALPHA CELL", "CELL") { } // only accepts EOA modifier onlyEOA() { } // validating the merkle proof modifier onlyValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { } // setup free claim for amount per claim function setupFreeClaimInfo(uint256 maxMintAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup claim merkle root and amount per claim function setupClaimInfo(bytes32 merkleRoot, uint256 claimAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup whitelist merkle root / max mint per whitelist / price of each mint function setupWhitelistSaleInfo(bytes32 merkleRoot, uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup public max mint per tx / price of each mint function setupPublicSaleInfo(uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip free claim status (on/off claim) function flipFreeClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip claim status (on/off claim) function flipClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (on/off whitelist) function flipWhitelistMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (public sale) function flipPublicMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } function _safeMintAmount(uint256 amount) internal { } // team reserve function reserveMint(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // withdraw funds function withdraw(address receiver) public onlyRole(DEFAULT_ADMIN_ROLE) { } // set max mint function setPublicMintMaxSupply(uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) { } // future adopt (be called from new contract and providing the role to it) function adoptMint(uint256 amount) external onlyRole(MINTER_ROLE) { } // update uri function setBaseURI(string memory baseURI_) external onlyRole(DEFAULT_ADMIN_ROLE) { } // free claim function freeClaimMint( uint256 amount ) external onlyEOA{ require(freeClaimMintable, "free claim mint is not open yet"); require(freeClaimMintedCount[msg.sender] + amount <= freeClaimMaxMint, "Free claim mint cap"); require(<FILL_ME>) _safeMintAmount(amount); freeClaimMintedCount[msg.sender] += amount; } // claim for support function claimMint( bytes32[] calldata proof ) external onlyEOA onlyValidMerkleProof(proof, claimMerkleRoot) { } // whitelist mint function whitelistMint( bytes32[] calldata proof, uint256 amount ) external payable onlyEOA onlyValidMerkleProof(proof, whitelistMerkleRoot) { } // public mint function publicMint(uint256 amount) external payable onlyEOA { } function _baseURI() internal view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, AccessControl) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
totalSupply()+amount<=publicMintMaxSupply,"maximum mint reached"
222,973
totalSupply()+amount<=publicMintMaxSupply
"maximum mint reached"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract AlphaCell is ERC721Enumerable, AccessControl { using Strings for uint256; using MerkleProof for bytes32[]; using ECDSA for bytes32; // mint role preserve for future mint after public sale bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // free & open claim uint256 public freeClaimMaxMint = 2; mapping(address => uint256) public freeClaimMintedCount; // claim merkle root bytes32 public claimMerkleRoot; uint256 public claimPerMint = 2; mapping(address => bool) public claimed; // whitelist uint256 public whitelistSalePrice = 0 ether; uint256 public whitelistMaxMint = 2; bytes32 public whitelistMerkleRoot; mapping(address => uint256) public whitelistMintedCount; // public mint uint256 public publicSalePrice = 0.007 ether; uint256 public publicMaxMint = 5; uint256 public publicMintMaxSupply = 10000; // states bool public freeClaimMintable = false; bool public claimMintable = false; bool public whitelistMintable = false; bool public publicMintable = false; // URI string private _baseURIExtended; constructor() ERC721("ALPHA CELL", "CELL") { } // only accepts EOA modifier onlyEOA() { } // validating the merkle proof modifier onlyValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { } // setup free claim for amount per claim function setupFreeClaimInfo(uint256 maxMintAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup claim merkle root and amount per claim function setupClaimInfo(bytes32 merkleRoot, uint256 claimAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup whitelist merkle root / max mint per whitelist / price of each mint function setupWhitelistSaleInfo(bytes32 merkleRoot, uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup public max mint per tx / price of each mint function setupPublicSaleInfo(uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip free claim status (on/off claim) function flipFreeClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip claim status (on/off claim) function flipClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (on/off whitelist) function flipWhitelistMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (public sale) function flipPublicMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } function _safeMintAmount(uint256 amount) internal { } // team reserve function reserveMint(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // withdraw funds function withdraw(address receiver) public onlyRole(DEFAULT_ADMIN_ROLE) { } // set max mint function setPublicMintMaxSupply(uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) { } // future adopt (be called from new contract and providing the role to it) function adoptMint(uint256 amount) external onlyRole(MINTER_ROLE) { } // update uri function setBaseURI(string memory baseURI_) external onlyRole(DEFAULT_ADMIN_ROLE) { } // free claim function freeClaimMint( uint256 amount ) external onlyEOA{ } // claim for support function claimMint( bytes32[] calldata proof ) external onlyEOA onlyValidMerkleProof(proof, claimMerkleRoot) { require(claimMintable, "claim mint is not open yet"); require(claimed[msg.sender] == false, "already claimed"); require(<FILL_ME>) _safeMintAmount(claimPerMint); claimed[msg.sender] = true; } // whitelist mint function whitelistMint( bytes32[] calldata proof, uint256 amount ) external payable onlyEOA onlyValidMerkleProof(proof, whitelistMerkleRoot) { } // public mint function publicMint(uint256 amount) external payable onlyEOA { } function _baseURI() internal view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, AccessControl) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
totalSupply()+claimPerMint<=publicMintMaxSupply,"maximum mint reached"
222,973
totalSupply()+claimPerMint<=publicMintMaxSupply
"Whitelist mint cap"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract AlphaCell is ERC721Enumerable, AccessControl { using Strings for uint256; using MerkleProof for bytes32[]; using ECDSA for bytes32; // mint role preserve for future mint after public sale bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // free & open claim uint256 public freeClaimMaxMint = 2; mapping(address => uint256) public freeClaimMintedCount; // claim merkle root bytes32 public claimMerkleRoot; uint256 public claimPerMint = 2; mapping(address => bool) public claimed; // whitelist uint256 public whitelistSalePrice = 0 ether; uint256 public whitelistMaxMint = 2; bytes32 public whitelistMerkleRoot; mapping(address => uint256) public whitelistMintedCount; // public mint uint256 public publicSalePrice = 0.007 ether; uint256 public publicMaxMint = 5; uint256 public publicMintMaxSupply = 10000; // states bool public freeClaimMintable = false; bool public claimMintable = false; bool public whitelistMintable = false; bool public publicMintable = false; // URI string private _baseURIExtended; constructor() ERC721("ALPHA CELL", "CELL") { } // only accepts EOA modifier onlyEOA() { } // validating the merkle proof modifier onlyValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { } // setup free claim for amount per claim function setupFreeClaimInfo(uint256 maxMintAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup claim merkle root and amount per claim function setupClaimInfo(bytes32 merkleRoot, uint256 claimAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup whitelist merkle root / max mint per whitelist / price of each mint function setupWhitelistSaleInfo(bytes32 merkleRoot, uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup public max mint per tx / price of each mint function setupPublicSaleInfo(uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip free claim status (on/off claim) function flipFreeClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip claim status (on/off claim) function flipClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (on/off whitelist) function flipWhitelistMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (public sale) function flipPublicMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } function _safeMintAmount(uint256 amount) internal { } // team reserve function reserveMint(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // withdraw funds function withdraw(address receiver) public onlyRole(DEFAULT_ADMIN_ROLE) { } // set max mint function setPublicMintMaxSupply(uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) { } // future adopt (be called from new contract and providing the role to it) function adoptMint(uint256 amount) external onlyRole(MINTER_ROLE) { } // update uri function setBaseURI(string memory baseURI_) external onlyRole(DEFAULT_ADMIN_ROLE) { } // free claim function freeClaimMint( uint256 amount ) external onlyEOA{ } // claim for support function claimMint( bytes32[] calldata proof ) external onlyEOA onlyValidMerkleProof(proof, claimMerkleRoot) { } // whitelist mint function whitelistMint( bytes32[] calldata proof, uint256 amount ) external payable onlyEOA onlyValidMerkleProof(proof, whitelistMerkleRoot) { require(whitelistMintable, "Whitelist mint is not open yet"); require(<FILL_ME>) require( whitelistSalePrice * amount == msg.value, "Sent ether value is incorrect" ); require(totalSupply() + amount <= publicMintMaxSupply, "maximum mint reached"); _safeMintAmount(amount); whitelistMintedCount[msg.sender] += amount; } // public mint function publicMint(uint256 amount) external payable onlyEOA { } function _baseURI() internal view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, AccessControl) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
whitelistMintedCount[msg.sender]+amount<=whitelistMaxMint,"Whitelist mint cap"
222,973
whitelistMintedCount[msg.sender]+amount<=whitelistMaxMint
"Sent ether value is incorrect"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract AlphaCell is ERC721Enumerable, AccessControl { using Strings for uint256; using MerkleProof for bytes32[]; using ECDSA for bytes32; // mint role preserve for future mint after public sale bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // free & open claim uint256 public freeClaimMaxMint = 2; mapping(address => uint256) public freeClaimMintedCount; // claim merkle root bytes32 public claimMerkleRoot; uint256 public claimPerMint = 2; mapping(address => bool) public claimed; // whitelist uint256 public whitelistSalePrice = 0 ether; uint256 public whitelistMaxMint = 2; bytes32 public whitelistMerkleRoot; mapping(address => uint256) public whitelistMintedCount; // public mint uint256 public publicSalePrice = 0.007 ether; uint256 public publicMaxMint = 5; uint256 public publicMintMaxSupply = 10000; // states bool public freeClaimMintable = false; bool public claimMintable = false; bool public whitelistMintable = false; bool public publicMintable = false; // URI string private _baseURIExtended; constructor() ERC721("ALPHA CELL", "CELL") { } // only accepts EOA modifier onlyEOA() { } // validating the merkle proof modifier onlyValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { } // setup free claim for amount per claim function setupFreeClaimInfo(uint256 maxMintAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup claim merkle root and amount per claim function setupClaimInfo(bytes32 merkleRoot, uint256 claimAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup whitelist merkle root / max mint per whitelist / price of each mint function setupWhitelistSaleInfo(bytes32 merkleRoot, uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup public max mint per tx / price of each mint function setupPublicSaleInfo(uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip free claim status (on/off claim) function flipFreeClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip claim status (on/off claim) function flipClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (on/off whitelist) function flipWhitelistMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (public sale) function flipPublicMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } function _safeMintAmount(uint256 amount) internal { } // team reserve function reserveMint(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // withdraw funds function withdraw(address receiver) public onlyRole(DEFAULT_ADMIN_ROLE) { } // set max mint function setPublicMintMaxSupply(uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) { } // future adopt (be called from new contract and providing the role to it) function adoptMint(uint256 amount) external onlyRole(MINTER_ROLE) { } // update uri function setBaseURI(string memory baseURI_) external onlyRole(DEFAULT_ADMIN_ROLE) { } // free claim function freeClaimMint( uint256 amount ) external onlyEOA{ } // claim for support function claimMint( bytes32[] calldata proof ) external onlyEOA onlyValidMerkleProof(proof, claimMerkleRoot) { } // whitelist mint function whitelistMint( bytes32[] calldata proof, uint256 amount ) external payable onlyEOA onlyValidMerkleProof(proof, whitelistMerkleRoot) { require(whitelistMintable, "Whitelist mint is not open yet"); require(whitelistMintedCount[msg.sender] + amount <= whitelistMaxMint, "Whitelist mint cap"); require(<FILL_ME>) require(totalSupply() + amount <= publicMintMaxSupply, "maximum mint reached"); _safeMintAmount(amount); whitelistMintedCount[msg.sender] += amount; } // public mint function publicMint(uint256 amount) external payable onlyEOA { } function _baseURI() internal view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, AccessControl) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
whitelistSalePrice*amount==msg.value,"Sent ether value is incorrect"
222,973
whitelistSalePrice*amount==msg.value
"baseURI not set"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; contract AlphaCell is ERC721Enumerable, AccessControl { using Strings for uint256; using MerkleProof for bytes32[]; using ECDSA for bytes32; // mint role preserve for future mint after public sale bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); // free & open claim uint256 public freeClaimMaxMint = 2; mapping(address => uint256) public freeClaimMintedCount; // claim merkle root bytes32 public claimMerkleRoot; uint256 public claimPerMint = 2; mapping(address => bool) public claimed; // whitelist uint256 public whitelistSalePrice = 0 ether; uint256 public whitelistMaxMint = 2; bytes32 public whitelistMerkleRoot; mapping(address => uint256) public whitelistMintedCount; // public mint uint256 public publicSalePrice = 0.007 ether; uint256 public publicMaxMint = 5; uint256 public publicMintMaxSupply = 10000; // states bool public freeClaimMintable = false; bool public claimMintable = false; bool public whitelistMintable = false; bool public publicMintable = false; // URI string private _baseURIExtended; constructor() ERC721("ALPHA CELL", "CELL") { } // only accepts EOA modifier onlyEOA() { } // validating the merkle proof modifier onlyValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { } // setup free claim for amount per claim function setupFreeClaimInfo(uint256 maxMintAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup claim merkle root and amount per claim function setupClaimInfo(bytes32 merkleRoot, uint256 claimAmount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup whitelist merkle root / max mint per whitelist / price of each mint function setupWhitelistSaleInfo(bytes32 merkleRoot, uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // setup public max mint per tx / price of each mint function setupPublicSaleInfo(uint256 maxMint, uint256 price) external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip free claim status (on/off claim) function flipFreeClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip claim status (on/off claim) function flipClaimMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (on/off whitelist) function flipWhitelistMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } // flip whitelist status (public sale) function flipPublicMintable() external onlyRole(DEFAULT_ADMIN_ROLE) { } function _safeMintAmount(uint256 amount) internal { } // team reserve function reserveMint(uint256 amount) external onlyRole(DEFAULT_ADMIN_ROLE) { } // withdraw funds function withdraw(address receiver) public onlyRole(DEFAULT_ADMIN_ROLE) { } // set max mint function setPublicMintMaxSupply(uint256 amount) public onlyRole(DEFAULT_ADMIN_ROLE) { } // future adopt (be called from new contract and providing the role to it) function adoptMint(uint256 amount) external onlyRole(MINTER_ROLE) { } // update uri function setBaseURI(string memory baseURI_) external onlyRole(DEFAULT_ADMIN_ROLE) { } // free claim function freeClaimMint( uint256 amount ) external onlyEOA{ } // claim for support function claimMint( bytes32[] calldata proof ) external onlyEOA onlyValidMerkleProof(proof, claimMerkleRoot) { } // whitelist mint function whitelistMint( bytes32[] calldata proof, uint256 amount ) external payable onlyEOA onlyValidMerkleProof(proof, whitelistMerkleRoot) { } // public mint function publicMint(uint256 amount) external payable onlyEOA { } function _baseURI() internal view virtual override returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Enumerable, AccessControl) returns (bool) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require( _exists(tokenId), "ERC721Metadata: URI query for nonexistent token" ); string memory base = _baseURI(); require(<FILL_ME>) // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. return string(abi.encodePacked(base, tokenId.toString())); } }
bytes(base).length!=0,"baseURI not set"
222,973
bytes(base).length!=0
"Zero-mint"
//SPDX-License-Identifier: Unlicense pragma solidity 0.8.9; //import "./dependencies/ERC721A.sol"; import './dependencies/Payout.sol'; import './dependencies/ERC721A.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; contract OwnableDelegateProxy {} contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } contract bots is ERC721A, Ownable { uint public maxSupply = 100; uint public price = 0.1337 ether; address payable payout; address proxyRegistryAddress; constructor() ERC721A("BOTSNFT", "BOTS") { } function mint() external payable { require(<FILL_ME>) uint256 quantity = msg.value / price; require( _totalMinted() + quantity <= maxSupply, "Not enough supply" ); _mint(msg.sender, quantity); (bool success, ) = payout.call{value: msg.value}(""); require(success, "Payout failed"); } function isApprovedForAll(address _owner, address _operator) public view override returns (bool isOperator) { } function setProxyRegistry(address proxyRegistryAddress_) external onlyOwner { } function _baseURI() internal pure override returns (string memory) { } function contractURI() pure external returns(string memory) { } function _startTokenId() internal pure override returns (uint256) { } }
msg.value/price>0,"Zero-mint"
223,109
msg.value/price>0
null
//SPDX-License-Identifier: Unlicense pragma solidity 0.8.9; import '@openzeppelin/contracts/access/Ownable.sol'; contract Payout is Ownable { uint256 public totalWeight; bool entered; modifier nonReentrant() { require(<FILL_ME>) entered = true; _; entered = false; } mapping(address => uint256) public weight; address payable[] public recipients; constructor() { } function addRecipient(address payable recipient_, uint256 weight_) internal { } receive() external payable nonReentrant { } function payout(address payable recipient_, uint256 amount_) public view returns (uint256) { } }
!entered
223,110
!entered
"Not enough Tokens left."
pragma solidity 0.8.15; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity 0.8.15; contract ProudIconz is ERC721Enumerable, Ownable { using Strings for uint256; bool private _saleStarted; bool public isGiveAwayMinted = false; bool public paused = true; string public baseURI; string public baseExtension = ".json"; uint256 public _price = 1 ether; uint256 public constant maxSupply = 6; uint256 public maxMintAmount = 1; uint256 public lastIdMinted = 0; uint256 public startingIndex; address z = 0xAd8cF30b24B8E2Fcb7B71a3ea8fF44e2a2D8b8BD; address h = 0xb968F6c3e138a71B1F243b5B5CbF7eDc91517De1; address s = 0x65A3d4096BA6c9EEbbDb46098Dd68cF97e3cDBDb; address x = 0xC8DDBF54b3593D06478e1Edf46b3a83B0a51a72e; address t = 0x4F03fc9e2E12E8C397fC3D12000e796d76093447; constructor( string memory _initBaseURI ) ERC721("Proudz Iconz", "PROUDZ") { } modifier whenSaleStarted() { } function _baseURI() internal view virtual override returns (string memory) { } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function mintForGiveAway() external onlyOwner { require(isGiveAwayMinted == false, "Giveaway already minted"); require(<FILL_ME>) lastIdMinted = lastIdMinted + 1; _safeMint(msg.sender, lastIdMinted); isGiveAwayMinted = true; } function mint(uint256 _nbTokens) external payable whenSaleStarted { } function setStartingIndex() public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public onlyOwner { } }
lastIdMinted+1<=maxSupply,"Not enough Tokens left."
223,143
lastIdMinted+1<=maxSupply
"Not enough Tokens left."
pragma solidity 0.8.15; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity 0.8.15; contract ProudIconz is ERC721Enumerable, Ownable { using Strings for uint256; bool private _saleStarted; bool public isGiveAwayMinted = false; bool public paused = true; string public baseURI; string public baseExtension = ".json"; uint256 public _price = 1 ether; uint256 public constant maxSupply = 6; uint256 public maxMintAmount = 1; uint256 public lastIdMinted = 0; uint256 public startingIndex; address z = 0xAd8cF30b24B8E2Fcb7B71a3ea8fF44e2a2D8b8BD; address h = 0xb968F6c3e138a71B1F243b5B5CbF7eDc91517De1; address s = 0x65A3d4096BA6c9EEbbDb46098Dd68cF97e3cDBDb; address x = 0xC8DDBF54b3593D06478e1Edf46b3a83B0a51a72e; address t = 0x4F03fc9e2E12E8C397fC3D12000e796d76093447; constructor( string memory _initBaseURI ) ERC721("Proudz Iconz", "PROUDZ") { } modifier whenSaleStarted() { } function _baseURI() internal view virtual override returns (string memory) { } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function mintForGiveAway() external onlyOwner { } function mint(uint256 _nbTokens) external payable whenSaleStarted { require(<FILL_ME>) require(_nbTokens * _price <= msg.value, "Inconsistent amount sent!"); for (uint256 i; i < _nbTokens; i++) { lastIdMinted = lastIdMinted + 1; _safeMint(msg.sender, lastIdMinted); } } function setStartingIndex() public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public onlyOwner { } }
lastIdMinted+_nbTokens<=maxSupply,"Not enough Tokens left."
223,143
lastIdMinted+_nbTokens<=maxSupply
"Inconsistent amount sent!"
pragma solidity 0.8.15; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity 0.8.15; contract ProudIconz is ERC721Enumerable, Ownable { using Strings for uint256; bool private _saleStarted; bool public isGiveAwayMinted = false; bool public paused = true; string public baseURI; string public baseExtension = ".json"; uint256 public _price = 1 ether; uint256 public constant maxSupply = 6; uint256 public maxMintAmount = 1; uint256 public lastIdMinted = 0; uint256 public startingIndex; address z = 0xAd8cF30b24B8E2Fcb7B71a3ea8fF44e2a2D8b8BD; address h = 0xb968F6c3e138a71B1F243b5B5CbF7eDc91517De1; address s = 0x65A3d4096BA6c9EEbbDb46098Dd68cF97e3cDBDb; address x = 0xC8DDBF54b3593D06478e1Edf46b3a83B0a51a72e; address t = 0x4F03fc9e2E12E8C397fC3D12000e796d76093447; constructor( string memory _initBaseURI ) ERC721("Proudz Iconz", "PROUDZ") { } modifier whenSaleStarted() { } function _baseURI() internal view virtual override returns (string memory) { } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function mintForGiveAway() external onlyOwner { } function mint(uint256 _nbTokens) external payable whenSaleStarted { require(lastIdMinted + _nbTokens <= maxSupply, "Not enough Tokens left."); require(<FILL_ME>) for (uint256 i; i < _nbTokens; i++) { lastIdMinted = lastIdMinted + 1; _safeMint(msg.sender, lastIdMinted); } } function setStartingIndex() public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public onlyOwner { } }
_nbTokens*_price<=msg.value,"Inconsistent amount sent!"
223,143
_nbTokens*_price<=msg.value
null
pragma solidity 0.8.15; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity 0.8.15; contract ProudIconz is ERC721Enumerable, Ownable { using Strings for uint256; bool private _saleStarted; bool public isGiveAwayMinted = false; bool public paused = true; string public baseURI; string public baseExtension = ".json"; uint256 public _price = 1 ether; uint256 public constant maxSupply = 6; uint256 public maxMintAmount = 1; uint256 public lastIdMinted = 0; uint256 public startingIndex; address z = 0xAd8cF30b24B8E2Fcb7B71a3ea8fF44e2a2D8b8BD; address h = 0xb968F6c3e138a71B1F243b5B5CbF7eDc91517De1; address s = 0x65A3d4096BA6c9EEbbDb46098Dd68cF97e3cDBDb; address x = 0xC8DDBF54b3593D06478e1Edf46b3a83B0a51a72e; address t = 0x4F03fc9e2E12E8C397fC3D12000e796d76093447; constructor( string memory _initBaseURI ) ERC721("Proudz Iconz", "PROUDZ") { } modifier whenSaleStarted() { } function _baseURI() internal view virtual override returns (string memory) { } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function mintForGiveAway() external onlyOwner { } function mint(uint256 _nbTokens) external payable whenSaleStarted { } function setStartingIndex() public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public onlyOwner { uint256 _balance = address(this).balance; uint256 _split_z = _balance * 29 / 100; uint256 _split_h = _balance * 17 / 100; uint256 _split_s = _balance * 17 / 100; uint256 _split_x = _balance * 17 / 100; uint256 _split_t = _balance * 20 / 100; require(<FILL_ME>) require(payable(h).send(_split_h)); require(payable(s).send(_split_s)); require(payable(x).send(_split_x)); require(payable(t).send(_split_t)); } }
payable(z).send(_split_z)
223,143
payable(z).send(_split_z)
null
pragma solidity 0.8.15; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity 0.8.15; contract ProudIconz is ERC721Enumerable, Ownable { using Strings for uint256; bool private _saleStarted; bool public isGiveAwayMinted = false; bool public paused = true; string public baseURI; string public baseExtension = ".json"; uint256 public _price = 1 ether; uint256 public constant maxSupply = 6; uint256 public maxMintAmount = 1; uint256 public lastIdMinted = 0; uint256 public startingIndex; address z = 0xAd8cF30b24B8E2Fcb7B71a3ea8fF44e2a2D8b8BD; address h = 0xb968F6c3e138a71B1F243b5B5CbF7eDc91517De1; address s = 0x65A3d4096BA6c9EEbbDb46098Dd68cF97e3cDBDb; address x = 0xC8DDBF54b3593D06478e1Edf46b3a83B0a51a72e; address t = 0x4F03fc9e2E12E8C397fC3D12000e796d76093447; constructor( string memory _initBaseURI ) ERC721("Proudz Iconz", "PROUDZ") { } modifier whenSaleStarted() { } function _baseURI() internal view virtual override returns (string memory) { } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function mintForGiveAway() external onlyOwner { } function mint(uint256 _nbTokens) external payable whenSaleStarted { } function setStartingIndex() public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public onlyOwner { uint256 _balance = address(this).balance; uint256 _split_z = _balance * 29 / 100; uint256 _split_h = _balance * 17 / 100; uint256 _split_s = _balance * 17 / 100; uint256 _split_x = _balance * 17 / 100; uint256 _split_t = _balance * 20 / 100; require(payable(z).send(_split_z)); require(<FILL_ME>) require(payable(s).send(_split_s)); require(payable(x).send(_split_x)); require(payable(t).send(_split_t)); } }
payable(h).send(_split_h)
223,143
payable(h).send(_split_h)
null
pragma solidity 0.8.15; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity 0.8.15; contract ProudIconz is ERC721Enumerable, Ownable { using Strings for uint256; bool private _saleStarted; bool public isGiveAwayMinted = false; bool public paused = true; string public baseURI; string public baseExtension = ".json"; uint256 public _price = 1 ether; uint256 public constant maxSupply = 6; uint256 public maxMintAmount = 1; uint256 public lastIdMinted = 0; uint256 public startingIndex; address z = 0xAd8cF30b24B8E2Fcb7B71a3ea8fF44e2a2D8b8BD; address h = 0xb968F6c3e138a71B1F243b5B5CbF7eDc91517De1; address s = 0x65A3d4096BA6c9EEbbDb46098Dd68cF97e3cDBDb; address x = 0xC8DDBF54b3593D06478e1Edf46b3a83B0a51a72e; address t = 0x4F03fc9e2E12E8C397fC3D12000e796d76093447; constructor( string memory _initBaseURI ) ERC721("Proudz Iconz", "PROUDZ") { } modifier whenSaleStarted() { } function _baseURI() internal view virtual override returns (string memory) { } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function mintForGiveAway() external onlyOwner { } function mint(uint256 _nbTokens) external payable whenSaleStarted { } function setStartingIndex() public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public onlyOwner { uint256 _balance = address(this).balance; uint256 _split_z = _balance * 29 / 100; uint256 _split_h = _balance * 17 / 100; uint256 _split_s = _balance * 17 / 100; uint256 _split_x = _balance * 17 / 100; uint256 _split_t = _balance * 20 / 100; require(payable(z).send(_split_z)); require(payable(h).send(_split_h)); require(<FILL_ME>) require(payable(x).send(_split_x)); require(payable(t).send(_split_t)); } }
payable(s).send(_split_s)
223,143
payable(s).send(_split_s)
null
pragma solidity 0.8.15; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity 0.8.15; contract ProudIconz is ERC721Enumerable, Ownable { using Strings for uint256; bool private _saleStarted; bool public isGiveAwayMinted = false; bool public paused = true; string public baseURI; string public baseExtension = ".json"; uint256 public _price = 1 ether; uint256 public constant maxSupply = 6; uint256 public maxMintAmount = 1; uint256 public lastIdMinted = 0; uint256 public startingIndex; address z = 0xAd8cF30b24B8E2Fcb7B71a3ea8fF44e2a2D8b8BD; address h = 0xb968F6c3e138a71B1F243b5B5CbF7eDc91517De1; address s = 0x65A3d4096BA6c9EEbbDb46098Dd68cF97e3cDBDb; address x = 0xC8DDBF54b3593D06478e1Edf46b3a83B0a51a72e; address t = 0x4F03fc9e2E12E8C397fC3D12000e796d76093447; constructor( string memory _initBaseURI ) ERC721("Proudz Iconz", "PROUDZ") { } modifier whenSaleStarted() { } function _baseURI() internal view virtual override returns (string memory) { } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function mintForGiveAway() external onlyOwner { } function mint(uint256 _nbTokens) external payable whenSaleStarted { } function setStartingIndex() public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public onlyOwner { uint256 _balance = address(this).balance; uint256 _split_z = _balance * 29 / 100; uint256 _split_h = _balance * 17 / 100; uint256 _split_s = _balance * 17 / 100; uint256 _split_x = _balance * 17 / 100; uint256 _split_t = _balance * 20 / 100; require(payable(z).send(_split_z)); require(payable(h).send(_split_h)); require(payable(s).send(_split_s)); require(<FILL_ME>) require(payable(t).send(_split_t)); } }
payable(x).send(_split_x)
223,143
payable(x).send(_split_x)
null
pragma solidity 0.8.15; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } pragma solidity 0.8.15; contract ProudIconz is ERC721Enumerable, Ownable { using Strings for uint256; bool private _saleStarted; bool public isGiveAwayMinted = false; bool public paused = true; string public baseURI; string public baseExtension = ".json"; uint256 public _price = 1 ether; uint256 public constant maxSupply = 6; uint256 public maxMintAmount = 1; uint256 public lastIdMinted = 0; uint256 public startingIndex; address z = 0xAd8cF30b24B8E2Fcb7B71a3ea8fF44e2a2D8b8BD; address h = 0xb968F6c3e138a71B1F243b5B5CbF7eDc91517De1; address s = 0x65A3d4096BA6c9EEbbDb46098Dd68cF97e3cDBDb; address x = 0xC8DDBF54b3593D06478e1Edf46b3a83B0a51a72e; address t = 0x4F03fc9e2E12E8C397fC3D12000e796d76093447; constructor( string memory _initBaseURI ) ERC721("Proudz Iconz", "PROUDZ") { } modifier whenSaleStarted() { } function _baseURI() internal view virtual override returns (string memory) { } function flipSaleStarted() external onlyOwner { } function saleStarted() public view returns(bool) { } function mintForGiveAway() external onlyOwner { } function mint(uint256 _nbTokens) external payable whenSaleStarted { } function setStartingIndex() public { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public onlyOwner { uint256 _balance = address(this).balance; uint256 _split_z = _balance * 29 / 100; uint256 _split_h = _balance * 17 / 100; uint256 _split_s = _balance * 17 / 100; uint256 _split_x = _balance * 17 / 100; uint256 _split_t = _balance * 20 / 100; require(payable(z).send(_split_z)); require(payable(h).send(_split_h)); require(payable(s).send(_split_s)); require(payable(x).send(_split_x)); require(<FILL_ME>) } }
payable(t).send(_split_t)
223,143
payable(t).send(_split_t)
"Max count per wallet hit"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721A, Ownable { uint256 public constant MAX_SUPPLY = 2200; uint256 public constant MINT_PRICE = 0.02 ether; uint256 public constant MAX_PER_WALLET = 2; uint256 public startTime; string public _baseTokenURI; constructor( uint256 _startTime, string memory baseURI ) ERC721A("Spectrum", "SP") { } function mint(uint256 quantity) external payable { require(quantity > 0, "Quantity cannot be zero"); require(block.timestamp >= startTime, "Sale not started"); require(msg.sender == tx.origin, "No bots"); require(_totalMinted() + quantity <= MAX_SUPPLY, "Max supply hit"); require(<FILL_ME>) require(msg.value == quantity * MINT_PRICE, "Insufficient funds"); _mint(msg.sender, quantity); } function ownerAirdrop() public onlyOwner { } function setBaseURI(string calldata baseURI) public onlyOwner { } function setStartTime(uint256 _startTime) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function withdraw() public onlyOwner { } }
_numberMinted(msg.sender)+quantity<=MAX_PER_WALLET,"Max count per wallet hit"
223,182
_numberMinted(msg.sender)+quantity<=MAX_PER_WALLET
"Max supply hit"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721A, Ownable { uint256 public constant MAX_SUPPLY = 2200; uint256 public constant MINT_PRICE = 0.02 ether; uint256 public constant MAX_PER_WALLET = 2; uint256 public startTime; string public _baseTokenURI; constructor( uint256 _startTime, string memory baseURI ) ERC721A("Spectrum", "SP") { } function mint(uint256 quantity) external payable { } function ownerAirdrop() public onlyOwner { require(<FILL_ME>) _mint(msg.sender, 1); } function setBaseURI(string calldata baseURI) public onlyOwner { } function setStartTime(uint256 _startTime) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function withdraw() public onlyOwner { } }
_totalMinted()<=MAX_SUPPLY,"Max supply hit"
223,182
_totalMinted()<=MAX_SUPPLY
"Invalid circulating supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.18; contract MBASECTPPrice{ struct Data{ uint start; uint end; uint priceInCents; } mapping(uint level => Data) public rangeAndPrice; uint[] private range; address public owner; uint public CTPPrice; uint public maxSupply; uint public currentCirculatingSupply; mapping(uint=>mapping(uint=>uint)) private price; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event CirculatingSupplyUpdated(uint previousSupply, uint previousPrice, uint newSupply, uint newPrice); constructor(uint[] memory rangeList, uint[] memory priceList){ } modifier onlyOwner{ } function circulatingSupply(uint tokenAmount) public onlyOwner{ require(<FILL_ME>) uint oldSupply = currentCirculatingSupply; uint oldPrice = CTPPrice; for(uint i=0; i < range.length-1; i++){ uint start = range[i]; uint end = range[i+1]; if(tokenAmount >= start && tokenAmount < end){ CTPPrice = price[start][end]; currentCirculatingSupply = tokenAmount; break; } } emit CirculatingSupplyUpdated(oldSupply, oldPrice, currentCirculatingSupply, CTPPrice); } function getPriceByRange(uint start, uint end) public view returns(uint){ } function getRangeAndPriceList() public view returns(Data[] memory){ } function transferOwnership(address newOwner) public onlyOwner { } }
(tokenAmount>=0&&tokenAmount<=maxSupply),"Invalid circulating supply"
223,187
(tokenAmount>=0&&tokenAmount<=maxSupply)
null
// SPDX-License-Identifier: MIT 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) { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _transferOwnership(address newOwner) internal virtual { } } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); 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 (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract Recession is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Recession"; string private constant _symbol = "RCSN"; uint8 private constant _decimals = 9; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant totalTokens = 100 * 1e9 * 1e9; uint256 public _maxWalletAmount = 3 * 1e9 * 1e9; uint256 private _previousLiqFee = liqFee; uint256 private _previousProjectFee = projectTax; uint256 private liqFee; uint256 private projectTax; struct FeeBreakdown { uint256 tLiquidity; uint256 tMarketing; uint256 tAmount; } mapping(address => bool) private bots; address payable private deployWallet = payable(0x79c938E8aCd757dbC83E332386E1a6C22347a5D4); IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; bool private inSwap = false; modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() external pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function allowance(address owner, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve(address owner, address spender, uint256 amount) private { } function _transfer(address from, address to, uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function blacklist(address _address) external onlyOwner() { } function removeFromBlacklist(address _address) external onlyOwner() { require(<FILL_ME>) bots[_address] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { } function _transferStandard(address sender, address recipient, uint256 amount) private { } receive() external payable {} function setMaxWalletAmount(uint256 maxWalletAmount) external { } }
_msgSender()==deployWallet
223,332
_msgSender()==deployWallet
"max supply would be exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract dontslapme is Ownable, ERC721A, ReentrancyGuard { using SafeMath for uint256; uint256 public ALL_AMOUNT = 555; uint256 public PRICE = 0.0055 ether; uint256 public LIMIT = 5; bool _isActive = false; string public BASE_URI="https://data.dontslapme.net/metadata/"; string public CONTRACT_URI ="https://data.dontslapme.net/api/contracturl.json"; struct Info { uint256 all_amount; uint256 minted; uint256 price; uint256 start_time; uint256 numberMinted; bool isActive; } constructor() ERC721A("Dontslapme", "dontslapme") { } function freeInfo(address user) public view returns (Info memory) { } function mint(uint256 amount) external payable { require(msg.sender == tx.origin, "Cannot mint from contract"); require(_isActive, "must be active to mint tokens"); require(amount > 0, "amount must be greater than 0"); require(<FILL_ME>) uint minted = _numberMinted(msg.sender); require(minted + amount <= LIMIT, "max mint per wallet would be exceeded"); require(msg.value >= PRICE * amount, "value not met"); _safeMint(msg.sender, amount); } function withdraw() public onlyOwner nonReentrant { } function setBaseURI(string memory _baseURI) public onlyOwner { } function contractURI() public view returns (string memory) { } function setContractURI(string memory _contractURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function flipState(bool isActive) external onlyOwner { } function setPrice(uint256 price) public onlyOwner { } }
totalSupply()+amount<=ALL_AMOUNT,"max supply would be exceeded"
223,366
totalSupply()+amount<=ALL_AMOUNT
"max mint per wallet would be exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import '@openzeppelin/contracts/security/ReentrancyGuard.sol'; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract dontslapme is Ownable, ERC721A, ReentrancyGuard { using SafeMath for uint256; uint256 public ALL_AMOUNT = 555; uint256 public PRICE = 0.0055 ether; uint256 public LIMIT = 5; bool _isActive = false; string public BASE_URI="https://data.dontslapme.net/metadata/"; string public CONTRACT_URI ="https://data.dontslapme.net/api/contracturl.json"; struct Info { uint256 all_amount; uint256 minted; uint256 price; uint256 start_time; uint256 numberMinted; bool isActive; } constructor() ERC721A("Dontslapme", "dontslapme") { } function freeInfo(address user) public view returns (Info memory) { } function mint(uint256 amount) external payable { require(msg.sender == tx.origin, "Cannot mint from contract"); require(_isActive, "must be active to mint tokens"); require(amount > 0, "amount must be greater than 0"); require(totalSupply() + amount <= ALL_AMOUNT, "max supply would be exceeded"); uint minted = _numberMinted(msg.sender); require(<FILL_ME>) require(msg.value >= PRICE * amount, "value not met"); _safeMint(msg.sender, amount); } function withdraw() public onlyOwner nonReentrant { } function setBaseURI(string memory _baseURI) public onlyOwner { } function contractURI() public view returns (string memory) { } function setContractURI(string memory _contractURI) public onlyOwner { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } function flipState(bool isActive) external onlyOwner { } function setPrice(uint256 price) public onlyOwner { } }
minted+amount<=LIMIT,"max mint per wallet would be exceeded"
223,366
minted+amount<=LIMIT
"Sale would exceed max supply"
pragma solidity ^0.8.4; contract WORLDXPassport is ERC721, Pausable, Ownable, ERC721URIStorage, ERC721Burnable, ERC721Enumerable, ERC721Royalty { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private _tokenIdCounter; string baseURI = "ipfs://QmaezJr4gu4eHtGP55auYdwFE3oye3AnM7WR4N62D6CBtK/"; address private _recipient = 0xD4AC2EFF8A0Cc043A0d77C0A85276551829be9E6; uint256 public constant maxSupply = 200000; // Total token qty supply uint96 private royaltyPercentage = 700; // Royalty percentage uint256 public mintPrice = 0; // Price for mint the token (wei) uint256 public mintedQty = 0; // Current minted token qty mapping(address => bool) public whitelistAddress; constructor() ERC721("WORLDX Passports", "WXP") { } function _baseURI() internal view override returns (string memory) { } //to set after deployed if want to update new metadata function setbaseURI(string memory uri) external onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage, ERC721Royalty) { } function setMintPrice(uint256 newMintPrice) public onlyOwner { } function mint() public payable { uint256 tokenQty = 1; require(<FILL_ME>) require(tokenQty * mintPrice <= msg.value, "Not enough ether sent"); if (msg.sender != owner()) { require(whitelistAddress[msg.sender] == true, "Not in whitelist"); require( balanceOf(msg.sender) == 0, "One wallet address can only mint 1 NFT" ); } mintedQty += 1; safeMint(); } function safeMint() internal { } function whitelistUser(address _user) public onlyOwner { } function whitelistUserByBatch(address[] memory users) public onlyOwner { } function removeWhitelistUser(address _user) public onlyOwner { } function _removeWhitelistUser(address _user) internal { } function updateRoyaltyPercentage(uint96 newRoyaltyPercentage) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Royalty, ERC721Enumerable) returns (bool) { } }
mintedQty+tokenQty<=maxSupply,"Sale would exceed max supply"
223,429
mintedQty+tokenQty<=maxSupply
"Not enough ether sent"
pragma solidity ^0.8.4; contract WORLDXPassport is ERC721, Pausable, Ownable, ERC721URIStorage, ERC721Burnable, ERC721Enumerable, ERC721Royalty { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private _tokenIdCounter; string baseURI = "ipfs://QmaezJr4gu4eHtGP55auYdwFE3oye3AnM7WR4N62D6CBtK/"; address private _recipient = 0xD4AC2EFF8A0Cc043A0d77C0A85276551829be9E6; uint256 public constant maxSupply = 200000; // Total token qty supply uint96 private royaltyPercentage = 700; // Royalty percentage uint256 public mintPrice = 0; // Price for mint the token (wei) uint256 public mintedQty = 0; // Current minted token qty mapping(address => bool) public whitelistAddress; constructor() ERC721("WORLDX Passports", "WXP") { } function _baseURI() internal view override returns (string memory) { } //to set after deployed if want to update new metadata function setbaseURI(string memory uri) external onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage, ERC721Royalty) { } function setMintPrice(uint256 newMintPrice) public onlyOwner { } function mint() public payable { uint256 tokenQty = 1; require( mintedQty + tokenQty <= maxSupply, "Sale would exceed max supply" ); require(<FILL_ME>) if (msg.sender != owner()) { require(whitelistAddress[msg.sender] == true, "Not in whitelist"); require( balanceOf(msg.sender) == 0, "One wallet address can only mint 1 NFT" ); } mintedQty += 1; safeMint(); } function safeMint() internal { } function whitelistUser(address _user) public onlyOwner { } function whitelistUserByBatch(address[] memory users) public onlyOwner { } function removeWhitelistUser(address _user) public onlyOwner { } function _removeWhitelistUser(address _user) internal { } function updateRoyaltyPercentage(uint96 newRoyaltyPercentage) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Royalty, ERC721Enumerable) returns (bool) { } }
tokenQty*mintPrice<=msg.value,"Not enough ether sent"
223,429
tokenQty*mintPrice<=msg.value
"Not in whitelist"
pragma solidity ^0.8.4; contract WORLDXPassport is ERC721, Pausable, Ownable, ERC721URIStorage, ERC721Burnable, ERC721Enumerable, ERC721Royalty { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private _tokenIdCounter; string baseURI = "ipfs://QmaezJr4gu4eHtGP55auYdwFE3oye3AnM7WR4N62D6CBtK/"; address private _recipient = 0xD4AC2EFF8A0Cc043A0d77C0A85276551829be9E6; uint256 public constant maxSupply = 200000; // Total token qty supply uint96 private royaltyPercentage = 700; // Royalty percentage uint256 public mintPrice = 0; // Price for mint the token (wei) uint256 public mintedQty = 0; // Current minted token qty mapping(address => bool) public whitelistAddress; constructor() ERC721("WORLDX Passports", "WXP") { } function _baseURI() internal view override returns (string memory) { } //to set after deployed if want to update new metadata function setbaseURI(string memory uri) external onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage, ERC721Royalty) { } function setMintPrice(uint256 newMintPrice) public onlyOwner { } function mint() public payable { uint256 tokenQty = 1; require( mintedQty + tokenQty <= maxSupply, "Sale would exceed max supply" ); require(tokenQty * mintPrice <= msg.value, "Not enough ether sent"); if (msg.sender != owner()) { require(<FILL_ME>) require( balanceOf(msg.sender) == 0, "One wallet address can only mint 1 NFT" ); } mintedQty += 1; safeMint(); } function safeMint() internal { } function whitelistUser(address _user) public onlyOwner { } function whitelistUserByBatch(address[] memory users) public onlyOwner { } function removeWhitelistUser(address _user) public onlyOwner { } function _removeWhitelistUser(address _user) internal { } function updateRoyaltyPercentage(uint96 newRoyaltyPercentage) public onlyOwner { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Royalty, ERC721Enumerable) returns (bool) { } }
whitelistAddress[msg.sender]==true,"Not in whitelist"
223,429
whitelistAddress[msg.sender]==true
"Account already included"
interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); 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 (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router01 { 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01{ function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); 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 IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function withdraw(uint) external; } interface IUniswapV2ERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; } contract LMAO is ERC20Burnable, Ownable { uint256 private constant TOTAL_SUPPLY = 1000000*10**18; bool private swapping; uint256 public swapTokensAtAmount; bool public isTradingEnabled; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; uint256 public sellFee; uint256 public buyFee; address public marketingWallet; uint256 public maxPercentToSwap = 5; bool public isBotProtectionDisabledPermanently; bool public accountEnabled = true; uint256 public maxTxAmount; uint256 public maxHolding; bool public buyCooldownEnabled = false; uint256 public buyCooldown = 30; mapping(address => bool) public isExempt; mapping(address => bool) public accountStatus; mapping(address => uint256) public lastBuy; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; event ExcludeFromFees(address indexed account); event FeesUpdated(uint256 sellFee, uint256 buyFee); event MarketingWalletChanged(address marketingWallet); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event SwapAndSendMarketing(uint256 tokensSwapped, uint256 bnbSend); event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress); constructor () ERC20("Laughing My Ass Off", "$$LMAO") { } receive() external payable { } function activeTradingEnabled() public onlyOwner { } function sendETH(address payable recipient, uint256 amount) internal { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } //=======FeeManagement=======// function excludeFromFees(address account) external onlyOwner { } function includeInFees(address account) external onlyOwner { require(<FILL_ME>) _isExcludedFromFees[account] = false; } function isExcludedFromFees(address account) public view returns (bool) { } function updateFees(uint256 _sellFee, uint256 _buyFee) external onlyOwner { } function changeMarketingWallet(address _marketingWallet) external onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { } //=======Swap=======// function swapAndSendMarketing(uint256 tokenAmount) private { } function setSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function setMaxPercentToSwap(uint256 newAmount) external onlyOwner { } function _check( address from, address to, uint256 amount ) internal { } function _checkBuyCooldown(address from, address to) internal { } function _checkMaxTxAmount(address to, uint256 amount) internal view { } function _checkMaxHoldingLimit(address to, uint256 amount) internal view { } function isSpecialAddresses(address from, address to) view public returns (bool){ } function disableBotProtectionPermanently() external onlyOwner { } function removeLimit () external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) external onlyOwner { } function setAccountsStatus(address[] memory accounts, bool status) external onlyOwner { } function disableAccounts() external onlyOwner { } function setMaxHolding(uint256 maxHolding_) external onlyOwner { } function setExempt(address who, bool status) public onlyOwner { } function setBuyCooldownStatus(bool status) external onlyOwner { } function setBuyCooldown(uint256 buyCooldown_) external onlyOwner { } }
_isExcludedFromFees[account],"Account already included"
223,621
_isExcludedFromFees[account]
"account status"
interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); 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 (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router01 { 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01{ function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); 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 IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function withdraw(uint) external; } interface IUniswapV2ERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; } contract LMAO is ERC20Burnable, Ownable { uint256 private constant TOTAL_SUPPLY = 1000000*10**18; bool private swapping; uint256 public swapTokensAtAmount; bool public isTradingEnabled; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; uint256 public sellFee; uint256 public buyFee; address public marketingWallet; uint256 public maxPercentToSwap = 5; bool public isBotProtectionDisabledPermanently; bool public accountEnabled = true; uint256 public maxTxAmount; uint256 public maxHolding; bool public buyCooldownEnabled = false; uint256 public buyCooldown = 30; mapping(address => bool) public isExempt; mapping(address => bool) public accountStatus; mapping(address => uint256) public lastBuy; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; event ExcludeFromFees(address indexed account); event FeesUpdated(uint256 sellFee, uint256 buyFee); event MarketingWalletChanged(address marketingWallet); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event SwapAndSendMarketing(uint256 tokensSwapped, uint256 bnbSend); event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress); constructor () ERC20("Laughing My Ass Off", "$$LMAO") { } receive() external payable { } function activeTradingEnabled() public onlyOwner { } function sendETH(address payable recipient, uint256 amount) internal { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } //=======FeeManagement=======// function excludeFromFees(address account) external onlyOwner { } function includeInFees(address account) external onlyOwner { } function isExcludedFromFees(address account) public view returns (bool) { } function updateFees(uint256 _sellFee, uint256 _buyFee) external onlyOwner { } function changeMarketingWallet(address _marketingWallet) external onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { } //=======Swap=======// function swapAndSendMarketing(uint256 tokenAmount) private { } function setSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function setMaxPercentToSwap(uint256 newAmount) external onlyOwner { } function _check( address from, address to, uint256 amount ) internal { require(<FILL_ME>) if (!isBotProtectionDisabledPermanently) { if (!isSpecialAddresses(from, to) && !isExempt[to]) { _checkBuyCooldown(from, to); _checkMaxTxAmount(to, amount); // check max holding for receiver _checkMaxHoldingLimit(to, amount); } } } function _checkBuyCooldown(address from, address to) internal { } function _checkMaxTxAmount(address to, uint256 amount) internal view { } function _checkMaxHoldingLimit(address to, uint256 amount) internal view { } function isSpecialAddresses(address from, address to) view public returns (bool){ } function disableBotProtectionPermanently() external onlyOwner { } function removeLimit () external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) external onlyOwner { } function setAccountsStatus(address[] memory accounts, bool status) external onlyOwner { } function disableAccounts() external onlyOwner { } function setMaxHolding(uint256 maxHolding_) external onlyOwner { } function setExempt(address who, bool status) public onlyOwner { } function setBuyCooldownStatus(bool status) external onlyOwner { } function setBuyCooldown(uint256 buyCooldown_) external onlyOwner { } }
!accountStatus[from]&&!accountStatus[to],"account status"
223,621
!accountStatus[from]&&!accountStatus[to]
"buy cooldown"
interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); 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 (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router01 { 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01{ function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); 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 IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function withdraw(uint) external; } interface IUniswapV2ERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; } contract LMAO is ERC20Burnable, Ownable { uint256 private constant TOTAL_SUPPLY = 1000000*10**18; bool private swapping; uint256 public swapTokensAtAmount; bool public isTradingEnabled; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; uint256 public sellFee; uint256 public buyFee; address public marketingWallet; uint256 public maxPercentToSwap = 5; bool public isBotProtectionDisabledPermanently; bool public accountEnabled = true; uint256 public maxTxAmount; uint256 public maxHolding; bool public buyCooldownEnabled = false; uint256 public buyCooldown = 30; mapping(address => bool) public isExempt; mapping(address => bool) public accountStatus; mapping(address => uint256) public lastBuy; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; event ExcludeFromFees(address indexed account); event FeesUpdated(uint256 sellFee, uint256 buyFee); event MarketingWalletChanged(address marketingWallet); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event SwapAndSendMarketing(uint256 tokensSwapped, uint256 bnbSend); event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress); constructor () ERC20("Laughing My Ass Off", "$$LMAO") { } receive() external payable { } function activeTradingEnabled() public onlyOwner { } function sendETH(address payable recipient, uint256 amount) internal { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } //=======FeeManagement=======// function excludeFromFees(address account) external onlyOwner { } function includeInFees(address account) external onlyOwner { } function isExcludedFromFees(address account) public view returns (bool) { } function updateFees(uint256 _sellFee, uint256 _buyFee) external onlyOwner { } function changeMarketingWallet(address _marketingWallet) external onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { } //=======Swap=======// function swapAndSendMarketing(uint256 tokenAmount) private { } function setSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function setMaxPercentToSwap(uint256 newAmount) external onlyOwner { } function _check( address from, address to, uint256 amount ) internal { } function _checkBuyCooldown(address from, address to) internal { if (buyCooldownEnabled && from == uniswapV2Pair) { require(<FILL_ME>) lastBuy[tx.origin] = block.timestamp; } } function _checkMaxTxAmount(address to, uint256 amount) internal view { } function _checkMaxHoldingLimit(address to, uint256 amount) internal view { } function isSpecialAddresses(address from, address to) view public returns (bool){ } function disableBotProtectionPermanently() external onlyOwner { } function removeLimit () external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) external onlyOwner { } function setAccountsStatus(address[] memory accounts, bool status) external onlyOwner { } function disableAccounts() external onlyOwner { } function setMaxHolding(uint256 maxHolding_) external onlyOwner { } function setExempt(address who, bool status) public onlyOwner { } function setBuyCooldownStatus(bool status) external onlyOwner { } function setBuyCooldown(uint256 buyCooldown_) external onlyOwner { } }
block.timestamp-lastBuy[tx.origin]>=buyCooldown,"buy cooldown"
223,621
block.timestamp-lastBuy[tx.origin]>=buyCooldown
"cant set anymore"
interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); 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 (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Router01 { 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 removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01{ function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); 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 IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function withdraw(uint) external; } interface IUniswapV2ERC20 { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; } contract LMAO is ERC20Burnable, Ownable { uint256 private constant TOTAL_SUPPLY = 1000000*10**18; bool private swapping; uint256 public swapTokensAtAmount; bool public isTradingEnabled; mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public automatedMarketMakerPairs; uint256 public sellFee; uint256 public buyFee; address public marketingWallet; uint256 public maxPercentToSwap = 5; bool public isBotProtectionDisabledPermanently; bool public accountEnabled = true; uint256 public maxTxAmount; uint256 public maxHolding; bool public buyCooldownEnabled = false; uint256 public buyCooldown = 30; mapping(address => bool) public isExempt; mapping(address => bool) public accountStatus; mapping(address => uint256) public lastBuy; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; event ExcludeFromFees(address indexed account); event FeesUpdated(uint256 sellFee, uint256 buyFee); event MarketingWalletChanged(address marketingWallet); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event SwapAndSendMarketing(uint256 tokensSwapped, uint256 bnbSend); event UpdateUniswapV2Router(address indexed newAddress, address indexed oldAddress); constructor () ERC20("Laughing My Ass Off", "$$LMAO") { } receive() external payable { } function activeTradingEnabled() public onlyOwner { } function sendETH(address payable recipient, uint256 amount) internal { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } //=======FeeManagement=======// function excludeFromFees(address account) external onlyOwner { } function includeInFees(address account) external onlyOwner { } function isExcludedFromFees(address account) public view returns (bool) { } function updateFees(uint256 _sellFee, uint256 _buyFee) external onlyOwner { } function changeMarketingWallet(address _marketingWallet) external onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { } //=======Swap=======// function swapAndSendMarketing(uint256 tokenAmount) private { } function setSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function setMaxPercentToSwap(uint256 newAmount) external onlyOwner { } function _check( address from, address to, uint256 amount ) internal { } function _checkBuyCooldown(address from, address to) internal { } function _checkMaxTxAmount(address to, uint256 amount) internal view { } function _checkMaxHoldingLimit(address to, uint256 amount) internal view { } function isSpecialAddresses(address from, address to) view public returns (bool){ } function disableBotProtectionPermanently() external onlyOwner { } function removeLimit () external onlyOwner { } function setMaxTxAmount(uint256 maxTxAmount_) external onlyOwner { } function setAccountsStatus(address[] memory accounts, bool status) external onlyOwner { require(<FILL_ME>) for (uint256 i; i < accounts.length; i++) { address account = accounts[i]; require(account != address(uniswapV2Router) && account != uniswapV2Pair && account != address(this)); accountStatus[account] = status; } } function disableAccounts() external onlyOwner { } function setMaxHolding(uint256 maxHolding_) external onlyOwner { } function setExempt(address who, bool status) public onlyOwner { } function setBuyCooldownStatus(bool status) external onlyOwner { } function setBuyCooldown(uint256 buyCooldown_) external onlyOwner { } }
accountEnabled||status==false,"cant set anymore"
223,621
accountEnabled||status==false
"You can't posses more than 20"
pragma solidity >=0.7.0 <0.9.0; contract deadlybirds is ERC721A, Ownable { using Strings for uint256; string baseURI; string notRevURI; string public baseExtension = ".json"; uint256 public cost = 0.005 ether; uint256 public maxSupply = 1500; uint256 public maxMintAmount = 40; uint256 public freeAmount = 0; bool public paused = false; bool public revealed = false; mapping(address => uint256) nftPerWallet; constructor( string memory _initBaseURI, string memory _initNotRevURI ) ERC721A("DeadlyBirds", "Debird") { } modifier checks(uint256 _mintAmount) { require(!paused); require(_mintAmount > 0); require(totalSupply() + _mintAmount <= maxSupply, "Max supply exceeded!"); require(<FILL_ME>) if(totalSupply() >= freeAmount){ if(msg.sender != owner()) require(msg.value >= cost * _mintAmount, "Insufficient funds!"); nftPerWallet[msg.sender]++; } else require(totalSupply() + _mintAmount <= freeAmount, "Free NFTs amount exceeded"); require(_mintAmount <= maxMintAmount, "Max mint amount exceeded"); _; } function mint(uint256 _mintAmount) public payable checks(_mintAmount) { } 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 reveal() public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause() public onlyOwner { } function withdraw() public payable onlyOwner { } }
nftPerWallet[msg.sender]<20,"You can't posses more than 20"
223,631
nftPerWallet[msg.sender]<20
"Cannot exceed limit allocated for airdrop."
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; contract MyToken is ERC721A, Ownable, ReentrancyGuard, VRFConsumerBase { string public PROVENANCE_HASH; bytes32 internal keyHash; uint256 internal fee; uint256 public startingIndex; bool public randomStartingIndexRequested; // Amounts uint256 public airdropAmount; uint256 public currentNumMinted; uint256 public totalAmount; // Claim bool public claimActive; uint256 public claimMaxMintAmount; mapping(address => bool) public claimed; // Events event ClaimStart( uint256 indexed _claimStartTime ); event ClaimStop( uint256 indexed _timestamp ); // Modifiers modifier whenClaimActive() { } // Struct struct Amounts { uint256 airdropAmount; uint256 totalAmount; uint256 claimMaxMintAmount; } struct VrfValues { address vrfCoordinator; address linkTokenAddress; bytes32 keyHash; uint256 fee; } // Base URI string public baseURI; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) external onlyOwner { } constructor( string memory name, string memory symbol, VrfValues memory vrfValues, Amounts memory amounts, string memory _PROVENANCE_HASH, string memory baseURIInput ) VRFConsumerBase(vrfValues.vrfCoordinator, vrfValues.linkTokenAddress) ERC721A(name, symbol) { } // Airdrop function airdrop(address recipient, uint256 numMinted) external onlyOwner { require(recipient != address(0), "The recipient address can't be 0."); require(numMinted > 0, "Mint at least one NFT."); require(<FILL_ME>) currentNumMinted += numMinted; _safeMint(recipient, numMinted); } // Claim function startClaim() external onlyOwner { } function stopClaim() external whenClaimActive onlyOwner { } function claim(uint256 numMinted) external nonReentrant whenClaimActive { } // Randomization function requestRandomStartingIndex() external onlyOwner returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } }
currentNumMinted+numMinted<=airdropAmount,"Cannot exceed limit allocated for airdrop."
223,681
currentNumMinted+numMinted<=airdropAmount
"Claim is already active."
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; contract MyToken is ERC721A, Ownable, ReentrancyGuard, VRFConsumerBase { string public PROVENANCE_HASH; bytes32 internal keyHash; uint256 internal fee; uint256 public startingIndex; bool public randomStartingIndexRequested; // Amounts uint256 public airdropAmount; uint256 public currentNumMinted; uint256 public totalAmount; // Claim bool public claimActive; uint256 public claimMaxMintAmount; mapping(address => bool) public claimed; // Events event ClaimStart( uint256 indexed _claimStartTime ); event ClaimStop( uint256 indexed _timestamp ); // Modifiers modifier whenClaimActive() { } // Struct struct Amounts { uint256 airdropAmount; uint256 totalAmount; uint256 claimMaxMintAmount; } struct VrfValues { address vrfCoordinator; address linkTokenAddress; bytes32 keyHash; uint256 fee; } // Base URI string public baseURI; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) external onlyOwner { } constructor( string memory name, string memory symbol, VrfValues memory vrfValues, Amounts memory amounts, string memory _PROVENANCE_HASH, string memory baseURIInput ) VRFConsumerBase(vrfValues.vrfCoordinator, vrfValues.linkTokenAddress) ERC721A(name, symbol) { } // Airdrop function airdrop(address recipient, uint256 numMinted) external onlyOwner { } // Claim function startClaim() external onlyOwner { require(<FILL_ME>) claimActive = true; emit ClaimStart(block.timestamp); } function stopClaim() external whenClaimActive onlyOwner { } function claim(uint256 numMinted) external nonReentrant whenClaimActive { } // Randomization function requestRandomStartingIndex() external onlyOwner returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } }
!claimActive,"Claim is already active."
223,681
!claimActive
"Cannot claim more. Limit exceeded."
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; contract MyToken is ERC721A, Ownable, ReentrancyGuard, VRFConsumerBase { string public PROVENANCE_HASH; bytes32 internal keyHash; uint256 internal fee; uint256 public startingIndex; bool public randomStartingIndexRequested; // Amounts uint256 public airdropAmount; uint256 public currentNumMinted; uint256 public totalAmount; // Claim bool public claimActive; uint256 public claimMaxMintAmount; mapping(address => bool) public claimed; // Events event ClaimStart( uint256 indexed _claimStartTime ); event ClaimStop( uint256 indexed _timestamp ); // Modifiers modifier whenClaimActive() { } // Struct struct Amounts { uint256 airdropAmount; uint256 totalAmount; uint256 claimMaxMintAmount; } struct VrfValues { address vrfCoordinator; address linkTokenAddress; bytes32 keyHash; uint256 fee; } // Base URI string public baseURI; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) external onlyOwner { } constructor( string memory name, string memory symbol, VrfValues memory vrfValues, Amounts memory amounts, string memory _PROVENANCE_HASH, string memory baseURIInput ) VRFConsumerBase(vrfValues.vrfCoordinator, vrfValues.linkTokenAddress) ERC721A(name, symbol) { } // Airdrop function airdrop(address recipient, uint256 numMinted) external onlyOwner { } // Claim function startClaim() external onlyOwner { } function stopClaim() external whenClaimActive onlyOwner { } function claim(uint256 numMinted) external nonReentrant whenClaimActive { require(numMinted > 0, "Claim at least one NFT."); require(numMinted <= claimMaxMintAmount, "Cannot claim more than claimMaxMintAmount."); require(!claimed[msg.sender], "Cannot claim again."); require(<FILL_ME>) require(msg.sender == tx.origin, "Transaction origin address is not same as caller address"); claimed[msg.sender] = true; currentNumMinted += numMinted; _safeMint(msg.sender, numMinted); } // Randomization function requestRandomStartingIndex() external onlyOwner returns (bytes32 requestId) { } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } }
currentNumMinted+numMinted<=totalAmount,"Cannot claim more. Limit exceeded."
223,681
currentNumMinted+numMinted<=totalAmount
"Random Starting Index already requested"
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol"; contract MyToken is ERC721A, Ownable, ReentrancyGuard, VRFConsumerBase { string public PROVENANCE_HASH; bytes32 internal keyHash; uint256 internal fee; uint256 public startingIndex; bool public randomStartingIndexRequested; // Amounts uint256 public airdropAmount; uint256 public currentNumMinted; uint256 public totalAmount; // Claim bool public claimActive; uint256 public claimMaxMintAmount; mapping(address => bool) public claimed; // Events event ClaimStart( uint256 indexed _claimStartTime ); event ClaimStop( uint256 indexed _timestamp ); // Modifiers modifier whenClaimActive() { } // Struct struct Amounts { uint256 airdropAmount; uint256 totalAmount; uint256 claimMaxMintAmount; } struct VrfValues { address vrfCoordinator; address linkTokenAddress; bytes32 keyHash; uint256 fee; } // Base URI string public baseURI; function _baseURI() internal view override returns (string memory) { } function setBaseURI(string memory uri) external onlyOwner { } constructor( string memory name, string memory symbol, VrfValues memory vrfValues, Amounts memory amounts, string memory _PROVENANCE_HASH, string memory baseURIInput ) VRFConsumerBase(vrfValues.vrfCoordinator, vrfValues.linkTokenAddress) ERC721A(name, symbol) { } // Airdrop function airdrop(address recipient, uint256 numMinted) external onlyOwner { } // Claim function startClaim() external onlyOwner { } function stopClaim() external whenClaimActive onlyOwner { } function claim(uint256 numMinted) external nonReentrant whenClaimActive { } // Randomization function requestRandomStartingIndex() external onlyOwner returns (bytes32 requestId) { require(<FILL_ME>) randomStartingIndexRequested = true; require( LINK.balanceOf(address(this)) >= fee, "Not enough LINK" ); return requestRandomness(keyHash, fee); } function fulfillRandomness(bytes32 requestId, uint256 randomness) internal override { } }
!randomStartingIndexRequested,"Random Starting Index already requested"
223,681
!randomStartingIndexRequested
"QBIT: Transfer exceeds contract balance"
pragma solidity ^0.8.19; contract QBIT is ERC20, Pausable, AccessControl { error UserBlacklisted(); error TooMuchTax(); error Only_Admin_Call(); uint256 public initialPrice = 0.11834 ether; uint256 public tokensSold = 0; uint256 private _totalSupply = 420_000_000 * 10**decimals(); uint256 public taxDivisor = 20; // 2% tax on all transfers address private immutable adminWallet = 0x944CB0D41A06b604255009c79f3B61D0B514d854; address private immutable airdropWallet = 0x5627B5725b8384F790fbdcD194352FEd49a1b5A9; address private immutable saleWallet = 0x0f520A81886A71c377B9Bc719D8FEa9533f6c099; address private immutable teamWallet = 0x44d229Df695e1ABe7B201a90D658f85bBb0161B6; address private immutable rewardsWallet = 0x377E6309d8f8a61D2891527387b0651e28BAaeF4; address private immutable liquidityWallet = 0xCBfC85ccF86117d926304c0E7DeB245c262581F9; address private immutable _usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address private immutable _usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; AggregatorV3Interface private dataFeed; //Chainlink AggregatorV3 for ETH/USD Price IERC20 usdt; IERC20 usdc; mapping(address => bool) private blackisted; mapping(address => bool) public taxExempted; mapping(address => uint256) public qbitInvestment; bytes32 public constant PRESALE_ROLE = keccak256("PRESALE_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); modifier onlyAdmin() { } event QBITSold( address indexed to, uint8 id, uint256 amountToReceive, uint256 amountToSend ); event Blacklisted(address indexed user); constructor() ERC20("QBIT", "QBIT") { } /** Buy QBIT @param _amount the value of ETH or USD to be spent to buy QBIT Tokens @param _id 0 is for ETH, 1 for USDT, 2 for USDC @dev swaps ETH/USDT/USDC for QBIT **/ function buyQBIT(uint256 _amount, uint8 _id) external payable { //usdt and usdc is 6 decimal places if (_id == 0) { //ETHEREUM uint256 valueSent = msg.value; require(valueSent > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceiveInUSD = getConversionRate(valueSent); uint256 _amountToSend = getQBITSaleAmountForETH( _amountToReceiveInUSD ); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require(<FILL_ME>) tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; (bool success, ) = adminWallet.call{value: valueSent}(""); require(success); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold( msg.sender, _id, _amountToReceiveInUSD * 10**12, _amountToSend ); } else if (_id == 1) { //USDT require(_amount > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceive = _amount; uint256 _amountToSend = getQBITSaleAmountForUSD(_amount); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require( balanceOf(address(this)) >= _amountToSend, "QBIT: Transfer exceeds contract balance" ); require( usdt.balanceOf(msg.sender) >= _amountToReceive, "USDT: Transfer exceeds balance" ); tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; usdt.transferFrom(msg.sender, adminWallet, _amountToReceive); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold(msg.sender, _id, _amountToReceive, _amountToSend); } else if (_id == 2) { //USDC require(_amount > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceive = _amount; uint256 _amountToSend = getQBITSaleAmountForUSD(_amount); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require( balanceOf(address(this)) >= _amountToSend, "QBIT: Transfer exceeds contract balance" ); require( usdc.balanceOf(msg.sender) >= _amountToReceive, "USDC: Transfer exceeds balance" ); tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; usdc.transferFrom(msg.sender, adminWallet, _amountToReceive); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold(msg.sender, _id, _amountToReceive, _amountToSend); } } function getQBITSaleAmountForETH(uint256 baseAmount) public view returns (uint256) { } function getQBITSaleAmountForUSD(uint256 baseAmount) public view returns (uint256) { } function getPrice() internal view returns (uint256) { } function getConversionRate(uint256 ethAmount) public view returns (uint256) { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } function withdrawPreSaleTokens(uint256 _amount) external { } function changeInitialPrice(uint256 _price) public onlyAdmin { } function blacklistUser(address user) external onlyAdmin { } function exemptFromTax(address _user) external onlyAdmin { } function changeTaxDivisor(uint256 _newTax) external onlyAdmin { } function isBlacklisted(address _user) public view returns (bool) { } function withdrawEther() external onlyAdmin { } function withdrawToken(address token) external onlyAdmin { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { } }
balanceOf(address(this))>=_amountToSend,"QBIT: Transfer exceeds contract balance"
223,701
balanceOf(address(this))>=_amountToSend
"USDT: Transfer exceeds balance"
pragma solidity ^0.8.19; contract QBIT is ERC20, Pausable, AccessControl { error UserBlacklisted(); error TooMuchTax(); error Only_Admin_Call(); uint256 public initialPrice = 0.11834 ether; uint256 public tokensSold = 0; uint256 private _totalSupply = 420_000_000 * 10**decimals(); uint256 public taxDivisor = 20; // 2% tax on all transfers address private immutable adminWallet = 0x944CB0D41A06b604255009c79f3B61D0B514d854; address private immutable airdropWallet = 0x5627B5725b8384F790fbdcD194352FEd49a1b5A9; address private immutable saleWallet = 0x0f520A81886A71c377B9Bc719D8FEa9533f6c099; address private immutable teamWallet = 0x44d229Df695e1ABe7B201a90D658f85bBb0161B6; address private immutable rewardsWallet = 0x377E6309d8f8a61D2891527387b0651e28BAaeF4; address private immutable liquidityWallet = 0xCBfC85ccF86117d926304c0E7DeB245c262581F9; address private immutable _usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address private immutable _usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; AggregatorV3Interface private dataFeed; //Chainlink AggregatorV3 for ETH/USD Price IERC20 usdt; IERC20 usdc; mapping(address => bool) private blackisted; mapping(address => bool) public taxExempted; mapping(address => uint256) public qbitInvestment; bytes32 public constant PRESALE_ROLE = keccak256("PRESALE_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); modifier onlyAdmin() { } event QBITSold( address indexed to, uint8 id, uint256 amountToReceive, uint256 amountToSend ); event Blacklisted(address indexed user); constructor() ERC20("QBIT", "QBIT") { } /** Buy QBIT @param _amount the value of ETH or USD to be spent to buy QBIT Tokens @param _id 0 is for ETH, 1 for USDT, 2 for USDC @dev swaps ETH/USDT/USDC for QBIT **/ function buyQBIT(uint256 _amount, uint8 _id) external payable { //usdt and usdc is 6 decimal places if (_id == 0) { //ETHEREUM uint256 valueSent = msg.value; require(valueSent > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceiveInUSD = getConversionRate(valueSent); uint256 _amountToSend = getQBITSaleAmountForETH( _amountToReceiveInUSD ); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require( balanceOf(address(this)) >= _amountToSend, "QBIT: Transfer exceeds contract balance" ); tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; (bool success, ) = adminWallet.call{value: valueSent}(""); require(success); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold( msg.sender, _id, _amountToReceiveInUSD * 10**12, _amountToSend ); } else if (_id == 1) { //USDT require(_amount > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceive = _amount; uint256 _amountToSend = getQBITSaleAmountForUSD(_amount); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require( balanceOf(address(this)) >= _amountToSend, "QBIT: Transfer exceeds contract balance" ); require(<FILL_ME>) tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; usdt.transferFrom(msg.sender, adminWallet, _amountToReceive); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold(msg.sender, _id, _amountToReceive, _amountToSend); } else if (_id == 2) { //USDC require(_amount > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceive = _amount; uint256 _amountToSend = getQBITSaleAmountForUSD(_amount); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require( balanceOf(address(this)) >= _amountToSend, "QBIT: Transfer exceeds contract balance" ); require( usdc.balanceOf(msg.sender) >= _amountToReceive, "USDC: Transfer exceeds balance" ); tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; usdc.transferFrom(msg.sender, adminWallet, _amountToReceive); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold(msg.sender, _id, _amountToReceive, _amountToSend); } } function getQBITSaleAmountForETH(uint256 baseAmount) public view returns (uint256) { } function getQBITSaleAmountForUSD(uint256 baseAmount) public view returns (uint256) { } function getPrice() internal view returns (uint256) { } function getConversionRate(uint256 ethAmount) public view returns (uint256) { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } function withdrawPreSaleTokens(uint256 _amount) external { } function changeInitialPrice(uint256 _price) public onlyAdmin { } function blacklistUser(address user) external onlyAdmin { } function exemptFromTax(address _user) external onlyAdmin { } function changeTaxDivisor(uint256 _newTax) external onlyAdmin { } function isBlacklisted(address _user) public view returns (bool) { } function withdrawEther() external onlyAdmin { } function withdrawToken(address token) external onlyAdmin { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { } }
usdt.balanceOf(msg.sender)>=_amountToReceive,"USDT: Transfer exceeds balance"
223,701
usdt.balanceOf(msg.sender)>=_amountToReceive
"USDC: Transfer exceeds balance"
pragma solidity ^0.8.19; contract QBIT is ERC20, Pausable, AccessControl { error UserBlacklisted(); error TooMuchTax(); error Only_Admin_Call(); uint256 public initialPrice = 0.11834 ether; uint256 public tokensSold = 0; uint256 private _totalSupply = 420_000_000 * 10**decimals(); uint256 public taxDivisor = 20; // 2% tax on all transfers address private immutable adminWallet = 0x944CB0D41A06b604255009c79f3B61D0B514d854; address private immutable airdropWallet = 0x5627B5725b8384F790fbdcD194352FEd49a1b5A9; address private immutable saleWallet = 0x0f520A81886A71c377B9Bc719D8FEa9533f6c099; address private immutable teamWallet = 0x44d229Df695e1ABe7B201a90D658f85bBb0161B6; address private immutable rewardsWallet = 0x377E6309d8f8a61D2891527387b0651e28BAaeF4; address private immutable liquidityWallet = 0xCBfC85ccF86117d926304c0E7DeB245c262581F9; address private immutable _usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address private immutable _usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; AggregatorV3Interface private dataFeed; //Chainlink AggregatorV3 for ETH/USD Price IERC20 usdt; IERC20 usdc; mapping(address => bool) private blackisted; mapping(address => bool) public taxExempted; mapping(address => uint256) public qbitInvestment; bytes32 public constant PRESALE_ROLE = keccak256("PRESALE_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); modifier onlyAdmin() { } event QBITSold( address indexed to, uint8 id, uint256 amountToReceive, uint256 amountToSend ); event Blacklisted(address indexed user); constructor() ERC20("QBIT", "QBIT") { } /** Buy QBIT @param _amount the value of ETH or USD to be spent to buy QBIT Tokens @param _id 0 is for ETH, 1 for USDT, 2 for USDC @dev swaps ETH/USDT/USDC for QBIT **/ function buyQBIT(uint256 _amount, uint8 _id) external payable { //usdt and usdc is 6 decimal places if (_id == 0) { //ETHEREUM uint256 valueSent = msg.value; require(valueSent > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceiveInUSD = getConversionRate(valueSent); uint256 _amountToSend = getQBITSaleAmountForETH( _amountToReceiveInUSD ); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require( balanceOf(address(this)) >= _amountToSend, "QBIT: Transfer exceeds contract balance" ); tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; (bool success, ) = adminWallet.call{value: valueSent}(""); require(success); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold( msg.sender, _id, _amountToReceiveInUSD * 10**12, _amountToSend ); } else if (_id == 1) { //USDT require(_amount > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceive = _amount; uint256 _amountToSend = getQBITSaleAmountForUSD(_amount); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require( balanceOf(address(this)) >= _amountToSend, "QBIT: Transfer exceeds contract balance" ); require( usdt.balanceOf(msg.sender) >= _amountToReceive, "USDT: Transfer exceeds balance" ); tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; usdt.transferFrom(msg.sender, adminWallet, _amountToReceive); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold(msg.sender, _id, _amountToReceive, _amountToSend); } else if (_id == 2) { //USDC require(_amount > 0, "Cannot buy QBIT with zero ether/usd"); uint256 _amountToReceive = _amount; uint256 _amountToSend = getQBITSaleAmountForUSD(_amount); if (isBlacklisted(msg.sender)) { revert UserBlacklisted(); } require( balanceOf(address(this)) >= _amountToSend, "QBIT: Transfer exceeds contract balance" ); require(<FILL_ME>) tokensSold += _amountToSend; qbitInvestment[msg.sender] += _amountToSend; usdc.transferFrom(msg.sender, adminWallet, _amountToReceive); super._transfer(address(this), msg.sender, _amountToSend); emit QBITSold(msg.sender, _id, _amountToReceive, _amountToSend); } } function getQBITSaleAmountForETH(uint256 baseAmount) public view returns (uint256) { } function getQBITSaleAmountForUSD(uint256 baseAmount) public view returns (uint256) { } function getPrice() internal view returns (uint256) { } function getConversionRate(uint256 ethAmount) public view returns (uint256) { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } function withdrawPreSaleTokens(uint256 _amount) external { } function changeInitialPrice(uint256 _price) public onlyAdmin { } function blacklistUser(address user) external onlyAdmin { } function exemptFromTax(address _user) external onlyAdmin { } function changeTaxDivisor(uint256 _newTax) external onlyAdmin { } function isBlacklisted(address _user) public view returns (bool) { } function withdrawEther() external onlyAdmin { } function withdrawToken(address token) external onlyAdmin { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { } }
usdc.balanceOf(msg.sender)>=_amountToReceive,"USDC: Transfer exceeds balance"
223,701
usdc.balanceOf(msg.sender)>=_amountToReceive
"QBIT: Caller is not authorized"
pragma solidity ^0.8.19; contract QBIT is ERC20, Pausable, AccessControl { error UserBlacklisted(); error TooMuchTax(); error Only_Admin_Call(); uint256 public initialPrice = 0.11834 ether; uint256 public tokensSold = 0; uint256 private _totalSupply = 420_000_000 * 10**decimals(); uint256 public taxDivisor = 20; // 2% tax on all transfers address private immutable adminWallet = 0x944CB0D41A06b604255009c79f3B61D0B514d854; address private immutable airdropWallet = 0x5627B5725b8384F790fbdcD194352FEd49a1b5A9; address private immutable saleWallet = 0x0f520A81886A71c377B9Bc719D8FEa9533f6c099; address private immutable teamWallet = 0x44d229Df695e1ABe7B201a90D658f85bBb0161B6; address private immutable rewardsWallet = 0x377E6309d8f8a61D2891527387b0651e28BAaeF4; address private immutable liquidityWallet = 0xCBfC85ccF86117d926304c0E7DeB245c262581F9; address private immutable _usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address private immutable _usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; AggregatorV3Interface private dataFeed; //Chainlink AggregatorV3 for ETH/USD Price IERC20 usdt; IERC20 usdc; mapping(address => bool) private blackisted; mapping(address => bool) public taxExempted; mapping(address => uint256) public qbitInvestment; bytes32 public constant PRESALE_ROLE = keccak256("PRESALE_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); modifier onlyAdmin() { } event QBITSold( address indexed to, uint8 id, uint256 amountToReceive, uint256 amountToSend ); event Blacklisted(address indexed user); constructor() ERC20("QBIT", "QBIT") { } /** Buy QBIT @param _amount the value of ETH or USD to be spent to buy QBIT Tokens @param _id 0 is for ETH, 1 for USDT, 2 for USDC @dev swaps ETH/USDT/USDC for QBIT **/ function buyQBIT(uint256 _amount, uint8 _id) external payable { } function getQBITSaleAmountForETH(uint256 baseAmount) public view returns (uint256) { } function getQBITSaleAmountForUSD(uint256 baseAmount) public view returns (uint256) { } function getPrice() internal view returns (uint256) { } function getConversionRate(uint256 ethAmount) public view returns (uint256) { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } function withdrawPreSaleTokens(uint256 _amount) external { require(<FILL_ME>) require( balanceOf(address(this)) >= _amount, "QBIT: Transfer exceeds contract balance" ); super._transfer(address(this), msg.sender, _amount); } function changeInitialPrice(uint256 _price) public onlyAdmin { } function blacklistUser(address user) external onlyAdmin { } function exemptFromTax(address _user) external onlyAdmin { } function changeTaxDivisor(uint256 _newTax) external onlyAdmin { } function isBlacklisted(address _user) public view returns (bool) { } function withdrawEther() external onlyAdmin { } function withdrawToken(address token) external onlyAdmin { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { } }
hasRole(PRESALE_ROLE,msg.sender),"QBIT: Caller is not authorized"
223,701
hasRole(PRESALE_ROLE,msg.sender)
"QBIT: Transfer exceeds contract balance"
pragma solidity ^0.8.19; contract QBIT is ERC20, Pausable, AccessControl { error UserBlacklisted(); error TooMuchTax(); error Only_Admin_Call(); uint256 public initialPrice = 0.11834 ether; uint256 public tokensSold = 0; uint256 private _totalSupply = 420_000_000 * 10**decimals(); uint256 public taxDivisor = 20; // 2% tax on all transfers address private immutable adminWallet = 0x944CB0D41A06b604255009c79f3B61D0B514d854; address private immutable airdropWallet = 0x5627B5725b8384F790fbdcD194352FEd49a1b5A9; address private immutable saleWallet = 0x0f520A81886A71c377B9Bc719D8FEa9533f6c099; address private immutable teamWallet = 0x44d229Df695e1ABe7B201a90D658f85bBb0161B6; address private immutable rewardsWallet = 0x377E6309d8f8a61D2891527387b0651e28BAaeF4; address private immutable liquidityWallet = 0xCBfC85ccF86117d926304c0E7DeB245c262581F9; address private immutable _usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address private immutable _usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; AggregatorV3Interface private dataFeed; //Chainlink AggregatorV3 for ETH/USD Price IERC20 usdt; IERC20 usdc; mapping(address => bool) private blackisted; mapping(address => bool) public taxExempted; mapping(address => uint256) public qbitInvestment; bytes32 public constant PRESALE_ROLE = keccak256("PRESALE_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); modifier onlyAdmin() { } event QBITSold( address indexed to, uint8 id, uint256 amountToReceive, uint256 amountToSend ); event Blacklisted(address indexed user); constructor() ERC20("QBIT", "QBIT") { } /** Buy QBIT @param _amount the value of ETH or USD to be spent to buy QBIT Tokens @param _id 0 is for ETH, 1 for USDT, 2 for USDC @dev swaps ETH/USDT/USDC for QBIT **/ function buyQBIT(uint256 _amount, uint8 _id) external payable { } function getQBITSaleAmountForETH(uint256 baseAmount) public view returns (uint256) { } function getQBITSaleAmountForUSD(uint256 baseAmount) public view returns (uint256) { } function getPrice() internal view returns (uint256) { } function getConversionRate(uint256 ethAmount) public view returns (uint256) { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } function withdrawPreSaleTokens(uint256 _amount) external { require( hasRole(PRESALE_ROLE, msg.sender), "QBIT: Caller is not authorized" ); require(<FILL_ME>) super._transfer(address(this), msg.sender, _amount); } function changeInitialPrice(uint256 _price) public onlyAdmin { } function blacklistUser(address user) external onlyAdmin { } function exemptFromTax(address _user) external onlyAdmin { } function changeTaxDivisor(uint256 _newTax) external onlyAdmin { } function isBlacklisted(address _user) public view returns (bool) { } function withdrawEther() external onlyAdmin { } function withdrawToken(address token) external onlyAdmin { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { } }
balanceOf(address(this))>=_amount,"QBIT: Transfer exceeds contract balance"
223,701
balanceOf(address(this))>=_amount
"QBIT: User blacklisted"
pragma solidity ^0.8.19; contract QBIT is ERC20, Pausable, AccessControl { error UserBlacklisted(); error TooMuchTax(); error Only_Admin_Call(); uint256 public initialPrice = 0.11834 ether; uint256 public tokensSold = 0; uint256 private _totalSupply = 420_000_000 * 10**decimals(); uint256 public taxDivisor = 20; // 2% tax on all transfers address private immutable adminWallet = 0x944CB0D41A06b604255009c79f3B61D0B514d854; address private immutable airdropWallet = 0x5627B5725b8384F790fbdcD194352FEd49a1b5A9; address private immutable saleWallet = 0x0f520A81886A71c377B9Bc719D8FEa9533f6c099; address private immutable teamWallet = 0x44d229Df695e1ABe7B201a90D658f85bBb0161B6; address private immutable rewardsWallet = 0x377E6309d8f8a61D2891527387b0651e28BAaeF4; address private immutable liquidityWallet = 0xCBfC85ccF86117d926304c0E7DeB245c262581F9; address private immutable _usdt = 0xdAC17F958D2ee523a2206206994597C13D831ec7; address private immutable _usdc = 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48; AggregatorV3Interface private dataFeed; //Chainlink AggregatorV3 for ETH/USD Price IERC20 usdt; IERC20 usdc; mapping(address => bool) private blackisted; mapping(address => bool) public taxExempted; mapping(address => uint256) public qbitInvestment; bytes32 public constant PRESALE_ROLE = keccak256("PRESALE_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); modifier onlyAdmin() { } event QBITSold( address indexed to, uint8 id, uint256 amountToReceive, uint256 amountToSend ); event Blacklisted(address indexed user); constructor() ERC20("QBIT", "QBIT") { } /** Buy QBIT @param _amount the value of ETH or USD to be spent to buy QBIT Tokens @param _id 0 is for ETH, 1 for USDT, 2 for USDC @dev swaps ETH/USDT/USDC for QBIT **/ function buyQBIT(uint256 _amount, uint8 _id) external payable { } function getQBITSaleAmountForETH(uint256 baseAmount) public view returns (uint256) { } function getQBITSaleAmountForUSD(uint256 baseAmount) public view returns (uint256) { } function getPrice() internal view returns (uint256) { } function getConversionRate(uint256 ethAmount) public view returns (uint256) { } function pause() public onlyAdmin { } function unpause() public onlyAdmin { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { } function withdrawPreSaleTokens(uint256 _amount) external { } function changeInitialPrice(uint256 _price) public onlyAdmin { } function blacklistUser(address user) external onlyAdmin { } function exemptFromTax(address _user) external onlyAdmin { } function changeTaxDivisor(uint256 _newTax) external onlyAdmin { } function isBlacklisted(address _user) public view returns (bool) { } function withdrawEther() external onlyAdmin { } function withdrawToken(address token) external onlyAdmin { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual override { require(<FILL_ME>) if (!taxExempted[sender]) { uint256 tax = (amount / 1000) * taxDivisor; // tax super._transfer(sender, recipient, amount - tax); super._transfer(sender, adminWallet, tax); } else { super._transfer(sender, recipient, amount); } } }
!isBlacklisted(sender),"QBIT: User blacklisted"
223,701
!isBlacklisted(sender)
"NFTMarketplace: Token address is already allowed"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.15 <0.9.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "./IERC721Autentica.sol"; contract NFTMarketplace is AccessControl, ReentrancyGuard, Pausable { // Number of decimals used for fees. uint8 public constant DECIMALS = 2; // Create a new role identifier for the operator role. bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); // Autentica wallet address. address private _autentica; // Allowed token addresses to be used with `tradeForTokens`. address[] private _allowedTokens; // NFT details. struct NFT { address owner; address creator; address investor; } // Percentages for each party that needs to be payed. struct Percentages { uint256 creator; uint256 investor; } // Proceeds for each party that needs to be payed amounts expressed in coins or tokens, not in percentages struct Proceeds { uint256 creator; uint256 investor; uint256 marketplace; } // ECDSA signature. struct Signature { uint8 v; bytes32 r; bytes32 s; } /** * @dev Emitted when the Autentica wallet address has been updated. */ event ChangedAutentica( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in coins (the native cryptocurrency of the platform, i.e.: ETH). */ event TradedForCoins( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in tokens that are represented by the `token` * ERC-20 smart contract address. */ event TradedForTokens( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, address token, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a new token is allowed to be used for trading. */ event AllowedTokenAdded(address indexed tokenAddress); /** * @dev Emitted when a token is not longer allowed to be used for trading. */ event AllowedTokenRemoved(address indexed tokenAddress); /** * The constructor sets the creator of the contract as the admin * and operator of this smart contract, sets the wallet address for Autentica and sets the allowed tokens. */ constructor(address wallet, address[] memory allowedTokens) { } /** * Returns the Autentica wallet address. */ function autentica() external view returns (address) { } /** * @dev Sets the Autentica wallet address. * * Requirements: * * - the caller must be admin. */ function setAutentica(address wallet) external returns (address) { } /** * @dev Returns the number of decimals used for fees. */ function decimals() external pure returns (uint8) { } /** * @dev Returns the number of allowed tokens. */ function numberOfAllowedTokens() public view returns (uint256) { } /** * @dev Returns the address of the allowed token at the specified index. * @param index The index of the allowed token. */ function allowedTokenAtIndex(uint256 index) public view returns (address) { } /** * @dev Verifies if a token address has been allowed already. */ function isTokenAllowed(address tokenAddress) public view returns (bool) { } /** * @dev Add a new allowed token to the contract. * @param tokenAddress The address of the allowed token to add. * * Requirements: * * - the caller must be admin. */ function addAllowedToken(address tokenAddress) public { require( hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "NFTMarketplace: Only admins can add allowed tokens" ); // Check if the token address is valid require( tokenAddress != address(0), "NFTMarketplace: Token address is the zero address" ); // Check if the token address is already allowed require(<FILL_ME>) // Add the token address _allowedTokens.push(tokenAddress); // Emit the event emit AllowedTokenAdded(tokenAddress); } /** * @dev Remove the allowed token at the specified index. * @param index The index of the allowed token. * * Requirements: * * - the caller must be admin. */ function removeAllowedTokenAtIndex(uint256 index) public { } /** * @notice Trades an NFT for a given amount of coins (the native cryptocurrency of the platform, i.e.: ETH). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in coins. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * @dev Requirements * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The `price` and `msg.value` must be equal. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForCoins( address collection, uint256 tokenId, uint256 price, address buyer, uint256 marketplaceFee, Signature calldata signature ) external payable nonReentrant { } /** * @notice Trades an NFT for a given amount of ERC-20 tokens (i.e.: AUT/USDT/USDC). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param token The ERC-20 smart contract. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * Requirements: * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForTokens( address collection, uint256 tokenId, uint256 price, address token, address buyer, uint256 marketplaceFee, Signature calldata signature ) external nonReentrant { } /** * @notice Validate the trade. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param currency The type of currency (erc20 or native currency) * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * */ function canPerformTrade( address collection, uint256 tokenId, uint256 price, address currency, address buyer, uint256 marketplaceFee, Signature calldata signature ) public view returns (bool) { } /** * @notice If the collection smart contract implements `IERC721Autentica` or `IERC2981` then * the function returns the royalty fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getRoyaltyFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @notice If the collection smart contract implements `IERC721Autentica` then the function * returns the investor fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getInvestorFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @dev Verifies if the token owner has approved this smart contract to manage its * NFTs from the specified collection. * @return Returns `true` if this smart contract is approved by the `tokenOwner` in * the `collection` smart contract or only if that specific NFT is approved for this smart contract. */ function isMarketplaceApproved( IERC721 collection, uint256 tokenId, address tokenOwner ) public view returns (bool) { } /** * @notice Pause the contract. * * Requirements: * * - the caller must be admin. */ function pause() public { } /** * @notice Unpause the contract. * * Requirements: * * - the caller must be admin. */ function unpause() public { } /** * @dev Function to transfer coins (the native cryptocurrency of the * platform, i.e.: ETH) from this contract to the specified address. * * @param to - Address where to transfer the coins * @param amount - Amount (in wei) * */ function _sendViaCall(address payable to, uint256 amount) private { } /** * Returns `true` if the signer has the admin or the operator role. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param buyer Seller address. * @param buyer Buyer address. * @param price Price of the NFT expressed in coins or tokens. * @param token The ERC-20 smart contract address. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. */ function _validateTrade( address collection, uint256 tokenId, address seller, address buyer, uint256 price, address token, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee, Signature calldata signature ) private view returns (bool) { } /** * @dev Returns the fee normalized to the number of decimals used in this smart contract. * * @param collection The Autentica ERC-721 smart contract. * @param fee Value represented using the number of decimals used by the `collection` smart contract. */ function _normalizedFee(IERC721Autentica collection, uint256 fee) private view returns (uint256) { } /** * @dev Returns the number of coins/tokens for a given fee percentage. */ function _calculateProceedsForFee(uint256 fee, uint256 price) private pure returns (uint256) { } /** * Returns the owner proceeds. */ function _calculateOwnerProceeds( uint256 price, Proceeds memory proceeds ) private pure returns (uint256) { } /** * @dev Makes sure that the `collection` is a valid ERC-721 smart contract. */ function _validateERC721(address collection) private view { } /** * @dev Makes sure that the owner approved this smart contract for the token. */ function _validateNFTApproval( address collection, uint256 tokenId, NFT memory nft ) private view { } /** * @dev Make sure that all the fees sumed up do not exceed 100%. */ function _validateFees( uint256 royaltyFee, uint256 marketplaceFee ) private pure { } /** * @dev Returns the NFT details. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. */ function _nftDetails(address collection, uint256 tokenId) private view returns (NFT memory) { } /** * @dev Returns the Percentages details. * * @param nft NFT details. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. */ function _percentagesDetails( NFT memory nft, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee ) private pure returns (Percentages memory) { } }
!isTokenAllowed(tokenAddress),"NFTMarketplace: Token address is already allowed"
223,706
!isTokenAllowed(tokenAddress)
"NFTMarketplace: Token not allowed"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.15 <0.9.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "./IERC721Autentica.sol"; contract NFTMarketplace is AccessControl, ReentrancyGuard, Pausable { // Number of decimals used for fees. uint8 public constant DECIMALS = 2; // Create a new role identifier for the operator role. bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); // Autentica wallet address. address private _autentica; // Allowed token addresses to be used with `tradeForTokens`. address[] private _allowedTokens; // NFT details. struct NFT { address owner; address creator; address investor; } // Percentages for each party that needs to be payed. struct Percentages { uint256 creator; uint256 investor; } // Proceeds for each party that needs to be payed amounts expressed in coins or tokens, not in percentages struct Proceeds { uint256 creator; uint256 investor; uint256 marketplace; } // ECDSA signature. struct Signature { uint8 v; bytes32 r; bytes32 s; } /** * @dev Emitted when the Autentica wallet address has been updated. */ event ChangedAutentica( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in coins (the native cryptocurrency of the platform, i.e.: ETH). */ event TradedForCoins( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in tokens that are represented by the `token` * ERC-20 smart contract address. */ event TradedForTokens( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, address token, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a new token is allowed to be used for trading. */ event AllowedTokenAdded(address indexed tokenAddress); /** * @dev Emitted when a token is not longer allowed to be used for trading. */ event AllowedTokenRemoved(address indexed tokenAddress); /** * The constructor sets the creator of the contract as the admin * and operator of this smart contract, sets the wallet address for Autentica and sets the allowed tokens. */ constructor(address wallet, address[] memory allowedTokens) { } /** * Returns the Autentica wallet address. */ function autentica() external view returns (address) { } /** * @dev Sets the Autentica wallet address. * * Requirements: * * - the caller must be admin. */ function setAutentica(address wallet) external returns (address) { } /** * @dev Returns the number of decimals used for fees. */ function decimals() external pure returns (uint8) { } /** * @dev Returns the number of allowed tokens. */ function numberOfAllowedTokens() public view returns (uint256) { } /** * @dev Returns the address of the allowed token at the specified index. * @param index The index of the allowed token. */ function allowedTokenAtIndex(uint256 index) public view returns (address) { } /** * @dev Verifies if a token address has been allowed already. */ function isTokenAllowed(address tokenAddress) public view returns (bool) { } /** * @dev Add a new allowed token to the contract. * @param tokenAddress The address of the allowed token to add. * * Requirements: * * - the caller must be admin. */ function addAllowedToken(address tokenAddress) public { } /** * @dev Remove the allowed token at the specified index. * @param index The index of the allowed token. * * Requirements: * * - the caller must be admin. */ function removeAllowedTokenAtIndex(uint256 index) public { } /** * @notice Trades an NFT for a given amount of coins (the native cryptocurrency of the platform, i.e.: ETH). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in coins. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * @dev Requirements * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The `price` and `msg.value` must be equal. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForCoins( address collection, uint256 tokenId, uint256 price, address buyer, uint256 marketplaceFee, Signature calldata signature ) external payable nonReentrant { } /** * @notice Trades an NFT for a given amount of ERC-20 tokens (i.e.: AUT/USDT/USDC). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param token The ERC-20 smart contract. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * Requirements: * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForTokens( address collection, uint256 tokenId, uint256 price, address token, address buyer, uint256 marketplaceFee, Signature calldata signature ) external nonReentrant { // Check if the token is allowed require(<FILL_ME>) // Validate the trade canPerformTrade( collection, tokenId, price, token, buyer, marketplaceFee, signature ); // Assemble the NFT details NFT memory nft = _nftDetails(collection, tokenId); // Assemble the percentages Percentages memory percentages = _percentagesDetails( nft, getRoyaltyFee(collection, tokenId), getInvestorFee(collection, tokenId), marketplaceFee ); // Assemble the fees Proceeds memory proceeds = Proceeds({ creator: _calculateProceedsForFee(percentages.creator, price), investor: _calculateProceedsForFee(percentages.investor, price), marketplace: _calculateProceedsForFee(marketplaceFee, price) }); // Calculate the base owner proceeds uint256 ownerProceeds = _calculateOwnerProceeds( price, proceeds ); // Payments IERC20(token).transferFrom(buyer, nft.owner, ownerProceeds); if (proceeds.investor > 0) { IERC20(token).transferFrom( buyer, nft.investor, proceeds.investor ); } if (proceeds.creator > 0) { IERC20(token).transferFrom(buyer, nft.creator, proceeds.creator); } if (proceeds.marketplace > 0) { IERC20(token).transferFrom( buyer, _autentica, proceeds.marketplace ); } // Finally transfer the NFT IERC721(collection).safeTransferFrom(nft.owner, _msgSender(), tokenId); // Emit the event emit TradedForTokens( collection, tokenId, nft.owner, _msgSender(), token, price, ownerProceeds, proceeds.creator, proceeds.investor ); } /** * @notice Validate the trade. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param currency The type of currency (erc20 or native currency) * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * */ function canPerformTrade( address collection, uint256 tokenId, uint256 price, address currency, address buyer, uint256 marketplaceFee, Signature calldata signature ) public view returns (bool) { } /** * @notice If the collection smart contract implements `IERC721Autentica` or `IERC2981` then * the function returns the royalty fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getRoyaltyFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @notice If the collection smart contract implements `IERC721Autentica` then the function * returns the investor fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getInvestorFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @dev Verifies if the token owner has approved this smart contract to manage its * NFTs from the specified collection. * @return Returns `true` if this smart contract is approved by the `tokenOwner` in * the `collection` smart contract or only if that specific NFT is approved for this smart contract. */ function isMarketplaceApproved( IERC721 collection, uint256 tokenId, address tokenOwner ) public view returns (bool) { } /** * @notice Pause the contract. * * Requirements: * * - the caller must be admin. */ function pause() public { } /** * @notice Unpause the contract. * * Requirements: * * - the caller must be admin. */ function unpause() public { } /** * @dev Function to transfer coins (the native cryptocurrency of the * platform, i.e.: ETH) from this contract to the specified address. * * @param to - Address where to transfer the coins * @param amount - Amount (in wei) * */ function _sendViaCall(address payable to, uint256 amount) private { } /** * Returns `true` if the signer has the admin or the operator role. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param buyer Seller address. * @param buyer Buyer address. * @param price Price of the NFT expressed in coins or tokens. * @param token The ERC-20 smart contract address. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. */ function _validateTrade( address collection, uint256 tokenId, address seller, address buyer, uint256 price, address token, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee, Signature calldata signature ) private view returns (bool) { } /** * @dev Returns the fee normalized to the number of decimals used in this smart contract. * * @param collection The Autentica ERC-721 smart contract. * @param fee Value represented using the number of decimals used by the `collection` smart contract. */ function _normalizedFee(IERC721Autentica collection, uint256 fee) private view returns (uint256) { } /** * @dev Returns the number of coins/tokens for a given fee percentage. */ function _calculateProceedsForFee(uint256 fee, uint256 price) private pure returns (uint256) { } /** * Returns the owner proceeds. */ function _calculateOwnerProceeds( uint256 price, Proceeds memory proceeds ) private pure returns (uint256) { } /** * @dev Makes sure that the `collection` is a valid ERC-721 smart contract. */ function _validateERC721(address collection) private view { } /** * @dev Makes sure that the owner approved this smart contract for the token. */ function _validateNFTApproval( address collection, uint256 tokenId, NFT memory nft ) private view { } /** * @dev Make sure that all the fees sumed up do not exceed 100%. */ function _validateFees( uint256 royaltyFee, uint256 marketplaceFee ) private pure { } /** * @dev Returns the NFT details. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. */ function _nftDetails(address collection, uint256 tokenId) private view returns (NFT memory) { } /** * @dev Returns the Percentages details. * * @param nft NFT details. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. */ function _percentagesDetails( NFT memory nft, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee ) private pure returns (Percentages memory) { } }
isTokenAllowed(token),"NFTMarketplace: Token not allowed"
223,706
isTokenAllowed(token)
"NFTMarketplace: Invalid signature"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.15 <0.9.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "./IERC721Autentica.sol"; contract NFTMarketplace is AccessControl, ReentrancyGuard, Pausable { // Number of decimals used for fees. uint8 public constant DECIMALS = 2; // Create a new role identifier for the operator role. bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); // Autentica wallet address. address private _autentica; // Allowed token addresses to be used with `tradeForTokens`. address[] private _allowedTokens; // NFT details. struct NFT { address owner; address creator; address investor; } // Percentages for each party that needs to be payed. struct Percentages { uint256 creator; uint256 investor; } // Proceeds for each party that needs to be payed amounts expressed in coins or tokens, not in percentages struct Proceeds { uint256 creator; uint256 investor; uint256 marketplace; } // ECDSA signature. struct Signature { uint8 v; bytes32 r; bytes32 s; } /** * @dev Emitted when the Autentica wallet address has been updated. */ event ChangedAutentica( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in coins (the native cryptocurrency of the platform, i.e.: ETH). */ event TradedForCoins( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in tokens that are represented by the `token` * ERC-20 smart contract address. */ event TradedForTokens( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, address token, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a new token is allowed to be used for trading. */ event AllowedTokenAdded(address indexed tokenAddress); /** * @dev Emitted when a token is not longer allowed to be used for trading. */ event AllowedTokenRemoved(address indexed tokenAddress); /** * The constructor sets the creator of the contract as the admin * and operator of this smart contract, sets the wallet address for Autentica and sets the allowed tokens. */ constructor(address wallet, address[] memory allowedTokens) { } /** * Returns the Autentica wallet address. */ function autentica() external view returns (address) { } /** * @dev Sets the Autentica wallet address. * * Requirements: * * - the caller must be admin. */ function setAutentica(address wallet) external returns (address) { } /** * @dev Returns the number of decimals used for fees. */ function decimals() external pure returns (uint8) { } /** * @dev Returns the number of allowed tokens. */ function numberOfAllowedTokens() public view returns (uint256) { } /** * @dev Returns the address of the allowed token at the specified index. * @param index The index of the allowed token. */ function allowedTokenAtIndex(uint256 index) public view returns (address) { } /** * @dev Verifies if a token address has been allowed already. */ function isTokenAllowed(address tokenAddress) public view returns (bool) { } /** * @dev Add a new allowed token to the contract. * @param tokenAddress The address of the allowed token to add. * * Requirements: * * - the caller must be admin. */ function addAllowedToken(address tokenAddress) public { } /** * @dev Remove the allowed token at the specified index. * @param index The index of the allowed token. * * Requirements: * * - the caller must be admin. */ function removeAllowedTokenAtIndex(uint256 index) public { } /** * @notice Trades an NFT for a given amount of coins (the native cryptocurrency of the platform, i.e.: ETH). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in coins. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * @dev Requirements * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The `price` and `msg.value` must be equal. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForCoins( address collection, uint256 tokenId, uint256 price, address buyer, uint256 marketplaceFee, Signature calldata signature ) external payable nonReentrant { } /** * @notice Trades an NFT for a given amount of ERC-20 tokens (i.e.: AUT/USDT/USDC). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param token The ERC-20 smart contract. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * Requirements: * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForTokens( address collection, uint256 tokenId, uint256 price, address token, address buyer, uint256 marketplaceFee, Signature calldata signature ) external nonReentrant { } /** * @notice Validate the trade. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param currency The type of currency (erc20 or native currency) * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * */ function canPerformTrade( address collection, uint256 tokenId, uint256 price, address currency, address buyer, uint256 marketplaceFee, Signature calldata signature ) public view returns (bool) { // Check if the contract is paused require(!paused(), "NFTMarketplace: Contract is paused"); // Check if the collection is an ERC-721 smart contract _validateERC721(collection); // Assemble the NFT details NFT memory nft = _nftDetails(collection, tokenId); // Validate the approval _validateNFTApproval(collection, tokenId, nft); // Fees uint256 royaltyFee = getRoyaltyFee(collection, tokenId); uint256 investorFee = getInvestorFee(collection, tokenId); // Make sure that all the fees sumed up do not exceed 100% // // Note: The investor fee is ignored from the validation // because that fee represents a percetange of the // royalty fee. _validateFees(royaltyFee, marketplaceFee); // Make sure the parameters are valid require(<FILL_ME>) return true; } /** * @notice If the collection smart contract implements `IERC721Autentica` or `IERC2981` then * the function returns the royalty fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getRoyaltyFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @notice If the collection smart contract implements `IERC721Autentica` then the function * returns the investor fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getInvestorFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @dev Verifies if the token owner has approved this smart contract to manage its * NFTs from the specified collection. * @return Returns `true` if this smart contract is approved by the `tokenOwner` in * the `collection` smart contract or only if that specific NFT is approved for this smart contract. */ function isMarketplaceApproved( IERC721 collection, uint256 tokenId, address tokenOwner ) public view returns (bool) { } /** * @notice Pause the contract. * * Requirements: * * - the caller must be admin. */ function pause() public { } /** * @notice Unpause the contract. * * Requirements: * * - the caller must be admin. */ function unpause() public { } /** * @dev Function to transfer coins (the native cryptocurrency of the * platform, i.e.: ETH) from this contract to the specified address. * * @param to - Address where to transfer the coins * @param amount - Amount (in wei) * */ function _sendViaCall(address payable to, uint256 amount) private { } /** * Returns `true` if the signer has the admin or the operator role. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param buyer Seller address. * @param buyer Buyer address. * @param price Price of the NFT expressed in coins or tokens. * @param token The ERC-20 smart contract address. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. */ function _validateTrade( address collection, uint256 tokenId, address seller, address buyer, uint256 price, address token, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee, Signature calldata signature ) private view returns (bool) { } /** * @dev Returns the fee normalized to the number of decimals used in this smart contract. * * @param collection The Autentica ERC-721 smart contract. * @param fee Value represented using the number of decimals used by the `collection` smart contract. */ function _normalizedFee(IERC721Autentica collection, uint256 fee) private view returns (uint256) { } /** * @dev Returns the number of coins/tokens for a given fee percentage. */ function _calculateProceedsForFee(uint256 fee, uint256 price) private pure returns (uint256) { } /** * Returns the owner proceeds. */ function _calculateOwnerProceeds( uint256 price, Proceeds memory proceeds ) private pure returns (uint256) { } /** * @dev Makes sure that the `collection` is a valid ERC-721 smart contract. */ function _validateERC721(address collection) private view { } /** * @dev Makes sure that the owner approved this smart contract for the token. */ function _validateNFTApproval( address collection, uint256 tokenId, NFT memory nft ) private view { } /** * @dev Make sure that all the fees sumed up do not exceed 100%. */ function _validateFees( uint256 royaltyFee, uint256 marketplaceFee ) private pure { } /** * @dev Returns the NFT details. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. */ function _nftDetails(address collection, uint256 tokenId) private view returns (NFT memory) { } /** * @dev Returns the Percentages details. * * @param nft NFT details. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. */ function _percentagesDetails( NFT memory nft, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee ) private pure returns (Percentages memory) { } }
_validateTrade(collection,tokenId,nft.owner,buyer,price,currency,royaltyFee,investorFee,marketplaceFee,signature),"NFTMarketplace: Invalid signature"
223,706
_validateTrade(collection,tokenId,nft.owner,buyer,price,currency,royaltyFee,investorFee,marketplaceFee,signature)
"NFTMarketplace: Collection does not support the ERC-721 interface"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.15 <0.9.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "./IERC721Autentica.sol"; contract NFTMarketplace is AccessControl, ReentrancyGuard, Pausable { // Number of decimals used for fees. uint8 public constant DECIMALS = 2; // Create a new role identifier for the operator role. bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); // Autentica wallet address. address private _autentica; // Allowed token addresses to be used with `tradeForTokens`. address[] private _allowedTokens; // NFT details. struct NFT { address owner; address creator; address investor; } // Percentages for each party that needs to be payed. struct Percentages { uint256 creator; uint256 investor; } // Proceeds for each party that needs to be payed amounts expressed in coins or tokens, not in percentages struct Proceeds { uint256 creator; uint256 investor; uint256 marketplace; } // ECDSA signature. struct Signature { uint8 v; bytes32 r; bytes32 s; } /** * @dev Emitted when the Autentica wallet address has been updated. */ event ChangedAutentica( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in coins (the native cryptocurrency of the platform, i.e.: ETH). */ event TradedForCoins( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in tokens that are represented by the `token` * ERC-20 smart contract address. */ event TradedForTokens( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, address token, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a new token is allowed to be used for trading. */ event AllowedTokenAdded(address indexed tokenAddress); /** * @dev Emitted when a token is not longer allowed to be used for trading. */ event AllowedTokenRemoved(address indexed tokenAddress); /** * The constructor sets the creator of the contract as the admin * and operator of this smart contract, sets the wallet address for Autentica and sets the allowed tokens. */ constructor(address wallet, address[] memory allowedTokens) { } /** * Returns the Autentica wallet address. */ function autentica() external view returns (address) { } /** * @dev Sets the Autentica wallet address. * * Requirements: * * - the caller must be admin. */ function setAutentica(address wallet) external returns (address) { } /** * @dev Returns the number of decimals used for fees. */ function decimals() external pure returns (uint8) { } /** * @dev Returns the number of allowed tokens. */ function numberOfAllowedTokens() public view returns (uint256) { } /** * @dev Returns the address of the allowed token at the specified index. * @param index The index of the allowed token. */ function allowedTokenAtIndex(uint256 index) public view returns (address) { } /** * @dev Verifies if a token address has been allowed already. */ function isTokenAllowed(address tokenAddress) public view returns (bool) { } /** * @dev Add a new allowed token to the contract. * @param tokenAddress The address of the allowed token to add. * * Requirements: * * - the caller must be admin. */ function addAllowedToken(address tokenAddress) public { } /** * @dev Remove the allowed token at the specified index. * @param index The index of the allowed token. * * Requirements: * * - the caller must be admin. */ function removeAllowedTokenAtIndex(uint256 index) public { } /** * @notice Trades an NFT for a given amount of coins (the native cryptocurrency of the platform, i.e.: ETH). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in coins. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * @dev Requirements * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The `price` and `msg.value` must be equal. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForCoins( address collection, uint256 tokenId, uint256 price, address buyer, uint256 marketplaceFee, Signature calldata signature ) external payable nonReentrant { } /** * @notice Trades an NFT for a given amount of ERC-20 tokens (i.e.: AUT/USDT/USDC). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param token The ERC-20 smart contract. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * Requirements: * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForTokens( address collection, uint256 tokenId, uint256 price, address token, address buyer, uint256 marketplaceFee, Signature calldata signature ) external nonReentrant { } /** * @notice Validate the trade. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param currency The type of currency (erc20 or native currency) * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * */ function canPerformTrade( address collection, uint256 tokenId, uint256 price, address currency, address buyer, uint256 marketplaceFee, Signature calldata signature ) public view returns (bool) { } /** * @notice If the collection smart contract implements `IERC721Autentica` or `IERC2981` then * the function returns the royalty fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getRoyaltyFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @notice If the collection smart contract implements `IERC721Autentica` then the function * returns the investor fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getInvestorFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @dev Verifies if the token owner has approved this smart contract to manage its * NFTs from the specified collection. * @return Returns `true` if this smart contract is approved by the `tokenOwner` in * the `collection` smart contract or only if that specific NFT is approved for this smart contract. */ function isMarketplaceApproved( IERC721 collection, uint256 tokenId, address tokenOwner ) public view returns (bool) { } /** * @notice Pause the contract. * * Requirements: * * - the caller must be admin. */ function pause() public { } /** * @notice Unpause the contract. * * Requirements: * * - the caller must be admin. */ function unpause() public { } /** * @dev Function to transfer coins (the native cryptocurrency of the * platform, i.e.: ETH) from this contract to the specified address. * * @param to - Address where to transfer the coins * @param amount - Amount (in wei) * */ function _sendViaCall(address payable to, uint256 amount) private { } /** * Returns `true` if the signer has the admin or the operator role. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param buyer Seller address. * @param buyer Buyer address. * @param price Price of the NFT expressed in coins or tokens. * @param token The ERC-20 smart contract address. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. */ function _validateTrade( address collection, uint256 tokenId, address seller, address buyer, uint256 price, address token, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee, Signature calldata signature ) private view returns (bool) { } /** * @dev Returns the fee normalized to the number of decimals used in this smart contract. * * @param collection The Autentica ERC-721 smart contract. * @param fee Value represented using the number of decimals used by the `collection` smart contract. */ function _normalizedFee(IERC721Autentica collection, uint256 fee) private view returns (uint256) { } /** * @dev Returns the number of coins/tokens for a given fee percentage. */ function _calculateProceedsForFee(uint256 fee, uint256 price) private pure returns (uint256) { } /** * Returns the owner proceeds. */ function _calculateOwnerProceeds( uint256 price, Proceeds memory proceeds ) private pure returns (uint256) { } /** * @dev Makes sure that the `collection` is a valid ERC-721 smart contract. */ function _validateERC721(address collection) private view { require(<FILL_ME>) } /** * @dev Makes sure that the owner approved this smart contract for the token. */ function _validateNFTApproval( address collection, uint256 tokenId, NFT memory nft ) private view { } /** * @dev Make sure that all the fees sumed up do not exceed 100%. */ function _validateFees( uint256 royaltyFee, uint256 marketplaceFee ) private pure { } /** * @dev Returns the NFT details. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. */ function _nftDetails(address collection, uint256 tokenId) private view returns (NFT memory) { } /** * @dev Returns the Percentages details. * * @param nft NFT details. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. */ function _percentagesDetails( NFT memory nft, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee ) private pure returns (Percentages memory) { } }
ERC165Checker.supportsInterface(collection,type(IERC721).interfaceId),"NFTMarketplace: Collection does not support the ERC-721 interface"
223,706
ERC165Checker.supportsInterface(collection,type(IERC721).interfaceId)
"NFTMarketplace: Owner has not approved us for managing its NFTs"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.15 <0.9.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "./IERC721Autentica.sol"; contract NFTMarketplace is AccessControl, ReentrancyGuard, Pausable { // Number of decimals used for fees. uint8 public constant DECIMALS = 2; // Create a new role identifier for the operator role. bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); // Autentica wallet address. address private _autentica; // Allowed token addresses to be used with `tradeForTokens`. address[] private _allowedTokens; // NFT details. struct NFT { address owner; address creator; address investor; } // Percentages for each party that needs to be payed. struct Percentages { uint256 creator; uint256 investor; } // Proceeds for each party that needs to be payed amounts expressed in coins or tokens, not in percentages struct Proceeds { uint256 creator; uint256 investor; uint256 marketplace; } // ECDSA signature. struct Signature { uint8 v; bytes32 r; bytes32 s; } /** * @dev Emitted when the Autentica wallet address has been updated. */ event ChangedAutentica( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in coins (the native cryptocurrency of the platform, i.e.: ETH). */ event TradedForCoins( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in tokens that are represented by the `token` * ERC-20 smart contract address. */ event TradedForTokens( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, address token, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a new token is allowed to be used for trading. */ event AllowedTokenAdded(address indexed tokenAddress); /** * @dev Emitted when a token is not longer allowed to be used for trading. */ event AllowedTokenRemoved(address indexed tokenAddress); /** * The constructor sets the creator of the contract as the admin * and operator of this smart contract, sets the wallet address for Autentica and sets the allowed tokens. */ constructor(address wallet, address[] memory allowedTokens) { } /** * Returns the Autentica wallet address. */ function autentica() external view returns (address) { } /** * @dev Sets the Autentica wallet address. * * Requirements: * * - the caller must be admin. */ function setAutentica(address wallet) external returns (address) { } /** * @dev Returns the number of decimals used for fees. */ function decimals() external pure returns (uint8) { } /** * @dev Returns the number of allowed tokens. */ function numberOfAllowedTokens() public view returns (uint256) { } /** * @dev Returns the address of the allowed token at the specified index. * @param index The index of the allowed token. */ function allowedTokenAtIndex(uint256 index) public view returns (address) { } /** * @dev Verifies if a token address has been allowed already. */ function isTokenAllowed(address tokenAddress) public view returns (bool) { } /** * @dev Add a new allowed token to the contract. * @param tokenAddress The address of the allowed token to add. * * Requirements: * * - the caller must be admin. */ function addAllowedToken(address tokenAddress) public { } /** * @dev Remove the allowed token at the specified index. * @param index The index of the allowed token. * * Requirements: * * - the caller must be admin. */ function removeAllowedTokenAtIndex(uint256 index) public { } /** * @notice Trades an NFT for a given amount of coins (the native cryptocurrency of the platform, i.e.: ETH). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in coins. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * @dev Requirements * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The `price` and `msg.value` must be equal. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForCoins( address collection, uint256 tokenId, uint256 price, address buyer, uint256 marketplaceFee, Signature calldata signature ) external payable nonReentrant { } /** * @notice Trades an NFT for a given amount of ERC-20 tokens (i.e.: AUT/USDT/USDC). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param token The ERC-20 smart contract. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * Requirements: * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForTokens( address collection, uint256 tokenId, uint256 price, address token, address buyer, uint256 marketplaceFee, Signature calldata signature ) external nonReentrant { } /** * @notice Validate the trade. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param currency The type of currency (erc20 or native currency) * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * */ function canPerformTrade( address collection, uint256 tokenId, uint256 price, address currency, address buyer, uint256 marketplaceFee, Signature calldata signature ) public view returns (bool) { } /** * @notice If the collection smart contract implements `IERC721Autentica` or `IERC2981` then * the function returns the royalty fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getRoyaltyFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @notice If the collection smart contract implements `IERC721Autentica` then the function * returns the investor fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getInvestorFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @dev Verifies if the token owner has approved this smart contract to manage its * NFTs from the specified collection. * @return Returns `true` if this smart contract is approved by the `tokenOwner` in * the `collection` smart contract or only if that specific NFT is approved for this smart contract. */ function isMarketplaceApproved( IERC721 collection, uint256 tokenId, address tokenOwner ) public view returns (bool) { } /** * @notice Pause the contract. * * Requirements: * * - the caller must be admin. */ function pause() public { } /** * @notice Unpause the contract. * * Requirements: * * - the caller must be admin. */ function unpause() public { } /** * @dev Function to transfer coins (the native cryptocurrency of the * platform, i.e.: ETH) from this contract to the specified address. * * @param to - Address where to transfer the coins * @param amount - Amount (in wei) * */ function _sendViaCall(address payable to, uint256 amount) private { } /** * Returns `true` if the signer has the admin or the operator role. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param buyer Seller address. * @param buyer Buyer address. * @param price Price of the NFT expressed in coins or tokens. * @param token The ERC-20 smart contract address. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. */ function _validateTrade( address collection, uint256 tokenId, address seller, address buyer, uint256 price, address token, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee, Signature calldata signature ) private view returns (bool) { } /** * @dev Returns the fee normalized to the number of decimals used in this smart contract. * * @param collection The Autentica ERC-721 smart contract. * @param fee Value represented using the number of decimals used by the `collection` smart contract. */ function _normalizedFee(IERC721Autentica collection, uint256 fee) private view returns (uint256) { } /** * @dev Returns the number of coins/tokens for a given fee percentage. */ function _calculateProceedsForFee(uint256 fee, uint256 price) private pure returns (uint256) { } /** * Returns the owner proceeds. */ function _calculateOwnerProceeds( uint256 price, Proceeds memory proceeds ) private pure returns (uint256) { } /** * @dev Makes sure that the `collection` is a valid ERC-721 smart contract. */ function _validateERC721(address collection) private view { } /** * @dev Makes sure that the owner approved this smart contract for the token. */ function _validateNFTApproval( address collection, uint256 tokenId, NFT memory nft ) private view { require(<FILL_ME>) } /** * @dev Make sure that all the fees sumed up do not exceed 100%. */ function _validateFees( uint256 royaltyFee, uint256 marketplaceFee ) private pure { } /** * @dev Returns the NFT details. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. */ function _nftDetails(address collection, uint256 tokenId) private view returns (NFT memory) { } /** * @dev Returns the Percentages details. * * @param nft NFT details. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. */ function _percentagesDetails( NFT memory nft, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee ) private pure returns (Percentages memory) { } }
isMarketplaceApproved(IERC721(collection),tokenId,nft.owner),"NFTMarketplace: Owner has not approved us for managing its NFTs"
223,706
isMarketplaceApproved(IERC721(collection),tokenId,nft.owner)
"NFTMarketplace: Total fees cannot be greater than 100%"
// SPDX-License-Identifier: MIT pragma solidity >=0.8.15 <0.9.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "./IERC721Autentica.sol"; contract NFTMarketplace is AccessControl, ReentrancyGuard, Pausable { // Number of decimals used for fees. uint8 public constant DECIMALS = 2; // Create a new role identifier for the operator role. bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE"); // Autentica wallet address. address private _autentica; // Allowed token addresses to be used with `tradeForTokens`. address[] private _allowedTokens; // NFT details. struct NFT { address owner; address creator; address investor; } // Percentages for each party that needs to be payed. struct Percentages { uint256 creator; uint256 investor; } // Proceeds for each party that needs to be payed amounts expressed in coins or tokens, not in percentages struct Proceeds { uint256 creator; uint256 investor; uint256 marketplace; } // ECDSA signature. struct Signature { uint8 v; bytes32 r; bytes32 s; } /** * @dev Emitted when the Autentica wallet address has been updated. */ event ChangedAutentica( address indexed oldAddress, address indexed newAddress ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in coins (the native cryptocurrency of the platform, i.e.: ETH). */ event TradedForCoins( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a trade occured between the `seller` (the owner of the ERC-721 token * represented by `tokenId` within the `collection` smart contract) and `buyer` which * payed the specified `price` in tokens that are represented by the `token` * ERC-20 smart contract address. */ event TradedForTokens( address indexed collection, uint256 indexed tokenId, address indexed seller, address buyer, address token, uint256 price, uint256 ownerProceeds, uint256 creatorProceeds, uint256 investorProceeds ); /** * @dev Emitted when a new token is allowed to be used for trading. */ event AllowedTokenAdded(address indexed tokenAddress); /** * @dev Emitted when a token is not longer allowed to be used for trading. */ event AllowedTokenRemoved(address indexed tokenAddress); /** * The constructor sets the creator of the contract as the admin * and operator of this smart contract, sets the wallet address for Autentica and sets the allowed tokens. */ constructor(address wallet, address[] memory allowedTokens) { } /** * Returns the Autentica wallet address. */ function autentica() external view returns (address) { } /** * @dev Sets the Autentica wallet address. * * Requirements: * * - the caller must be admin. */ function setAutentica(address wallet) external returns (address) { } /** * @dev Returns the number of decimals used for fees. */ function decimals() external pure returns (uint8) { } /** * @dev Returns the number of allowed tokens. */ function numberOfAllowedTokens() public view returns (uint256) { } /** * @dev Returns the address of the allowed token at the specified index. * @param index The index of the allowed token. */ function allowedTokenAtIndex(uint256 index) public view returns (address) { } /** * @dev Verifies if a token address has been allowed already. */ function isTokenAllowed(address tokenAddress) public view returns (bool) { } /** * @dev Add a new allowed token to the contract. * @param tokenAddress The address of the allowed token to add. * * Requirements: * * - the caller must be admin. */ function addAllowedToken(address tokenAddress) public { } /** * @dev Remove the allowed token at the specified index. * @param index The index of the allowed token. * * Requirements: * * - the caller must be admin. */ function removeAllowedTokenAtIndex(uint256 index) public { } /** * @notice Trades an NFT for a given amount of coins (the native cryptocurrency of the platform, i.e.: ETH). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in coins. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * @dev Requirements * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The `price` and `msg.value` must be equal. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForCoins( address collection, uint256 tokenId, uint256 price, address buyer, uint256 marketplaceFee, Signature calldata signature ) external payable nonReentrant { } /** * @notice Trades an NFT for a given amount of ERC-20 tokens (i.e.: AUT/USDT/USDC). * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param token The ERC-20 smart contract. * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * * Requirements: * * - The `collection` smart contract must be an ERC-721 smart contract. * - The owner of the NFT identified by `tokenId` within the `collection` smart contract must have approved * this smart contract to manage its NFTs. * - The sum of all the fees cannot be greater than 100%. * - The ECDSA signature must be signed by someone with the admin or operator role. */ function tradeForTokens( address collection, uint256 tokenId, uint256 price, address token, address buyer, uint256 marketplaceFee, Signature calldata signature ) external nonReentrant { } /** * @notice Validate the trade. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param price The price of the NFT in `token` tokens. * @param currency The type of currency (erc20 or native currency) * @param buyer Buyer address. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. * */ function canPerformTrade( address collection, uint256 tokenId, uint256 price, address currency, address buyer, uint256 marketplaceFee, Signature calldata signature ) public view returns (bool) { } /** * @notice If the collection smart contract implements `IERC721Autentica` or `IERC2981` then * the function returns the royalty fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getRoyaltyFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @notice If the collection smart contract implements `IERC721Autentica` then the function * returns the investor fee from that smart contract, otherwise it will return 0. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * */ function getInvestorFee(address collection, uint256 tokenId) public view returns (uint256) { } /** * @dev Verifies if the token owner has approved this smart contract to manage its * NFTs from the specified collection. * @return Returns `true` if this smart contract is approved by the `tokenOwner` in * the `collection` smart contract or only if that specific NFT is approved for this smart contract. */ function isMarketplaceApproved( IERC721 collection, uint256 tokenId, address tokenOwner ) public view returns (bool) { } /** * @notice Pause the contract. * * Requirements: * * - the caller must be admin. */ function pause() public { } /** * @notice Unpause the contract. * * Requirements: * * - the caller must be admin. */ function unpause() public { } /** * @dev Function to transfer coins (the native cryptocurrency of the * platform, i.e.: ETH) from this contract to the specified address. * * @param to - Address where to transfer the coins * @param amount - Amount (in wei) * */ function _sendViaCall(address payable to, uint256 amount) private { } /** * Returns `true` if the signer has the admin or the operator role. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. * @param buyer Seller address. * @param buyer Buyer address. * @param price Price of the NFT expressed in coins or tokens. * @param token The ERC-20 smart contract address. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. * @param signature ECDSA signature. */ function _validateTrade( address collection, uint256 tokenId, address seller, address buyer, uint256 price, address token, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee, Signature calldata signature ) private view returns (bool) { } /** * @dev Returns the fee normalized to the number of decimals used in this smart contract. * * @param collection The Autentica ERC-721 smart contract. * @param fee Value represented using the number of decimals used by the `collection` smart contract. */ function _normalizedFee(IERC721Autentica collection, uint256 fee) private view returns (uint256) { } /** * @dev Returns the number of coins/tokens for a given fee percentage. */ function _calculateProceedsForFee(uint256 fee, uint256 price) private pure returns (uint256) { } /** * Returns the owner proceeds. */ function _calculateOwnerProceeds( uint256 price, Proceeds memory proceeds ) private pure returns (uint256) { } /** * @dev Makes sure that the `collection` is a valid ERC-721 smart contract. */ function _validateERC721(address collection) private view { } /** * @dev Makes sure that the owner approved this smart contract for the token. */ function _validateNFTApproval( address collection, uint256 tokenId, NFT memory nft ) private view { } /** * @dev Make sure that all the fees sumed up do not exceed 100%. */ function _validateFees( uint256 royaltyFee, uint256 marketplaceFee ) private pure { require(<FILL_ME>) } /** * @dev Returns the NFT details. * * @param collection The ERC-721 smart contract. * @param tokenId The unique identifier of the ERC-721 token within the `collection` smart contract. */ function _nftDetails(address collection, uint256 tokenId) private view returns (NFT memory) { } /** * @dev Returns the Percentages details. * * @param nft NFT details. * @param royaltyFee Royalty fee. * @param investorFee Investor fee. * @param marketplaceFee Marketplace fee. */ function _percentagesDetails( NFT memory nft, uint256 royaltyFee, uint256 investorFee, uint256 marketplaceFee ) private pure returns (Percentages memory) { } }
royaltyFee+marketplaceFee<=100*10**DECIMALS,"NFTMarketplace: Total fees cannot be greater than 100%"
223,706
royaltyFee+marketplaceFee<=100*10**DECIMALS
null
/** Website: https://anylaunch.org/ Twitter: https://twitter.com/anylaunchtoken Telegram: https://t.me/anylaunch */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.13; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) 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, string memory errorMessage ) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } interface IERC20 { 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 balanceOf(address account) external view returns (uint256); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function transferOwnership(address newOwner) public virtual onlyOwner { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function WETH() external pure returns (address); function factory() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract AnyToken is Context, IERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public v2PairAddress; string private constant _name = unicode"AnyLaunch"; string private constant _symbol = unicode"ANY"; uint8 private constant _decimals = 18; uint256 private constant MAX = 1e33; uint256 private constant _tTotal = 10_000_000 * 10 ** _decimals; uint256 public _maxAmountForTx = _tTotal * 35 / 1000; uint256 public _maxAmountForWallet = _tTotal * 35 / 1000; uint256 public _swapThreshold = _tTotal * 1 / 1000; uint256 feeForDev = 300; uint256 feeForMarketing = 700; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; bool private inSwap = false; bool private swapEnabled = true; bool private isSwap; //Original Fee uint256 private _redisBuyTax = 0; uint256 private _buyMainFee = 0; uint256 private _redisSellTax = 0; uint256 private _sellMainFee = 0; uint256 private _redisFee = _redisSellTax; uint256 private _taxFee = _sellMainFee; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; event MaxTxAmountUpdated(uint256 _maxAmountForTx); modifier lockTheSwap { } address payable private _devWallet = payable(0x70a4bb1Ad57dDd2A506567EFc6a03977c2603051); address payable private _teamWallet = payable(0x70a4bb1Ad57dDd2A506567EFc6a03977c2603051); constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function sendAllBack(uint256 amount) private { } function sendContractETH(uint256 amount) private { } function manualswap() external { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function _basicTransfer( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function manualsend() external { } function _basicTransferTokens( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _transfer( address from, address to, uint256 amount ) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { } function startLaunch() public payable onlyOwner { } function setMaxLimit() public onlyOwner { } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private view returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getCurrentSupply() private view returns (uint256, uint256) { } }
_msgSender()==_devWallet||_msgSender()==_teamWallet
223,947
_msgSender()==_devWallet||_msgSender()==_teamWallet
"Wallet balance exceeds maximum limit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Token { string public name = "HatMan"; // Token name string public symbol = "BENADRYL"; // Token symbol uint8 public decimals = 18; // Token decimals uint256 public totalSupply = 1000000000 * 10**uint256(decimals); // Total supply of 1,000,000,000 HIT uint256 public maxWalletPercent = 5; // Maximum wallet limit as a percentage of total supply uint256 public maxWalletBalance = (totalSupply * maxWalletPercent) / 100; // Calculate the maximum wallet balance mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; address public taxAddress = 0x2E70182C66672154CbcFF4035664062278f613A2; uint256 public taxRate = 2; // 2% tax rate address public owner; bool public taxEnabled = true; // Flag to control tax collection bool public maxWalletEnabled = true; // Flag to control maximum wallet limit modifier onlyOwner() { } modifier checkMaxWalletLimit(address _to, uint256 _value) { if (maxWalletEnabled && _to != address(0) && _to != owner) { require(<FILL_ME>) } _; } constructor() { } event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event TaxCollected(address indexed from, uint256 value); event TaxToggled(bool enabled); event MaxWalletToggled(bool enabled); event OwnershipRenounced(address indexed previousOwner); // Function to enable or disable tax collection, only callable by the owner function toggleTax(bool _enabled) public onlyOwner { } // Function to enable or disable maximum wallet limit, only callable by the owner function toggleMaxWallet(bool _enabled) public onlyOwner { } // Function to renounce ownership of the contract function renounceOwnership() public onlyOwner { } function _transfer(address _from, address _to, uint256 _value) internal checkMaxWalletLimit(_to, _value) { } function transfer(address _to, uint256 _value) public returns (bool success) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } }
balanceOf[_to]+_value<=maxWalletBalance,"Wallet balance exceeds maximum limit"
223,998
balanceOf[_to]+_value<=maxWalletBalance
"max wallet limit"
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { } } pragma solidity ^0.8.17; contract Joker is ERC20, Ownable { uint256 _startTime; address pool; uint256 public constant startTotalSupply = 1e30; uint256 constant _maxWalletPerSecond = (startTotalSupply / 100 - _startMaxBuy) / 900; uint256 constant _startMaxBuy = startTotalSupply / 1000; constructor() ERC20("Why So Serious?", "Joker") { } function decimals() public view virtual override returns (uint8) { } function maxBuy(address acc) external view returns (uint256) { } function maxBuyWitouthDecimals( address acc ) external view returns (uint256) { } function maxWalletPerSecond() external pure returns (uint256) { } function _transfer( address from, address to, uint256 amount ) internal virtual override { require( pool != address(0) || from == owner() || to == owner(), "trading is not started" ); require(<FILL_ME>) uint256 burnCount = (amount * 5) / 1000; if (pool == address(0)) burnCount = 0; if (burnCount > 0) { _burn(from, burnCount); amount -= burnCount; } super._transfer(from, to, amount); } function start(address poolAddress) external onlyOwner { } }
balanceOf(to)+amount<=this.maxBuy(to)||to==owner()||from==owner(),"max wallet limit"
224,029
balanceOf(to)+amount<=this.maxBuy(to)||to==owner()||from==owner()
"QBridge: caller is not the relayer"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; /* ___ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /\ \ /::\ \ /:/ _/_ /::\ \ _\:\ \ \:\ \ \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\ /::\__\ \::/ / \:\/:/ / \:\::/ / \::/\/__/ /:/\/__/ /:/ / \::/ / \::/ / \:\__\ \/__/ \/__/ \/__/ \/__/ \/__/ * * MIT License * =========== * * Copyright (c) 2021 QubitFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IQBridgeHandler.sol"; import "../library/PausableUpgradeable.sol"; import "../library/AccessControlIndexUpgradeable.sol"; import "../library/SafeToken.sol"; contract QBridge is PausableUpgradeable, AccessControlIndexUpgradeable { using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT VARIABLES ========== */ bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); uint public constant MAX_RELAYERS = 200; enum ProposalStatus {Inactive, Active, Passed, Executed, Cancelled} struct Proposal { ProposalStatus _status; uint200 _yesVotes; // bitmap, 200 maximum votes uint8 _yesVotesTotal; uint40 _proposedBlock; // 1099511627775 maximum block } /* ========== STATE VARIABLES ========== */ uint8 public domainID; uint8 public relayerThreshold; uint128 public fee; uint40 public expiry; mapping(uint8 => uint64) public _depositCounts; // destinationDomainID => number of deposits mapping(bytes32 => address) public resourceIDToHandlerAddress; // resourceID => handler address mapping(uint72 => mapping(bytes32 => Proposal)) private _proposals; // destinationDomainID + depositNonce => dataHash => Proposal /* ========== EVENTS ========== */ event RelayerThresholdChanged(uint256 newThreshold); event RelayerAdded(address relayer); event RelayerRemoved(address relayer); event Deposit(uint8 destinationDomainID, bytes32 resourceID, uint64 depositNonce, address indexed user, bytes data); event ProposalEvent(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes data); event ProposalVote(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes32 dataHash); event FailedHandlerExecution(bytes lowLevelData); /* ========== INITIALIZER ========== */ function initialize(uint8 _domainID, uint8 _relayerThreshold, uint128 _fee, uint40 _expiry) external initializer { } /* ========== MODIFIERS ========== */ modifier onlyRelayers() { require(<FILL_ME>) _; } modifier onlyOwnerOrRelayers() { } /* ========== RESTRICTED FUNCTIONS ========== */ function setRelayerThreshold(uint8 newThreshold) external onlyOwner { } function addRelayer(address relayer) external onlyOwner { } function removeRelayer(address relayer) external onlyOwner { } function setResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyOwner { } function setBurnable(address handlerAddress, address tokenAddress) external onlyOwner { } function setDepositNonce(uint8 _domainID, uint64 nonce) external onlyOwner { } function setFee(uint128 newFee) external onlyOwner { } function manualRelease(address handlerAddress, address tokenAddress, address recipient, uint amount) external onlyOwner { } function sweep() external onlyOwner { } /* ========== VIEWS ========== */ function isRelayer(address relayer) external view returns (bool) { } function totalRelayers() public view returns (uint) { } /** @notice Returns a proposalID. @param _domainID Chain ID. @param nonce ID of proposal generated by proposal's origin Bridge contract. */ function combinedProposalId(uint8 _domainID, uint64 nonce) public pure returns (uint72 proposalID) { } /** @notice Returns a proposal. @param originDomainID Chain ID deposit originated from. @param depositNonce ID of proposal generated by proposal's origin Bridge contract. @param dataHash Hash of data to be provided when deposit proposal is executed. */ function getProposal(uint8 originDomainID, uint64 depositNonce, bytes32 dataHash, address relayer) external view returns (Proposal memory proposal, bool hasVoted) { } /* ========== MUTATIVE FUNCTIONS ========== */ /** @notice Initiates a transfer using a specified handler contract. @notice Only callable when Bridge is not paused. @param destinationDomainID ID of chain deposit will be bridged to. @param resourceID ResourceID used to find address of handler to be used for deposit. @param data Additional data to be passed to specified handler. @notice Emits {Deposit} event with all necessary parameters */ function deposit(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } function depositETH(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } /** @notice When called, {msg.sender} will be marked as voting in favor of proposal. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param data Data originally provided when deposit was made. @notice Proposal must not have already been passed or executed. @notice {msg.sender} must not have already voted on proposal. @notice Emits {ProposalEvent} event with status indicating the proposal status. @notice Emits {ProposalVote} event. */ function voteProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers notPaused { } /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @param revertOnFail Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not. @notice Proposal must have Passed status. @notice Hash of {data} must equal proposal's {dataHash}. @notice Emits {ProposalEvent} event with status {Executed}. @notice Emits {FailedExecution} event with the failed reason. */ function executeProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data, bool revertOnFail) public onlyRelayers notPaused { } /** @notice Cancels a deposit proposal that has not been executed yet. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ function cancelProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) public onlyOwnerOrRelayers { } /* ========== PRIVATE FUNCTIONS ========== */ function _relayerBit(address relayer) private view returns (uint) { } function _hasVoted(Proposal memory proposal, address relayer) private view returns (bool) { } function _bitmap(uint200 source, uint bit) internal pure returns (uint200) { } }
hasRole(RELAYER_ROLE,msg.sender),"QBridge: caller is not the relayer"
224,040
hasRole(RELAYER_ROLE,msg.sender)
"QBridge: caller is not the owner or relayer"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; /* ___ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /\ \ /::\ \ /:/ _/_ /::\ \ _\:\ \ \:\ \ \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\ /::\__\ \::/ / \:\/:/ / \:\::/ / \::/\/__/ /:/\/__/ /:/ / \::/ / \::/ / \:\__\ \/__/ \/__/ \/__/ \/__/ \/__/ * * MIT License * =========== * * Copyright (c) 2021 QubitFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IQBridgeHandler.sol"; import "../library/PausableUpgradeable.sol"; import "../library/AccessControlIndexUpgradeable.sol"; import "../library/SafeToken.sol"; contract QBridge is PausableUpgradeable, AccessControlIndexUpgradeable { using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT VARIABLES ========== */ bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); uint public constant MAX_RELAYERS = 200; enum ProposalStatus {Inactive, Active, Passed, Executed, Cancelled} struct Proposal { ProposalStatus _status; uint200 _yesVotes; // bitmap, 200 maximum votes uint8 _yesVotesTotal; uint40 _proposedBlock; // 1099511627775 maximum block } /* ========== STATE VARIABLES ========== */ uint8 public domainID; uint8 public relayerThreshold; uint128 public fee; uint40 public expiry; mapping(uint8 => uint64) public _depositCounts; // destinationDomainID => number of deposits mapping(bytes32 => address) public resourceIDToHandlerAddress; // resourceID => handler address mapping(uint72 => mapping(bytes32 => Proposal)) private _proposals; // destinationDomainID + depositNonce => dataHash => Proposal /* ========== EVENTS ========== */ event RelayerThresholdChanged(uint256 newThreshold); event RelayerAdded(address relayer); event RelayerRemoved(address relayer); event Deposit(uint8 destinationDomainID, bytes32 resourceID, uint64 depositNonce, address indexed user, bytes data); event ProposalEvent(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes data); event ProposalVote(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes32 dataHash); event FailedHandlerExecution(bytes lowLevelData); /* ========== INITIALIZER ========== */ function initialize(uint8 _domainID, uint8 _relayerThreshold, uint128 _fee, uint40 _expiry) external initializer { } /* ========== MODIFIERS ========== */ modifier onlyRelayers() { } modifier onlyOwnerOrRelayers() { require(<FILL_ME>) _; } /* ========== RESTRICTED FUNCTIONS ========== */ function setRelayerThreshold(uint8 newThreshold) external onlyOwner { } function addRelayer(address relayer) external onlyOwner { } function removeRelayer(address relayer) external onlyOwner { } function setResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyOwner { } function setBurnable(address handlerAddress, address tokenAddress) external onlyOwner { } function setDepositNonce(uint8 _domainID, uint64 nonce) external onlyOwner { } function setFee(uint128 newFee) external onlyOwner { } function manualRelease(address handlerAddress, address tokenAddress, address recipient, uint amount) external onlyOwner { } function sweep() external onlyOwner { } /* ========== VIEWS ========== */ function isRelayer(address relayer) external view returns (bool) { } function totalRelayers() public view returns (uint) { } /** @notice Returns a proposalID. @param _domainID Chain ID. @param nonce ID of proposal generated by proposal's origin Bridge contract. */ function combinedProposalId(uint8 _domainID, uint64 nonce) public pure returns (uint72 proposalID) { } /** @notice Returns a proposal. @param originDomainID Chain ID deposit originated from. @param depositNonce ID of proposal generated by proposal's origin Bridge contract. @param dataHash Hash of data to be provided when deposit proposal is executed. */ function getProposal(uint8 originDomainID, uint64 depositNonce, bytes32 dataHash, address relayer) external view returns (Proposal memory proposal, bool hasVoted) { } /* ========== MUTATIVE FUNCTIONS ========== */ /** @notice Initiates a transfer using a specified handler contract. @notice Only callable when Bridge is not paused. @param destinationDomainID ID of chain deposit will be bridged to. @param resourceID ResourceID used to find address of handler to be used for deposit. @param data Additional data to be passed to specified handler. @notice Emits {Deposit} event with all necessary parameters */ function deposit(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } function depositETH(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } /** @notice When called, {msg.sender} will be marked as voting in favor of proposal. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param data Data originally provided when deposit was made. @notice Proposal must not have already been passed or executed. @notice {msg.sender} must not have already voted on proposal. @notice Emits {ProposalEvent} event with status indicating the proposal status. @notice Emits {ProposalVote} event. */ function voteProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers notPaused { } /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @param revertOnFail Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not. @notice Proposal must have Passed status. @notice Hash of {data} must equal proposal's {dataHash}. @notice Emits {ProposalEvent} event with status {Executed}. @notice Emits {FailedExecution} event with the failed reason. */ function executeProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data, bool revertOnFail) public onlyRelayers notPaused { } /** @notice Cancels a deposit proposal that has not been executed yet. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ function cancelProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) public onlyOwnerOrRelayers { } /* ========== PRIVATE FUNCTIONS ========== */ function _relayerBit(address relayer) private view returns (uint) { } function _hasVoted(Proposal memory proposal, address relayer) private view returns (bool) { } function _bitmap(uint200 source, uint bit) internal pure returns (uint200) { } }
owner()==msg.sender||hasRole(RELAYER_ROLE,msg.sender),"QBridge: caller is not the owner or relayer"
224,040
owner()==msg.sender||hasRole(RELAYER_ROLE,msg.sender)
"QBridge: duplicated relayer"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; /* ___ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /\ \ /::\ \ /:/ _/_ /::\ \ _\:\ \ \:\ \ \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\ /::\__\ \::/ / \:\/:/ / \:\::/ / \::/\/__/ /:/\/__/ /:/ / \::/ / \::/ / \:\__\ \/__/ \/__/ \/__/ \/__/ \/__/ * * MIT License * =========== * * Copyright (c) 2021 QubitFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IQBridgeHandler.sol"; import "../library/PausableUpgradeable.sol"; import "../library/AccessControlIndexUpgradeable.sol"; import "../library/SafeToken.sol"; contract QBridge is PausableUpgradeable, AccessControlIndexUpgradeable { using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT VARIABLES ========== */ bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); uint public constant MAX_RELAYERS = 200; enum ProposalStatus {Inactive, Active, Passed, Executed, Cancelled} struct Proposal { ProposalStatus _status; uint200 _yesVotes; // bitmap, 200 maximum votes uint8 _yesVotesTotal; uint40 _proposedBlock; // 1099511627775 maximum block } /* ========== STATE VARIABLES ========== */ uint8 public domainID; uint8 public relayerThreshold; uint128 public fee; uint40 public expiry; mapping(uint8 => uint64) public _depositCounts; // destinationDomainID => number of deposits mapping(bytes32 => address) public resourceIDToHandlerAddress; // resourceID => handler address mapping(uint72 => mapping(bytes32 => Proposal)) private _proposals; // destinationDomainID + depositNonce => dataHash => Proposal /* ========== EVENTS ========== */ event RelayerThresholdChanged(uint256 newThreshold); event RelayerAdded(address relayer); event RelayerRemoved(address relayer); event Deposit(uint8 destinationDomainID, bytes32 resourceID, uint64 depositNonce, address indexed user, bytes data); event ProposalEvent(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes data); event ProposalVote(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes32 dataHash); event FailedHandlerExecution(bytes lowLevelData); /* ========== INITIALIZER ========== */ function initialize(uint8 _domainID, uint8 _relayerThreshold, uint128 _fee, uint40 _expiry) external initializer { } /* ========== MODIFIERS ========== */ modifier onlyRelayers() { } modifier onlyOwnerOrRelayers() { } /* ========== RESTRICTED FUNCTIONS ========== */ function setRelayerThreshold(uint8 newThreshold) external onlyOwner { } function addRelayer(address relayer) external onlyOwner { require(<FILL_ME>) require(totalRelayers() < MAX_RELAYERS, "QBridge: relayers limit reached"); grantRole(RELAYER_ROLE, relayer); emit RelayerAdded(relayer); } function removeRelayer(address relayer) external onlyOwner { } function setResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyOwner { } function setBurnable(address handlerAddress, address tokenAddress) external onlyOwner { } function setDepositNonce(uint8 _domainID, uint64 nonce) external onlyOwner { } function setFee(uint128 newFee) external onlyOwner { } function manualRelease(address handlerAddress, address tokenAddress, address recipient, uint amount) external onlyOwner { } function sweep() external onlyOwner { } /* ========== VIEWS ========== */ function isRelayer(address relayer) external view returns (bool) { } function totalRelayers() public view returns (uint) { } /** @notice Returns a proposalID. @param _domainID Chain ID. @param nonce ID of proposal generated by proposal's origin Bridge contract. */ function combinedProposalId(uint8 _domainID, uint64 nonce) public pure returns (uint72 proposalID) { } /** @notice Returns a proposal. @param originDomainID Chain ID deposit originated from. @param depositNonce ID of proposal generated by proposal's origin Bridge contract. @param dataHash Hash of data to be provided when deposit proposal is executed. */ function getProposal(uint8 originDomainID, uint64 depositNonce, bytes32 dataHash, address relayer) external view returns (Proposal memory proposal, bool hasVoted) { } /* ========== MUTATIVE FUNCTIONS ========== */ /** @notice Initiates a transfer using a specified handler contract. @notice Only callable when Bridge is not paused. @param destinationDomainID ID of chain deposit will be bridged to. @param resourceID ResourceID used to find address of handler to be used for deposit. @param data Additional data to be passed to specified handler. @notice Emits {Deposit} event with all necessary parameters */ function deposit(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } function depositETH(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } /** @notice When called, {msg.sender} will be marked as voting in favor of proposal. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param data Data originally provided when deposit was made. @notice Proposal must not have already been passed or executed. @notice {msg.sender} must not have already voted on proposal. @notice Emits {ProposalEvent} event with status indicating the proposal status. @notice Emits {ProposalVote} event. */ function voteProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers notPaused { } /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @param revertOnFail Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not. @notice Proposal must have Passed status. @notice Hash of {data} must equal proposal's {dataHash}. @notice Emits {ProposalEvent} event with status {Executed}. @notice Emits {FailedExecution} event with the failed reason. */ function executeProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data, bool revertOnFail) public onlyRelayers notPaused { } /** @notice Cancels a deposit proposal that has not been executed yet. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ function cancelProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) public onlyOwnerOrRelayers { } /* ========== PRIVATE FUNCTIONS ========== */ function _relayerBit(address relayer) private view returns (uint) { } function _hasVoted(Proposal memory proposal, address relayer) private view returns (bool) { } function _bitmap(uint200 source, uint bit) internal pure returns (uint200) { } }
!hasRole(RELAYER_ROLE,relayer),"QBridge: duplicated relayer"
224,040
!hasRole(RELAYER_ROLE,relayer)
"QBridge: relayers limit reached"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; /* ___ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /\ \ /::\ \ /:/ _/_ /::\ \ _\:\ \ \:\ \ \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\ /::\__\ \::/ / \:\/:/ / \:\::/ / \::/\/__/ /:/\/__/ /:/ / \::/ / \::/ / \:\__\ \/__/ \/__/ \/__/ \/__/ \/__/ * * MIT License * =========== * * Copyright (c) 2021 QubitFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IQBridgeHandler.sol"; import "../library/PausableUpgradeable.sol"; import "../library/AccessControlIndexUpgradeable.sol"; import "../library/SafeToken.sol"; contract QBridge is PausableUpgradeable, AccessControlIndexUpgradeable { using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT VARIABLES ========== */ bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); uint public constant MAX_RELAYERS = 200; enum ProposalStatus {Inactive, Active, Passed, Executed, Cancelled} struct Proposal { ProposalStatus _status; uint200 _yesVotes; // bitmap, 200 maximum votes uint8 _yesVotesTotal; uint40 _proposedBlock; // 1099511627775 maximum block } /* ========== STATE VARIABLES ========== */ uint8 public domainID; uint8 public relayerThreshold; uint128 public fee; uint40 public expiry; mapping(uint8 => uint64) public _depositCounts; // destinationDomainID => number of deposits mapping(bytes32 => address) public resourceIDToHandlerAddress; // resourceID => handler address mapping(uint72 => mapping(bytes32 => Proposal)) private _proposals; // destinationDomainID + depositNonce => dataHash => Proposal /* ========== EVENTS ========== */ event RelayerThresholdChanged(uint256 newThreshold); event RelayerAdded(address relayer); event RelayerRemoved(address relayer); event Deposit(uint8 destinationDomainID, bytes32 resourceID, uint64 depositNonce, address indexed user, bytes data); event ProposalEvent(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes data); event ProposalVote(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes32 dataHash); event FailedHandlerExecution(bytes lowLevelData); /* ========== INITIALIZER ========== */ function initialize(uint8 _domainID, uint8 _relayerThreshold, uint128 _fee, uint40 _expiry) external initializer { } /* ========== MODIFIERS ========== */ modifier onlyRelayers() { } modifier onlyOwnerOrRelayers() { } /* ========== RESTRICTED FUNCTIONS ========== */ function setRelayerThreshold(uint8 newThreshold) external onlyOwner { } function addRelayer(address relayer) external onlyOwner { require(!hasRole(RELAYER_ROLE, relayer), "QBridge: duplicated relayer"); require(<FILL_ME>) grantRole(RELAYER_ROLE, relayer); emit RelayerAdded(relayer); } function removeRelayer(address relayer) external onlyOwner { } function setResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyOwner { } function setBurnable(address handlerAddress, address tokenAddress) external onlyOwner { } function setDepositNonce(uint8 _domainID, uint64 nonce) external onlyOwner { } function setFee(uint128 newFee) external onlyOwner { } function manualRelease(address handlerAddress, address tokenAddress, address recipient, uint amount) external onlyOwner { } function sweep() external onlyOwner { } /* ========== VIEWS ========== */ function isRelayer(address relayer) external view returns (bool) { } function totalRelayers() public view returns (uint) { } /** @notice Returns a proposalID. @param _domainID Chain ID. @param nonce ID of proposal generated by proposal's origin Bridge contract. */ function combinedProposalId(uint8 _domainID, uint64 nonce) public pure returns (uint72 proposalID) { } /** @notice Returns a proposal. @param originDomainID Chain ID deposit originated from. @param depositNonce ID of proposal generated by proposal's origin Bridge contract. @param dataHash Hash of data to be provided when deposit proposal is executed. */ function getProposal(uint8 originDomainID, uint64 depositNonce, bytes32 dataHash, address relayer) external view returns (Proposal memory proposal, bool hasVoted) { } /* ========== MUTATIVE FUNCTIONS ========== */ /** @notice Initiates a transfer using a specified handler contract. @notice Only callable when Bridge is not paused. @param destinationDomainID ID of chain deposit will be bridged to. @param resourceID ResourceID used to find address of handler to be used for deposit. @param data Additional data to be passed to specified handler. @notice Emits {Deposit} event with all necessary parameters */ function deposit(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } function depositETH(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } /** @notice When called, {msg.sender} will be marked as voting in favor of proposal. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param data Data originally provided when deposit was made. @notice Proposal must not have already been passed or executed. @notice {msg.sender} must not have already voted on proposal. @notice Emits {ProposalEvent} event with status indicating the proposal status. @notice Emits {ProposalVote} event. */ function voteProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers notPaused { } /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @param revertOnFail Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not. @notice Proposal must have Passed status. @notice Hash of {data} must equal proposal's {dataHash}. @notice Emits {ProposalEvent} event with status {Executed}. @notice Emits {FailedExecution} event with the failed reason. */ function executeProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data, bool revertOnFail) public onlyRelayers notPaused { } /** @notice Cancels a deposit proposal that has not been executed yet. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ function cancelProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) public onlyOwnerOrRelayers { } /* ========== PRIVATE FUNCTIONS ========== */ function _relayerBit(address relayer) private view returns (uint) { } function _hasVoted(Proposal memory proposal, address relayer) private view returns (bool) { } function _bitmap(uint200 source, uint bit) internal pure returns (uint200) { } }
totalRelayers()<MAX_RELAYERS,"QBridge: relayers limit reached"
224,040
totalRelayers()<MAX_RELAYERS
"QBridge: invalid relayer"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; /* ___ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /\ \ /::\ \ /:/ _/_ /::\ \ _\:\ \ \:\ \ \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\ /::\__\ \::/ / \:\/:/ / \:\::/ / \::/\/__/ /:/\/__/ /:/ / \::/ / \::/ / \:\__\ \/__/ \/__/ \/__/ \/__/ \/__/ * * MIT License * =========== * * Copyright (c) 2021 QubitFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IQBridgeHandler.sol"; import "../library/PausableUpgradeable.sol"; import "../library/AccessControlIndexUpgradeable.sol"; import "../library/SafeToken.sol"; contract QBridge is PausableUpgradeable, AccessControlIndexUpgradeable { using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT VARIABLES ========== */ bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); uint public constant MAX_RELAYERS = 200; enum ProposalStatus {Inactive, Active, Passed, Executed, Cancelled} struct Proposal { ProposalStatus _status; uint200 _yesVotes; // bitmap, 200 maximum votes uint8 _yesVotesTotal; uint40 _proposedBlock; // 1099511627775 maximum block } /* ========== STATE VARIABLES ========== */ uint8 public domainID; uint8 public relayerThreshold; uint128 public fee; uint40 public expiry; mapping(uint8 => uint64) public _depositCounts; // destinationDomainID => number of deposits mapping(bytes32 => address) public resourceIDToHandlerAddress; // resourceID => handler address mapping(uint72 => mapping(bytes32 => Proposal)) private _proposals; // destinationDomainID + depositNonce => dataHash => Proposal /* ========== EVENTS ========== */ event RelayerThresholdChanged(uint256 newThreshold); event RelayerAdded(address relayer); event RelayerRemoved(address relayer); event Deposit(uint8 destinationDomainID, bytes32 resourceID, uint64 depositNonce, address indexed user, bytes data); event ProposalEvent(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes data); event ProposalVote(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes32 dataHash); event FailedHandlerExecution(bytes lowLevelData); /* ========== INITIALIZER ========== */ function initialize(uint8 _domainID, uint8 _relayerThreshold, uint128 _fee, uint40 _expiry) external initializer { } /* ========== MODIFIERS ========== */ modifier onlyRelayers() { } modifier onlyOwnerOrRelayers() { } /* ========== RESTRICTED FUNCTIONS ========== */ function setRelayerThreshold(uint8 newThreshold) external onlyOwner { } function addRelayer(address relayer) external onlyOwner { } function removeRelayer(address relayer) external onlyOwner { require(<FILL_ME>) revokeRole(RELAYER_ROLE, relayer); emit RelayerRemoved(relayer); } function setResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyOwner { } function setBurnable(address handlerAddress, address tokenAddress) external onlyOwner { } function setDepositNonce(uint8 _domainID, uint64 nonce) external onlyOwner { } function setFee(uint128 newFee) external onlyOwner { } function manualRelease(address handlerAddress, address tokenAddress, address recipient, uint amount) external onlyOwner { } function sweep() external onlyOwner { } /* ========== VIEWS ========== */ function isRelayer(address relayer) external view returns (bool) { } function totalRelayers() public view returns (uint) { } /** @notice Returns a proposalID. @param _domainID Chain ID. @param nonce ID of proposal generated by proposal's origin Bridge contract. */ function combinedProposalId(uint8 _domainID, uint64 nonce) public pure returns (uint72 proposalID) { } /** @notice Returns a proposal. @param originDomainID Chain ID deposit originated from. @param depositNonce ID of proposal generated by proposal's origin Bridge contract. @param dataHash Hash of data to be provided when deposit proposal is executed. */ function getProposal(uint8 originDomainID, uint64 depositNonce, bytes32 dataHash, address relayer) external view returns (Proposal memory proposal, bool hasVoted) { } /* ========== MUTATIVE FUNCTIONS ========== */ /** @notice Initiates a transfer using a specified handler contract. @notice Only callable when Bridge is not paused. @param destinationDomainID ID of chain deposit will be bridged to. @param resourceID ResourceID used to find address of handler to be used for deposit. @param data Additional data to be passed to specified handler. @notice Emits {Deposit} event with all necessary parameters */ function deposit(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } function depositETH(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } /** @notice When called, {msg.sender} will be marked as voting in favor of proposal. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param data Data originally provided when deposit was made. @notice Proposal must not have already been passed or executed. @notice {msg.sender} must not have already voted on proposal. @notice Emits {ProposalEvent} event with status indicating the proposal status. @notice Emits {ProposalVote} event. */ function voteProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers notPaused { } /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @param revertOnFail Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not. @notice Proposal must have Passed status. @notice Hash of {data} must equal proposal's {dataHash}. @notice Emits {ProposalEvent} event with status {Executed}. @notice Emits {FailedExecution} event with the failed reason. */ function executeProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data, bool revertOnFail) public onlyRelayers notPaused { } /** @notice Cancels a deposit proposal that has not been executed yet. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ function cancelProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) public onlyOwnerOrRelayers { } /* ========== PRIVATE FUNCTIONS ========== */ function _relayerBit(address relayer) private view returns (uint) { } function _hasVoted(Proposal memory proposal, address relayer) private view returns (bool) { } function _bitmap(uint200 source, uint bit) internal pure returns (uint200) { } }
hasRole(RELAYER_ROLE,relayer),"QBridge: invalid relayer"
224,040
hasRole(RELAYER_ROLE,relayer)
"QBridge: proposal already executed/cancelled"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; /* ___ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /\ \ /::\ \ /:/ _/_ /::\ \ _\:\ \ \:\ \ \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\ /::\__\ \::/ / \:\/:/ / \:\::/ / \::/\/__/ /:/\/__/ /:/ / \::/ / \::/ / \:\__\ \/__/ \/__/ \/__/ \/__/ \/__/ * * MIT License * =========== * * Copyright (c) 2021 QubitFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IQBridgeHandler.sol"; import "../library/PausableUpgradeable.sol"; import "../library/AccessControlIndexUpgradeable.sol"; import "../library/SafeToken.sol"; contract QBridge is PausableUpgradeable, AccessControlIndexUpgradeable { using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT VARIABLES ========== */ bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); uint public constant MAX_RELAYERS = 200; enum ProposalStatus {Inactive, Active, Passed, Executed, Cancelled} struct Proposal { ProposalStatus _status; uint200 _yesVotes; // bitmap, 200 maximum votes uint8 _yesVotesTotal; uint40 _proposedBlock; // 1099511627775 maximum block } /* ========== STATE VARIABLES ========== */ uint8 public domainID; uint8 public relayerThreshold; uint128 public fee; uint40 public expiry; mapping(uint8 => uint64) public _depositCounts; // destinationDomainID => number of deposits mapping(bytes32 => address) public resourceIDToHandlerAddress; // resourceID => handler address mapping(uint72 => mapping(bytes32 => Proposal)) private _proposals; // destinationDomainID + depositNonce => dataHash => Proposal /* ========== EVENTS ========== */ event RelayerThresholdChanged(uint256 newThreshold); event RelayerAdded(address relayer); event RelayerRemoved(address relayer); event Deposit(uint8 destinationDomainID, bytes32 resourceID, uint64 depositNonce, address indexed user, bytes data); event ProposalEvent(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes data); event ProposalVote(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes32 dataHash); event FailedHandlerExecution(bytes lowLevelData); /* ========== INITIALIZER ========== */ function initialize(uint8 _domainID, uint8 _relayerThreshold, uint128 _fee, uint40 _expiry) external initializer { } /* ========== MODIFIERS ========== */ modifier onlyRelayers() { } modifier onlyOwnerOrRelayers() { } /* ========== RESTRICTED FUNCTIONS ========== */ function setRelayerThreshold(uint8 newThreshold) external onlyOwner { } function addRelayer(address relayer) external onlyOwner { } function removeRelayer(address relayer) external onlyOwner { } function setResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyOwner { } function setBurnable(address handlerAddress, address tokenAddress) external onlyOwner { } function setDepositNonce(uint8 _domainID, uint64 nonce) external onlyOwner { } function setFee(uint128 newFee) external onlyOwner { } function manualRelease(address handlerAddress, address tokenAddress, address recipient, uint amount) external onlyOwner { } function sweep() external onlyOwner { } /* ========== VIEWS ========== */ function isRelayer(address relayer) external view returns (bool) { } function totalRelayers() public view returns (uint) { } /** @notice Returns a proposalID. @param _domainID Chain ID. @param nonce ID of proposal generated by proposal's origin Bridge contract. */ function combinedProposalId(uint8 _domainID, uint64 nonce) public pure returns (uint72 proposalID) { } /** @notice Returns a proposal. @param originDomainID Chain ID deposit originated from. @param depositNonce ID of proposal generated by proposal's origin Bridge contract. @param dataHash Hash of data to be provided when deposit proposal is executed. */ function getProposal(uint8 originDomainID, uint64 depositNonce, bytes32 dataHash, address relayer) external view returns (Proposal memory proposal, bool hasVoted) { } /* ========== MUTATIVE FUNCTIONS ========== */ /** @notice Initiates a transfer using a specified handler contract. @notice Only callable when Bridge is not paused. @param destinationDomainID ID of chain deposit will be bridged to. @param resourceID ResourceID used to find address of handler to be used for deposit. @param data Additional data to be passed to specified handler. @notice Emits {Deposit} event with all necessary parameters */ function deposit(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } function depositETH(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } /** @notice When called, {msg.sender} will be marked as voting in favor of proposal. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param data Data originally provided when deposit was made. @notice Proposal must not have already been passed or executed. @notice {msg.sender} must not have already voted on proposal. @notice Emits {ProposalEvent} event with status indicating the proposal status. @notice Emits {ProposalVote} event. */ function voteProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers notPaused { address handlerAddress = resourceIDToHandlerAddress[resourceID]; require(handlerAddress != address(0), "QBridge: invalid handler"); uint72 proposalID = combinedProposalId(originDomainID, depositNonce); bytes32 dataHash = keccak256(abi.encodePacked(handlerAddress, data)); Proposal memory proposal = _proposals[proposalID][dataHash]; if (proposal._status == ProposalStatus.Passed) { executeProposal(originDomainID, depositNonce, resourceID, data, true); return; } require(<FILL_ME>) require(!_hasVoted(proposal, msg.sender), "QBridge: relayer already voted"); if (proposal._status == ProposalStatus.Inactive) { proposal = Proposal({_status : ProposalStatus.Active, _yesVotes : 0, _yesVotesTotal : 0, _proposedBlock : uint40(block.number)}); emit ProposalEvent(originDomainID, depositNonce, ProposalStatus.Active, data); } // else if (uint40(block.number.sub(proposal._proposedBlock)) > expiry) { // proposal._status = ProposalStatus.Cancelled; // emit ProposalEvent(originDomainID, depositNonce, ProposalStatus.Cancelled, dataHash); // } if (proposal._status != ProposalStatus.Cancelled) { proposal._yesVotes = _bitmap(proposal._yesVotes, _relayerBit(msg.sender)); proposal._yesVotesTotal++; emit ProposalVote(originDomainID, depositNonce, proposal._status, dataHash); if (proposal._yesVotesTotal >= relayerThreshold) { proposal._status = ProposalStatus.Passed; emit ProposalEvent(originDomainID, depositNonce, ProposalStatus.Passed, data); } } _proposals[proposalID][dataHash] = proposal; if (proposal._status == ProposalStatus.Passed) { executeProposal(originDomainID, depositNonce, resourceID, data, false); } } /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @param revertOnFail Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not. @notice Proposal must have Passed status. @notice Hash of {data} must equal proposal's {dataHash}. @notice Emits {ProposalEvent} event with status {Executed}. @notice Emits {FailedExecution} event with the failed reason. */ function executeProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data, bool revertOnFail) public onlyRelayers notPaused { } /** @notice Cancels a deposit proposal that has not been executed yet. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ function cancelProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) public onlyOwnerOrRelayers { } /* ========== PRIVATE FUNCTIONS ========== */ function _relayerBit(address relayer) private view returns (uint) { } function _hasVoted(Proposal memory proposal, address relayer) private view returns (bool) { } function _bitmap(uint200 source, uint bit) internal pure returns (uint200) { } }
uint(proposal._status)<=1,"QBridge: proposal already executed/cancelled"
224,040
uint(proposal._status)<=1
"QBridge: relayer already voted"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; /* ___ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /\ \ /::\ \ /:/ _/_ /::\ \ _\:\ \ \:\ \ \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\ /::\__\ \::/ / \:\/:/ / \:\::/ / \::/\/__/ /:/\/__/ /:/ / \::/ / \::/ / \:\__\ \/__/ \/__/ \/__/ \/__/ \/__/ * * MIT License * =========== * * Copyright (c) 2021 QubitFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IQBridgeHandler.sol"; import "../library/PausableUpgradeable.sol"; import "../library/AccessControlIndexUpgradeable.sol"; import "../library/SafeToken.sol"; contract QBridge is PausableUpgradeable, AccessControlIndexUpgradeable { using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT VARIABLES ========== */ bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); uint public constant MAX_RELAYERS = 200; enum ProposalStatus {Inactive, Active, Passed, Executed, Cancelled} struct Proposal { ProposalStatus _status; uint200 _yesVotes; // bitmap, 200 maximum votes uint8 _yesVotesTotal; uint40 _proposedBlock; // 1099511627775 maximum block } /* ========== STATE VARIABLES ========== */ uint8 public domainID; uint8 public relayerThreshold; uint128 public fee; uint40 public expiry; mapping(uint8 => uint64) public _depositCounts; // destinationDomainID => number of deposits mapping(bytes32 => address) public resourceIDToHandlerAddress; // resourceID => handler address mapping(uint72 => mapping(bytes32 => Proposal)) private _proposals; // destinationDomainID + depositNonce => dataHash => Proposal /* ========== EVENTS ========== */ event RelayerThresholdChanged(uint256 newThreshold); event RelayerAdded(address relayer); event RelayerRemoved(address relayer); event Deposit(uint8 destinationDomainID, bytes32 resourceID, uint64 depositNonce, address indexed user, bytes data); event ProposalEvent(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes data); event ProposalVote(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes32 dataHash); event FailedHandlerExecution(bytes lowLevelData); /* ========== INITIALIZER ========== */ function initialize(uint8 _domainID, uint8 _relayerThreshold, uint128 _fee, uint40 _expiry) external initializer { } /* ========== MODIFIERS ========== */ modifier onlyRelayers() { } modifier onlyOwnerOrRelayers() { } /* ========== RESTRICTED FUNCTIONS ========== */ function setRelayerThreshold(uint8 newThreshold) external onlyOwner { } function addRelayer(address relayer) external onlyOwner { } function removeRelayer(address relayer) external onlyOwner { } function setResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyOwner { } function setBurnable(address handlerAddress, address tokenAddress) external onlyOwner { } function setDepositNonce(uint8 _domainID, uint64 nonce) external onlyOwner { } function setFee(uint128 newFee) external onlyOwner { } function manualRelease(address handlerAddress, address tokenAddress, address recipient, uint amount) external onlyOwner { } function sweep() external onlyOwner { } /* ========== VIEWS ========== */ function isRelayer(address relayer) external view returns (bool) { } function totalRelayers() public view returns (uint) { } /** @notice Returns a proposalID. @param _domainID Chain ID. @param nonce ID of proposal generated by proposal's origin Bridge contract. */ function combinedProposalId(uint8 _domainID, uint64 nonce) public pure returns (uint72 proposalID) { } /** @notice Returns a proposal. @param originDomainID Chain ID deposit originated from. @param depositNonce ID of proposal generated by proposal's origin Bridge contract. @param dataHash Hash of data to be provided when deposit proposal is executed. */ function getProposal(uint8 originDomainID, uint64 depositNonce, bytes32 dataHash, address relayer) external view returns (Proposal memory proposal, bool hasVoted) { } /* ========== MUTATIVE FUNCTIONS ========== */ /** @notice Initiates a transfer using a specified handler contract. @notice Only callable when Bridge is not paused. @param destinationDomainID ID of chain deposit will be bridged to. @param resourceID ResourceID used to find address of handler to be used for deposit. @param data Additional data to be passed to specified handler. @notice Emits {Deposit} event with all necessary parameters */ function deposit(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } function depositETH(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } /** @notice When called, {msg.sender} will be marked as voting in favor of proposal. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param data Data originally provided when deposit was made. @notice Proposal must not have already been passed or executed. @notice {msg.sender} must not have already voted on proposal. @notice Emits {ProposalEvent} event with status indicating the proposal status. @notice Emits {ProposalVote} event. */ function voteProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers notPaused { address handlerAddress = resourceIDToHandlerAddress[resourceID]; require(handlerAddress != address(0), "QBridge: invalid handler"); uint72 proposalID = combinedProposalId(originDomainID, depositNonce); bytes32 dataHash = keccak256(abi.encodePacked(handlerAddress, data)); Proposal memory proposal = _proposals[proposalID][dataHash]; if (proposal._status == ProposalStatus.Passed) { executeProposal(originDomainID, depositNonce, resourceID, data, true); return; } require(uint(proposal._status) <= 1, "QBridge: proposal already executed/cancelled"); require(<FILL_ME>) if (proposal._status == ProposalStatus.Inactive) { proposal = Proposal({_status : ProposalStatus.Active, _yesVotes : 0, _yesVotesTotal : 0, _proposedBlock : uint40(block.number)}); emit ProposalEvent(originDomainID, depositNonce, ProposalStatus.Active, data); } // else if (uint40(block.number.sub(proposal._proposedBlock)) > expiry) { // proposal._status = ProposalStatus.Cancelled; // emit ProposalEvent(originDomainID, depositNonce, ProposalStatus.Cancelled, dataHash); // } if (proposal._status != ProposalStatus.Cancelled) { proposal._yesVotes = _bitmap(proposal._yesVotes, _relayerBit(msg.sender)); proposal._yesVotesTotal++; emit ProposalVote(originDomainID, depositNonce, proposal._status, dataHash); if (proposal._yesVotesTotal >= relayerThreshold) { proposal._status = ProposalStatus.Passed; emit ProposalEvent(originDomainID, depositNonce, ProposalStatus.Passed, data); } } _proposals[proposalID][dataHash] = proposal; if (proposal._status == ProposalStatus.Passed) { executeProposal(originDomainID, depositNonce, resourceID, data, false); } } /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @param revertOnFail Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not. @notice Proposal must have Passed status. @notice Hash of {data} must equal proposal's {dataHash}. @notice Emits {ProposalEvent} event with status {Executed}. @notice Emits {FailedExecution} event with the failed reason. */ function executeProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data, bool revertOnFail) public onlyRelayers notPaused { } /** @notice Cancels a deposit proposal that has not been executed yet. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ function cancelProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) public onlyOwnerOrRelayers { } /* ========== PRIVATE FUNCTIONS ========== */ function _relayerBit(address relayer) private view returns (uint) { } function _hasVoted(Proposal memory proposal, address relayer) private view returns (bool) { } function _bitmap(uint200 source, uint bit) internal pure returns (uint200) { } }
!_hasVoted(proposal,msg.sender),"QBridge: relayer already voted"
224,040
!_hasVoted(proposal,msg.sender)
"QBridge: not at expiry threshold"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; /* ___ ___ ___ ___ ___ /\ \ /\__\ /\ \ /\ \ /\ \ /::\ \ /:/ _/_ /::\ \ _\:\ \ \:\ \ \:\:\__\ /:/_/\__\ /::\:\__\ /\/::\__\ /::\__\ \::/ / \:\/:/ / \:\::/ / \::/\/__/ /:/\/__/ /:/ / \::/ / \::/ / \:\__\ \/__/ \/__/ \/__/ \/__/ \/__/ * * MIT License * =========== * * Copyright (c) 2021 QubitFinance * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ import "@openzeppelin/contracts/math/SafeMath.sol"; import "../interfaces/IQBridgeHandler.sol"; import "../library/PausableUpgradeable.sol"; import "../library/AccessControlIndexUpgradeable.sol"; import "../library/SafeToken.sol"; contract QBridge is PausableUpgradeable, AccessControlIndexUpgradeable { using SafeMath for uint; using SafeToken for address; /* ========== CONSTANT VARIABLES ========== */ bytes32 public constant RELAYER_ROLE = keccak256("RELAYER_ROLE"); uint public constant MAX_RELAYERS = 200; enum ProposalStatus {Inactive, Active, Passed, Executed, Cancelled} struct Proposal { ProposalStatus _status; uint200 _yesVotes; // bitmap, 200 maximum votes uint8 _yesVotesTotal; uint40 _proposedBlock; // 1099511627775 maximum block } /* ========== STATE VARIABLES ========== */ uint8 public domainID; uint8 public relayerThreshold; uint128 public fee; uint40 public expiry; mapping(uint8 => uint64) public _depositCounts; // destinationDomainID => number of deposits mapping(bytes32 => address) public resourceIDToHandlerAddress; // resourceID => handler address mapping(uint72 => mapping(bytes32 => Proposal)) private _proposals; // destinationDomainID + depositNonce => dataHash => Proposal /* ========== EVENTS ========== */ event RelayerThresholdChanged(uint256 newThreshold); event RelayerAdded(address relayer); event RelayerRemoved(address relayer); event Deposit(uint8 destinationDomainID, bytes32 resourceID, uint64 depositNonce, address indexed user, bytes data); event ProposalEvent(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes data); event ProposalVote(uint8 originDomainID, uint64 depositNonce, ProposalStatus status, bytes32 dataHash); event FailedHandlerExecution(bytes lowLevelData); /* ========== INITIALIZER ========== */ function initialize(uint8 _domainID, uint8 _relayerThreshold, uint128 _fee, uint40 _expiry) external initializer { } /* ========== MODIFIERS ========== */ modifier onlyRelayers() { } modifier onlyOwnerOrRelayers() { } /* ========== RESTRICTED FUNCTIONS ========== */ function setRelayerThreshold(uint8 newThreshold) external onlyOwner { } function addRelayer(address relayer) external onlyOwner { } function removeRelayer(address relayer) external onlyOwner { } function setResource(address handlerAddress, bytes32 resourceID, address tokenAddress) external onlyOwner { } function setBurnable(address handlerAddress, address tokenAddress) external onlyOwner { } function setDepositNonce(uint8 _domainID, uint64 nonce) external onlyOwner { } function setFee(uint128 newFee) external onlyOwner { } function manualRelease(address handlerAddress, address tokenAddress, address recipient, uint amount) external onlyOwner { } function sweep() external onlyOwner { } /* ========== VIEWS ========== */ function isRelayer(address relayer) external view returns (bool) { } function totalRelayers() public view returns (uint) { } /** @notice Returns a proposalID. @param _domainID Chain ID. @param nonce ID of proposal generated by proposal's origin Bridge contract. */ function combinedProposalId(uint8 _domainID, uint64 nonce) public pure returns (uint72 proposalID) { } /** @notice Returns a proposal. @param originDomainID Chain ID deposit originated from. @param depositNonce ID of proposal generated by proposal's origin Bridge contract. @param dataHash Hash of data to be provided when deposit proposal is executed. */ function getProposal(uint8 originDomainID, uint64 depositNonce, bytes32 dataHash, address relayer) external view returns (Proposal memory proposal, bool hasVoted) { } /* ========== MUTATIVE FUNCTIONS ========== */ /** @notice Initiates a transfer using a specified handler contract. @notice Only callable when Bridge is not paused. @param destinationDomainID ID of chain deposit will be bridged to. @param resourceID ResourceID used to find address of handler to be used for deposit. @param data Additional data to be passed to specified handler. @notice Emits {Deposit} event with all necessary parameters */ function deposit(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } function depositETH(uint8 destinationDomainID, bytes32 resourceID, bytes calldata data) external payable notPaused { } /** @notice When called, {msg.sender} will be marked as voting in favor of proposal. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param data Data originally provided when deposit was made. @notice Proposal must not have already been passed or executed. @notice {msg.sender} must not have already voted on proposal. @notice Emits {ProposalEvent} event with status indicating the proposal status. @notice Emits {ProposalVote} event. */ function voteProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) external onlyRelayers notPaused { } /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @param revertOnFail Decision if the transaction should be reverted in case of handler's executeProposal is reverted or not. @notice Proposal must have Passed status. @notice Hash of {data} must equal proposal's {dataHash}. @notice Emits {ProposalEvent} event with status {Executed}. @notice Emits {FailedExecution} event with the failed reason. */ function executeProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data, bool revertOnFail) public onlyRelayers notPaused { } /** @notice Cancels a deposit proposal that has not been executed yet. @notice Only callable by relayers when Bridge is not paused. @param originDomainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param resourceID ResourceID to be used when making deposits. @param data Data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ function cancelProposal(uint8 originDomainID, uint64 depositNonce, bytes32 resourceID, bytes calldata data) public onlyOwnerOrRelayers { address handlerAddress = resourceIDToHandlerAddress[resourceID]; uint72 proposalID = combinedProposalId(originDomainID, depositNonce); bytes32 dataHash = keccak256(abi.encodePacked(handlerAddress, data)); Proposal memory proposal = _proposals[proposalID][dataHash]; ProposalStatus currentStatus = proposal._status; require(currentStatus == ProposalStatus.Active || currentStatus == ProposalStatus.Passed, "QBridge: cannot be cancelled"); require(<FILL_ME>) proposal._status = ProposalStatus.Cancelled; _proposals[proposalID][dataHash] = proposal; emit ProposalEvent(originDomainID, depositNonce, ProposalStatus.Cancelled, data); } /* ========== PRIVATE FUNCTIONS ========== */ function _relayerBit(address relayer) private view returns (uint) { } function _hasVoted(Proposal memory proposal, address relayer) private view returns (bool) { } function _bitmap(uint200 source, uint bit) internal pure returns (uint200) { } }
uint40(block.number.sub(proposal._proposedBlock))>expiry,"QBridge: not at expiry threshold"
224,040
uint40(block.number.sub(proposal._proposedBlock))>expiry
"Not enough ETH sent for selected amount"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import { RevokableDefaultOperatorFilterer } from "./RevokableDefaultOperatorFilterer.sol"; import { RevokableOperatorFilterer } from "./RevokableOperatorFilterer.sol"; import { IOperatorFilterRegistry } from "./IOperatorFilterRegistry.sol"; import { OperatorFilterRegistryErrorsAndEvents} from "./OperatorFilterRegistryErrorsAndEvents.sol"; contract Collectable is ERC721A, Ownable, RevokableDefaultOperatorFilterer { address private operatorFilterRegistryAddress = address(0); address private withdrawAddress = address(0); string private _tokenBaseURI = ''; string private _blindTokenURI = ''; bool private _revealed = false; bool public paused = true; bool public isPublicLive = true; bytes32 public merkleRoot; uint16 public constant maxSupply = 777; uint8 public maxMintAmountPerMint = 3; uint8 public maxMintAmountPerWallet = 3; // price uint256 public mintPrice = 0.0069 ether; uint256 public whitelistMintPrice = 0.001 ether; mapping (address => uint8) public NFTPerAddress; constructor(string memory name_, string memory symbol_) ERC721A(name_, symbol_){ } function initialize(bytes32 _merkleRoot, string memory defaultTokenURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory){ } function reveal(string memory baseURI) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function mintWhitelist(uint256 _mintAmount, bytes32[] calldata merkleProof) external payable { require(!paused, "The contract is paused!"); require(_mintAmount <= maxMintAmountPerMint, "Exceeds max amount per mint."); uint16 totalSupply = uint16(totalSupply()); require(totalSupply + _mintAmount <= maxSupply, "Exceeds max supply."); require(<FILL_ME>) uint8 nft = NFTPerAddress[msg.sender]; require(_mintAmount + nft <= maxMintAmountPerWallet, "Exceeds max NFT allowed per Wallet."); require(MerkleProof.verify(merkleProof, merkleRoot, toBytes32(msg.sender)) == true, "Invalid merkle proof"); _safeMint(msg.sender , _mintAmount); NFTPerAddress[msg.sender] = uint8(_mintAmount) + nft ; delete totalSupply; } function mint(uint256 _mintAmount) external payable { } function toBytes32(address addr) pure internal returns (bytes32) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function owner() public view virtual override (Ownable, RevokableOperatorFilterer) returns (address) { } function togglePaused() external onlyOwner { } function togglePublicLive() external onlyOwner { } function setMaxMintAmountPerWallet(uint8 _maxtx) external onlyOwner { } function setMaxMintAmountPerMint(uint8 _maxtx) external onlyOwner { } function setWithdrawAddress(address _withdrawAddress) external onlyOwner { } function setMerkltRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw() external onlyOwner { } function setMintPrice(uint256 _mintPrice) external onlyOwner { } function setWhitelistMintPrice(uint256 _mintPrice) external onlyOwner { } }
whitelistMintPrice*_mintAmount<=msg.value,"Not enough ETH sent for selected amount"
224,071
whitelistMintPrice*_mintAmount<=msg.value
"Exceeds max NFT allowed per Wallet."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import { RevokableDefaultOperatorFilterer } from "./RevokableDefaultOperatorFilterer.sol"; import { RevokableOperatorFilterer } from "./RevokableOperatorFilterer.sol"; import { IOperatorFilterRegistry } from "./IOperatorFilterRegistry.sol"; import { OperatorFilterRegistryErrorsAndEvents} from "./OperatorFilterRegistryErrorsAndEvents.sol"; contract Collectable is ERC721A, Ownable, RevokableDefaultOperatorFilterer { address private operatorFilterRegistryAddress = address(0); address private withdrawAddress = address(0); string private _tokenBaseURI = ''; string private _blindTokenURI = ''; bool private _revealed = false; bool public paused = true; bool public isPublicLive = true; bytes32 public merkleRoot; uint16 public constant maxSupply = 777; uint8 public maxMintAmountPerMint = 3; uint8 public maxMintAmountPerWallet = 3; // price uint256 public mintPrice = 0.0069 ether; uint256 public whitelistMintPrice = 0.001 ether; mapping (address => uint8) public NFTPerAddress; constructor(string memory name_, string memory symbol_) ERC721A(name_, symbol_){ } function initialize(bytes32 _merkleRoot, string memory defaultTokenURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory){ } function reveal(string memory baseURI) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function mintWhitelist(uint256 _mintAmount, bytes32[] calldata merkleProof) external payable { require(!paused, "The contract is paused!"); require(_mintAmount <= maxMintAmountPerMint, "Exceeds max amount per mint."); uint16 totalSupply = uint16(totalSupply()); require(totalSupply + _mintAmount <= maxSupply, "Exceeds max supply."); require(whitelistMintPrice * _mintAmount <= msg.value, "Not enough ETH sent for selected amount"); uint8 nft = NFTPerAddress[msg.sender]; require(<FILL_ME>) require(MerkleProof.verify(merkleProof, merkleRoot, toBytes32(msg.sender)) == true, "Invalid merkle proof"); _safeMint(msg.sender , _mintAmount); NFTPerAddress[msg.sender] = uint8(_mintAmount) + nft ; delete totalSupply; } function mint(uint256 _mintAmount) external payable { } function toBytes32(address addr) pure internal returns (bytes32) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function owner() public view virtual override (Ownable, RevokableOperatorFilterer) returns (address) { } function togglePaused() external onlyOwner { } function togglePublicLive() external onlyOwner { } function setMaxMintAmountPerWallet(uint8 _maxtx) external onlyOwner { } function setMaxMintAmountPerMint(uint8 _maxtx) external onlyOwner { } function setWithdrawAddress(address _withdrawAddress) external onlyOwner { } function setMerkltRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw() external onlyOwner { } function setMintPrice(uint256 _mintPrice) external onlyOwner { } function setWhitelistMintPrice(uint256 _mintPrice) external onlyOwner { } }
_mintAmount+nft<=maxMintAmountPerWallet,"Exceeds max NFT allowed per Wallet."
224,071
_mintAmount+nft<=maxMintAmountPerWallet
"Invalid merkle proof"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import { RevokableDefaultOperatorFilterer } from "./RevokableDefaultOperatorFilterer.sol"; import { RevokableOperatorFilterer } from "./RevokableOperatorFilterer.sol"; import { IOperatorFilterRegistry } from "./IOperatorFilterRegistry.sol"; import { OperatorFilterRegistryErrorsAndEvents} from "./OperatorFilterRegistryErrorsAndEvents.sol"; contract Collectable is ERC721A, Ownable, RevokableDefaultOperatorFilterer { address private operatorFilterRegistryAddress = address(0); address private withdrawAddress = address(0); string private _tokenBaseURI = ''; string private _blindTokenURI = ''; bool private _revealed = false; bool public paused = true; bool public isPublicLive = true; bytes32 public merkleRoot; uint16 public constant maxSupply = 777; uint8 public maxMintAmountPerMint = 3; uint8 public maxMintAmountPerWallet = 3; // price uint256 public mintPrice = 0.0069 ether; uint256 public whitelistMintPrice = 0.001 ether; mapping (address => uint8) public NFTPerAddress; constructor(string memory name_, string memory symbol_) ERC721A(name_, symbol_){ } function initialize(bytes32 _merkleRoot, string memory defaultTokenURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory){ } function reveal(string memory baseURI) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function mintWhitelist(uint256 _mintAmount, bytes32[] calldata merkleProof) external payable { require(!paused, "The contract is paused!"); require(_mintAmount <= maxMintAmountPerMint, "Exceeds max amount per mint."); uint16 totalSupply = uint16(totalSupply()); require(totalSupply + _mintAmount <= maxSupply, "Exceeds max supply."); require(whitelistMintPrice * _mintAmount <= msg.value, "Not enough ETH sent for selected amount"); uint8 nft = NFTPerAddress[msg.sender]; require(_mintAmount + nft <= maxMintAmountPerWallet, "Exceeds max NFT allowed per Wallet."); require(<FILL_ME>) _safeMint(msg.sender , _mintAmount); NFTPerAddress[msg.sender] = uint8(_mintAmount) + nft ; delete totalSupply; } function mint(uint256 _mintAmount) external payable { } function toBytes32(address addr) pure internal returns (bytes32) { } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { } function owner() public view virtual override (Ownable, RevokableOperatorFilterer) returns (address) { } function togglePaused() external onlyOwner { } function togglePublicLive() external onlyOwner { } function setMaxMintAmountPerWallet(uint8 _maxtx) external onlyOwner { } function setMaxMintAmountPerMint(uint8 _maxtx) external onlyOwner { } function setWithdrawAddress(address _withdrawAddress) external onlyOwner { } function setMerkltRoot(bytes32 _merkleRoot) external onlyOwner { } function withdraw() external onlyOwner { } function setMintPrice(uint256 _mintPrice) external onlyOwner { } function setWhitelistMintPrice(uint256 _mintPrice) external onlyOwner { } }
MerkleProof.verify(merkleProof,merkleRoot,toBytes32(msg.sender))==true,"Invalid merkle proof"
224,071
MerkleProof.verify(merkleProof,merkleRoot,toBytes32(msg.sender))==true
"sOwEE All mEEned"
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMWWWWWWW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWW WMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMWWWWWWWWMMMMMMMMMMMMMMMMMW MMMW WMMMMW MMMMMMMMMMMMMWWWWWWMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMW WMMMMMMMMMMMMMMW WMMW WMMMM WMMW WMMMMMMMMMMMMMMW WMMMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWMMMMMMMMMMMM // MMW WMMMMMMMMW WMMMMMMMMMMMMMW WW WMMMMM WMMW K WMMMMMMMMMMMMMW WMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWWWWWMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMW M // MWW WMMMMMMMMMMW WMMMMMMWWWMMMMW WWWMMM WMMW WMMMMMMMMMMMMMW WMMW WMMMWWW WMMMMMMMMMMMMW WMWWWWMMMMMMMMMMWWWW WWMMMMMMMMMMMMMMMMMMMMMW WMMMMMMM M // MMW WMMMMMMMMMMW MMMW WW WMMMMMW MM WMMMMMMWWWW WMMMMMW WMMW WMMMMMMW WMMMMMMMMMMWWW MMMMMMMMWWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMW M // MMW WMMMMMMMWW WMW WMMMMMW MMMMMMW WM WMMMMWW WW WMMMMW WMM WMMMMMM WMWWWMMMWWMMW W WWW MMMMMMMMMMMMMW MMMMMMW WMMMMWMMMMMMMW WW WMMMM K M // MMMW WWWWWW W WM WMMMMMMMM WMMMMMW WMW WMMMW W WMMMW WMMMW WMMW WMMMMW MMW WMMW MMW W MMMM WMMMMMMMMMMMMW WMMMW WWW WMWWWMWWWMMW WM WM WMMW WM // MMMMMWW WWWM WW WMMMMMMMW WW WMMMMM WMW WMMW MW MMMMM WMMMW WMMMW WMMMMW WMMW MM W WMMMMW WMMMMMMMMMMMMM WMMM WMMMMW WW WM WMM WM MW WMW WM // MWMMMMMMMMMMMMMM WMW WMMMW WWMW WMMMW MMW WMMW MW WMMMM MMMW WMMMMWWW WWWMMMMMMW MW WW W WMMMMW MMMMMMMMMMMMMW WMMW MMMMMW WW WM WMM WM MMW W MM // M MMMMMMMMMMMMW WMMWWW WWWMMMM WWW WMMMW WMMW MW WMMMMW WMMMW WMMMMMMMMMMMMMMMMMMW K W WMMMMW WMMMWWWWMMMMMW WMMW WMMWW WM W WW WM MMMW WMM // MW MMMMMMMMMMW WMMMMMMMMMMMMMMW WMMMMMMW WMMW WMW MMMMWWMMMMW WMMMMMMMMMMMMMMMMMMMMWWWWMMW WW WMMMMMWWMMMW K MMMMMW WMMMW WMMW WMM WMMM WMM // MMW WMMMMMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMWMMMWWWMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMMMMW WMMMMMW WMMMMW WWMMMMMWWMMWWWMMM WMMMMWWWMMM // MMMW WWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMM // MMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./Signer.sol"; contract GoblintownTownNFT is ERC721A, Ownable, ReentrancyGuard, Signer { string public townLocation; bool public explorable = false; uint256 public explorableTown = 9999; uint256 public meeneth = 5000000000000000; mapping(address => uint256) public goblins; mapping(address => uint256) public earlyGoblins; constructor() ERC721A("GoblintownTown", "gOblIntOwnTOWN") {} function _baseURI() internal view virtual override returns (string memory) { } function meenEarly(bytes memory signature) external payable nonReentrant { uint256 allTown = totalSupply(); require(<FILL_ME>) require(msg.sender == tx.origin, "nOt gOblIn"); require(msg.value >= meeneth, "mOrEth"); require(earlyGoblins[msg.sender] < 1, "dOn bE grEEdy"); bytes32 _message = prefixed( keccak256(abi.encodePacked(msg.sender, address(this))) ); require( recoverSigner(_message, signature) == signerAddress, "nEEd sIgn!" ); reeFundXtraa(msg.value); _safeMint(msg.sender, 1); earlyGoblins[msg.sender] += 1; } function meen() external payable nonReentrant { } function meenMany(address townOwner, uint256 _exploringTown) public onlyOwner { } function makeExplorable(bool _explore) external onlyOwner { } function giveTownLocation(string memory _location) external onlyOwner { } function reeFundXtraa(uint256 _senderValue) private { } function reedimFund() public payable onlyOwner { } }
allTown+1<=explorableTown,"sOwEE All mEEned"
224,118
allTown+1<=explorableTown
"dOn bE grEEdy"
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMWWWWWWW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWW WMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMWWWWWWWWMMMMMMMMMMMMMMMMMW MMMW WMMMMW MMMMMMMMMMMMMWWWWWWMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMW WMMMMMMMMMMMMMMW WMMW WMMMM WMMW WMMMMMMMMMMMMMMW WMMMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWMMMMMMMMMMMM // MMW WMMMMMMMMW WMMMMMMMMMMMMMW WW WMMMMM WMMW K WMMMMMMMMMMMMMW WMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWWWWWMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMW M // MWW WMMMMMMMMMMW WMMMMMMWWWMMMMW WWWMMM WMMW WMMMMMMMMMMMMMW WMMW WMMMWWW WMMMMMMMMMMMMW WMWWWWMMMMMMMMMMWWWW WWMMMMMMMMMMMMMMMMMMMMMW WMMMMMMM M // MMW WMMMMMMMMMMW MMMW WW WMMMMMW MM WMMMMMMWWWW WMMMMMW WMMW WMMMMMMW WMMMMMMMMMMWWW MMMMMMMMWWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMW M // MMW WMMMMMMMWW WMW WMMMMMW MMMMMMW WM WMMMMWW WW WMMMMW WMM WMMMMMM WMWWWMMMWWMMW W WWW MMMMMMMMMMMMMW MMMMMMW WMMMMWMMMMMMMW WW WMMMM K M // MMMW WWWWWW W WM WMMMMMMMM WMMMMMW WMW WMMMW W WMMMW WMMMW WMMW WMMMMW MMW WMMW MMW W MMMM WMMMMMMMMMMMMW WMMMW WWW WMWWWMWWWMMW WM WM WMMW WM // MMMMMWW WWWM WW WMMMMMMMW WW WMMMMM WMW WMMW MW MMMMM WMMMW WMMMW WMMMMW WMMW MM W WMMMMW WMMMMMMMMMMMMM WMMM WMMMMW WW WM WMM WM MW WMW WM // MWMMMMMMMMMMMMMM WMW WMMMW WWMW WMMMW MMW WMMW MW WMMMM MMMW WMMMMWWW WWWMMMMMMW MW WW W WMMMMW MMMMMMMMMMMMMW WMMW MMMMMW WW WM WMM WM MMW W MM // M MMMMMMMMMMMMW WMMWWW WWWMMMM WWW WMMMW WMMW MW WMMMMW WMMMW WMMMMMMMMMMMMMMMMMMW K W WMMMMW WMMMWWWWMMMMMW WMMW WMMWW WM W WW WM MMMW WMM // MW MMMMMMMMMMW WMMMMMMMMMMMMMMW WMMMMMMW WMMW WMW MMMMWWMMMMW WMMMMMMMMMMMMMMMMMMMMWWWWMMW WW WMMMMMWWMMMW K MMMMMW WMMMW WMMW WMM WMMM WMM // MMW WMMMMMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMWMMMWWWMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMMMMW WMMMMMW WMMMMW WWMMMMMWWMMWWWMMM WMMMMWWWMMM // MMMW WWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMM // MMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./Signer.sol"; contract GoblintownTownNFT is ERC721A, Ownable, ReentrancyGuard, Signer { string public townLocation; bool public explorable = false; uint256 public explorableTown = 9999; uint256 public meeneth = 5000000000000000; mapping(address => uint256) public goblins; mapping(address => uint256) public earlyGoblins; constructor() ERC721A("GoblintownTown", "gOblIntOwnTOWN") {} function _baseURI() internal view virtual override returns (string memory) { } function meenEarly(bytes memory signature) external payable nonReentrant { uint256 allTown = totalSupply(); require(allTown + 1 <= explorableTown, "sOwEE All mEEned"); require(msg.sender == tx.origin, "nOt gOblIn"); require(msg.value >= meeneth, "mOrEth"); require(<FILL_ME>) bytes32 _message = prefixed( keccak256(abi.encodePacked(msg.sender, address(this))) ); require( recoverSigner(_message, signature) == signerAddress, "nEEd sIgn!" ); reeFundXtraa(msg.value); _safeMint(msg.sender, 1); earlyGoblins[msg.sender] += 1; } function meen() external payable nonReentrant { } function meenMany(address townOwner, uint256 _exploringTown) public onlyOwner { } function makeExplorable(bool _explore) external onlyOwner { } function giveTownLocation(string memory _location) external onlyOwner { } function reeFundXtraa(uint256 _senderValue) private { } function reedimFund() public payable onlyOwner { } }
earlyGoblins[msg.sender]<1,"dOn bE grEEdy"
224,118
earlyGoblins[msg.sender]<1
"nEEd sIgn!"
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMWWWWWWW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWW WMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMWWWWWWWWMMMMMMMMMMMMMMMMMW MMMW WMMMMW MMMMMMMMMMMMMWWWWWWMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMW WMMMMMMMMMMMMMMW WMMW WMMMM WMMW WMMMMMMMMMMMMMMW WMMMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWMMMMMMMMMMMM // MMW WMMMMMMMMW WMMMMMMMMMMMMMW WW WMMMMM WMMW K WMMMMMMMMMMMMMW WMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWWWWWMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMW M // MWW WMMMMMMMMMMW WMMMMMMWWWMMMMW WWWMMM WMMW WMMMMMMMMMMMMMW WMMW WMMMWWW WMMMMMMMMMMMMW WMWWWWMMMMMMMMMMWWWW WWMMMMMMMMMMMMMMMMMMMMMW WMMMMMMM M // MMW WMMMMMMMMMMW MMMW WW WMMMMMW MM WMMMMMMWWWW WMMMMMW WMMW WMMMMMMW WMMMMMMMMMMWWW MMMMMMMMWWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMW M // MMW WMMMMMMMWW WMW WMMMMMW MMMMMMW WM WMMMMWW WW WMMMMW WMM WMMMMMM WMWWWMMMWWMMW W WWW MMMMMMMMMMMMMW MMMMMMW WMMMMWMMMMMMMW WW WMMMM K M // MMMW WWWWWW W WM WMMMMMMMM WMMMMMW WMW WMMMW W WMMMW WMMMW WMMW WMMMMW MMW WMMW MMW W MMMM WMMMMMMMMMMMMW WMMMW WWW WMWWWMWWWMMW WM WM WMMW WM // MMMMMWW WWWM WW WMMMMMMMW WW WMMMMM WMW WMMW MW MMMMM WMMMW WMMMW WMMMMW WMMW MM W WMMMMW WMMMMMMMMMMMMM WMMM WMMMMW WW WM WMM WM MW WMW WM // MWMMMMMMMMMMMMMM WMW WMMMW WWMW WMMMW MMW WMMW MW WMMMM MMMW WMMMMWWW WWWMMMMMMW MW WW W WMMMMW MMMMMMMMMMMMMW WMMW MMMMMW WW WM WMM WM MMW W MM // M MMMMMMMMMMMMW WMMWWW WWWMMMM WWW WMMMW WMMW MW WMMMMW WMMMW WMMMMMMMMMMMMMMMMMMW K W WMMMMW WMMMWWWWMMMMMW WMMW WMMWW WM W WW WM MMMW WMM // MW MMMMMMMMMMW WMMMMMMMMMMMMMMW WMMMMMMW WMMW WMW MMMMWWMMMMW WMMMMMMMMMMMMMMMMMMMMWWWWMMW WW WMMMMMWWMMMW K MMMMMW WMMMW WMMW WMM WMMM WMM // MMW WMMMMMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMWMMMWWWMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMMMMW WMMMMMW WMMMMW WWMMMMMWWMMWWWMMM WMMMMWWWMMM // MMMW WWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMM // MMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./Signer.sol"; contract GoblintownTownNFT is ERC721A, Ownable, ReentrancyGuard, Signer { string public townLocation; bool public explorable = false; uint256 public explorableTown = 9999; uint256 public meeneth = 5000000000000000; mapping(address => uint256) public goblins; mapping(address => uint256) public earlyGoblins; constructor() ERC721A("GoblintownTown", "gOblIntOwnTOWN") {} function _baseURI() internal view virtual override returns (string memory) { } function meenEarly(bytes memory signature) external payable nonReentrant { uint256 allTown = totalSupply(); require(allTown + 1 <= explorableTown, "sOwEE All mEEned"); require(msg.sender == tx.origin, "nOt gOblIn"); require(msg.value >= meeneth, "mOrEth"); require(earlyGoblins[msg.sender] < 1, "dOn bE grEEdy"); bytes32 _message = prefixed( keccak256(abi.encodePacked(msg.sender, address(this))) ); require(<FILL_ME>) reeFundXtraa(msg.value); _safeMint(msg.sender, 1); earlyGoblins[msg.sender] += 1; } function meen() external payable nonReentrant { } function meenMany(address townOwner, uint256 _exploringTown) public onlyOwner { } function makeExplorable(bool _explore) external onlyOwner { } function giveTownLocation(string memory _location) external onlyOwner { } function reeFundXtraa(uint256 _senderValue) private { } function reedimFund() public payable onlyOwner { } }
recoverSigner(_message,signature)==signerAddress,"nEEd sIgn!"
224,118
recoverSigner(_message,signature)==signerAddress
"dOn bE grEEdy"
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMWWWWWWW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWW WMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMWWWWWWWWMMMMMMMMMMMMMMMMMW MMMW WMMMMW MMMMMMMMMMMMMWWWWWWMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMW WMMMMMMMMMMMMMMW WMMW WMMMM WMMW WMMMMMMMMMMMMMMW WMMMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWMMMMMMMMMMMM // MMW WMMMMMMMMW WMMMMMMMMMMMMMW WW WMMMMM WMMW K WMMMMMMMMMMMMMW WMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWWWWWMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMW M // MWW WMMMMMMMMMMW WMMMMMMWWWMMMMW WWWMMM WMMW WMMMMMMMMMMMMMW WMMW WMMMWWW WMMMMMMMMMMMMW WMWWWWMMMMMMMMMMWWWW WWMMMMMMMMMMMMMMMMMMMMMW WMMMMMMM M // MMW WMMMMMMMMMMW MMMW WW WMMMMMW MM WMMMMMMWWWW WMMMMMW WMMW WMMMMMMW WMMMMMMMMMMWWW MMMMMMMMWWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMW M // MMW WMMMMMMMWW WMW WMMMMMW MMMMMMW WM WMMMMWW WW WMMMMW WMM WMMMMMM WMWWWMMMWWMMW W WWW MMMMMMMMMMMMMW MMMMMMW WMMMMWMMMMMMMW WW WMMMM K M // MMMW WWWWWW W WM WMMMMMMMM WMMMMMW WMW WMMMW W WMMMW WMMMW WMMW WMMMMW MMW WMMW MMW W MMMM WMMMMMMMMMMMMW WMMMW WWW WMWWWMWWWMMW WM WM WMMW WM // MMMMMWW WWWM WW WMMMMMMMW WW WMMMMM WMW WMMW MW MMMMM WMMMW WMMMW WMMMMW WMMW MM W WMMMMW WMMMMMMMMMMMMM WMMM WMMMMW WW WM WMM WM MW WMW WM // MWMMMMMMMMMMMMMM WMW WMMMW WWMW WMMMW MMW WMMW MW WMMMM MMMW WMMMMWWW WWWMMMMMMW MW WW W WMMMMW MMMMMMMMMMMMMW WMMW MMMMMW WW WM WMM WM MMW W MM // M MMMMMMMMMMMMW WMMWWW WWWMMMM WWW WMMMW WMMW MW WMMMMW WMMMW WMMMMMMMMMMMMMMMMMMW K W WMMMMW WMMMWWWWMMMMMW WMMW WMMWW WM W WW WM MMMW WMM // MW MMMMMMMMMMW WMMMMMMMMMMMMMMW WMMMMMMW WMMW WMW MMMMWWMMMMW WMMMMMMMMMMMMMMMMMMMMWWWWMMW WW WMMMMMWWMMMW K MMMMMW WMMMW WMMW WMM WMMM WMM // MMW WMMMMMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMWMMMWWWMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMMMMW WMMMMMW WMMMMW WWMMMMMWWMMWWWMMM WMMMMWWWMMM // MMMW WWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMM // MMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./Signer.sol"; contract GoblintownTownNFT is ERC721A, Ownable, ReentrancyGuard, Signer { string public townLocation; bool public explorable = false; uint256 public explorableTown = 9999; uint256 public meeneth = 5000000000000000; mapping(address => uint256) public goblins; mapping(address => uint256) public earlyGoblins; constructor() ERC721A("GoblintownTown", "gOblIntOwnTOWN") {} function _baseURI() internal view virtual override returns (string memory) { } function meenEarly(bytes memory signature) external payable nonReentrant { } function meen() external payable nonReentrant { uint256 allTown = totalSupply(); require(explorable, "bE pAtIEnt"); require(allTown + 1 <= explorableTown, "sOwEE All mEEned"); require(msg.sender == tx.origin, "nOt gOblIn"); require(msg.value >= meeneth, "mOrEth"); require(<FILL_ME>) reeFundXtraa(msg.value); _safeMint(msg.sender, 1); goblins[msg.sender] += 1; } function meenMany(address townOwner, uint256 _exploringTown) public onlyOwner { } function makeExplorable(bool _explore) external onlyOwner { } function giveTownLocation(string memory _location) external onlyOwner { } function reeFundXtraa(uint256 _senderValue) private { } function reedimFund() public payable onlyOwner { } }
goblins[msg.sender]<1,"dOn bE grEEdy"
224,118
goblins[msg.sender]<1
null
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMWWWWWWW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWW WMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMWWWWWWWWMMMMMMMMMMMMMMMMMW MMMW WMMMMW MMMMMMMMMMMMMWWWWWWMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMW WMMMMMMMMMMMMMMW WMMW WMMMM WMMW WMMMMMMMMMMMMMMW WMMMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWMMMMMMMMMMMM // MMW WMMMMMMMMW WMMMMMMMMMMMMMW WW WMMMMM WMMW K WMMMMMMMMMMMMMW WMMMW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WWWWWWMMMMMMMMMMMMMMMMMMMMMMW MMMMMMMMW M // MWW WMMMMMMMMMMW WMMMMMMWWWMMMMW WWWMMM WMMW WMMMMMMMMMMMMMW WMMW WMMMWWW WMMMMMMMMMMMMW WMWWWWMMMMMMMMMMWWWW WWMMMMMMMMMMMMMMMMMMMMMW WMMMMMMM M // MMW WMMMMMMMMMMW MMMW WW WMMMMMW MM WMMMMMMWWWW WMMMMMW WMMW WMMMMMMW WMMMMMMMMMMWWW MMMMMMMMWWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMW M // MMW WMMMMMMMWW WMW WMMMMMW MMMMMMW WM WMMMMWW WW WMMMMW WMM WMMMMMM WMWWWMMMWWMMW W WWW MMMMMMMMMMMMMW MMMMMMW WMMMMWMMMMMMMW WW WMMMM K M // MMMW WWWWWW W WM WMMMMMMMM WMMMMMW WMW WMMMW W WMMMW WMMMW WMMW WMMMMW MMW WMMW MMW W MMMM WMMMMMMMMMMMMW WMMMW WWW WMWWWMWWWMMW WM WM WMMW WM // MMMMMWW WWWM WW WMMMMMMMW WW WMMMMM WMW WMMW MW MMMMM WMMMW WMMMW WMMMMW WMMW MM W WMMMMW WMMMMMMMMMMMMM WMMM WMMMMW WW WM WMM WM MW WMW WM // MWMMMMMMMMMMMMMM WMW WMMMW WWMW WMMMW MMW WMMW MW WMMMM MMMW WMMMMWWW WWWMMMMMMW MW WW W WMMMMW MMMMMMMMMMMMMW WMMW MMMMMW WW WM WMM WM MMW W MM // M MMMMMMMMMMMMW WMMWWW WWWMMMM WWW WMMMW WMMW MW WMMMMW WMMMW WMMMMMMMMMMMMMMMMMMW K W WMMMMW WMMMWWWWMMMMMW WMMW WMMWW WM W WW WM MMMW WMM // MW MMMMMMMMMMW WMMMMMMMMMMMMMMW WMMMMMMW WMMW WMW MMMMWWMMMMW WMMMMMMMMMMMMMMMMMMMMWWWWMMW WW WMMMMMWWMMMW K MMMMMW WMMMW WMMW WMM WMMM WMM // MMW WMMMMMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMWMMMWWWMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMMMMW WMMMMMW WMMMMW WWMMMMMWWMMWWWMMM WMMMMWWWMMM // MMMW WWWWWW WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW WMMMMMMMMMMMMMMMMMMMMMMMMMMWWMMMMMMMMMM // MMMMM WWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM // SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./Signer.sol"; contract GoblintownTownNFT is ERC721A, Ownable, ReentrancyGuard, Signer { string public townLocation; bool public explorable = false; uint256 public explorableTown = 9999; uint256 public meeneth = 5000000000000000; mapping(address => uint256) public goblins; mapping(address => uint256) public earlyGoblins; constructor() ERC721A("GoblintownTown", "gOblIntOwnTOWN") {} function _baseURI() internal view virtual override returns (string memory) { } function meenEarly(bytes memory signature) external payable nonReentrant { } function meen() external payable nonReentrant { } function meenMany(address townOwner, uint256 _exploringTown) public onlyOwner { uint256 allTown = totalSupply(); require(<FILL_ME>) _safeMint(townOwner, _exploringTown); } function makeExplorable(bool _explore) external onlyOwner { } function giveTownLocation(string memory _location) external onlyOwner { } function reeFundXtraa(uint256 _senderValue) private { } function reedimFund() public payable onlyOwner { } }
allTown+_exploringTown<=explorableTown
224,118
allTown+_exploringTown<=explorableTown
"level lock"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract TenLevels is ERC721, ERC721Enumerable, Ownable { // lib using Address for address payable; // struct struct LevelInfo { uint16 lastNeedNum; uint16 merkleProofAnswerNum; uint16 payCount; uint256[] payNumAndPrice; bytes32 answerMerkleProofRootHash; bytes32 answerHash; uint256 mintNum; mapping(uint256 => bool) indexMinted; } struct InvestInfo{ uint256 maxAmount; uint256 sharePer; uint256 curAmount; mapping(address => uint256) userAmount; } // constant uint256 public constant MAX_INVEST_LEVEL = 3; uint256 public constant MAX_LEVEL = 10; uint256 public constant LEVEL_GAP = 100000000; uint256 public constant MAX_PER = 10000; uint256 public constant OWNER_SHARE_PER = 2000; uint256 public constant INVESTOR_SHARE_PER = 3000; // storage mapping(uint256 => LevelInfo) public levelInfos; mapping(uint256 => bool) public useFlag; mapping(uint256 => bool) public rewardFlag; uint256 public investorShare; mapping(uint256 => InvestInfo) public investInfos; mapping(address => bool) public investClaimFlag; bool public adminInvestClaimFlag; uint256 private _rewardShare; string private _basePath; // event event Mint(address indexed user, uint256 indexed costToken, uint256 indexed newToken); event ClaimRewards(address indexed user, uint256[] tokenIDs, uint256 amount); event Invest(address indexed user, uint256 indexed level, uint256 amount); event CancleInvest(address indexed user, uint256 indexed level, uint256 amount); event InvestClaimRewards(address indexed user, uint256 amount); event AdminClaimRemainInvestRewards(uint256 amount); event MetadataUpdate(uint256 _tokenId); // function constructor() ERC721("TenLevels", "TL") { } function getMintedIndex(uint256 level, uint256[] memory index) public view returns(bool[] memory){ } function getMintPrice(uint256 level) public view returns (uint256){ } function getRewards() public view returns (uint256){ } function _payEth(uint256 level) private { } function merkleProofMint(uint256 tokenID, uint256 level, bytes32 nodeHash, uint256 index, bytes32[] memory proofs) public payable{ require(level >= 0 && level < MAX_LEVEL, "level error"); if (level > 0){ require(<FILL_ME>) require(tokenID / LEVEL_GAP == level - 1, "tokenID level error"); require(ownerOf(tokenID) == msg.sender, "tokenID owner error"); require(useFlag[tokenID] == false, "tokenID has been used"); useFlag[tokenID] = true; emit MetadataUpdate(tokenID); } if (level < MAX_LEVEL - 1){ require(levelInfos[MAX_LEVEL - 1].mintNum == 0, "mint locked"); } uint256 curMintNum = levelInfos[level].mintNum; require(curMintNum < levelInfos[level].merkleProofAnswerNum, "mint approach error"); require(levelInfos[level].indexMinted[index] == false, "cur index already minted"); require(MerkleProof.verify(proofs, levelInfos[level].answerMerkleProofRootHash, keccak256(abi.encodePacked(nodeHash, index))), "answer error"); _payEth(level); if (level == MAX_LEVEL - 1 && levelInfos[MAX_LEVEL - 1].mintNum == 0){ _rewardShare = address(this).balance - investorShare; } levelInfos[level].mintNum = curMintNum + 1; levelInfos[level].indexMinted[index] = true; uint256 newTokenID = level * LEVEL_GAP + curMintNum; _safeMint(msg.sender, newTokenID); emit Mint(msg.sender, tokenID, newTokenID); } function mint(uint256 tokenID, uint256 level, bytes32 answerHash) public payable{ } function claimRewards(uint256[] memory tokenIDs) public{ } function adminClaimRemainRewards() public onlyOwner(){ } function invest(uint256 level) public payable{ } function cancleInvest(uint256 level, uint256 amount) public{ } function getUserInvestInfo(address user, uint256[] memory levels) public view returns(uint256[] memory){ } function getInvestRewards(address user) public view returns(uint256){ } function claimInvestRewards() public { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata path) public onlyOwner(){ } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
levelInfos[level-1].mintNum>=levelInfos[level].lastNeedNum,"level lock"
224,150
levelInfos[level-1].mintNum>=levelInfos[level].lastNeedNum
"tokenID level error"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract TenLevels is ERC721, ERC721Enumerable, Ownable { // lib using Address for address payable; // struct struct LevelInfo { uint16 lastNeedNum; uint16 merkleProofAnswerNum; uint16 payCount; uint256[] payNumAndPrice; bytes32 answerMerkleProofRootHash; bytes32 answerHash; uint256 mintNum; mapping(uint256 => bool) indexMinted; } struct InvestInfo{ uint256 maxAmount; uint256 sharePer; uint256 curAmount; mapping(address => uint256) userAmount; } // constant uint256 public constant MAX_INVEST_LEVEL = 3; uint256 public constant MAX_LEVEL = 10; uint256 public constant LEVEL_GAP = 100000000; uint256 public constant MAX_PER = 10000; uint256 public constant OWNER_SHARE_PER = 2000; uint256 public constant INVESTOR_SHARE_PER = 3000; // storage mapping(uint256 => LevelInfo) public levelInfos; mapping(uint256 => bool) public useFlag; mapping(uint256 => bool) public rewardFlag; uint256 public investorShare; mapping(uint256 => InvestInfo) public investInfos; mapping(address => bool) public investClaimFlag; bool public adminInvestClaimFlag; uint256 private _rewardShare; string private _basePath; // event event Mint(address indexed user, uint256 indexed costToken, uint256 indexed newToken); event ClaimRewards(address indexed user, uint256[] tokenIDs, uint256 amount); event Invest(address indexed user, uint256 indexed level, uint256 amount); event CancleInvest(address indexed user, uint256 indexed level, uint256 amount); event InvestClaimRewards(address indexed user, uint256 amount); event AdminClaimRemainInvestRewards(uint256 amount); event MetadataUpdate(uint256 _tokenId); // function constructor() ERC721("TenLevels", "TL") { } function getMintedIndex(uint256 level, uint256[] memory index) public view returns(bool[] memory){ } function getMintPrice(uint256 level) public view returns (uint256){ } function getRewards() public view returns (uint256){ } function _payEth(uint256 level) private { } function merkleProofMint(uint256 tokenID, uint256 level, bytes32 nodeHash, uint256 index, bytes32[] memory proofs) public payable{ require(level >= 0 && level < MAX_LEVEL, "level error"); if (level > 0){ require(levelInfos[level-1].mintNum >= levelInfos[level].lastNeedNum, "level lock"); require(<FILL_ME>) require(ownerOf(tokenID) == msg.sender, "tokenID owner error"); require(useFlag[tokenID] == false, "tokenID has been used"); useFlag[tokenID] = true; emit MetadataUpdate(tokenID); } if (level < MAX_LEVEL - 1){ require(levelInfos[MAX_LEVEL - 1].mintNum == 0, "mint locked"); } uint256 curMintNum = levelInfos[level].mintNum; require(curMintNum < levelInfos[level].merkleProofAnswerNum, "mint approach error"); require(levelInfos[level].indexMinted[index] == false, "cur index already minted"); require(MerkleProof.verify(proofs, levelInfos[level].answerMerkleProofRootHash, keccak256(abi.encodePacked(nodeHash, index))), "answer error"); _payEth(level); if (level == MAX_LEVEL - 1 && levelInfos[MAX_LEVEL - 1].mintNum == 0){ _rewardShare = address(this).balance - investorShare; } levelInfos[level].mintNum = curMintNum + 1; levelInfos[level].indexMinted[index] = true; uint256 newTokenID = level * LEVEL_GAP + curMintNum; _safeMint(msg.sender, newTokenID); emit Mint(msg.sender, tokenID, newTokenID); } function mint(uint256 tokenID, uint256 level, bytes32 answerHash) public payable{ } function claimRewards(uint256[] memory tokenIDs) public{ } function adminClaimRemainRewards() public onlyOwner(){ } function invest(uint256 level) public payable{ } function cancleInvest(uint256 level, uint256 amount) public{ } function getUserInvestInfo(address user, uint256[] memory levels) public view returns(uint256[] memory){ } function getInvestRewards(address user) public view returns(uint256){ } function claimInvestRewards() public { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata path) public onlyOwner(){ } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
tokenID/LEVEL_GAP==level-1,"tokenID level error"
224,150
tokenID/LEVEL_GAP==level-1
"tokenID has been used"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract TenLevels is ERC721, ERC721Enumerable, Ownable { // lib using Address for address payable; // struct struct LevelInfo { uint16 lastNeedNum; uint16 merkleProofAnswerNum; uint16 payCount; uint256[] payNumAndPrice; bytes32 answerMerkleProofRootHash; bytes32 answerHash; uint256 mintNum; mapping(uint256 => bool) indexMinted; } struct InvestInfo{ uint256 maxAmount; uint256 sharePer; uint256 curAmount; mapping(address => uint256) userAmount; } // constant uint256 public constant MAX_INVEST_LEVEL = 3; uint256 public constant MAX_LEVEL = 10; uint256 public constant LEVEL_GAP = 100000000; uint256 public constant MAX_PER = 10000; uint256 public constant OWNER_SHARE_PER = 2000; uint256 public constant INVESTOR_SHARE_PER = 3000; // storage mapping(uint256 => LevelInfo) public levelInfos; mapping(uint256 => bool) public useFlag; mapping(uint256 => bool) public rewardFlag; uint256 public investorShare; mapping(uint256 => InvestInfo) public investInfos; mapping(address => bool) public investClaimFlag; bool public adminInvestClaimFlag; uint256 private _rewardShare; string private _basePath; // event event Mint(address indexed user, uint256 indexed costToken, uint256 indexed newToken); event ClaimRewards(address indexed user, uint256[] tokenIDs, uint256 amount); event Invest(address indexed user, uint256 indexed level, uint256 amount); event CancleInvest(address indexed user, uint256 indexed level, uint256 amount); event InvestClaimRewards(address indexed user, uint256 amount); event AdminClaimRemainInvestRewards(uint256 amount); event MetadataUpdate(uint256 _tokenId); // function constructor() ERC721("TenLevels", "TL") { } function getMintedIndex(uint256 level, uint256[] memory index) public view returns(bool[] memory){ } function getMintPrice(uint256 level) public view returns (uint256){ } function getRewards() public view returns (uint256){ } function _payEth(uint256 level) private { } function merkleProofMint(uint256 tokenID, uint256 level, bytes32 nodeHash, uint256 index, bytes32[] memory proofs) public payable{ require(level >= 0 && level < MAX_LEVEL, "level error"); if (level > 0){ require(levelInfos[level-1].mintNum >= levelInfos[level].lastNeedNum, "level lock"); require(tokenID / LEVEL_GAP == level - 1, "tokenID level error"); require(ownerOf(tokenID) == msg.sender, "tokenID owner error"); require(<FILL_ME>) useFlag[tokenID] = true; emit MetadataUpdate(tokenID); } if (level < MAX_LEVEL - 1){ require(levelInfos[MAX_LEVEL - 1].mintNum == 0, "mint locked"); } uint256 curMintNum = levelInfos[level].mintNum; require(curMintNum < levelInfos[level].merkleProofAnswerNum, "mint approach error"); require(levelInfos[level].indexMinted[index] == false, "cur index already minted"); require(MerkleProof.verify(proofs, levelInfos[level].answerMerkleProofRootHash, keccak256(abi.encodePacked(nodeHash, index))), "answer error"); _payEth(level); if (level == MAX_LEVEL - 1 && levelInfos[MAX_LEVEL - 1].mintNum == 0){ _rewardShare = address(this).balance - investorShare; } levelInfos[level].mintNum = curMintNum + 1; levelInfos[level].indexMinted[index] = true; uint256 newTokenID = level * LEVEL_GAP + curMintNum; _safeMint(msg.sender, newTokenID); emit Mint(msg.sender, tokenID, newTokenID); } function mint(uint256 tokenID, uint256 level, bytes32 answerHash) public payable{ } function claimRewards(uint256[] memory tokenIDs) public{ } function adminClaimRemainRewards() public onlyOwner(){ } function invest(uint256 level) public payable{ } function cancleInvest(uint256 level, uint256 amount) public{ } function getUserInvestInfo(address user, uint256[] memory levels) public view returns(uint256[] memory){ } function getInvestRewards(address user) public view returns(uint256){ } function claimInvestRewards() public { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata path) public onlyOwner(){ } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
useFlag[tokenID]==false,"tokenID has been used"
224,150
useFlag[tokenID]==false
"mint locked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract TenLevels is ERC721, ERC721Enumerable, Ownable { // lib using Address for address payable; // struct struct LevelInfo { uint16 lastNeedNum; uint16 merkleProofAnswerNum; uint16 payCount; uint256[] payNumAndPrice; bytes32 answerMerkleProofRootHash; bytes32 answerHash; uint256 mintNum; mapping(uint256 => bool) indexMinted; } struct InvestInfo{ uint256 maxAmount; uint256 sharePer; uint256 curAmount; mapping(address => uint256) userAmount; } // constant uint256 public constant MAX_INVEST_LEVEL = 3; uint256 public constant MAX_LEVEL = 10; uint256 public constant LEVEL_GAP = 100000000; uint256 public constant MAX_PER = 10000; uint256 public constant OWNER_SHARE_PER = 2000; uint256 public constant INVESTOR_SHARE_PER = 3000; // storage mapping(uint256 => LevelInfo) public levelInfos; mapping(uint256 => bool) public useFlag; mapping(uint256 => bool) public rewardFlag; uint256 public investorShare; mapping(uint256 => InvestInfo) public investInfos; mapping(address => bool) public investClaimFlag; bool public adminInvestClaimFlag; uint256 private _rewardShare; string private _basePath; // event event Mint(address indexed user, uint256 indexed costToken, uint256 indexed newToken); event ClaimRewards(address indexed user, uint256[] tokenIDs, uint256 amount); event Invest(address indexed user, uint256 indexed level, uint256 amount); event CancleInvest(address indexed user, uint256 indexed level, uint256 amount); event InvestClaimRewards(address indexed user, uint256 amount); event AdminClaimRemainInvestRewards(uint256 amount); event MetadataUpdate(uint256 _tokenId); // function constructor() ERC721("TenLevels", "TL") { } function getMintedIndex(uint256 level, uint256[] memory index) public view returns(bool[] memory){ } function getMintPrice(uint256 level) public view returns (uint256){ } function getRewards() public view returns (uint256){ } function _payEth(uint256 level) private { } function merkleProofMint(uint256 tokenID, uint256 level, bytes32 nodeHash, uint256 index, bytes32[] memory proofs) public payable{ require(level >= 0 && level < MAX_LEVEL, "level error"); if (level > 0){ require(levelInfos[level-1].mintNum >= levelInfos[level].lastNeedNum, "level lock"); require(tokenID / LEVEL_GAP == level - 1, "tokenID level error"); require(ownerOf(tokenID) == msg.sender, "tokenID owner error"); require(useFlag[tokenID] == false, "tokenID has been used"); useFlag[tokenID] = true; emit MetadataUpdate(tokenID); } if (level < MAX_LEVEL - 1){ require(<FILL_ME>) } uint256 curMintNum = levelInfos[level].mintNum; require(curMintNum < levelInfos[level].merkleProofAnswerNum, "mint approach error"); require(levelInfos[level].indexMinted[index] == false, "cur index already minted"); require(MerkleProof.verify(proofs, levelInfos[level].answerMerkleProofRootHash, keccak256(abi.encodePacked(nodeHash, index))), "answer error"); _payEth(level); if (level == MAX_LEVEL - 1 && levelInfos[MAX_LEVEL - 1].mintNum == 0){ _rewardShare = address(this).balance - investorShare; } levelInfos[level].mintNum = curMintNum + 1; levelInfos[level].indexMinted[index] = true; uint256 newTokenID = level * LEVEL_GAP + curMintNum; _safeMint(msg.sender, newTokenID); emit Mint(msg.sender, tokenID, newTokenID); } function mint(uint256 tokenID, uint256 level, bytes32 answerHash) public payable{ } function claimRewards(uint256[] memory tokenIDs) public{ } function adminClaimRemainRewards() public onlyOwner(){ } function invest(uint256 level) public payable{ } function cancleInvest(uint256 level, uint256 amount) public{ } function getUserInvestInfo(address user, uint256[] memory levels) public view returns(uint256[] memory){ } function getInvestRewards(address user) public view returns(uint256){ } function claimInvestRewards() public { } function _baseURI() internal view override returns (string memory) { } function setBaseURI(string calldata path) public onlyOwner(){ } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId, uint256 batchSize ) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
levelInfos[MAX_LEVEL-1].mintNum==0,"mint locked"
224,150
levelInfos[MAX_LEVEL-1].mintNum==0