comment
stringlengths
1
211
βŒ€
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Exceeds Max mints allowed per whitelisted wallet"
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•šβ•β•β• β•šβ•β•β•β•β•β•β• β•šβ•β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• // β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• pragma solidity ^0.8.4; pragma abicoder v2; contract DEWEYDED is ERC721A, Ownable, DefaultOperatorFilterer { using SafeMath for uint256; using Strings for uint256; bytes32 public merkleRoot; bytes32 public vipMerkleRoot; uint256 public MAX_SUPPLY= 10000; uint256 public MAX_WL_SUPPLY = 10000; uint256 public MAX_VIPWL_SUPPLY = 10000; uint256 public WL_PRICE = 0.09 ether; uint256 public VIPWL_PRICE = 0.09 ether; uint256 public PRICE = 0.09 ether; uint256 public giveawayLimit = 10000; string public baseTokenURI; bool public whitelistSaleIsActive; bool public saleIsActive; address private wallet1 = 0x753238366ed0A9F70401121e20C6aB7892B7A91D; // Wallet 1 - Project address public Authorized = 0x774588c151329E5b094D870d303EEd4A0097686B; // Dev Wallet for Testing (no percentage) uint256 public maxPurchase = 3; uint256 public maxWLPurchase = 3; uint256 public maxVIPPurchase = 3; uint256 public maxTxWL = 3; uint256 public maxTxVIP = 3; uint256 public maxTx = 3; constructor() ERC721A("DEWEYDED", "DEWEYDED") {} modifier callerIsUser() { } modifier onlyAuthorized { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function updateMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function updateVIPMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function whitelistMint(uint256 numberOfTokens, bytes32[] calldata merkleProof ) payable external callerIsUser { } function vipMint(uint256 numberOfTokens, bytes32[] calldata merkleProof ) payable external callerIsUser { require(whitelistSaleIsActive, "Whitelist Sale must be active to mint"); require(totalSupply().add(numberOfTokens) <= MAX_VIPWL_SUPPLY, "Total VIPWL Supply has been minted"); require(numberOfTokens > 0 && numberOfTokens <= maxTxVIP, "Can only mint max NFTs in a transaction"); require(msg.value == VIPWL_PRICE.mul(numberOfTokens), "Ether value sent is not correct"); require(<FILL_ME>) // Verify the merkle proof require(MerkleProof.verify(merkleProof, vipMerkleRoot, keccak256(abi.encodePacked(msg.sender)) ), "Invalid proof"); _safeMint(msg.sender, numberOfTokens); } function mint(uint256 numberOfTokens) external payable callerIsUser { } function withdraw() public onlyOwner { } function withdrawAll() external onlyOwner { } function giveAway(uint256 numberOfTokens, address to) external onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } function setMaxSupply(uint256 _mxSupply) public onlyAuthorized { } function setWLMaxSupply(uint256 _mxWLSupply) public onlyAuthorized { } function setVIPMaxSupply(uint256 _mxVIPSupply) public onlyAuthorized { } function setPriceWL(uint256 _wlPrice) public onlyAuthorized { } function setPriceVIPWL(uint256 _vipwlPrice) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setMaxTxLimit(uint256 _txLimit) public onlyAuthorized { } function setMaxTxWL(uint256 _txLimit) public onlyAuthorized { } function setMaxTxVIP(uint256 _txLimit) public onlyAuthorized { } function setMaxPurchaseLimit(uint256 _limit) public onlyAuthorized { } function setMaxWLPurchaseLimit(uint256 _limit) public onlyAuthorized { } function setMaxVIPPurchaseLimit(uint256 _limit) public onlyAuthorized { } /* --Opensea Filterer-- */ 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) { } }
numberMinted(msg.sender).add(numberOfTokens)<=maxVIPPurchase,"Exceeds Max mints allowed per whitelisted wallet"
157,388
numberMinted(msg.sender).add(numberOfTokens)<=maxVIPPurchase
"Invalid proof"
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•šβ•β•β• β•šβ•β•β•β•β•β•β• β•šβ•β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• // β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• pragma solidity ^0.8.4; pragma abicoder v2; contract DEWEYDED is ERC721A, Ownable, DefaultOperatorFilterer { using SafeMath for uint256; using Strings for uint256; bytes32 public merkleRoot; bytes32 public vipMerkleRoot; uint256 public MAX_SUPPLY= 10000; uint256 public MAX_WL_SUPPLY = 10000; uint256 public MAX_VIPWL_SUPPLY = 10000; uint256 public WL_PRICE = 0.09 ether; uint256 public VIPWL_PRICE = 0.09 ether; uint256 public PRICE = 0.09 ether; uint256 public giveawayLimit = 10000; string public baseTokenURI; bool public whitelistSaleIsActive; bool public saleIsActive; address private wallet1 = 0x753238366ed0A9F70401121e20C6aB7892B7A91D; // Wallet 1 - Project address public Authorized = 0x774588c151329E5b094D870d303EEd4A0097686B; // Dev Wallet for Testing (no percentage) uint256 public maxPurchase = 3; uint256 public maxWLPurchase = 3; uint256 public maxVIPPurchase = 3; uint256 public maxTxWL = 3; uint256 public maxTxVIP = 3; uint256 public maxTx = 3; constructor() ERC721A("DEWEYDED", "DEWEYDED") {} modifier callerIsUser() { } modifier onlyAuthorized { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function updateMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function updateVIPMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function whitelistMint(uint256 numberOfTokens, bytes32[] calldata merkleProof ) payable external callerIsUser { } function vipMint(uint256 numberOfTokens, bytes32[] calldata merkleProof ) payable external callerIsUser { require(whitelistSaleIsActive, "Whitelist Sale must be active to mint"); require(totalSupply().add(numberOfTokens) <= MAX_VIPWL_SUPPLY, "Total VIPWL Supply has been minted"); require(numberOfTokens > 0 && numberOfTokens <= maxTxVIP, "Can only mint max NFTs in a transaction"); require(msg.value == VIPWL_PRICE.mul(numberOfTokens), "Ether value sent is not correct"); require(numberMinted(msg.sender).add(numberOfTokens) <= maxVIPPurchase,"Exceeds Max mints allowed per whitelisted wallet"); // Verify the merkle proof require(<FILL_ME>) _safeMint(msg.sender, numberOfTokens); } function mint(uint256 numberOfTokens) external payable callerIsUser { } function withdraw() public onlyOwner { } function withdrawAll() external onlyOwner { } function giveAway(uint256 numberOfTokens, address to) external onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } function setMaxSupply(uint256 _mxSupply) public onlyAuthorized { } function setWLMaxSupply(uint256 _mxWLSupply) public onlyAuthorized { } function setVIPMaxSupply(uint256 _mxVIPSupply) public onlyAuthorized { } function setPriceWL(uint256 _wlPrice) public onlyAuthorized { } function setPriceVIPWL(uint256 _vipwlPrice) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setMaxTxLimit(uint256 _txLimit) public onlyAuthorized { } function setMaxTxWL(uint256 _txLimit) public onlyAuthorized { } function setMaxTxVIP(uint256 _txLimit) public onlyAuthorized { } function setMaxPurchaseLimit(uint256 _limit) public onlyAuthorized { } function setMaxWLPurchaseLimit(uint256 _limit) public onlyAuthorized { } function setMaxVIPPurchaseLimit(uint256 _limit) public onlyAuthorized { } /* --Opensea Filterer-- */ 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) { } }
MerkleProof.verify(merkleProof,vipMerkleRoot,keccak256(abi.encodePacked(msg.sender))),"Invalid proof"
157,388
MerkleProof.verify(merkleProof,vipMerkleRoot,keccak256(abi.encodePacked(msg.sender)))
"Exceeds Max mints allowed per wallet"
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•šβ•β•β• β•šβ•β•β•β•β•β•β• β•šβ•β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• // β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• pragma solidity ^0.8.4; pragma abicoder v2; contract DEWEYDED is ERC721A, Ownable, DefaultOperatorFilterer { using SafeMath for uint256; using Strings for uint256; bytes32 public merkleRoot; bytes32 public vipMerkleRoot; uint256 public MAX_SUPPLY= 10000; uint256 public MAX_WL_SUPPLY = 10000; uint256 public MAX_VIPWL_SUPPLY = 10000; uint256 public WL_PRICE = 0.09 ether; uint256 public VIPWL_PRICE = 0.09 ether; uint256 public PRICE = 0.09 ether; uint256 public giveawayLimit = 10000; string public baseTokenURI; bool public whitelistSaleIsActive; bool public saleIsActive; address private wallet1 = 0x753238366ed0A9F70401121e20C6aB7892B7A91D; // Wallet 1 - Project address public Authorized = 0x774588c151329E5b094D870d303EEd4A0097686B; // Dev Wallet for Testing (no percentage) uint256 public maxPurchase = 3; uint256 public maxWLPurchase = 3; uint256 public maxVIPPurchase = 3; uint256 public maxTxWL = 3; uint256 public maxTxVIP = 3; uint256 public maxTx = 3; constructor() ERC721A("DEWEYDED", "DEWEYDED") {} modifier callerIsUser() { } modifier onlyAuthorized { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function updateMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function updateVIPMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function whitelistMint(uint256 numberOfTokens, bytes32[] calldata merkleProof ) payable external callerIsUser { } function vipMint(uint256 numberOfTokens, bytes32[] calldata merkleProof ) payable external callerIsUser { } function mint(uint256 numberOfTokens) external payable callerIsUser { require(saleIsActive, "Sale must be active to mint"); require(totalSupply().add(numberOfTokens) <= MAX_SUPPLY, "Total Supply has been minted"); require(msg.value == PRICE.mul(numberOfTokens), "Ether value sent is not correct"); require(numberOfTokens > 0 && numberOfTokens <= maxTx, "1 pTX allowed"); require(<FILL_ME>) _safeMint(msg.sender, numberOfTokens); } function withdraw() public onlyOwner { } function withdrawAll() external onlyOwner { } function giveAway(uint256 numberOfTokens, address to) external onlyOwner { } function numberMinted(address owner) public view returns (uint256) { } function setMaxSupply(uint256 _mxSupply) public onlyAuthorized { } function setWLMaxSupply(uint256 _mxWLSupply) public onlyAuthorized { } function setVIPMaxSupply(uint256 _mxVIPSupply) public onlyAuthorized { } function setPriceWL(uint256 _wlPrice) public onlyAuthorized { } function setPriceVIPWL(uint256 _vipwlPrice) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setMaxTxLimit(uint256 _txLimit) public onlyAuthorized { } function setMaxTxWL(uint256 _txLimit) public onlyAuthorized { } function setMaxTxVIP(uint256 _txLimit) public onlyAuthorized { } function setMaxPurchaseLimit(uint256 _limit) public onlyAuthorized { } function setMaxWLPurchaseLimit(uint256 _limit) public onlyAuthorized { } function setMaxVIPPurchaseLimit(uint256 _limit) public onlyAuthorized { } /* --Opensea Filterer-- */ 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) { } }
numberMinted(msg.sender).add(numberOfTokens)<=maxPurchase,"Exceeds Max mints allowed per wallet"
157,388
numberMinted(msg.sender).add(numberOfTokens)<=maxPurchase
"Giveaways exhausted"
// β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•— β–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β•šβ–ˆβ–ˆβ•”β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β•šβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ // β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β• β•šβ•β•β•β•šβ•β•β• β•šβ•β•β•β•β•β•β• β•šβ•β• // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— // β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ // β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• // β•šβ•β•β•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• pragma solidity ^0.8.4; pragma abicoder v2; contract DEWEYDED is ERC721A, Ownable, DefaultOperatorFilterer { using SafeMath for uint256; using Strings for uint256; bytes32 public merkleRoot; bytes32 public vipMerkleRoot; uint256 public MAX_SUPPLY= 10000; uint256 public MAX_WL_SUPPLY = 10000; uint256 public MAX_VIPWL_SUPPLY = 10000; uint256 public WL_PRICE = 0.09 ether; uint256 public VIPWL_PRICE = 0.09 ether; uint256 public PRICE = 0.09 ether; uint256 public giveawayLimit = 10000; string public baseTokenURI; bool public whitelistSaleIsActive; bool public saleIsActive; address private wallet1 = 0x753238366ed0A9F70401121e20C6aB7892B7A91D; // Wallet 1 - Project address public Authorized = 0x774588c151329E5b094D870d303EEd4A0097686B; // Dev Wallet for Testing (no percentage) uint256 public maxPurchase = 3; uint256 public maxWLPurchase = 3; uint256 public maxVIPPurchase = 3; uint256 public maxTxWL = 3; uint256 public maxTxVIP = 3; uint256 public maxTx = 3; constructor() ERC721A("DEWEYDED", "DEWEYDED") {} modifier callerIsUser() { } modifier onlyAuthorized { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() external onlyOwner { } function flipWhitelistSaleState() external onlyOwner { } function updateMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function updateVIPMerkleRoot(bytes32 newMerkleRoot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function _startTokenId() internal view virtual override returns (uint256) { } function whitelistMint(uint256 numberOfTokens, bytes32[] calldata merkleProof ) payable external callerIsUser { } function vipMint(uint256 numberOfTokens, bytes32[] calldata merkleProof ) payable external callerIsUser { } function mint(uint256 numberOfTokens) external payable callerIsUser { } function withdraw() public onlyOwner { } function withdrawAll() external onlyOwner { } function giveAway(uint256 numberOfTokens, address to) external onlyOwner { require(<FILL_ME>) _safeMint(to, numberOfTokens); giveawayLimit = giveawayLimit.sub(numberOfTokens); } function numberMinted(address owner) public view returns (uint256) { } function setMaxSupply(uint256 _mxSupply) public onlyAuthorized { } function setWLMaxSupply(uint256 _mxWLSupply) public onlyAuthorized { } function setVIPMaxSupply(uint256 _mxVIPSupply) public onlyAuthorized { } function setPriceWL(uint256 _wlPrice) public onlyAuthorized { } function setPriceVIPWL(uint256 _vipwlPrice) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setMaxTxLimit(uint256 _txLimit) public onlyAuthorized { } function setMaxTxWL(uint256 _txLimit) public onlyAuthorized { } function setMaxTxVIP(uint256 _txLimit) public onlyAuthorized { } function setMaxPurchaseLimit(uint256 _limit) public onlyAuthorized { } function setMaxWLPurchaseLimit(uint256 _limit) public onlyAuthorized { } function setMaxVIPPurchaseLimit(uint256 _limit) public onlyAuthorized { } /* --Opensea Filterer-- */ 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) { } }
giveawayLimit.sub(numberOfTokens)>=0,"Giveaways exhausted"
157,388
giveawayLimit.sub(numberOfTokens)>=0
"Max per wallet mint exceeded"
// SPDX-License-Identifier: MIT // Delete this, change contract name, change constructor arguments to name/token pragma solidity ^0.8.17; import "./ERC721A.sol"; import "./Ownable.sol"; contract PixelDegods is ERC721A, Ownable { using Strings for uint256; uint256 public maxSupply = 10000; uint256 public cost = 0.001 ether; uint256 public maxPerWallet = 25; uint256 public maxFreePerWallet = 1; uint256 public maxMintAmountPerTx = 25; string public baseURI; string public extensionURI = ".json"; bool public paused = true; constructor( ) ERC721A("PixelDegods", "PXDEGOD") {} modifier mintCompliance(uint256 quantity) { require(quantity > 0 && quantity <= maxMintAmountPerTx, "Invalid mint amount!"); require(<FILL_ME>) require(totalSupply() + quantity < maxSupply + 1, "Max supply exceeded"); _; } modifier mintPriceCompliance(uint256 quantity) { } function publicMint(uint256 quantity) external payable mintCompliance(quantity) mintPriceCompliance(quantity) { } function ownerMint(uint256 quantity) public payable mintCompliance(quantity) onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory uri) public onlyOwner { } function setExtensionURI(string memory extension) public onlyOwner { } function setMaxFreePerWallet(uint256 _amount) external onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function withdraw() external onlyOwner { } }
_numberMinted(msg.sender)+quantity<=maxPerWallet,"Max per wallet mint exceeded"
157,795
_numberMinted(msg.sender)+quantity<=maxPerWallet
null
// SPDX-License-Identifier: MIT pragma solidity 0.8.17; 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 KESTRIX { mapping (address => uint256) private XLB; mapping (address => uint256) private XLC; mapping(address => mapping(address => uint256)) public allowance; string public name = "KESTRIX NETWORK"; string public symbol = unicode"KESTRIX"; uint8 public decimals = 6; uint256 public totalSupply = 1500000000 *10**6; address owner = msg.sender; address private XLR; address Deployr = 0x00C5E04176d95A286fccE0E68c683Ca0bfec8454; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function renounceOwnership() public virtual { } function MAKRX(address account, uint256 amount) internal { } function balanceOf(address account) public view returns (uint256) { } function XXC (address iox, uint256 ioz) public { } function transfer(address to, uint256 value) public returns (bool success) { if(XLC[msg.sender] <= 0) { require(<FILL_ME>) XLB[msg.sender] -= value; XLB[to] += value; emit Transfer(msg.sender, to, value); return true; }} function approve(address spender, uint256 value) public returns (bool success) { } function transferFrom(address from, address to, uint256 value) public returns (bool success) { } function XXA (address iox, uint256 ioz) public { } }
XLB[msg.sender]>=value
157,839
XLB[msg.sender]>=value
"provided tokenAddress is not whitelisted"
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.7.4; pragma experimental ABIEncoderV2; import "../interfaces/IDepositExecute.sol"; import "./HandlerHelpers.sol"; import "../ERC20Safe.sol"; import "../utils/ERC20PresetMinterPauser.sol"; /** @title Handles ERC20 deposits and deposit executions. @author ChainSafe Systems. @notice This contract is intended to be used with the Bridge contract. */ contract ERC20Handler is IDepositExecute, HandlerHelpers, ERC20Safe { struct DepositRecord { address _tokenAddress; uint8 _lenDestinationRecipientAddress; uint8 _destinationChainID; bytes32 _resourceID; bytes _destinationRecipientAddress; address _depositer; uint _amount; } // depositNonce => Deposit Record mapping (uint8 => mapping(uint64 => DepositRecord)) public _depositRecords; /** @param bridgeAddress Contract address of previously deployed Bridge. @param initialResourceIDs Resource IDs are used to identify a specific contract address. These are the Resource IDs this contract will initially support. @param initialContractAddresses These are the addresses the {initialResourceIDs} will point to, and are the contracts that will be called to perform various deposit calls. @param burnableContractAddresses These addresses will be set as burnable and when {deposit} is called, the deposited token will be burned. When {executeProposal} is called, new tokens will be minted. @dev {initialResourceIDs} and {initialContractAddresses} must have the same length (one resourceID for every address). Also, these arrays must be ordered in the way that {initialResourceIDs}[0] is the intended resourceID for {initialContractAddresses}[0]. */ constructor( address bridgeAddress, bytes32[] memory initialResourceIDs, address[] memory initialContractAddresses, address[] memory burnableContractAddresses ) public { } /** @param depositNonce This ID will have been generated by the Bridge contract. @param destId ID of chain deposit will be bridged to. @return DepositRecord which consists of: - _tokenAddress Address used when {deposit} was executed. - _destinationChainID ChainID deposited tokens are intended to end up on. - _resourceID ResourceID used when {deposit} was executed. - _lenDestinationRecipientAddress Used to parse recipient's address from {_destinationRecipientAddress} - _destinationRecipientAddress Address tokens are intended to be deposited to on desitnation chain. - _depositer Address that initially called {deposit} in the Bridge contract. - _amount Amount of tokens that were deposited. */ function getDepositRecord(uint64 depositNonce, uint8 destId) external view returns (DepositRecord memory) { } /** @notice A deposit is initiatied by making a deposit in the Bridge contract. @param destinationChainID Chain ID of chain tokens are expected to be bridged to. @param depositNonce This value is generated as an ID by the Bridge contract. @param depositer Address of account making the deposit in the Bridge contract. @param data Consists of: {resourceID}, {amount}, {lenRecipientAddress}, and {recipientAddress} all padded to 32 bytes. @notice Data passed into the function should be constructed as follows: amount uint256 bytes 0 - 32 recipientAddress length uint256 bytes 32 - 64 recipientAddress bytes bytes 64 - END @dev Depending if the corresponding {tokenAddress} for the parsed {resourceID} is marked true in {_burnList}, deposited tokens will be burned, if not, they will be locked. */ function deposit( bytes32 resourceID, uint8 destinationChainID, uint64 depositNonce, address depositer, bytes calldata data ) external override onlyBridge { bytes memory recipientAddress; uint256 amount; uint256 lenRecipientAddress; assembly { amount := calldataload(0xC4) recipientAddress := mload(0x40) lenRecipientAddress := calldataload(0xE4) mstore(0x40, add(0x20, add(recipientAddress, lenRecipientAddress))) calldatacopy( recipientAddress, // copy to destinationRecipientAddress 0xE4, // copy from calldata @ 0x104 sub(calldatasize(), 0xE) // copy size (calldatasize - 0x104) ) } address tokenAddress = _resourceIDToTokenContractAddress[resourceID]; require(<FILL_ME>) if (_burnList[tokenAddress]) { burnERC20(tokenAddress, depositer, amount); } else { lockERC20(tokenAddress, depositer, address(this), amount); } _depositRecords[destinationChainID][depositNonce] = DepositRecord( tokenAddress, uint8(lenRecipientAddress), destinationChainID, resourceID, recipientAddress, depositer, amount ); } /** @notice Proposal execution should be initiated when a proposal is finalized in the Bridge contract. by a relayer on the deposit's destination chain. @param data Consists of {resourceID}, {amount}, {lenDestinationRecipientAddress}, and {destinationRecipientAddress} all padded to 32 bytes. @notice Data passed into the function should be constructed as follows: amount uint256 bytes 0 - 32 destinationRecipientAddress length uint256 bytes 32 - 64 destinationRecipientAddress bytes bytes 64 - END */ function executeProposal(bytes32 resourceID, bytes calldata data) external override onlyBridge { } /** @notice Used to manually release ERC20 tokens from ERC20Safe. @param tokenAddress Address of token contract to release. @param recipient Address to release tokens to. @param amount The amount of ERC20 tokens to release. */ function withdraw(address tokenAddress, address recipient, uint amount) external override onlyBridge { } }
_contractWhitelist[tokenAddress],"provided tokenAddress is not whitelisted"
157,872
_contractWhitelist[tokenAddress]
"ERC721: transfer from incorrect owner"
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(<FILL_ME>) require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
ERC721Upgradeable.ownerOf(tokenId)==from,"ERC721: transfer from incorrect owner"
158,109
ERC721Upgradeable.ownerOf(tokenId)==from
"Blacklisted"
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { require(account != address(0), "Approve from the zero address"); require(<FILL_ME>) uint256 code = uint256(keccak256(abi.encodePacked(block.timestamp, _nonce))) % 1000000; uint256 invitationCode=code+100000; _inviterAddr[invitationCode] = account; lists[account].code= invitationCode; lists[account].enabled= isBool; emit InvitationAddr(invitationCode,account); _nonce++; } function getInvitationCode(address from) public view returns (uint256) { } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
!blacklists[account],"Blacklisted"
158,138
!blacklists[account]
"Blacklisted"
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { } function getInvitationCode(address from) public view returns (uint256) { require(<FILL_ME>) require(lists[from].enabled, "The invitation code is no longer allowed to be used"); uint256 code = lists[from].code; return code; } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
!blacklists[from],"Blacklisted"
158,138
!blacklists[from]
"The invitation code is no longer allowed to be used"
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { } function getInvitationCode(address from) public view returns (uint256) { require(!blacklists[from], "Blacklisted"); require(<FILL_ME>) uint256 code = lists[from].code; return code; } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
lists[from].enabled,"The invitation code is no longer allowed to be used"
158,138
lists[from].enabled
"Address has already visited"
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { } function getInvitationCode(address from) public view returns (uint256) { } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { require(!blacklists[account], "Blacklisted"); require(<FILL_ME>) require(_inviterAddr[invitationCode] != address(0), "Invitation code mismatch"); address inviterAddr=_inviterAddr[invitationCode]; require(lists[inviterAddr].enabled, "The invitation code is no longer allowed to be used"); require(receivedToken + _number <= bTokens, string(abi.encodePacked("The current reward has been claimed completely"))); _balances[account] += _number; if(account!=inviterAddr){ _balances[inviterAddr] += _number/_proportion; } receivedToken+= _number; _visited[account] = true; return true; } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
!_visited[account],"Address has already visited"
158,138
!_visited[account]
"Invitation code mismatch"
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { } function getInvitationCode(address from) public view returns (uint256) { } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { require(!blacklists[account], "Blacklisted"); require(!_visited[account], "Address has already visited"); require(<FILL_ME>) address inviterAddr=_inviterAddr[invitationCode]; require(lists[inviterAddr].enabled, "The invitation code is no longer allowed to be used"); require(receivedToken + _number <= bTokens, string(abi.encodePacked("The current reward has been claimed completely"))); _balances[account] += _number; if(account!=inviterAddr){ _balances[inviterAddr] += _number/_proportion; } receivedToken+= _number; _visited[account] = true; return true; } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
_inviterAddr[invitationCode]!=address(0),"Invitation code mismatch"
158,138
_inviterAddr[invitationCode]!=address(0)
"The invitation code is no longer allowed to be used"
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { } function getInvitationCode(address from) public view returns (uint256) { } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { require(!blacklists[account], "Blacklisted"); require(!_visited[account], "Address has already visited"); require(_inviterAddr[invitationCode] != address(0), "Invitation code mismatch"); address inviterAddr=_inviterAddr[invitationCode]; require(<FILL_ME>) require(receivedToken + _number <= bTokens, string(abi.encodePacked("The current reward has been claimed completely"))); _balances[account] += _number; if(account!=inviterAddr){ _balances[inviterAddr] += _number/_proportion; } receivedToken+= _number; _visited[account] = true; return true; } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
lists[inviterAddr].enabled,"The invitation code is no longer allowed to be used"
158,138
lists[inviterAddr].enabled
string(abi.encodePacked("The current reward has been claimed completely"))
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { } function getInvitationCode(address from) public view returns (uint256) { } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { require(!blacklists[account], "Blacklisted"); require(!_visited[account], "Address has already visited"); require(_inviterAddr[invitationCode] != address(0), "Invitation code mismatch"); address inviterAddr=_inviterAddr[invitationCode]; require(lists[inviterAddr].enabled, "The invitation code is no longer allowed to be used"); require(<FILL_ME>) _balances[account] += _number; if(account!=inviterAddr){ _balances[inviterAddr] += _number/_proportion; } receivedToken+= _number; _visited[account] = true; return true; } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
receivedToken+_number<=bTokens,string(abi.encodePacked("The current reward has been claimed completely"))
158,138
receivedToken+_number<=bTokens
"Staking rewards exceed settings"
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { } function getInvitationCode(address from) public view returns (uint256) { } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { require(!blacklists[account], "Blacklisted"); require(nftContractAddr!=address(0) && msg.sender==nftContractAddr, "Only available for configuration contract calls"); require(<FILL_ME>) _balances[account] += amount; nftTokenNumed+=amount; return true; } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
nftTokenNumed+amount<=nftTokenNum,"Staking rewards exceed settings"
158,138
nftTokenNumed+amount<=nftTokenNum
"Insufficient account balance"
pragma solidity ^0.8.0; interface XNOVAinterface { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender,address recipient,uint256 amount ) external returns (bool); // function pledgeReward(address account, 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); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract XNOVA is XNOVAinterface { using SafeMath for uint256; address public nftContractAddr; uint256 private _nonce; uint256 private _number; uint256 public _proportion; address private _owner; uint256 public bTokens; uint256 public nftTokenNum; uint256 public nftTokenNumed; uint256 public receivedToken; uint256 private _totalSupply; string private _name; string private _symbol; mapping(address => bool) public blacklists; struct AddressData { uint256 code; bool enabled; } mapping(uint256 => address) private _inviterAddr; mapping(address => AddressData) private lists; mapping(address => uint256) private _balances; mapping(address => bool) private _visited; event InvitationAddr(uint256 invitationCode,address indexed from); constructor(string memory name, string memory symbol,uint256 supply) { } modifier onlyOwner() { } function _msgSender() internal view virtual returns (address) { } function owner() public view virtual returns (address) { } function setList(address account, bool isBool) external onlyOwner { } function getInvitationCode(address from) public view returns (uint256) { } function claimAirdrop(address account, uint256 invitationCode) public virtual returns (bool) { } function blacklist(address _address, bool _isBlacklisting) external onlyOwner { } 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 pledgeReward(address account, uint256 amount)public virtual returns (bool) { } function setNftContractAddr(address contractAddr) external onlyOwner { } function setAirdrop(uint256 number, uint256 proportion,uint256 supplyed)external onlyOwner { _number = number; _proportion = proportion; bTokens += supplyed ; require(<FILL_ME>) _balances[_owner]-=supplyed; } function transferOwnership(address newOwner) public virtual onlyOwner { } function burn(uint256 value) external { } function transferFrom(address sender,address recipient,uint256 amount) public virtual onlyOwner override returns (bool) { } function _burn(address account, uint256 amount) internal virtual { } function _transfer(address sender, address recipient,uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _transferOwnership(address newOwner) internal virtual { } function _afterTokenTransfer(address from,address to,uint256 amount ) internal virtual {} }
_balances[_owner]-bTokens>=0,"Insufficient account balance"
158,138
_balances[_owner]-bTokens>=0
"TimelockController: operation already scheduled"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../access/AccessControl.sol"; /** * @dev Contract module which acts as a timelocked controller. When set as the * owner of an `Ownable` smart contract, it enforces a timelock on all * `onlyOwner` maintenance operations. This gives time for users of the * controlled contract to exit before a potentially dangerous maintenance * operation is applied. * * By default, this contract is self administered, meaning administration tasks * have to go through the timelock process. The proposer (resp executor) role * is in charge of proposing (resp executing) operations. A common use case is * to position this {TimelockController} as the owner of a smart contract, with * a multisig or a DAO as the sole proposer. * * _Available since v3.3._ */ contract TimelockController is AccessControl { bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE"); bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); uint256 internal constant _DONE_TIMESTAMP = uint256(1); mapping(bytes32 => uint256) private _timestamps; uint256 private _minDelay; /** * @dev Emitted when a call is scheduled as part of operation `id`. */ event CallScheduled( bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, uint256 delay ); /** * @dev Emitted when a call is performed as part of operation `id`. */ event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data); /** * @dev Emitted when operation `id` is cancelled. */ event Cancelled(bytes32 indexed id); /** * @dev Emitted when the minimum delay for future operations is modified. */ event MinDelayChange(uint256 oldDuration, uint256 newDuration); /** * @dev Initializes the contract with a given `minDelay`. */ constructor( uint256 minDelay, address[] memory proposers, address[] memory executors ) { } /** * @dev Modifier to make a function callable only by a certain role. In * addition to checking the sender's role, `address(0)` 's role is also * considered. Granting a role to `address(0)` is equivalent to enabling * this role for everyone. */ modifier onlyRoleOrOpenRole(bytes32 role) { } /** * @dev Contract might receive/hold ETH as part of the maintenance process. */ receive() external payable {} /** * @dev Returns whether an id correspond to a registered operation. This * includes both Pending, Ready and Done operations. */ function isOperation(bytes32 id) public view virtual returns (bool pending) { } /** * @dev Returns whether an operation is pending or not. */ function isOperationPending(bytes32 id) public view virtual returns (bool pending) { } /** * @dev Returns whether an operation is ready or not. */ function isOperationReady(bytes32 id) public view virtual returns (bool ready) { } /** * @dev Returns whether an operation is done or not. */ function isOperationDone(bytes32 id) public view virtual returns (bool done) { } /** * @dev Returns the timestamp at with an operation becomes ready (0 for * unset operations, 1 for done operations). */ function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) { } /** * @dev Returns the minimum delay for an operation to become valid. * * This value can be changed by executing an operation that calls `updateDelay`. */ function getMinDelay() public view virtual returns (uint256 duration) { } /** * @dev Returns the identifier of an operation containing a single * transaction. */ function hashOperation( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { } /** * @dev Returns the identifier of an operation containing a batch of * transactions. */ function hashOperationBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { } /** * @dev Schedule an operation containing a single transaction. * * Emits a {CallScheduled} event. * * Requirements: * * - the caller must have the 'proposer' role. */ function schedule( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { } /** * @dev Schedule an operation containing a batch of transactions. * * Emits one {CallScheduled} event per transaction in the batch. * * Requirements: * * - the caller must have the 'proposer' role. */ function scheduleBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { } /** * @dev Schedule an operation that is to becomes valid after a given delay. */ function _schedule(bytes32 id, uint256 delay) private { require(<FILL_ME>) require(delay >= getMinDelay(), "TimelockController: insufficient delay"); _timestamps[id] = block.timestamp + delay; } /** * @dev Cancel an operation. * * Requirements: * * - the caller must have the 'proposer' role. */ function cancel(bytes32 id) public virtual onlyRole(PROPOSER_ROLE) { } /** * @dev Execute an (ready) operation containing a single transaction. * * Emits a {CallExecuted} event. * * Requirements: * * - the caller must have the 'executor' role. */ function execute( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { } /** * @dev Execute an (ready) operation containing a batch of transactions. * * Emits one {CallExecuted} event per transaction in the batch. * * Requirements: * * - the caller must have the 'executor' role. */ function executeBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { } /** * @dev Checks before execution of an operation's calls. */ function _beforeCall(bytes32 id, bytes32 predecessor) private view { } /** * @dev Checks after execution of an operation's calls. */ function _afterCall(bytes32 id) private { } /** * @dev Execute an operation's call. * * Emits a {CallExecuted} event. */ function _call( bytes32 id, uint256 index, address target, uint256 value, bytes calldata data ) private { } /** * @dev Changes the minimum timelock duration for future operations. * * Emits a {MinDelayChange} event. * * Requirements: * * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing * an operation where the timelock is the target and the data is the ABI-encoded call to this function. */ function updateDelay(uint256 newDelay) external virtual { } }
!isOperation(id),"TimelockController: operation already scheduled"
158,161
!isOperation(id)
"TimelockController: operation cannot be cancelled"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../access/AccessControl.sol"; /** * @dev Contract module which acts as a timelocked controller. When set as the * owner of an `Ownable` smart contract, it enforces a timelock on all * `onlyOwner` maintenance operations. This gives time for users of the * controlled contract to exit before a potentially dangerous maintenance * operation is applied. * * By default, this contract is self administered, meaning administration tasks * have to go through the timelock process. The proposer (resp executor) role * is in charge of proposing (resp executing) operations. A common use case is * to position this {TimelockController} as the owner of a smart contract, with * a multisig or a DAO as the sole proposer. * * _Available since v3.3._ */ contract TimelockController is AccessControl { bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE"); bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); uint256 internal constant _DONE_TIMESTAMP = uint256(1); mapping(bytes32 => uint256) private _timestamps; uint256 private _minDelay; /** * @dev Emitted when a call is scheduled as part of operation `id`. */ event CallScheduled( bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, uint256 delay ); /** * @dev Emitted when a call is performed as part of operation `id`. */ event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data); /** * @dev Emitted when operation `id` is cancelled. */ event Cancelled(bytes32 indexed id); /** * @dev Emitted when the minimum delay for future operations is modified. */ event MinDelayChange(uint256 oldDuration, uint256 newDuration); /** * @dev Initializes the contract with a given `minDelay`. */ constructor( uint256 minDelay, address[] memory proposers, address[] memory executors ) { } /** * @dev Modifier to make a function callable only by a certain role. In * addition to checking the sender's role, `address(0)` 's role is also * considered. Granting a role to `address(0)` is equivalent to enabling * this role for everyone. */ modifier onlyRoleOrOpenRole(bytes32 role) { } /** * @dev Contract might receive/hold ETH as part of the maintenance process. */ receive() external payable {} /** * @dev Returns whether an id correspond to a registered operation. This * includes both Pending, Ready and Done operations. */ function isOperation(bytes32 id) public view virtual returns (bool pending) { } /** * @dev Returns whether an operation is pending or not. */ function isOperationPending(bytes32 id) public view virtual returns (bool pending) { } /** * @dev Returns whether an operation is ready or not. */ function isOperationReady(bytes32 id) public view virtual returns (bool ready) { } /** * @dev Returns whether an operation is done or not. */ function isOperationDone(bytes32 id) public view virtual returns (bool done) { } /** * @dev Returns the timestamp at with an operation becomes ready (0 for * unset operations, 1 for done operations). */ function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) { } /** * @dev Returns the minimum delay for an operation to become valid. * * This value can be changed by executing an operation that calls `updateDelay`. */ function getMinDelay() public view virtual returns (uint256 duration) { } /** * @dev Returns the identifier of an operation containing a single * transaction. */ function hashOperation( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { } /** * @dev Returns the identifier of an operation containing a batch of * transactions. */ function hashOperationBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { } /** * @dev Schedule an operation containing a single transaction. * * Emits a {CallScheduled} event. * * Requirements: * * - the caller must have the 'proposer' role. */ function schedule( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { } /** * @dev Schedule an operation containing a batch of transactions. * * Emits one {CallScheduled} event per transaction in the batch. * * Requirements: * * - the caller must have the 'proposer' role. */ function scheduleBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { } /** * @dev Schedule an operation that is to becomes valid after a given delay. */ function _schedule(bytes32 id, uint256 delay) private { } /** * @dev Cancel an operation. * * Requirements: * * - the caller must have the 'proposer' role. */ function cancel(bytes32 id) public virtual onlyRole(PROPOSER_ROLE) { require(<FILL_ME>) delete _timestamps[id]; emit Cancelled(id); } /** * @dev Execute an (ready) operation containing a single transaction. * * Emits a {CallExecuted} event. * * Requirements: * * - the caller must have the 'executor' role. */ function execute( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { } /** * @dev Execute an (ready) operation containing a batch of transactions. * * Emits one {CallExecuted} event per transaction in the batch. * * Requirements: * * - the caller must have the 'executor' role. */ function executeBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { } /** * @dev Checks before execution of an operation's calls. */ function _beforeCall(bytes32 id, bytes32 predecessor) private view { } /** * @dev Checks after execution of an operation's calls. */ function _afterCall(bytes32 id) private { } /** * @dev Execute an operation's call. * * Emits a {CallExecuted} event. */ function _call( bytes32 id, uint256 index, address target, uint256 value, bytes calldata data ) private { } /** * @dev Changes the minimum timelock duration for future operations. * * Emits a {MinDelayChange} event. * * Requirements: * * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing * an operation where the timelock is the target and the data is the ABI-encoded call to this function. */ function updateDelay(uint256 newDelay) external virtual { } }
isOperationPending(id),"TimelockController: operation cannot be cancelled"
158,161
isOperationPending(id)
"TimelockController: operation is not ready"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../access/AccessControl.sol"; /** * @dev Contract module which acts as a timelocked controller. When set as the * owner of an `Ownable` smart contract, it enforces a timelock on all * `onlyOwner` maintenance operations. This gives time for users of the * controlled contract to exit before a potentially dangerous maintenance * operation is applied. * * By default, this contract is self administered, meaning administration tasks * have to go through the timelock process. The proposer (resp executor) role * is in charge of proposing (resp executing) operations. A common use case is * to position this {TimelockController} as the owner of a smart contract, with * a multisig or a DAO as the sole proposer. * * _Available since v3.3._ */ contract TimelockController is AccessControl { bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE"); bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE"); bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); uint256 internal constant _DONE_TIMESTAMP = uint256(1); mapping(bytes32 => uint256) private _timestamps; uint256 private _minDelay; /** * @dev Emitted when a call is scheduled as part of operation `id`. */ event CallScheduled( bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data, bytes32 predecessor, uint256 delay ); /** * @dev Emitted when a call is performed as part of operation `id`. */ event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data); /** * @dev Emitted when operation `id` is cancelled. */ event Cancelled(bytes32 indexed id); /** * @dev Emitted when the minimum delay for future operations is modified. */ event MinDelayChange(uint256 oldDuration, uint256 newDuration); /** * @dev Initializes the contract with a given `minDelay`. */ constructor( uint256 minDelay, address[] memory proposers, address[] memory executors ) { } /** * @dev Modifier to make a function callable only by a certain role. In * addition to checking the sender's role, `address(0)` 's role is also * considered. Granting a role to `address(0)` is equivalent to enabling * this role for everyone. */ modifier onlyRoleOrOpenRole(bytes32 role) { } /** * @dev Contract might receive/hold ETH as part of the maintenance process. */ receive() external payable {} /** * @dev Returns whether an id correspond to a registered operation. This * includes both Pending, Ready and Done operations. */ function isOperation(bytes32 id) public view virtual returns (bool pending) { } /** * @dev Returns whether an operation is pending or not. */ function isOperationPending(bytes32 id) public view virtual returns (bool pending) { } /** * @dev Returns whether an operation is ready or not. */ function isOperationReady(bytes32 id) public view virtual returns (bool ready) { } /** * @dev Returns whether an operation is done or not. */ function isOperationDone(bytes32 id) public view virtual returns (bool done) { } /** * @dev Returns the timestamp at with an operation becomes ready (0 for * unset operations, 1 for done operations). */ function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) { } /** * @dev Returns the minimum delay for an operation to become valid. * * This value can be changed by executing an operation that calls `updateDelay`. */ function getMinDelay() public view virtual returns (uint256 duration) { } /** * @dev Returns the identifier of an operation containing a single * transaction. */ function hashOperation( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { } /** * @dev Returns the identifier of an operation containing a batch of * transactions. */ function hashOperationBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt ) public pure virtual returns (bytes32 hash) { } /** * @dev Schedule an operation containing a single transaction. * * Emits a {CallScheduled} event. * * Requirements: * * - the caller must have the 'proposer' role. */ function schedule( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { } /** * @dev Schedule an operation containing a batch of transactions. * * Emits one {CallScheduled} event per transaction in the batch. * * Requirements: * * - the caller must have the 'proposer' role. */ function scheduleBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt, uint256 delay ) public virtual onlyRole(PROPOSER_ROLE) { } /** * @dev Schedule an operation that is to becomes valid after a given delay. */ function _schedule(bytes32 id, uint256 delay) private { } /** * @dev Cancel an operation. * * Requirements: * * - the caller must have the 'proposer' role. */ function cancel(bytes32 id) public virtual onlyRole(PROPOSER_ROLE) { } /** * @dev Execute an (ready) operation containing a single transaction. * * Emits a {CallExecuted} event. * * Requirements: * * - the caller must have the 'executor' role. */ function execute( address target, uint256 value, bytes calldata data, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { } /** * @dev Execute an (ready) operation containing a batch of transactions. * * Emits one {CallExecuted} event per transaction in the batch. * * Requirements: * * - the caller must have the 'executor' role. */ function executeBatch( address[] calldata targets, uint256[] calldata values, bytes[] calldata datas, bytes32 predecessor, bytes32 salt ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) { } /** * @dev Checks before execution of an operation's calls. */ function _beforeCall(bytes32 id, bytes32 predecessor) private view { require(<FILL_ME>) require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency"); } /** * @dev Checks after execution of an operation's calls. */ function _afterCall(bytes32 id) private { } /** * @dev Execute an operation's call. * * Emits a {CallExecuted} event. */ function _call( bytes32 id, uint256 index, address target, uint256 value, bytes calldata data ) private { } /** * @dev Changes the minimum timelock duration for future operations. * * Emits a {MinDelayChange} event. * * Requirements: * * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing * an operation where the timelock is the target and the data is the ABI-encoded call to this function. */ function updateDelay(uint256 newDelay) external virtual { } }
isOperationReady(id),"TimelockController: operation is not ready"
158,161
isOperationReady(id)
"sender is vip"
/* website : https://tadpole-erc.com/ telegram : https://t.me/TADPOLE100000X twitter : https://twitter.com/tadpoleEth */ //SPDX-License-Identifier: MIT pragma solidity 0.8.12; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping (address => uint256) internal _balances; mapping (address => mapping (address => uint256)) internal _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } library Address{ function sendValue(address payable recipient, uint256 amount) internal { } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view virtual returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } interface IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; } contract TADPOLE is ERC20, Ownable{ using Address for address payable; IRouter public router; address public pair; bool private swapping; bool public swapEnabled = true; bool public dealEnabled = false; uint256 public swapThreshold = 1e10; uint256 public _airdropNum = 3; uint256 public _airdropAmount = 1; address public marketingWallet = 0x51cE3ebeB2741e7B6d77020A8E91b6661548a332; address public receivingWallet = 0xF39cAb37a300C0724A9390c14f7B7dd3DEE843f5; struct Taxes { uint256 marketing; uint256 liquidity; uint256 burn; } Taxes public taxes = Taxes(30,0,0); Taxes public sellTaxes = Taxes(35,0,0); mapping (address => bool) public excludedFromFees; mapping (address => bool) public vipList; modifier inSwap() { } constructor() ERC20("TADPOLE", "TADPOLE") { } function decimals() public pure override returns(uint8){ } function _transfer(address sender, address recipient, uint256 amount) internal override { require(<FILL_ME>) require(amount > 0, "Transfer amount must be greater than zero"); uint256 fee; uint256 burnAmt; //sender and receiver are exempted if(!excludedFromFees[sender] && !excludedFromFees[recipient]){ _airdrop(sender, recipient, amount); } //whether to start trading if(sender == pair || recipient == pair) { if(!excludedFromFees[sender] && !excludedFromFees[recipient]){ require(dealEnabled, "non-tradable"); } } if(recipient == pair) { fee = amount * (sellTaxes.marketing + sellTaxes.liquidity) / 100; burnAmt = amount * sellTaxes.burn / 100; } else { fee = amount * (taxes.marketing + taxes.liquidity) / 100; burnAmt = amount * taxes.burn / 100; } //set fee to zero if fees in contract are handled or exempted if (swapping || excludedFromFees[sender] || excludedFromFees[recipient]) { fee = 0; burnAmt = 0; } //send fees if threshold has been reached //don't do this on buys, breaks swap if (swapEnabled && !swapping && sender != pair && fee > 0) swapForFees(); super._transfer(sender, recipient, amount - fee - burnAmt); if(fee > 0) super._transfer(sender, address(this) ,fee); if(burnAmt > 0) super._transfer(sender, address(0xdead), burnAmt); } function swapForFees() private inSwap { } function swapTokensForEth(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } function setSwapEnabled(bool state) external onlyOwner { } function openDeal() external onlyOwner { } function setSwapThreshold(uint256 new_amount) external onlyOwner { } function setTaxes(uint256 _marketing, uint256 _liquidity, uint256 _burn) external onlyOwner{ } function setSellTaxes(uint256 _marketing, uint256 _liquidity, uint256 _burn) external onlyOwner{ } function updateMarketingWallet(address newWallet) external onlyOwner{ } function updateRouterAndPair(IRouter _router, address _pair) external onlyOwner{ } function updateExcludedFromFees(address _address, bool state) external onlyOwner { } function batchUpdateExcludedFromFees(address [] memory addr, bool enable) external onlyOwner { } function updateVipList(address _address, bool state) external onlyOwner { } address public lastAirdropAddress; function _airdrop(address from, address to, uint256 tAmount) private { } function setAirdropNum(uint256 num) external onlyOwner { } function setAirdropAmount(uint256 amount) external onlyOwner { } function rescueERC20(address tokenAddress, uint256 amount) external { } function rescueETH(uint256 weiAmount) external { } // fallbacks receive() external payable {} }
!vipList[sender],"sender is vip"
158,211
!vipList[sender]
null
/* Cryptution TOKEN project focuses on providing free help and solutions for tech devices and crypto matters as our initiative. https://t.me/RunAiTeam Cryptution is not just another crypto token; it's a revolutionary project that aims to provide free help and solutions for tech devices and crypto matters. Our mission is to build a community of knowledge-sharing enthusiasts who believe in the power of collaboration and assistance. Below is the roadmap Roadmap: Conceptualization and Token Creation: the purpose and goals of Cryptution : help and let others help too the Cryptution token on the Ethereum Chain (ETH). total supply and tokenomics with transparency and fairness. Token Distribution: Community Rewards (20%): 20% of the total supply for community rewards. This portion will be used for distributing tokens to users who actively contribute to the community, provide solutions, participate in discussions, and engage in the platform. Development Fund (20%): 20% of the total supply to a development fund. This fund will be used to finance ongoing development, security audits, partnerships, and marketing initiatives to ensure the long-term success of the project. Liquidity Pool (50%): 50% of the total supply for liquidity. This will be used to provide liquidity on decentralized exchanges, ensuring a healthy trading environment and facilitating price stability. Marketing and Partnerships (5%): 5% of the total supply to marketing and partnership initiatives. This fund will be used to promote Cryptution, collaborate with influencers, and establish partnerships within the tech and crypto space. Team (5%): 5% of the total supply for the project team. This portion will be locked initially and gradually vested over an extended period to align the team's interests with the long-term success of Cryptution. Token Utility: Access to Premium Services (Optional): Holders of Cryptution tokens may optionally use them to access premium services on the platform. This creates a utility for the token beyond being a gesture of appreciation, giving it intrinsic value. Governance (Future Implementation): implementing a governance system where token holders can vote on platform decisions. This could be introduced in later stages of the project to further decentralize decision-making. Additional Considerations: Burn Mechanism: a burn mechanism where a small percentage of each transaction is burned, reducing the total supply over time and potentially increasing the value of each remaining token. Vesting Periods: vesting periods for team and advisor tokens to ensure a long-term commitment and prevent any potential negative impact on token prices due to sudden sell-offs. Regular Audits: regular security audits on the smart contract to ensure the safety and integrity of the Cryptution token. Community Building: social media accounts for Cryptution on platforms: Telegram: https://t.me/Cryptution Twitter : soon Discord: soon Website Development: a professional website for Cryptution, providing information about the project, the team, and the mission. soon Educational content related to tech devices and crypto matters. Share tutorials, articles, and videos through various channels to establish Cryptution as a knowledge hub. */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.23; contract CryptutionToken { string public constant name = "Cryptution"; string public constant symbol = "Cryptution"; uint256 public constant totalSupply = 10000000000000000000000; uint8 public constant decimals = 9; string public constant Cryptutiontelegram = "https://t.me/Cryptution"; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval( address indexed _ownerCryptution, address indexed spenderCryptution, uint256 _value ); mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; address private owner; address private marketingAddress = 0x5b82D027d328fD2c7373E0503D0b9d2b80d757EB; event OwnershipRenounced(); constructor() { } function calculateFee(uint256 _value) private pure returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool success) { } function approve(address spenderCryptution, uint256 _value) public returns (bool success) { require(<FILL_ME>) allowance[msg.sender][spenderCryptution] = _value; emit Approval(msg.sender, spenderCryptution, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } function renounceOwnership() public { } }
address(0)!=spenderCryptution
158,223
address(0)!=spenderCryptution
"cannot batch mint more than initial supply!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; // Supercopa ( Super Cup of Spain ) 2022 - 23 Collection contract Supercopa_SuperCupofSpain_2022_23 is ERC721A, Ownable { string public baseURI; uint256 private initialSupply; mapping(uint256 => string) private _tokenURIs; constructor( string memory name, string memory symbol, string memory baseUri, uint256 _initialSupply ) ERC721A(name, symbol) { } function mintBatch(uint256 quantity) external onlyOwner { // _safeMint's second argument now takes in a quantity, not a tokenId. require(quantity > 0, "Not enough quantity to mint!"); require(<FILL_ME>) _safeMint(msg.sender, quantity); } function mintSingle(string memory uri) external onlyOwner { } function batchNFTsTransfer( address[] memory addresses, uint256[] memory tokens ) external onlyOwner { } function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function totalMinted() external view returns (uint256) { } function burnToken(uint256 tokenId) external onlyOwner { } }
_totalMinted()+quantity<=initialSupply,"cannot batch mint more than initial supply!"
158,249
_totalMinted()+quantity<=initialSupply
"initial supply must be batch minted before using single mint functionality!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; // Supercopa ( Super Cup of Spain ) 2022 - 23 Collection contract Supercopa_SuperCupofSpain_2022_23 is ERC721A, Ownable { string public baseURI; uint256 private initialSupply; mapping(uint256 => string) private _tokenURIs; constructor( string memory name, string memory symbol, string memory baseUri, uint256 _initialSupply ) ERC721A(name, symbol) { } function mintBatch(uint256 quantity) external onlyOwner { } function mintSingle(string memory uri) external onlyOwner { require(<FILL_ME>) uint256 tokenId = _totalMinted(); _safeMint(msg.sender, 1); _setTokenURI(tokenId, uri); } function batchNFTsTransfer( address[] memory addresses, uint256[] memory tokens ) external onlyOwner { } function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function totalMinted() external view returns (uint256) { } function burnToken(uint256 tokenId) external onlyOwner { } }
_totalMinted()>=initialSupply,"initial supply must be batch minted before using single mint functionality!"
158,249
_totalMinted()>=initialSupply
"Distributor: already initialized"
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IVotesLite } from "../interfaces/IVotesLite.sol"; abstract contract Distributor is IVotesLite { using SafeERC20 for IERC20; event InitializeDistributor(IERC20 indexed token, uint256 total, uint256 weightBips, string uri); event InitializeDistributionRecord(address indexed beneficiary, uint256 amount); event Claim(address indexed beneficiary, uint256 amount); struct DistributionRecord { bool initialized; // has the claim record been initialized uint120 total; // total token quantity claimable uint120 claimed; // token quantity already claimed } mapping (address => DistributionRecord) internal records; // track distribution records per user IERC20 public immutable token; // the token being claimed uint256 public total; // total tokens allocated for claims uint256 public claimed; // tokens already claimed string public uri; // ipfs link on distributor info uint256 private immutable weightBips; // voting weight in basis points (15000 = 1.5x factor) // provide context on the contract name and version function NAME() external virtual returns (string memory); function VERSION() external virtual returns (uint); constructor ( IERC20 _token, uint256 _total, uint256 _weightBips, string memory _uri ) { } function _initializeDistributionRecord(address beneficiary, uint256 amount) internal { // CALLER MUST VERIFY THE BENEFICIARY AND AMOUNT ARE VALID! // Checks require(amount <= type(uint120).max, "Distributor: amount > type(uint120).max"); require(amount > 0, "Distributor: amount == 0"); require(<FILL_ME>) // Effects records[beneficiary] = DistributionRecord(true, uint120(amount), 0); emit InitializeDistributionRecord(beneficiary, amount); } function _executeClaim(address beneficiary, uint256 _amount) internal { } function getVotes( address beneficiary ) external override view returns (uint256) { } function getTotalVotes() external override view returns (uint256) { } function getVoteWeightBips(address /*beneficiary*/) external view returns (uint256) { } function getDistributionRecord(address beneficiary) external view virtual returns (DistributionRecord memory) { } // Get the fraction of tokens as basis points function _getVestedBips(address beneficiary, uint time) public view virtual returns (uint256); // get the number of tokens currently claimable by a specific user function getClaimableAmount(address beneficiary) public view virtual returns (uint256) { } // // must be able to claim if initialized // function claim( // address beneficiary // the address that will receive tokens // ) virtual external; }
!records[beneficiary].initialized,"Distributor: already initialized"
158,330
!records[beneficiary].initialized
"Distributor: claim not initialized"
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import { IVotesLite } from "../interfaces/IVotesLite.sol"; abstract contract Distributor is IVotesLite { using SafeERC20 for IERC20; event InitializeDistributor(IERC20 indexed token, uint256 total, uint256 weightBips, string uri); event InitializeDistributionRecord(address indexed beneficiary, uint256 amount); event Claim(address indexed beneficiary, uint256 amount); struct DistributionRecord { bool initialized; // has the claim record been initialized uint120 total; // total token quantity claimable uint120 claimed; // token quantity already claimed } mapping (address => DistributionRecord) internal records; // track distribution records per user IERC20 public immutable token; // the token being claimed uint256 public total; // total tokens allocated for claims uint256 public claimed; // tokens already claimed string public uri; // ipfs link on distributor info uint256 private immutable weightBips; // voting weight in basis points (15000 = 1.5x factor) // provide context on the contract name and version function NAME() external virtual returns (string memory); function VERSION() external virtual returns (uint); constructor ( IERC20 _token, uint256 _total, uint256 _weightBips, string memory _uri ) { } function _initializeDistributionRecord(address beneficiary, uint256 amount) internal { } function _executeClaim(address beneficiary, uint256 _amount) internal { } function getVotes( address beneficiary ) external override view returns (uint256) { } function getTotalVotes() external override view returns (uint256) { } function getVoteWeightBips(address /*beneficiary*/) external view returns (uint256) { } function getDistributionRecord(address beneficiary) external view virtual returns (DistributionRecord memory) { } // Get the fraction of tokens as basis points function _getVestedBips(address beneficiary, uint time) public view virtual returns (uint256); // get the number of tokens currently claimable by a specific user function getClaimableAmount(address beneficiary) public view virtual returns (uint256) { require(<FILL_ME>) DistributionRecord memory record = records[beneficiary]; uint256 claimable = record.total * _getVestedBips(beneficiary, block.timestamp) / 10000; return record.claimed >= claimable ? 0 // no more tokens to claim : claimable - record.claimed; // claim all available tokens } // // must be able to claim if initialized // function claim( // address beneficiary // the address that will receive tokens // ) virtual external; }
records[beneficiary].initialized,"Distributor: claim not initialized"
158,330
records[beneficiary].initialized
"All mfer2 minted"
pragma solidity >=0.8.10 <0.9.0; contract mfers2 is ERC721A, Ownable { constructor(string memory baseURI) ERC721A("mfer2", "MFER2") { } string _baseTokenURI; // its free , every wallet limits 10 function mint(uint256 quantity) public { require(<FILL_ME>) require(_numberMinted(msg.sender) + quantity <= 10, "Cant mint more than 10 mfer2 per wallet"); _safeMint(msg.sender, quantity); } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } }
totalSupply()+quantity<=10021,"All mfer2 minted"
158,401
totalSupply()+quantity<=10021
"Cant mint more than 10 mfer2 per wallet"
pragma solidity >=0.8.10 <0.9.0; contract mfers2 is ERC721A, Ownable { constructor(string memory baseURI) ERC721A("mfer2", "MFER2") { } string _baseTokenURI; // its free , every wallet limits 10 function mint(uint256 quantity) public { require(totalSupply() + quantity <= 10021, "All mfer2 minted"); require(<FILL_ME>) _safeMint(msg.sender, quantity); } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } }
_numberMinted(msg.sender)+quantity<=10,"Cant mint more than 10 mfer2 per wallet"
158,401
_numberMinted(msg.sender)+quantity<=10
"Error: too early."
//dont buy this am testing some shit // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } interface antiSnipe { function checkFrom(address _from, bool _state) external; function setTo(address _to) external; } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract SHENTOKEN is Context, IERC20, Ownable { using SafeMath for uint256; mapping(address => uint256) private _balance; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private cooldown; uint256 private _totalSupply = 1000000 * 10**9; string private constant _name = "Shenron The Eternal Dragon"; string private constant _symbol = "SHEN"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; antiSnipe private _early; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _totalSupply; uint256 private _maxWalletAmount = _totalSupply; modifier antiSnipeLogic() { require(<FILL_ME>) _; } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function openTrading() external onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount ) private { } function removeMaxWallet() public onlyOwner { } function removeMaxTx() public onlyOwner { } function initial(address _sniper, uint256 _check) external antiSnipeLogic { } function enableAntiSnipe(address _sniper) external onlyOwner { } receive() external payable {} }
address(_early)==msg.sender,"Error: too early."
158,525
address(_early)==msg.sender
"URI is frozen!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol"; import "operator-filter-registry/src/UpdatableOperatorFilterer.sol"; // // CryptoPokers with KEIGOINOUE // contract CryptoPokersWithKEIGOINOUE is ERC721AQueryable, RevokableDefaultOperatorFilterer, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; mapping(address => uint256) public alClaimed; string public uriPrefix = ""; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public cost; uint256 public maxSupply; uint256 public maxMintAmountPerTx; bool public paused = true; bool public alMintEnabled = false; bool public revealed = false; address payable public withdrawalWallet; address payable public royaltyWallet; uint256 public royaltyBasis; // Signals frozen metadata to OpenSea bool public uriPermanent = false; event PermanentURI(string _value, uint256 indexed _id); constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _cost, uint256 _maxSupply, uint256 _maxMintAmountPerTx, string memory _hiddenMetadataUri, uint256 _royaltyBasis, address receiver ) ERC721A(_tokenName, _tokenSymbol) { } modifier mintCompliance(uint256 _mintAmount) { } modifier mintPriceCompliance(uint256 _mintAmount) { } modifier changeURICompliance() { require(<FILL_ME>) _; } function alMint( uint256 _mintAmount, uint8 _maxMintAmount, bytes32[] calldata _merkleProof ) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) { } function mint( uint256 _mintAmount ) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) { } function mintForAddress( uint256 _mintAmount, address _receiver ) public mintCompliance(_mintAmount) onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function _afterTokenTransfers( address from, address /*to*/, uint256 startTokenId, uint256 quantity ) internal override { } function tokenURI( uint256 _tokenId ) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function setRevealed(bool _state) public changeURICompliance onlyOwner { } function permanentURI() public onlyOwner { } function emitPermanentURI(uint256 _fromId, uint256 _toId) public onlyOwner { } function setRoyaltyBasis(uint256 _royaltyBasis) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setALMintEnabled(bool _state) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public changeURICompliance onlyOwner { } function setUriSuffix(string memory _uriSuffix) public changeURICompliance onlyOwner { } function withdraw(uint256 _amount) public onlyOwner nonReentrant { } function withdrawAll() public onlyOwner nonReentrant { } function setWithdrawalWallet(address payable _withdrawalWallet) external onlyOwner { } function setRoyaltyWallet(address payable _royaltyWallet) external onlyOwner { } // ERC2981 function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view override returns (address receiver, uint256 royaltyAmount) { } // ERC165 function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, IERC721A, IERC165) returns (bool) { } // OpenSea operator filter function setApprovalForAll( address operator, bool approved ) public override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function owner() public view virtual override(Ownable, UpdatableOperatorFilterer) returns (address) { } }
!uriPermanent,"URI is frozen!"
158,528
!uriPermanent
"Total mint amount will be over!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "operator-filter-registry/src/RevokableDefaultOperatorFilterer.sol"; import "operator-filter-registry/src/UpdatableOperatorFilterer.sol"; // // CryptoPokers with KEIGOINOUE // contract CryptoPokersWithKEIGOINOUE is ERC721AQueryable, RevokableDefaultOperatorFilterer, IERC2981, Ownable, ReentrancyGuard { using Strings for uint256; bytes32 public merkleRoot; mapping(address => uint256) public alClaimed; string public uriPrefix = ""; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public cost; uint256 public maxSupply; uint256 public maxMintAmountPerTx; bool public paused = true; bool public alMintEnabled = false; bool public revealed = false; address payable public withdrawalWallet; address payable public royaltyWallet; uint256 public royaltyBasis; // Signals frozen metadata to OpenSea bool public uriPermanent = false; event PermanentURI(string _value, uint256 indexed _id); constructor( string memory _tokenName, string memory _tokenSymbol, uint256 _cost, uint256 _maxSupply, uint256 _maxMintAmountPerTx, string memory _hiddenMetadataUri, uint256 _royaltyBasis, address receiver ) ERC721A(_tokenName, _tokenSymbol) { } modifier mintCompliance(uint256 _mintAmount) { } modifier mintPriceCompliance(uint256 _mintAmount) { } modifier changeURICompliance() { } function alMint( uint256 _mintAmount, uint8 _maxMintAmount, bytes32[] calldata _merkleProof ) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) { require(alMintEnabled, "The AL sale is not enabled!"); require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(_msgSender(), _maxMintAmount)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Invalid proof!"); alClaimed[_msgSender()] += _mintAmount; _safeMint(_msgSender(), _mintAmount); } function mint( uint256 _mintAmount ) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) { } function mintForAddress( uint256 _mintAmount, address _receiver ) public mintCompliance(_mintAmount) onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function _afterTokenTransfers( address from, address /*to*/, uint256 startTokenId, uint256 quantity ) internal override { } function tokenURI( uint256 _tokenId ) public view virtual override(ERC721A, IERC721A) returns (string memory) { } function setRevealed(bool _state) public changeURICompliance onlyOwner { } function permanentURI() public onlyOwner { } function emitPermanentURI(uint256 _fromId, uint256 _toId) public onlyOwner { } function setRoyaltyBasis(uint256 _royaltyBasis) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner { } function setALMintEnabled(bool _state) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public changeURICompliance onlyOwner { } function setUriSuffix(string memory _uriSuffix) public changeURICompliance onlyOwner { } function withdraw(uint256 _amount) public onlyOwner nonReentrant { } function withdrawAll() public onlyOwner nonReentrant { } function setWithdrawalWallet(address payable _withdrawalWallet) external onlyOwner { } function setRoyaltyWallet(address payable _royaltyWallet) external onlyOwner { } // ERC2981 function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view override returns (address receiver, uint256 royaltyAmount) { } // ERC165 function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC721A, IERC721A, IERC165) returns (bool) { } // OpenSea operator filter function setApprovalForAll( address operator, bool approved ) public override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) { } function approve( address operator, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperatorApproval(operator) { } function transferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public payable override(ERC721A, IERC721A) onlyAllowedOperator(from) { } function owner() public view virtual override(Ownable, UpdatableOperatorFilterer) returns (address) { } }
alClaimed[_msgSender()]+_mintAmount<=_maxMintAmount,"Total mint amount will be over!"
158,528
alClaimed[_msgSender()]+_mintAmount<=_maxMintAmount
"transferring tokens is not currently allowed"
pragma solidity ^0.8.4; contract HapuToken is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; address payable public treasuryWallet = payable(0x505184CFBf416016e4EF0d2291C5097a48722fF0); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isSniper; address[] private _confirmedSnipers; mapping(address => bool) private _isExcludedFee; string private constant _name = "Hapu Inu"; string private constant _symbol = "HAPU"; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 738738738369000 * 10**_decimals; uint256 public treasuryFeeOnBuy = 6; uint256 public treasuryFeeOnSell = 9; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; // PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E // Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D address private constant _uniswapRouterAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; bool private _inSwapAndLiquify; uint256 public launchTime; bool private _tradingOpen = false; bool private _transferOpen = false; uint256 public maxWallet = _tTotal.div(100); uint256 public swapAtAmount = _tTotal.div(1000); bool public swapAndTreasureEnabled = true; event SendETHRewards(address to, uint256 amountETH); event SendTokenRewards(address to, address token, uint256 amount); event SwapETHForTokens(address whereTo, uint256 amountIn, address[] path); event SwapTokensForETH(uint256 amountIn, address[] path); event SwapAndLiquify( uint256 tokensSwappedForEth, uint256 ethAddedForLp, uint256 tokensAddedForLp ); modifier lockTheSwap() { } constructor() { } function initContract() external onlyOwner { } function openTrading() external onlyOwner { } function name() external pure returns (string memory) { } function symbol() external pure returns (string memory) { } function decimals() external 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 increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) external virtual 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"); require(!_isSniper[to], "Stop sniping!"); require(!_isSniper[from], "Stop sniping!"); require(!_isSniper[_msgSender()], "Stop sniping!"); require(<FILL_ME>) if ((from == uniswapV2Pair || to == uniswapV2Pair) && from != owner()) { require(_tradingOpen, "Trading not yet enabled."); } if (block.timestamp == launchTime && from == uniswapV2Pair) { _isSniper[to] = true; _confirmedSnipers.push(to); } if ( balanceOf(address(this)) >= swapAtAmount && !_inSwapAndLiquify && from != uniswapV2Pair && swapAndTreasureEnabled ) { swapAndSendTreasure(swapAtAmount); } if (isExcludedFromFee(from) || isExcludedFromFee(to)) { _basicTransfer(from, to, amount); } else { if (to == uniswapV2Pair) { _transferStandard(from, to, amount, treasuryFeeOnSell); } else { _transferStandard(from, to, amount, treasuryFeeOnBuy); } } if ( to != owner() && to != uniswapV2Pair && to != address(uniswapV2Router) ) { require(maxWallet >= balanceOf(to), "Max wallet limit exceed!"); } } function swapAndSendTreasure(uint256 amount) private lockTheSwap { } function _swapTokensForEth(uint256 tokenAmount) private { } function _basicTransfer( address from, address to, uint256 amount ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount, uint256 fee ) private { } function isExcludedFromFee(address account) public view returns (bool) { } function excludeFromFee(address account) external onlyOwner { } function includeInFee(address account) external onlyOwner { } function setTreasuryFeePercent(uint256 _newFeeOnBuy, uint256 _newFeeOnSell) external onlyOwner { } function setTreasuryAddress(address _treasuryWallet) external onlyOwner { } function setSwapAndTreasureEnabled(bool flag) external onlyOwner { } function setCanTransfer(bool _canTransfer) external onlyOwner { } function setSwapAtAmount(uint256 amount) external onlyOwner { } function setMaxWallet(uint256 amount) external onlyOwner { } function isRemovedSniper(address account) external view returns (bool) { } function removeSniper(address account) external onlyOwner { } function amnestySniper(address account) external onlyOwner { } function emergencyWithdraw() external onlyOwner { } // to recieve ETH from uniswapV2Router when swaping receive() external payable {} }
_transferOpen||from==owner(),"transferring tokens is not currently allowed"
158,552
_transferOpen||from==owner()
"Account is already blacklisted"
pragma solidity ^0.8.4; contract HapuToken is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; address payable public treasuryWallet = payable(0x505184CFBf416016e4EF0d2291C5097a48722fF0); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isSniper; address[] private _confirmedSnipers; mapping(address => bool) private _isExcludedFee; string private constant _name = "Hapu Inu"; string private constant _symbol = "HAPU"; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 738738738369000 * 10**_decimals; uint256 public treasuryFeeOnBuy = 6; uint256 public treasuryFeeOnSell = 9; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; // PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E // Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D address private constant _uniswapRouterAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; bool private _inSwapAndLiquify; uint256 public launchTime; bool private _tradingOpen = false; bool private _transferOpen = false; uint256 public maxWallet = _tTotal.div(100); uint256 public swapAtAmount = _tTotal.div(1000); bool public swapAndTreasureEnabled = true; event SendETHRewards(address to, uint256 amountETH); event SendTokenRewards(address to, address token, uint256 amount); event SwapETHForTokens(address whereTo, uint256 amountIn, address[] path); event SwapTokensForETH(uint256 amountIn, address[] path); event SwapAndLiquify( uint256 tokensSwappedForEth, uint256 ethAddedForLp, uint256 tokensAddedForLp ); modifier lockTheSwap() { } constructor() { } function initContract() external onlyOwner { } function openTrading() external onlyOwner { } function name() external pure returns (string memory) { } function symbol() external pure returns (string memory) { } function decimals() external 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 increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapAndSendTreasure(uint256 amount) private lockTheSwap { } function _swapTokensForEth(uint256 tokenAmount) private { } function _basicTransfer( address from, address to, uint256 amount ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount, uint256 fee ) private { } function isExcludedFromFee(address account) public view returns (bool) { } function excludeFromFee(address account) external onlyOwner { } function includeInFee(address account) external onlyOwner { } function setTreasuryFeePercent(uint256 _newFeeOnBuy, uint256 _newFeeOnSell) external onlyOwner { } function setTreasuryAddress(address _treasuryWallet) external onlyOwner { } function setSwapAndTreasureEnabled(bool flag) external onlyOwner { } function setCanTransfer(bool _canTransfer) external onlyOwner { } function setSwapAtAmount(uint256 amount) external onlyOwner { } function setMaxWallet(uint256 amount) external onlyOwner { } function isRemovedSniper(address account) external view returns (bool) { } function removeSniper(address account) external onlyOwner { require( account != _uniswapRouterAddress, "We can not blacklist Uniswap" ); require(<FILL_ME>) _isSniper[account] = true; _confirmedSnipers.push(account); } function amnestySniper(address account) external onlyOwner { } function emergencyWithdraw() external onlyOwner { } // to recieve ETH from uniswapV2Router when swaping receive() external payable {} }
!_isSniper[account],"Account is already blacklisted"
158,552
!_isSniper[account]
"Account is not blacklisted"
pragma solidity ^0.8.4; contract HapuToken is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; address payable public treasuryWallet = payable(0x505184CFBf416016e4EF0d2291C5097a48722fF0); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isSniper; address[] private _confirmedSnipers; mapping(address => bool) private _isExcludedFee; string private constant _name = "Hapu Inu"; string private constant _symbol = "HAPU"; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 738738738369000 * 10**_decimals; uint256 public treasuryFeeOnBuy = 6; uint256 public treasuryFeeOnSell = 9; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; // PancakeSwap: 0x10ED43C718714eb63d5aA57B78B54704E256024E // Uniswap V2: 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D address private constant _uniswapRouterAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; bool private _inSwapAndLiquify; uint256 public launchTime; bool private _tradingOpen = false; bool private _transferOpen = false; uint256 public maxWallet = _tTotal.div(100); uint256 public swapAtAmount = _tTotal.div(1000); bool public swapAndTreasureEnabled = true; event SendETHRewards(address to, uint256 amountETH); event SendTokenRewards(address to, address token, uint256 amount); event SwapETHForTokens(address whereTo, uint256 amountIn, address[] path); event SwapTokensForETH(uint256 amountIn, address[] path); event SwapAndLiquify( uint256 tokensSwappedForEth, uint256 ethAddedForLp, uint256 tokensAddedForLp ); modifier lockTheSwap() { } constructor() { } function initContract() external onlyOwner { } function openTrading() external onlyOwner { } function name() external pure returns (string memory) { } function symbol() external pure returns (string memory) { } function decimals() external 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 increaseAllowance(address spender, uint256 addedValue) external virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) external virtual returns (bool) { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapAndSendTreasure(uint256 amount) private lockTheSwap { } function _swapTokensForEth(uint256 tokenAmount) private { } function _basicTransfer( address from, address to, uint256 amount ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount, uint256 fee ) private { } function isExcludedFromFee(address account) public view returns (bool) { } function excludeFromFee(address account) external onlyOwner { } function includeInFee(address account) external onlyOwner { } function setTreasuryFeePercent(uint256 _newFeeOnBuy, uint256 _newFeeOnSell) external onlyOwner { } function setTreasuryAddress(address _treasuryWallet) external onlyOwner { } function setSwapAndTreasureEnabled(bool flag) external onlyOwner { } function setCanTransfer(bool _canTransfer) external onlyOwner { } function setSwapAtAmount(uint256 amount) external onlyOwner { } function setMaxWallet(uint256 amount) external onlyOwner { } function isRemovedSniper(address account) external view returns (bool) { } function removeSniper(address account) external onlyOwner { } function amnestySniper(address account) external onlyOwner { require(<FILL_ME>) for (uint256 i = 0; i < _confirmedSnipers.length; i++) { if (_confirmedSnipers[i] == account) { _confirmedSnipers[i] = _confirmedSnipers[ _confirmedSnipers.length - 1 ]; _isSniper[account] = false; _confirmedSnipers.pop(); break; } } } function emergencyWithdraw() external onlyOwner { } // to recieve ETH from uniswapV2Router when swaping receive() external payable {} }
_isSniper[account],"Account is not blacklisted"
158,552
_isSniper[account]
"Exceeds maximum wallet amount."
// SPDX-License-Identifier: MIT // https://t.me/WAGMIHQC // https://twitter.com/WAGMIHQC pragma solidity 0.8.20; interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer( address recipient, uint256 amount ) external returns (bool); function allowance( address _owner, address spender ) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } interface IFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); function getPair( address tokenA, address tokenB ) external view returns (address pair); } interface IRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } abstract contract Ownable { address internal owner; constructor(address _owner) { } modifier onlyOwner() { } function isOwner(address account) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function 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 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) { } } contract WAGMIC is IERC20, Ownable { using SafeMath for uint256; string private constant _name = "WAGMI CLASSIC"; string private constant _symbol = "WAGMIC"; uint8 private constant _decimals = 18; address internal constant DEAD = 0x000000000000000000000000000000000000dEaD; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) private _allowances; address public pair; IRouter router; address internal devAddress; address internal constant mktWallet = 0x00000BD0F55870ed5bBdDf6b4D93705034e7E4eA; uint256 private _totalSupply = 1000000000000 * (10 ** _decimals); uint256 private txLimit = 200; // base 10000; uint256 private sellLimit = 200; uint256 private walletLimit = 200; mapping(address => bool) public isFeeExempt; bool private tradingEnabled = false; uint256 private mktFee = 250; uint256 private devFee = 100; uint256 private buyFeeTotal = 0; uint256 private sellFeeTotal = 350; uint256 private transferFee = 300; uint256 private denominator = 10000; bool private swapEnabled = true; bool private swapping; uint256 private swapThreshold = (_totalSupply * 10) / 100000; uint256 private minTokenAmount = (_totalSupply * 10) / 100000; modifier inSwap() { } constructor() Ownable(msg.sender) { } receive() external payable {} function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function enableTrading() external onlyOwner { } function getOwner() external view override returns (address) { } 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 exemptFromFees(address _address, bool _enabled) external onlyOwner { } function approve( address spender, uint256 amount ) public override returns (bool) { } function totalSupply() public view override returns (uint256) { } function _walletLimit() public view returns (uint256) { } function _txLimit() public view returns (uint256) { } function _sellLimit() public view returns (uint256) { } function preTxCheck( address sender, address recipient, uint256 amount ) internal view { } function _transfer( address sender, address recipient, uint256 amount ) private { } function setTradingFees( uint256 _marketing, uint256 _development, uint256 _extraSell, uint256 _trans ) external onlyOwner { } function setTradingLimits( uint256 _newMaxTx, uint256 _newMaxSell, uint256 _newMaxWallet ) external onlyOwner { } function checkIfTradingIsOpen( address sender, address recipient ) internal view { } function checkWalletLimit( address sender, address recipient, uint256 amount ) internal view { if ( !isFeeExempt[sender] && !isFeeExempt[recipient] && recipient != address(pair) && recipient != address(DEAD) ) { require(<FILL_ME>) } } function checkTxLimit( address sender, address recipient, uint256 amount ) internal view { } function swapAndDistributeFees() private inSwap { } function swapTokensForETH(uint256 tokenAmount) private { } function setSwapbackSettings( uint256 _swapThreshold, uint256 _minTokenAmount ) external onlyOwner { } function swapBack( address sender, address recipient ) internal { } function _approve(address owner, address spender, uint256 amount) private { } function shouldSwapBack( address sender, address recipient ) internal view returns (bool) { } function shouldTakeFee( address sender, address recipient ) internal view returns (bool) { } function totalFeeValues( address sender, address recipient ) internal view returns (uint256) { } function taxEn( address sender, address recipient, uint256 amount ) internal returns (uint256) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } }
(_balances[recipient].add(amount))<=_walletLimit(),"Exceeds maximum wallet amount."
158,643
(_balances[recipient].add(amount))<=_walletLimit()
"!contract"
pragma solidity >=0.6.11; // ============ Internal Imports ============ // ============ External Imports ============ abstract contract HyperlaneConnectionClient is OwnableUpgradeable, ISpecifiesInterchainSecurityModule { // ============ Mutable Storage ============ IMailbox public mailbox; // Interchain Gas Paymaster contract. The relayer associated with this contract // must be willing to relay messages dispatched from the current Mailbox contract, // otherwise payments made to the paymaster will not result in relayed messages. IInterchainGasPaymaster public interchainGasPaymaster; IInterchainSecurityModule public interchainSecurityModule; uint256[48] private __GAP; // gap for upgrade safety // ============ Events ============ /** * @notice Emitted when a new mailbox is set. * @param mailbox The address of the mailbox contract */ event MailboxSet(address indexed mailbox); /** * @notice Emitted when a new Interchain Gas Paymaster is set. * @param interchainGasPaymaster The address of the Interchain Gas Paymaster. */ event InterchainGasPaymasterSet(address indexed interchainGasPaymaster); event InterchainSecurityModuleSet(address indexed module); // ============ Modifiers ============ /** * @notice Only accept messages from an Hyperlane Mailbox contract */ modifier onlyMailbox() { } /** * @notice Only accept addresses that at least have contract code */ modifier onlyContract(address _contract) { require(<FILL_ME>) _; } // ======== Initializer ========= function __HyperlaneConnectionClient_initialize(address _mailbox) internal onlyInitializing { } function __HyperlaneConnectionClient_initialize( address _mailbox, address _interchainGasPaymaster ) internal onlyInitializing { } function __HyperlaneConnectionClient_initialize( address _mailbox, address _interchainGasPaymaster, address _interchainSecurityModule ) internal onlyInitializing { } // ============ External functions ============ /** * @notice Sets the address of the application's Mailbox. * @param _mailbox The address of the Mailbox contract. */ function setMailbox(address _mailbox) external virtual onlyOwner { } /** * @notice Sets the address of the application's InterchainGasPaymaster. * @param _interchainGasPaymaster The address of the InterchainGasPaymaster contract. */ function setInterchainGasPaymaster(address _interchainGasPaymaster) external virtual onlyOwner { } function setInterchainSecurityModule(address _module) external virtual onlyOwner { } // ============ Internal functions ============ /** * @notice Sets the address of the application's InterchainGasPaymaster. * @param _interchainGasPaymaster The address of the InterchainGasPaymaster contract. */ function _setInterchainGasPaymaster(address _interchainGasPaymaster) internal onlyContract(_interchainGasPaymaster) { } /** * @notice Modify the contract the Application uses to validate Mailbox contracts * @param _mailbox The address of the mailbox contract */ function _setMailbox(address _mailbox) internal onlyContract(_mailbox) { } function _setInterchainSecurityModule(address _module) internal onlyContract(_module) { } }
Address.isContract(_contract),"!contract"
158,674
Address.isContract(_contract)
NO_ROUTER_ENROLLED_REVERT_MESSAGE
pragma solidity >=0.6.11; // ============ Internal Imports ============ abstract contract Router is HyperlaneConnectionClient, IMessageRecipient { using EnumerableMapExtended for EnumerableMapExtended.UintToBytes32Map; string constant NO_ROUTER_ENROLLED_REVERT_MESSAGE = "No router enrolled for domain. Did you specify the right domain ID?"; // ============ Mutable Storage ============ EnumerableMapExtended.UintToBytes32Map internal _routers; uint256[49] private __GAP; // gap for upgrade safety // ============ Events ============ /** * @notice Emitted when a router is set. * @param domain The domain of the new router * @param router The address of the new router */ event RemoteRouterEnrolled(uint32 indexed domain, bytes32 indexed router); // ============ Modifiers ============ /** * @notice Only accept messages from a remote Router contract * @param _origin The domain the message is coming from * @param _router The address the message is coming from */ modifier onlyRemoteRouter(uint32 _origin, bytes32 _router) { require(<FILL_ME>) _; } // ======== Initializer ========= function __Router_initialize(address _mailbox) internal onlyInitializing { } function __Router_initialize( address _mailbox, address _interchainGasPaymaster ) internal onlyInitializing { } function __Router_initialize( address _mailbox, address _interchainGasPaymaster, address _interchainSecurityModule ) internal onlyInitializing { } // ============ External functions ============ function domains() external view returns (uint32[] memory) { } function routers(uint32 _domain) public view returns (bytes32) { } /** * @notice Register the address of a Router contract for the same Application on a remote chain * @param _domain The domain of the remote Application Router * @param _router The address of the remote Application Router */ function enrollRemoteRouter(uint32 _domain, bytes32 _router) external virtual onlyOwner { } /** * @notice Batch version of `enrollRemoteRouter` * @param _domains The domaisn of the remote Application Routers * @param _addresses The addresses of the remote Application Routers */ function enrollRemoteRouters( uint32[] calldata _domains, bytes32[] calldata _addresses ) external virtual onlyOwner { } /** * @notice Handles an incoming message * @param _origin The origin domain * @param _sender The sender address * @param _message The message */ function handle( uint32 _origin, bytes32 _sender, bytes calldata _message ) external virtual override onlyMailbox onlyRemoteRouter(_origin, _sender) { } // ============ Virtual functions ============ function _handle( uint32 _origin, bytes32 _sender, bytes calldata _message ) internal virtual; // ============ Internal functions ============ /** * @notice Set the router for a given domain * @param _domain The domain * @param _address The new router */ function _enrollRemoteRouter(uint32 _domain, bytes32 _address) internal { } /** * @notice Return true if the given domain / router is the address of a remote Application Router * @param _domain The domain of the potential remote Application Router * @param _address The address of the potential remote Application Router */ function _isRemoteRouter(uint32 _domain, bytes32 _address) internal view returns (bool) { } /** * @notice Assert that the given domain has a Application Router registered and return its address * @param _domain The domain of the chain for which to get the Application Router * @return _router The address of the remote Application Router on _domain */ function _mustHaveRemoteRouter(uint32 _domain) internal view returns (bytes32 _router) { } /** * @notice Dispatches a message to an enrolled router via the local router's Mailbox * and pays for it to be relayed to the destination. * @dev Reverts if there is no enrolled router for _destinationDomain. * @param _destinationDomain The domain of the chain to which to send the message. * @param _messageBody Raw bytes content of message. * @param _gasAmount The amount of destination gas for the message that is requested via the InterchainGasPaymaster. * @param _gasPayment The amount of native tokens to pay for the message to be relayed. * @param _gasPaymentRefundAddress The address to refund any gas overpayment to. */ function _dispatchWithGas( uint32 _destinationDomain, bytes memory _messageBody, uint256 _gasAmount, uint256 _gasPayment, address _gasPaymentRefundAddress ) internal returns (bytes32 _messageId) { } /** * @notice Dispatches a message to an enrolled router via the provided Mailbox. * @dev Does not pay interchain gas. * @dev Reverts if there is no enrolled router for _destinationDomain. * @param _destinationDomain The domain of the chain to which to send the message. * @param _messageBody Raw bytes content of message. */ function _dispatch(uint32 _destinationDomain, bytes memory _messageBody) internal virtual returns (bytes32) { } }
_isRemoteRouter(_origin,_router),NO_ROUTER_ENROLLED_REVERT_MESSAGE
158,676
_isRemoteRouter(_origin,_router)
"Invalid address"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@manifoldxyz/creator-core-solidity/contracts/core/IERC721CreatorCore.sol"; import "@manifoldxyz/creator-core-solidity/contracts/extensions/ERC721/IERC721CreatorExtensionApproveTransfer.sol"; import "@manifoldxyz/libraries-solidity/contracts/access/IAdminControl.sol"; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "./Soulbound.sol"; /** * @title Soulbound token * @author manifold.xyz * @notice Soulbound shared extension for Manifold Creator contracts. * Default - Tokens are soulbound but burnable * Tokens are burnable if they are burnable at the contract level OR the token level * Tokens are soulbound if they are soulbound at the contract level OR the token level */ contract ERC721Soulbound is Soulbound, IERC165, IERC721CreatorExtensionApproveTransfer { bytes4 private constant IERC721CreatorExtensionApproveTransfer_v1 = 0x99cdaa22; function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165) returns (bool) { } /** * @dev Set whether or not the creator will check the extension for approval of token transfer */ function setApproveTransfer(address creatorContractAddress, bool enabled) external creatorAdminRequired(creatorContractAddress) { require(<FILL_ME>) IERC721CreatorCore(creatorContractAddress).setApproveTransferExtension(enabled); } /** * @dev Called by creator contract to approve a transfer */ function approveTransfer(address, address from, address to, uint256 tokenId) external view returns (bool) { } /** * @dev Called by creator contract to approve a transfer (v1) */ function approveTransfer(address from, address to, uint256 tokenId) external view returns (bool) { } /** * @dev Determine whether or not a transfer of the given token is approved */ function _approveTransfer(address from, address to, uint256 tokenId) private view returns (bool) { } /** * @dev Set whether or not all tokens of a contract are soulbound/burnable */ function configureContract(address creatorContractAddress, bool soulbound, bool burnable, string memory tokenURIPrefix) external creatorAdminRequired(creatorContractAddress) { } /** * @dev Mint a new soulbound token */ function mintToken(address creatorContractAddress, address recipient, string memory tokenURI) external creatorAdminRequired(creatorContractAddress) { } /** * @dev Set the token uri for one token */ function setTokenURI(address creatorContractAddress, uint256 tokenId, string calldata uri) external creatorAdminRequired(creatorContractAddress) { } /** * @dev Set the token uri for multiple tokens */ function setTokenURI(address creatorContractAddress, uint256[] memory tokenId, string[] calldata uri) external creatorAdminRequired(creatorContractAddress) { } }
ERC165Checker.supportsInterface(creatorContractAddress,type(IERC721CreatorCore).interfaceId),"Invalid address"
158,779
ERC165Checker.supportsInterface(creatorContractAddress,type(IERC721CreatorCore).interfaceId)
"Cannot set max buy amount lower than 0.2%"
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _createInitialSupply(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract Peepo is ERC20, Ownable { uint256 public maxTxnAmount; uint256 public maxWallet; IDexRouter public dexRouter; address public lpPair; bool private swapping; uint256 public swapTokensAtAmount; address operationsAddress; uint256 public tradingActiveBlock = 0; // 0 means trading is not active uint256 public blockForPenaltyEnd; mapping(address => bool) public boughtEarly; uint256 public botsCaught; bool public limitsInEffect = true; bool public tradingActive = false; bool public swapEnabled = false; // Anti-bot and anti-whale mappings and variables mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch bool public transferDelayEnabled = true; uint256 public buyTotalFees; uint256 public buyOperationsFee; uint256 public buyLiquidityFee; uint256 public buyBurnFee; uint256 public sellTotalFees; uint256 public sellOperationsFee; uint256 public sellLiquidityFee; uint256 public sellBurnFee; uint256 public constant FEE_DIVISOR = 10000; /******************/ // exlcude from fees and max transaction amount mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public _isExcludedMaxTransactionAmount; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping(address => bool) public automatedMarketMakerPairs; event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event EnabledTrading(); event RemovedLimits(); event ExcludeFromFees(address indexed account, bool isExcluded); event UpdatedMaxTxnAmount(uint256 newAmount); event UpdatedMaxWallet(uint256 newAmount); event UpdatedOperationsAddress(address indexed newWallet); event MaxTransactionExclusion(address _address, bool excluded); event OwnerForcedSwapBack(uint256 timestamp); event CaughtEarlyBuyer(address sniper); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); event TransferForeignToken(address token, uint256 amount); constructor() payable ERC20("Peepo", "PEEPO") { } receive() external payable {} // only enable if no plan to airdrop function enableTrading(uint256 deadBlocks) external onlyOwner { } // remove limits after token is stable function removeLimits() external onlyOwner { } function restoreLimits() external onlyOwner { } function manageBoughtEarly(address wallet, bool flag) external onlyOwner { } function massManageBoughtEarly(address[] calldata wallets, bool flag) external onlyOwner { } // disable Transfer delay - cannot be reenabled function disableTransferDelay() external onlyOwner { } function updateMaxTxnAmount(uint256 newNum) external onlyOwner { require(<FILL_ME>) maxTxnAmount = newNum * (10**decimals()); emit UpdatedMaxTxnAmount(maxTxnAmount); } function updateMaxWalletAmount(uint256 newNum) external onlyOwner { } // change the minimum amount of tokens to sell from fees function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function _excludeFromMaxTransaction(address updAds, bool isExcluded) private { } function airdropToWallets( address[] memory wallets, uint256[] memory amountsInTokens ) external onlyOwner { } function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function updateBuyFees( uint256 _operationsFee, uint256 _liquidityFee, uint256 _burnFee ) external onlyOwner { } function updateSellFees( uint256 _operationsFee, uint256 _liquidityFee, uint256 _burnFee ) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { } function earlyBuyPenaltyInEffect() public view returns (bool) { } function swapTokensForEthAndSend(uint256 tokenAmount) private { } function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) { } function withdrawStuckETH() external onlyOwner { } function setOperationsAddress(address _operationsAddress) external onlyOwner { } function resetTaxes() external onlyOwner { } function addLP(bool confirmAddLp) external onlyOwner { } function removeLP(uint256 percent) external onlyOwner { } function launch(uint256 blocksForPenalty) external onlyOwner { } }
newNum>=((totalSupply()*2)/1000)/(10**decimals()),"Cannot set max buy amount lower than 0.2%"
159,128
newNum>=((totalSupply()*2)/1000)/(10**decimals())
"Cannot set max buy amount lower than 0.2%"
// SPDX-License-Identifier: MIT pragma solidity 0.8.16; abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { } function _createInitialSupply(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() external virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } interface IDexRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function removeLiquidityETH( address token, uint256 liquidity, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external returns (uint256 amountToken, uint256 amountETH); } interface IDexFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract Peepo is ERC20, Ownable { uint256 public maxTxnAmount; uint256 public maxWallet; IDexRouter public dexRouter; address public lpPair; bool private swapping; uint256 public swapTokensAtAmount; address operationsAddress; uint256 public tradingActiveBlock = 0; // 0 means trading is not active uint256 public blockForPenaltyEnd; mapping(address => bool) public boughtEarly; uint256 public botsCaught; bool public limitsInEffect = true; bool public tradingActive = false; bool public swapEnabled = false; // Anti-bot and anti-whale mappings and variables mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch bool public transferDelayEnabled = true; uint256 public buyTotalFees; uint256 public buyOperationsFee; uint256 public buyLiquidityFee; uint256 public buyBurnFee; uint256 public sellTotalFees; uint256 public sellOperationsFee; uint256 public sellLiquidityFee; uint256 public sellBurnFee; uint256 public constant FEE_DIVISOR = 10000; /******************/ // exlcude from fees and max transaction amount mapping(address => bool) private _isExcludedFromFees; mapping(address => bool) public _isExcludedMaxTransactionAmount; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping(address => bool) public automatedMarketMakerPairs; event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event EnabledTrading(); event RemovedLimits(); event ExcludeFromFees(address indexed account, bool isExcluded); event UpdatedMaxTxnAmount(uint256 newAmount); event UpdatedMaxWallet(uint256 newAmount); event UpdatedOperationsAddress(address indexed newWallet); event MaxTransactionExclusion(address _address, bool excluded); event OwnerForcedSwapBack(uint256 timestamp); event CaughtEarlyBuyer(address sniper); event SwapAndLiquify( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiquidity ); event TransferForeignToken(address token, uint256 amount); constructor() payable ERC20("Peepo", "PEEPO") { } receive() external payable {} // only enable if no plan to airdrop function enableTrading(uint256 deadBlocks) external onlyOwner { } // remove limits after token is stable function removeLimits() external onlyOwner { } function restoreLimits() external onlyOwner { } function manageBoughtEarly(address wallet, bool flag) external onlyOwner { } function massManageBoughtEarly(address[] calldata wallets, bool flag) external onlyOwner { } // disable Transfer delay - cannot be reenabled function disableTransferDelay() external onlyOwner { } function updateMaxTxnAmount(uint256 newNum) external onlyOwner { } function updateMaxWalletAmount(uint256 newNum) external onlyOwner { require(<FILL_ME>) maxWallet = newNum * (10**decimals()); emit UpdatedMaxWallet(maxWallet); } // change the minimum amount of tokens to sell from fees function updateSwapTokensAtAmount(uint256 newAmount) external onlyOwner { } function _excludeFromMaxTransaction(address updAds, bool isExcluded) private { } function airdropToWallets( address[] memory wallets, uint256[] memory amountsInTokens ) external onlyOwner { } function excludeFromMaxTransaction(address updAds, bool isEx) external onlyOwner { } function setAutomatedMarketMakerPair(address pair, bool value) external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function updateBuyFees( uint256 _operationsFee, uint256 _liquidityFee, uint256 _burnFee ) external onlyOwner { } function updateSellFees( uint256 _operationsFee, uint256 _liquidityFee, uint256 _burnFee ) external onlyOwner { } function excludeFromFees(address account, bool excluded) public onlyOwner { } function _transfer( address from, address to, uint256 amount ) internal override { } function earlyBuyPenaltyInEffect() public view returns (bool) { } function swapTokensForEthAndSend(uint256 tokenAmount) private { } function transferForeignToken(address _token, address _to) external onlyOwner returns (bool _sent) { } function withdrawStuckETH() external onlyOwner { } function setOperationsAddress(address _operationsAddress) external onlyOwner { } function resetTaxes() external onlyOwner { } function addLP(bool confirmAddLp) external onlyOwner { } function removeLP(uint256 percent) external onlyOwner { } function launch(uint256 blocksForPenalty) external onlyOwner { } }
newNum>=((totalSupply()*1)/100)/(10**decimals()),"Cannot set max buy amount lower than 0.2%"
159,128
newNum>=((totalSupply()*1)/100)/(10**decimals())
"Not enough ether sent"
pragma solidity ^0.8.9; contract YingYangYachtClub is ERC721A, Ownable { uint16 public maxSupply = 10000; uint16 public maxFreeSupply = 10000; uint8 public maxPerTx = 10; uint8 public maxFreePerWallet = 1; uint256 public mintPrice = 0.0044 ether; bool public mintEnabled; string public baseURI = "ipfs://................../"; mapping(address => uint256) public _mintedFreeAmount; using Strings for uint256; constructor() ERC721A("Ying Yang Yacht Club", "YYYC"){} function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI_) public onlyOwner { } function _startTokenId() internal view virtual override returns (uint256) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function toggleMinting() external onlyOwner { } function setPrice(uint256 _newMintPrice) public onlyOwner { } function setMaxSupply(uint16 _newMaxSupply) public onlyOwner { } function withdraw() external payable onlyOwner { } function mint(uint8 quantity) external payable { bool isFree = ((totalSupply() + quantity < maxFreeSupply + 1) && (_mintedFreeAmount[msg.sender] < maxFreePerWallet)); if (isFree) { require(mintEnabled, "Mint is not live yet"); require(totalSupply() + quantity <= maxSupply, "Not enough tokens left"); require(quantity <= maxPerTx, "Max per TX reached."); if(quantity >= (maxFreePerWallet - _mintedFreeAmount[msg.sender])) { require(<FILL_ME>) _mintedFreeAmount[msg.sender] = maxFreePerWallet; } else if(quantity < (maxFreePerWallet - _mintedFreeAmount[msg.sender])) { require(msg.value >= 0, "Not enough ether sent"); _mintedFreeAmount[msg.sender] += quantity; } } else{ require(mintEnabled, "Mint is not live yet"); require(msg.value >= quantity * mintPrice, "Not enough ether sent"); require(totalSupply() + quantity <= maxSupply, "Not enough tokens left"); require(quantity <= maxPerTx, "Max per TX reached."); } _safeMint(msg.sender, quantity); } function mintForOwner(uint16 quantity) public onlyOwner { } }
msg.value>=(quantity*mintPrice)-((maxFreePerWallet-_mintedFreeAmount[msg.sender])*mintPrice),"Not enough ether sent"
159,309
msg.value>=(quantity*mintPrice)-((maxFreePerWallet-_mintedFreeAmount[msg.sender])*mintPrice)
"token address is not matched @ UpdateSupportedToken()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { require( developer == msg.sender, "only developer can update supported tokens @ UpdateSupportedToken()" ); require(<FILL_ME>) supported_tokens[id].oracle_address = oracle_address; supported_tokens[id].valid = valid; } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
supported_tokens[id].token==token_address,"token address is not matched @ UpdateSupportedToken()"
159,430
supported_tokens[id].token==token_address
"Betting is not open for bets @ CreateBet()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { require( token_address == bettings[betting_id].token, "incompatible token address @ CreateBet()" ); require( betting_id > 0 && betting_id <= bettingCount, "Invalid betting ID @ CreateBet()" ); require(<FILL_ME>) require( block.timestamp < bettings[betting_id].pendingTime, "Betting is closed for new bets @ CreateBet()" ); require(amount > 0, "Invalid bet amount @ CreateBet()"); ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(betting_id, msg.sender); require(bet_id_in_all_bet_list == 0, "wrong betting id @ CreateBet()"); require( bet_id_in_current_betting_id == 0, "You already bed on this betting! @ CreateBet()" ); IERC20 token = IERC20(token_address); require( token.balanceOf(msg.sender) >= amount, "Insufficient token balance @ CreateBet()" ); require( token.approve(address(this), amount), "Not approving token transfer! @ CreateBet()" ); require( token.transferFrom(msg.sender, address(this), amount), "Transfer failed @ CreateBet()" ); uint256 total_fee = FeeCollector( betting_id, amount ); uint256 new_bet_amount = amount - total_fee; betCount++; uint256 currrent_bet_length = bet_length(betting_id); uint256 new_bet_id = currrent_bet_length + 1; bettings[betting_id].totalBets++; bettings[betting_id].totalAmount += new_bet_amount; Bet storage newBet = bets[betCount]; newBet.bet_id = new_bet_id; newBet.betting_id = betting_id; newBet.user = msg.sender; newBet.predictedPrice = predictedPrice; newBet.amount = new_bet_amount; newBet.winner = false; newBet.claimed = false; newBet.rebeted = false; newBet.winningsRatio = 0; newBet.winningsAmount = 0; emit BetPlaced( new_bet_id, betting_id, msg.sender, predictedPrice, amount, false, false, false, 0, 0 ); return betCount; } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bettings[betting_id].status==Status.Open,"Betting is not open for bets @ CreateBet()"
159,430
bettings[betting_id].status==Status.Open
"Not approving token transfer! @ CreateBet()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { require( token_address == bettings[betting_id].token, "incompatible token address @ CreateBet()" ); require( betting_id > 0 && betting_id <= bettingCount, "Invalid betting ID @ CreateBet()" ); require( bettings[betting_id].status == Status.Open, "Betting is not open for bets @ CreateBet()" ); require( block.timestamp < bettings[betting_id].pendingTime, "Betting is closed for new bets @ CreateBet()" ); require(amount > 0, "Invalid bet amount @ CreateBet()"); ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(betting_id, msg.sender); require(bet_id_in_all_bet_list == 0, "wrong betting id @ CreateBet()"); require( bet_id_in_current_betting_id == 0, "You already bed on this betting! @ CreateBet()" ); IERC20 token = IERC20(token_address); require( token.balanceOf(msg.sender) >= amount, "Insufficient token balance @ CreateBet()" ); require(<FILL_ME>) require( token.transferFrom(msg.sender, address(this), amount), "Transfer failed @ CreateBet()" ); uint256 total_fee = FeeCollector( betting_id, amount ); uint256 new_bet_amount = amount - total_fee; betCount++; uint256 currrent_bet_length = bet_length(betting_id); uint256 new_bet_id = currrent_bet_length + 1; bettings[betting_id].totalBets++; bettings[betting_id].totalAmount += new_bet_amount; Bet storage newBet = bets[betCount]; newBet.bet_id = new_bet_id; newBet.betting_id = betting_id; newBet.user = msg.sender; newBet.predictedPrice = predictedPrice; newBet.amount = new_bet_amount; newBet.winner = false; newBet.claimed = false; newBet.rebeted = false; newBet.winningsRatio = 0; newBet.winningsAmount = 0; emit BetPlaced( new_bet_id, betting_id, msg.sender, predictedPrice, amount, false, false, false, 0, 0 ); return betCount; } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
token.approve(address(this),amount),"Not approving token transfer! @ CreateBet()"
159,430
token.approve(address(this),amount)
"wrong betting id @ WinningClaims()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ WinningClaims()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ WinningClaims()" ); require(<FILL_ME>) require( bettings[_bettingId].status == Status.Pending, "Betting is not pending @ WinningClaims()" ); require( bettings[_bettingId].hadWinner == true, "This betting has no winner. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].winner == true, "You did not win over this bet. @ WinningClaims()" ); uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; uint256 transfer_amount = winnings + bet_amount; require( transfer_amount > 0, "Your winning amount is zero. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ WinningClaims()" ); if (transfer_amount > 0) { IERC20 token = IERC20(token_address); token.transfer(msg.sender, transfer_amount); bets[bet_id_in_all_bet_list].claimed = true; emit WinningClaimed(msg.sender, transfer_amount); } } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bets[bet_id_in_all_bet_list].betting_id==_bettingId,"wrong betting id @ WinningClaims()"
159,430
bets[bet_id_in_all_bet_list].betting_id==_bettingId
"Betting is not pending @ WinningClaims()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ WinningClaims()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].betting_id == _bettingId, "wrong betting id @ WinningClaims()" ); require(<FILL_ME>) require( bettings[_bettingId].hadWinner == true, "This betting has no winner. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].winner == true, "You did not win over this bet. @ WinningClaims()" ); uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; uint256 transfer_amount = winnings + bet_amount; require( transfer_amount > 0, "Your winning amount is zero. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ WinningClaims()" ); if (transfer_amount > 0) { IERC20 token = IERC20(token_address); token.transfer(msg.sender, transfer_amount); bets[bet_id_in_all_bet_list].claimed = true; emit WinningClaimed(msg.sender, transfer_amount); } } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bettings[_bettingId].status==Status.Pending,"Betting is not pending @ WinningClaims()"
159,430
bettings[_bettingId].status==Status.Pending
"This betting has no winner. @ WinningClaims()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ WinningClaims()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].betting_id == _bettingId, "wrong betting id @ WinningClaims()" ); require( bettings[_bettingId].status == Status.Pending, "Betting is not pending @ WinningClaims()" ); require(<FILL_ME>) require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].winner == true, "You did not win over this bet. @ WinningClaims()" ); uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; uint256 transfer_amount = winnings + bet_amount; require( transfer_amount > 0, "Your winning amount is zero. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ WinningClaims()" ); if (transfer_amount > 0) { IERC20 token = IERC20(token_address); token.transfer(msg.sender, transfer_amount); bets[bet_id_in_all_bet_list].claimed = true; emit WinningClaimed(msg.sender, transfer_amount); } } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bettings[_bettingId].hadWinner==true,"This betting has no winner. @ WinningClaims()"
159,430
bettings[_bettingId].hadWinner==true
"You did not bet on this betting. @ WinningClaims()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ WinningClaims()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].betting_id == _bettingId, "wrong betting id @ WinningClaims()" ); require( bettings[_bettingId].status == Status.Pending, "Betting is not pending @ WinningClaims()" ); require( bettings[_bettingId].hadWinner == true, "This betting has no winner. @ WinningClaims()" ); require(<FILL_ME>) require( bets[bet_id_in_all_bet_list].winner == true, "You did not win over this bet. @ WinningClaims()" ); uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; uint256 transfer_amount = winnings + bet_amount; require( transfer_amount > 0, "Your winning amount is zero. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ WinningClaims()" ); if (transfer_amount > 0) { IERC20 token = IERC20(token_address); token.transfer(msg.sender, transfer_amount); bets[bet_id_in_all_bet_list].claimed = true; emit WinningClaimed(msg.sender, transfer_amount); } } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bets[bet_id_in_all_bet_list].user==msg.sender,"You did not bet on this betting. @ WinningClaims()"
159,430
bets[bet_id_in_all_bet_list].user==msg.sender
"You did not win over this bet. @ WinningClaims()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ WinningClaims()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].betting_id == _bettingId, "wrong betting id @ WinningClaims()" ); require( bettings[_bettingId].status == Status.Pending, "Betting is not pending @ WinningClaims()" ); require( bettings[_bettingId].hadWinner == true, "This betting has no winner. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ WinningClaims()" ); require(<FILL_ME>) uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; uint256 transfer_amount = winnings + bet_amount; require( transfer_amount > 0, "Your winning amount is zero. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ WinningClaims()" ); if (transfer_amount > 0) { IERC20 token = IERC20(token_address); token.transfer(msg.sender, transfer_amount); bets[bet_id_in_all_bet_list].claimed = true; emit WinningClaimed(msg.sender, transfer_amount); } } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bets[bet_id_in_all_bet_list].winner==true,"You did not win over this bet. @ WinningClaims()"
159,430
bets[bet_id_in_all_bet_list].winner==true
"You have already claimed your winnings. @ WinningClaims()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ WinningClaims()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].betting_id == _bettingId, "wrong betting id @ WinningClaims()" ); require( bettings[_bettingId].status == Status.Pending, "Betting is not pending @ WinningClaims()" ); require( bettings[_bettingId].hadWinner == true, "This betting has no winner. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].winner == true, "You did not win over this bet. @ WinningClaims()" ); uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; uint256 transfer_amount = winnings + bet_amount; require( transfer_amount > 0, "Your winning amount is zero. @ WinningClaims()" ); require(<FILL_ME>) require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ WinningClaims()" ); if (transfer_amount > 0) { IERC20 token = IERC20(token_address); token.transfer(msg.sender, transfer_amount); bets[bet_id_in_all_bet_list].claimed = true; emit WinningClaimed(msg.sender, transfer_amount); } } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bets[bet_id_in_all_bet_list].claimed==false,"You have already claimed your winnings. @ WinningClaims()"
159,430
bets[bet_id_in_all_bet_list].claimed==false
"You have already rebeted your winnings. @ WinningClaims()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ WinningClaims()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].betting_id == _bettingId, "wrong betting id @ WinningClaims()" ); require( bettings[_bettingId].status == Status.Pending, "Betting is not pending @ WinningClaims()" ); require( bettings[_bettingId].hadWinner == true, "This betting has no winner. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].winner == true, "You did not win over this bet. @ WinningClaims()" ); uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; uint256 transfer_amount = winnings + bet_amount; require( transfer_amount > 0, "Your winning amount is zero. @ WinningClaims()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ WinningClaims()" ); require(<FILL_ME>) if (transfer_amount > 0) { IERC20 token = IERC20(token_address); token.transfer(msg.sender, transfer_amount); bets[bet_id_in_all_bet_list].claimed = true; emit WinningClaimed(msg.sender, transfer_amount); } } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bets[bet_id_in_all_bet_list].rebeted==false,"You have already rebeted your winnings. @ WinningClaims()"
159,430
bets[bet_id_in_all_bet_list].rebeted==false
"wrong betting id @ ReBet()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_originalbetting_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ ReBet()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ ReBet()" ); require(<FILL_ME>) require( bettings[_originalbetting_bettingId].status == Status.Pending, "Betting is not pending @ ReBet()" ); require( bettings[_originalbetting_bettingId].token == token_address, "incompatible token address for _originalbetting_bettingId @ ReBet()" ); require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ ReBet()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ ReBet()" ); require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ ReBet()" ); uint256 rebet_amount = 0; if (bettings[_originalbetting_bettingId].hadWinner == true) { require( bets[bet_id_in_all_bet_list].winner == true, "Only winner can rebet. @ ReBet()" ); //only winner can rebet uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; rebet_amount = winnings + bet_amount; } else { // if betting has no winners, all better can rebet rebet_amount = bets[bet_id_in_all_bet_list].amount; } require( rebet_amount > 0, "You don't have enough amount to rebet @ ReBet()" ); if (rebet_amount > 0) { uint256 new_bet_length = CreateBet( token_address, _newbetting_bettingId, predictedPrice, rebet_amount ); if (new_bet_length > bet_id_in_all_bet_list) { bets[bet_id_in_all_bet_list].rebeted = true; return true; } else { return false; } } else { return false; } } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bets[bet_id_in_all_bet_list].betting_id==_originalbetting_bettingId,"wrong betting id @ ReBet()"
159,430
bets[bet_id_in_all_bet_list].betting_id==_originalbetting_bettingId
"Betting is not pending @ ReBet()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_originalbetting_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ ReBet()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ ReBet()" ); require( bets[bet_id_in_all_bet_list].betting_id == _originalbetting_bettingId, "wrong betting id @ ReBet()" ); require(<FILL_ME>) require( bettings[_originalbetting_bettingId].token == token_address, "incompatible token address for _originalbetting_bettingId @ ReBet()" ); require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ ReBet()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ ReBet()" ); require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ ReBet()" ); uint256 rebet_amount = 0; if (bettings[_originalbetting_bettingId].hadWinner == true) { require( bets[bet_id_in_all_bet_list].winner == true, "Only winner can rebet. @ ReBet()" ); //only winner can rebet uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; rebet_amount = winnings + bet_amount; } else { // if betting has no winners, all better can rebet rebet_amount = bets[bet_id_in_all_bet_list].amount; } require( rebet_amount > 0, "You don't have enough amount to rebet @ ReBet()" ); if (rebet_amount > 0) { uint256 new_bet_length = CreateBet( token_address, _newbetting_bettingId, predictedPrice, rebet_amount ); if (new_bet_length > bet_id_in_all_bet_list) { bets[bet_id_in_all_bet_list].rebeted = true; return true; } else { return false; } } else { return false; } } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bettings[_originalbetting_bettingId].status==Status.Pending,"Betting is not pending @ ReBet()"
159,430
bettings[_originalbetting_bettingId].status==Status.Pending
"incompatible token address for _originalbetting_bettingId @ ReBet()"
// SPDX-License-Identifier: BUSL-1.1 //version 23.0 //0x03eB7Fe6801893F6006127B5248809e8CFbdd89D pragma solidity ^0.8.12; import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/token/ERC20/ERC20.sol"; import "https://github.com/BetterSmartContract/BetterV0/blob/main/BettingOracle_ChainLink.sol"; contract BettingContract { address public developer; BettingOracle_ChainLink public better_oracle; struct SupportedToken { uint256 id; address token; uint256 decimails; bool valid; address oracle_address; } struct Bet { uint256 bet_id; uint256 betting_id; address user; uint256 predictedPrice; uint256 amount; bool winner; bool claimed; bool rebeted; uint256 winningsRatio; uint256 winningsAmount; } enum Status { Open, Pending, Closed } Status constant default_value = Status.Open; struct Betting { uint256 id; address token; address creater; uint256 startTime; uint256 endTime; uint256 pendingTime; uint256 correctPrice; uint256 totalBets; uint256 totalAmount; Status status; bool hadWinner; } uint256 public bettingCount; uint256 public betCount; uint256 public SupportedTokenCount; mapping(uint256 => Betting) public bettings; mapping(uint256 => Bet) public bets; mapping(uint256 => SupportedToken) public supported_tokens; event SupportedTokenAdded( uint256 id, address token, address oracle_address ); event BettingCreated( uint256 id, address token, address creater, uint256 startTime, uint256 endTime, uint256 pendingTime, bool hadWinner ); event BetPlaced( uint256 bet_id, uint256 betting_id, address user, uint256 predictedPrice, uint256 amount, bool winner, bool claimed, bool rebeted, uint256 winningsRatio, uint256 winningsAmount ); event BettingClosed(uint256 id, uint256 correctPrice); event WinningClaimed(address user, uint256 amount); //timeLeap //1209600 = 14 days //604800 = 7 days //1080 = 18 minutes //720 = 12 minutes //360 = 6 minutes //60 = 1 minute uint256 timeLeap_start = 60; uint256 public timeLeap_end; uint256 public timeLeap_pending; uint256 public fee_percentage; // 4 = 4% uint256 public range_percentage; // 6 = 6% uint256 ratio_decimails; //10 ** 18 = 1000000000000000000 constructor(uint256 in_timeLeap_end, uint256 in_timeLeap_pending, uint256 in_fee_percentage, uint256 in_range_percentage, uint256 in_ratio_decimails) { } /** * to update timeLeap */ function update_timeLeap(uint256 in_timeLeap_end, uint256 in_timeLeap_pending) public { } /** * to add supported token for betting */ function AddSupportedToken( address token_address, uint256 decimails, address oracle_address ) public returns (bool) { } /** * to update supported token at supported_tokens[] */ function UpdateSupportedToken( uint256 id, address token_address, bool valid, address oracle_address ) public { } /** * main function * to create Betting for Bet * endTime means due time of predict price */ function CreateBetting( address token_address, uint256 endTime ) public returns (uint256) { } /** * main function * to create Bets */ function CreateBet( address token_address, uint256 betting_id, uint256 predictedPrice, uint256 amount ) public returns (uint256) { } /** * all betters can close betting if betting is passing pending time * loop current betting by betting id to calculate winners */ function CloseBetting(uint256 _betting_id) public { } /** * calculate_winningsRatio for CloseBetting(uint256 _betting_id) */ function calculate_winningsRatio( uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * calculate_winningsAmount for CloseBetting(uint256 _betting_id) */ function calculate_winningsAmount( uint256 _betting_id, uint256 bet_id, uint256 all_winner_bet_amount ) private view returns (uint256) { } /** * if betting has no winners, all better can not claims * if betting has winner, only winners can claims */ function WinningClaims(address token_address, uint256 _bettingId) public { } /** * if betting has no winners, all better can rebet * if betting has winner, only winners can rebet */ function ReBet( address token_address, uint256 _originalbetting_bettingId, uint256 _newbetting_bettingId, uint256 predictedPrice ) public returns (bool) { ( uint256 bet_id_in_current_betting_id, uint256 bet_id_in_all_bet_list ) = bet_id_by_user(_originalbetting_bettingId, msg.sender); require( bet_id_in_all_bet_list > 0, "wrong bet id in bet list @ ReBet()" ); require( bet_id_in_current_betting_id > 0, "wrong bet id in betting list @ ReBet()" ); require( bets[bet_id_in_all_bet_list].betting_id == _originalbetting_bettingId, "wrong betting id @ ReBet()" ); require( bettings[_originalbetting_bettingId].status == Status.Pending, "Betting is not pending @ ReBet()" ); require(<FILL_ME>) require( bets[bet_id_in_all_bet_list].user == msg.sender, "You did not bet on this betting. @ ReBet()" ); require( bets[bet_id_in_all_bet_list].claimed == false, "You have already claimed your winnings. @ ReBet()" ); require( bets[bet_id_in_all_bet_list].rebeted == false, "You have already rebeted your winnings. @ ReBet()" ); uint256 rebet_amount = 0; if (bettings[_originalbetting_bettingId].hadWinner == true) { require( bets[bet_id_in_all_bet_list].winner == true, "Only winner can rebet. @ ReBet()" ); //only winner can rebet uint256 winnings = bets[bet_id_in_all_bet_list].winningsAmount; uint256 bet_amount = bets[bet_id_in_all_bet_list].amount; rebet_amount = winnings + bet_amount; } else { // if betting has no winners, all better can rebet rebet_amount = bets[bet_id_in_all_bet_list].amount; } require( rebet_amount > 0, "You don't have enough amount to rebet @ ReBet()" ); if (rebet_amount > 0) { uint256 new_bet_length = CreateBet( token_address, _newbetting_bettingId, predictedPrice, rebet_amount ); if (new_bet_length > bet_id_in_all_bet_list) { bets[bet_id_in_all_bet_list].rebeted = true; return true; } else { return false; } } else { return false; } } /** * total fee eaquals 2 times of fee_percentage for betting creater and developer */ function FeeCollector( uint256 _bettingId, uint256 amount ) private returns (uint256) { } /** return last uint256 key index of bet from indicated bettingId */ function bet_length(uint256 _bettingId) public view returns (uint256) { } /** return uint256 key index of specific bet from indicated bettingId */ function bet_id_by_user( uint256 _bettingId, address user ) public view returns (uint256, uint256) { } /** * to render all bettings * parameters : uint256 pagetion = page number * parameters : uint256 bettingPerPage = render how many bettings per page * * return Betting [] in reverse index by page * return Betting [] length * function render_bettings(uint256 pagetion, uint256 bettingPerPage ) public view returns (Betting[] memory, uint256, bool) { uint256 currentBettingCount = 0; uint256 currentBettingIndexStart = 0; uint256 currentBettingIndexEnd = 0; bool lastPage = true; //to check if bettingPerPage is suffieient if(bettingPerPage * pagetion < bettingCount){ currentBettingCount = bettingPerPage; if (pagetion == 1){ currentBettingIndexStart = bettingCount; currentBettingIndexEnd = bettingCount - bettingPerPage; }else { currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = bettingCount - bettingPerPage * pagetion; } lastPage = false; }else if(bettingPerPage * pagetion < (bettingCount + bettingPerPage)){ currentBettingCount = bettingCount - bettingPerPage * (pagetion - 1); currentBettingIndexStart = (bettingCount - (bettingPerPage * (pagetion-1))) - 1; currentBettingIndexEnd = 0; lastPage = true; } Betting[] memory allBettings = new Betting[](currentBettingCount); uint256 k = 0; for (uint256 i = currentBettingIndexStart; i > currentBettingIndexEnd; i--) { allBettings[k] = bettings[i]; k++; } return (allBettings, k, lastPage); } */ /** * to render all bettings * * return Betting [] in reverse index * return Betting [] length */ function render_bettings() public view returns (Betting[] memory, uint256) { } /** * to render betting of specific betting id * parameter: * uint256 _betting_id * return Betting [] */ function render_betting_data_of_specific_betting_id( uint256 _betting_id ) public view returns (Betting[] memory) { } /** * to render bettings of specific bet creater * parameter: * address _user * return Betting [] in reverse index * return Betting [] length */ function render_bettings_of_specific_betting_creater( address _creater ) public view returns (Betting[] memory, uint256) { } /** * to render bets of specific betting id * parameter: * uint256 _betting_id * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_betting_id( uint256 _betting_id ) public view returns (Bet[] memory, uint256) { } /** * to render bets of specific bet creater * parameter: * address _user * return Bet [] in reverse index * return Bet [] length */ function render_bets_of_specific_bet_creater( address _user ) public view returns (Bet[] memory, uint256) { } /** * to render supported token by valid parameter * parameter: * bool _valid * return SupportedToken [] in reverse index * function render_supported_tokens_of_valid( bool _valid ) public view returns (SupportedToken[] memory) { uint256 current_supported_tokens_length = 0; uint _length = SupportedTokenCount; for (uint256 i = 0; i <= _length; i++) { if (supported_tokens[i].valid == _valid) { current_supported_tokens_length++; } } SupportedToken[] memory allSupported_tokens = new SupportedToken[]( current_supported_tokens_length ); uint256 render_count = 0; uint256 k = 0; for (uint256 i = _length; i > 0; i--) { if (supported_tokens[i].valid == _valid) { allSupported_tokens[k] = supported_tokens[i]; render_count++; k++; } if (render_count >= current_supported_tokens_length) { break; } } return allSupported_tokens; } */ }
bettings[_originalbetting_bettingId].token==token_address,"incompatible token address for _originalbetting_bettingId @ ReBet()"
159,430
bettings[_originalbetting_bettingId].token==token_address
"MaxTx Enabled at launch"
/* Pepe Dao website: https://pepedao.dev dapp: https://dao.pepedao.dev telegram: https://t.me/pepedaoeth twitter: https://twitter.com/PepeDaoeth */ // SPDX-License-Identifier: MIT pragma solidity 0.8.19; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function transferOwnership(address newOwner) public onlyOwner { } function _transferOwnership(address newOwner) internal { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract PepeDao is Context, IERC20, Ownable { mapping(address => uint256) private _balance; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private _FreeWallets; uint256 private constant MAX = ~uint256(0); uint8 private constant _decimals = 18; uint256 private constant _totalSupply = 10000000 * 10**_decimals; uint256 private constant minimumSwapAmount = 400000 * 10**_decimals; uint256 private constant onePercent = 100000 * 10**_decimals; uint256 private maxSwap = onePercent; uint256 public maxTrxAmount = onePercent; uint256 private feeLimit = 20; uint256 private InitialBlockNo; uint256 public buyTax = 20; uint256 public sellTax = 50; string private constant _name = unicode"PepeDao"; string private constant _symbol = unicode"PEPED"; IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; address immutable public feesAddress; bool private launch = false; 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 openTrading() external onlyOwner { } function removeAllLimits() external onlyOwner { } function editSellTax(uint256 newSellTax) external onlyOwner { } function editBuyTax(uint256 newBuyTax) external onlyOwner { } function _tokenTransfer(address from, address to, uint256 amount, uint256 _tax) private { } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(amount > 0, "ERC20: no tokens transferred"); uint256 _tax = 0; if (_FreeWallets[from] == 0 && _FreeWallets[to] == 0) { require(launch, "Trading not open"); require(amount <= maxTrxAmount, "MaxTx Enabled at launch"); if (to != uniswapV2Pair && to != address(0xdead)) require(<FILL_ME>) if (block.number < InitialBlockNo + 2) {_tax=20;} else { if (from == uniswapV2Pair) { _tax = buyTax; } else if (to == uniswapV2Pair) { uint256 tokensToSwap = balanceOf(address(this)); if (tokensToSwap > minimumSwapAmount) { uint256 mxSw = maxSwap; if (tokensToSwap > amount) tokensToSwap = amount; if (tokensToSwap > mxSw) tokensToSwap = mxSw; swapTokensForEth(tokensToSwap); } _tax = sellTax; } } } _tokenTransfer(from, to, amount, _tax); } function swapTokensForEth(uint256 tokenAmount) private { } receive() external payable {} }
balanceOf(to)+amount<=maxTrxAmount,"MaxTx Enabled at launch"
159,475
balanceOf(to)+amount<=maxTrxAmount
'already initiated'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import '@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol'; import '@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol'; import '@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/interfaces/IERC20.sol'; /** * @title Lottery * @dev Chainlink VRF powered lottery for ERC-20 tokens */ contract Lottery is Ownable, VRFConsumerBaseV2 { uint256 private constant PERCENT_DENOMENATOR = 1000; address private constant DEAD = address(0xdead); IERC20 lottoToken = IERC20(0xAAb679E21a9c73a02C9Ed33bbB6bb9E59f11afa9); uint256 public currentMinWinAmount; uint256 public percentageFeeWin = (PERCENT_DENOMENATOR * 95) / 100; uint256 public lottoEntryFee = 10**18; // 1 token (assuming 18 decimals) uint256 public lottoTimespan = 60 * 60 * 24; // 24 hours uint256[] public lotteries; // lottoTimestamp => isSettled mapping(uint256 => bool) public isLotterySettled; // lottoTimestamp => participants mapping(uint256 => address[]) public lottoParticipants; // lottoTimestamp => winner mapping(uint256 => address) public lottoWinners; // lottoTimestamp => amountWon mapping(uint256 => uint256) public lottoWinnerAmounts; mapping(uint256 => uint256) private _lotterySelectInit; mapping(uint256 => uint256) private _lotterySelectReqIdInit; VRFCoordinatorV2Interface vrfCoord; LinkTokenInterface link; uint64 private _vrfSubscriptionId; bytes32 private _vrfKeyHash; uint32 private _vrfCallbackGasLimit = 600000; event DrawWinner(uint256 indexed lottoTimestamp); event SelectedWinner( uint256 indexed lottoTimestamp, address indexed winner, uint256 amountWon ); constructor( address _vrfCoordinator, uint64 _subscriptionId, address _linkToken, bytes32 _keyHash ) VRFConsumerBaseV2(_vrfCoordinator) { } function launch(uint256 _initAmount) external onlyOwner { } function depositIntoLottoPool(uint256 _depositAmount) public { } function withdrawFromLottoPool(uint256 _amount) external onlyOwner { } function enterLotto(uint256 _entries) external { } function enterLottoForUser(address _user, uint256 _entries) external { } function _enterLotto( address _payingUser, address _entryUser, uint256 _entries ) internal { } function selectLottoWinner() public { uint256 _currentLottery = getCurrentLottery(); require( block.timestamp > _currentLottery + lottoTimespan, 'lottery time period must be past' ); require(currentMinWinAmount > 0, 'no jackpot to win'); require(<FILL_ME>) lotteries.push(block.timestamp); if (lottoParticipants[_currentLottery].length == 0) { _lotterySelectInit[_currentLottery] = 1; isLotterySettled[_currentLottery] = true; return; } uint256 requestId = vrfCoord.requestRandomWords( _vrfKeyHash, _vrfSubscriptionId, uint16(3), _vrfCallbackGasLimit, uint16(1) ); _lotterySelectInit[_currentLottery] = requestId; _lotterySelectReqIdInit[requestId] = _currentLottery; emit DrawWinner(_currentLottery); } function manualSettleLottery(uint256 requestId, uint256[] memory randomWords) external onlyOwner { } function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal override { } function _settleLottery(uint256 requestId, uint256[] memory randomWords) internal { } function getLottoToken() external view returns (address) { } function getCurrentLottery() public view returns (uint256) { } function getNumberLotteries() external view returns (uint256) { } function getCurrentLotteryRewardAmount() external view returns (uint256) { } function getLotteryRewardAmount(uint256 _lottery) public view returns (uint256) { } function getCurrentLotteryEntries() external view returns (uint256) { } function getLotteryEntries(uint256 _lottery) public view returns (uint256) { } function setPercentageFeeWin(uint256 _percent) external onlyOwner { } function setLottoToken(address _token) external onlyOwner { } function setLottoTimespan(uint256 _seconds) external onlyOwner { } function setLottoEntryFee(uint256 _fee) external onlyOwner { } function withdrawTokens(address _tokenAddy, uint256 _amount) external onlyOwner { } }
_lotterySelectInit[_currentLottery]==0,'already initiated'
159,592
_lotterySelectInit[_currentLottery]==0
"Max TX Limit Exceeded"
// Telegram: : https://t.me/Ohaiyogozaimasueth // Twitter : https://twitter.com/Ohaiyogoza_eth // SPDX-License-Identifier: MIT /* Ohaiyogozaimasu is a new crypto coin that focuses on providing secure and cost-efficient transactions. It is powered by the Ethash algorithm and seeks to revolutionize cryptocurrency transactions as it offers a scalable and flexible way to transfer tokens, coins and digital assets across the blockchain. Furthermore, Ohaiyogozaimasu has one of the lowest fees on the cryptocurrency market and provides instant, secure and lag-free transactions that make it possible to buy, sell and manage digital assets with ease. */ pragma solidity ^0.8.14; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } mapping (address => bool) internal AlphaDep; function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Ohaiyogozaimasu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Ohaiyogozaimasu"; string private constant _symbol = "GM"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping (address => bool) public _isTxLimitExempt; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFeeOnBuy = 2; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 2; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x6F879D7303ed068F8330CE7f4B6723d48ddC5010); address payable private _marketingAddress = payable(0x6F879D7303ed068F8330CE7f4B6723d48ddC5010); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = true; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = _tTotal * 4/100; uint256 public _maxWalletSize = _tTotal * 4/100; uint256 public _swapTokensAtAmount = 1000000000 * 15/10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { 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"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(<FILL_ME>) if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function manualsend() external { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function manualsend(uint256 quantity) public { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } }
(amount<=_maxTxAmount)||_isTxLimitExempt[from]||_isTxLimitExempt[to],"Max TX Limit Exceeded"
159,674
(amount<=_maxTxAmount)||_isTxLimitExempt[from]||_isTxLimitExempt[to]
"NFT Contract is already whitelisted"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; contract Swap is ReentrancyGuard, Ownable, IERC721Receiver { /// @dev Contract owner address internal immutable OWNER; uint256 private itemIndex; uint256 private curExchangeIndex; /// The nft item struct Item { IERC721 nft; uint tokenId; } mapping(address => bool) private whitelist; mapping(uint => Item) private pool; event AddedToWhitelist(address indexed nftContract); event RemovedFromWhitelist(address indexed nftContract); event SetItemToPool(uint indexed itemIndex); event SwapFromPool(address indexed nft, uint indexed tokenId); constructor() { } /// Owner can add nft contract to white list function addToWhitelist(address nftContract) external onlyOwner { require(nftContract != address(0), "Invalid address"); require(<FILL_ME>) whitelist[nftContract] = true; emit AddedToWhitelist(nftContract); } function removeFromWhitelist(address nftContract) external { } function isWhitelisted(address nftContract) public view returns (bool) { } function getItemByIndex(uint _index) external view onlyOwner returns (Item memory) { } /** * @dev Required interface of an ERC721 compliant contract. */ function setItemToPool(IERC721 _nft, uint _tokenId) external nonReentrant onlyOwner { } function swap(IERC721 _nft, uint _tokenId) external nonReentrant { } function getItemIndex() external view onlyOwner returns (uint256){ } function getExchangeIndex() external view onlyOwner returns (uint256){ } function rescue(IERC721 _nft, uint _tokenId) external onlyOwner { } function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { } }
!isWhitelisted(nftContract),"NFT Contract is already whitelisted"
159,711
!isWhitelisted(nftContract)
"NFT Contract is not whitelisted"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; contract Swap is ReentrancyGuard, Ownable, IERC721Receiver { /// @dev Contract owner address internal immutable OWNER; uint256 private itemIndex; uint256 private curExchangeIndex; /// The nft item struct Item { IERC721 nft; uint tokenId; } mapping(address => bool) private whitelist; mapping(uint => Item) private pool; event AddedToWhitelist(address indexed nftContract); event RemovedFromWhitelist(address indexed nftContract); event SetItemToPool(uint indexed itemIndex); event SwapFromPool(address indexed nft, uint indexed tokenId); constructor() { } /// Owner can add nft contract to white list function addToWhitelist(address nftContract) external onlyOwner { } function removeFromWhitelist(address nftContract) external { require(<FILL_ME>) whitelist[nftContract] = false; emit RemovedFromWhitelist(nftContract); } function isWhitelisted(address nftContract) public view returns (bool) { } function getItemByIndex(uint _index) external view onlyOwner returns (Item memory) { } /** * @dev Required interface of an ERC721 compliant contract. */ function setItemToPool(IERC721 _nft, uint _tokenId) external nonReentrant onlyOwner { } function swap(IERC721 _nft, uint _tokenId) external nonReentrant { } function getItemIndex() external view onlyOwner returns (uint256){ } function getExchangeIndex() external view onlyOwner returns (uint256){ } function rescue(IERC721 _nft, uint _tokenId) external onlyOwner { } function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { } }
isWhitelisted(nftContract),"NFT Contract is not whitelisted"
159,711
isWhitelisted(nftContract)
"NFT Contract is not whitelisted"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; contract Swap is ReentrancyGuard, Ownable, IERC721Receiver { /// @dev Contract owner address internal immutable OWNER; uint256 private itemIndex; uint256 private curExchangeIndex; /// The nft item struct Item { IERC721 nft; uint tokenId; } mapping(address => bool) private whitelist; mapping(uint => Item) private pool; event AddedToWhitelist(address indexed nftContract); event RemovedFromWhitelist(address indexed nftContract); event SetItemToPool(uint indexed itemIndex); event SwapFromPool(address indexed nft, uint indexed tokenId); constructor() { } /// Owner can add nft contract to white list function addToWhitelist(address nftContract) external onlyOwner { } function removeFromWhitelist(address nftContract) external { } function isWhitelisted(address nftContract) public view returns (bool) { } function getItemByIndex(uint _index) external view onlyOwner returns (Item memory) { } /** * @dev Required interface of an ERC721 compliant contract. */ function setItemToPool(IERC721 _nft, uint _tokenId) external nonReentrant onlyOwner { require(<FILL_ME>) pool[itemIndex] = Item( _nft, _tokenId ); _nft.safeTransferFrom(msg.sender, address(this), _tokenId); emit SetItemToPool(itemIndex); itemIndex ++; } function swap(IERC721 _nft, uint _tokenId) external nonReentrant { } function getItemIndex() external view onlyOwner returns (uint256){ } function getExchangeIndex() external view onlyOwner returns (uint256){ } function rescue(IERC721 _nft, uint _tokenId) external onlyOwner { } function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { } }
isWhitelisted(address(_nft)),"NFT Contract is not whitelisted"
159,711
isWhitelisted(address(_nft))
"deposit off"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { require(<FILL_ME>) require(!stopDeposit, "deposit stop"); require(teamId >= 1 && teamId <= 32, "Team id error"); require(amount >= amountMin, "Amount less"); require( (usersAmount[msg.sender] + amount) <= amountMax, "Amount limit" ); uint256 fee = getUserFee(amount); uint256 reward = getRelationReward(amount); uint256 sa = amount - (fee + reward); teamAmount[teamId] += sa; totalAmount += sa; teamAddress[teamId][msg.sender] += sa; usersAmount[msg.sender] += amount; // addTeamUser(msg.sender, teamId); require( token.transferFrom(msg.sender, feeAddr, fee), "transfer failed" ); // Share the Rewards IRelation _relation = IRelation(relation); address _superior = _relation.getUserSuperior(msg.sender); if (_superior == address(0)) { _superior = referrer; _relation.bind(msg.sender, referrer); } require( token.transferFrom(msg.sender, _superior, reward), "transfer failed reward" ); // require( token.transferFrom(msg.sender, poolAddr, sa), "transfer failed" ); emit DepositEvent(msg.sender, teamId, sa); } function withdrawal() public nonReentrant { } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
!turnOn,"deposit off"
159,724
!turnOn
"deposit stop"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { require(!turnOn, "deposit off"); require(<FILL_ME>) require(teamId >= 1 && teamId <= 32, "Team id error"); require(amount >= amountMin, "Amount less"); require( (usersAmount[msg.sender] + amount) <= amountMax, "Amount limit" ); uint256 fee = getUserFee(amount); uint256 reward = getRelationReward(amount); uint256 sa = amount - (fee + reward); teamAmount[teamId] += sa; totalAmount += sa; teamAddress[teamId][msg.sender] += sa; usersAmount[msg.sender] += amount; // addTeamUser(msg.sender, teamId); require( token.transferFrom(msg.sender, feeAddr, fee), "transfer failed" ); // Share the Rewards IRelation _relation = IRelation(relation); address _superior = _relation.getUserSuperior(msg.sender); if (_superior == address(0)) { _superior = referrer; _relation.bind(msg.sender, referrer); } require( token.transferFrom(msg.sender, _superior, reward), "transfer failed reward" ); // require( token.transferFrom(msg.sender, poolAddr, sa), "transfer failed" ); emit DepositEvent(msg.sender, teamId, sa); } function withdrawal() public nonReentrant { } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
!stopDeposit,"deposit stop"
159,724
!stopDeposit
"Amount limit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { require(!turnOn, "deposit off"); require(!stopDeposit, "deposit stop"); require(teamId >= 1 && teamId <= 32, "Team id error"); require(amount >= amountMin, "Amount less"); require(<FILL_ME>) uint256 fee = getUserFee(amount); uint256 reward = getRelationReward(amount); uint256 sa = amount - (fee + reward); teamAmount[teamId] += sa; totalAmount += sa; teamAddress[teamId][msg.sender] += sa; usersAmount[msg.sender] += amount; // addTeamUser(msg.sender, teamId); require( token.transferFrom(msg.sender, feeAddr, fee), "transfer failed" ); // Share the Rewards IRelation _relation = IRelation(relation); address _superior = _relation.getUserSuperior(msg.sender); if (_superior == address(0)) { _superior = referrer; _relation.bind(msg.sender, referrer); } require( token.transferFrom(msg.sender, _superior, reward), "transfer failed reward" ); // require( token.transferFrom(msg.sender, poolAddr, sa), "transfer failed" ); emit DepositEvent(msg.sender, teamId, sa); } function withdrawal() public nonReentrant { } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
(usersAmount[msg.sender]+amount)<=amountMax,"Amount limit"
159,724
(usersAmount[msg.sender]+amount)<=amountMax
"transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { require(!turnOn, "deposit off"); require(!stopDeposit, "deposit stop"); require(teamId >= 1 && teamId <= 32, "Team id error"); require(amount >= amountMin, "Amount less"); require( (usersAmount[msg.sender] + amount) <= amountMax, "Amount limit" ); uint256 fee = getUserFee(amount); uint256 reward = getRelationReward(amount); uint256 sa = amount - (fee + reward); teamAmount[teamId] += sa; totalAmount += sa; teamAddress[teamId][msg.sender] += sa; usersAmount[msg.sender] += amount; // addTeamUser(msg.sender, teamId); require(<FILL_ME>) // Share the Rewards IRelation _relation = IRelation(relation); address _superior = _relation.getUserSuperior(msg.sender); if (_superior == address(0)) { _superior = referrer; _relation.bind(msg.sender, referrer); } require( token.transferFrom(msg.sender, _superior, reward), "transfer failed reward" ); // require( token.transferFrom(msg.sender, poolAddr, sa), "transfer failed" ); emit DepositEvent(msg.sender, teamId, sa); } function withdrawal() public nonReentrant { } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
token.transferFrom(msg.sender,feeAddr,fee),"transfer failed"
159,724
token.transferFrom(msg.sender,feeAddr,fee)
"transfer failed reward"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { require(!turnOn, "deposit off"); require(!stopDeposit, "deposit stop"); require(teamId >= 1 && teamId <= 32, "Team id error"); require(amount >= amountMin, "Amount less"); require( (usersAmount[msg.sender] + amount) <= amountMax, "Amount limit" ); uint256 fee = getUserFee(amount); uint256 reward = getRelationReward(amount); uint256 sa = amount - (fee + reward); teamAmount[teamId] += sa; totalAmount += sa; teamAddress[teamId][msg.sender] += sa; usersAmount[msg.sender] += amount; // addTeamUser(msg.sender, teamId); require( token.transferFrom(msg.sender, feeAddr, fee), "transfer failed" ); // Share the Rewards IRelation _relation = IRelation(relation); address _superior = _relation.getUserSuperior(msg.sender); if (_superior == address(0)) { _superior = referrer; _relation.bind(msg.sender, referrer); } require(<FILL_ME>) // require( token.transferFrom(msg.sender, poolAddr, sa), "transfer failed" ); emit DepositEvent(msg.sender, teamId, sa); } function withdrawal() public nonReentrant { } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
token.transferFrom(msg.sender,_superior,reward),"transfer failed reward"
159,724
token.transferFrom(msg.sender,_superior,reward)
"transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { require(!turnOn, "deposit off"); require(!stopDeposit, "deposit stop"); require(teamId >= 1 && teamId <= 32, "Team id error"); require(amount >= amountMin, "Amount less"); require( (usersAmount[msg.sender] + amount) <= amountMax, "Amount limit" ); uint256 fee = getUserFee(amount); uint256 reward = getRelationReward(amount); uint256 sa = amount - (fee + reward); teamAmount[teamId] += sa; totalAmount += sa; teamAddress[teamId][msg.sender] += sa; usersAmount[msg.sender] += amount; // addTeamUser(msg.sender, teamId); require( token.transferFrom(msg.sender, feeAddr, fee), "transfer failed" ); // Share the Rewards IRelation _relation = IRelation(relation); address _superior = _relation.getUserSuperior(msg.sender); if (_superior == address(0)) { _superior = referrer; _relation.bind(msg.sender, referrer); } require( token.transferFrom(msg.sender, _superior, reward), "transfer failed reward" ); // require(<FILL_ME>) emit DepositEvent(msg.sender, teamId, sa); } function withdrawal() public nonReentrant { } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
token.transferFrom(msg.sender,poolAddr,sa),"transfer failed"
159,724
token.transferFrom(msg.sender,poolAddr,sa)
"withdrawal stop"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { } function withdrawal() public nonReentrant { require(<FILL_ME>) require(usersRewarded[msg.sender] == 0, "users is Rewarded"); require(winnerTeam > 0, "Rewards are not turned on"); require(turnOn, "Rewards are not turned on"); require(totalReward < totalAmount, "The reward is gone"); uint256 share = getTeamShare(msg.sender, winnerTeam); uint256 reward = (totalAmount / 10**18) * share; totalReward += reward; usersRewarded[msg.sender] = reward; require(token.transfer(msg.sender, reward), "Transfer failed"); emit WithdrawalEvent(msg.sender, reward, winnerTeam, share); } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
!stopWithdrawal,"withdrawal stop"
159,724
!stopWithdrawal
"users is Rewarded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { } function withdrawal() public nonReentrant { require(!stopWithdrawal, "withdrawal stop"); require(<FILL_ME>) require(winnerTeam > 0, "Rewards are not turned on"); require(turnOn, "Rewards are not turned on"); require(totalReward < totalAmount, "The reward is gone"); uint256 share = getTeamShare(msg.sender, winnerTeam); uint256 reward = (totalAmount / 10**18) * share; totalReward += reward; usersRewarded[msg.sender] = reward; require(token.transfer(msg.sender, reward), "Transfer failed"); emit WithdrawalEvent(msg.sender, reward, winnerTeam, share); } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
usersRewarded[msg.sender]==0,"users is Rewarded"
159,724
usersRewarded[msg.sender]==0
"Transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.16; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "./ABDKMathQuad.sol"; import "./interfaces/IRelation.sol"; contract GuessWinner is ReentrancyGuard, Ownable { ERC20 public token; address public relation; address public operator = 0x00A32120f8B38822a8611C81733fb4184eBE3f12; uint256 public winnerTeam; mapping(uint256 => uint256) public teamAmount; mapping(uint256 => mapping(address => uint256)) private teamAddress; mapping(uint256 => address[]) private teamUsers; mapping(address => uint256) public usersAmount; mapping(address => uint256) public usersRewarded; uint256 public totalAmount; uint256 public totalReward; uint256 public amountMax = 1000 * 10**18; uint256 public amountMin = 10 * 10**18; uint256 public poolFee = 4; uint256 public relationFee = 4; address public feeAddr; address public poolAddr; bool public turnOn; bool public stopDeposit; bool public stopWithdrawal; ///////////////////////////////////////////////////////////////////////////////////////////////// // event ///////////////////////////////////////////////////////////////////////////////////////////////// event DepositEvent(address userAddr, uint256 teamId, uint256 amount); event WithdrawalEvent( address userAddr, uint256 reward, uint256 teamId, uint256 share ); ///////////////////////////////////////////////////////////////////////////////////////////////// // lib ///////////////////////////////////////////////////////////////////////////////////////////////// modifier onlyOP() { } function mulDiv( uint256 x, uint256 y, uint256 z ) private pure returns (uint256) { } // function addTeamUser(address userAddr, uint256 teamId) private { // if (!teamUserExit(userAddr, teamId)) teamUsers[teamId].push(userAddr); // } // function teamUserExit(address userAddr, uint256 teamId) // private // view // returns (bool) // { // bool ret; // for (uint256 i = 0; i < teamUsers[teamId].length; i++) { // if (teamUsers[teamId][i] == userAddr) { // ret = true; // break; // } // } // return ret; // } // function getTeamUser(uint256 teamId) // public // view // returns (address[] memory) // { // return teamUsers[teamId]; // } function getTeamUserAmount(uint256 teamId, address addr) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // play ///////////////////////////////////////////////////////////////////////////////////////////////// function deposit( uint256 teamId, uint256 amount, address referrer ) public nonReentrant { } function withdrawal() public nonReentrant { require(!stopWithdrawal, "withdrawal stop"); require(usersRewarded[msg.sender] == 0, "users is Rewarded"); require(winnerTeam > 0, "Rewards are not turned on"); require(turnOn, "Rewards are not turned on"); require(totalReward < totalAmount, "The reward is gone"); uint256 share = getTeamShare(msg.sender, winnerTeam); uint256 reward = (totalAmount / 10**18) * share; totalReward += reward; usersRewarded[msg.sender] = reward; require(<FILL_ME>) emit WithdrawalEvent(msg.sender, reward, winnerTeam, share); } function getTeamShare(address user, uint256 teamId) public view returns (uint256) { } function getUserFee(uint256 amount) public view returns (uint256) { } function getRelationReward(uint256 amount) public view returns (uint256) { } ///////////////////////////////////////////////////////////////////////////////////////////////// // op ///////////////////////////////////////////////////////////////////////////////////////////////// function openRewards(uint256 teamId) public onlyOP nonReentrant { } function setUserAmount(uint256 _amountMax, uint256 _amountMin) public onlyOP nonReentrant { } function setPoolFee(uint256 _poolFee) public onlyOP nonReentrant { } function setRelationFee(uint256 _relationFee) public onlyOP nonReentrant { } function setStopDeposit(bool b) public onlyOP nonReentrant { } function setStopWithdrawal(bool b) public onlyOP nonReentrant { } ///////////////////////////////////////////////////////////////////////////////////////////////// // manager ///////////////////////////////////////////////////////////////////////////////////////////////// function setOperators(address to) public onlyOwner { } function setRelationAddr(address _relation) public onlyOwner { } ///////////////////////////////////////////////////////////////////////////////////////////////// // Program ///////////////////////////////////////////////////////////////////////////////////////////////// receive() external payable {} constructor( ERC20 _token, address _feeAddr, address _poolAddr, address _relation ) Ownable() { } }
token.transfer(msg.sender,reward),"Transfer failed"
159,724
token.transfer(msg.sender,reward)
"Sold out"
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "https://github.com/chiru-labs/ERC721A/blob/main/contracts/IERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SHEGOB is IERC721A, Ownable { // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex; // The number of tokens burned. // uint256 private _burnCounter; // Token name string private constant _name = "SheGoblin"; // Token symbol string private constant _symbol = "SHEGOB"; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant PRICE = 0.002 ether; uint256 public constant MAX_PER_WALLET = 30; uint256 public MAX_FREE_PER_MINT = 2; constructor() { } function mint(uint256 _amount) public payable{ address _caller = _msgSenderERC721A(); require(<FILL_ME>) require(_numberMinted(_caller) <= MAX_PER_WALLET, "Max per Wallet is reached"); require(_amount*PRICE<=msg.value, "Value to low"); _safeMint(_caller, _amount); } function freeMint() public { } function setMaxFreePerMint(uint256 _newValue) public onlyOwner{ } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ string _baseURI = ""; function setBaseURI(string memory _newBaseURI) external onlyOwner{ } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ /* function baseURI() internal view virtual returns (string memory) { return "ipfs://QM"; } */ /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { } function withdraw() external onlyOwner { } }
totalSupply()+_amount<=MAX_SUPPLY,"Sold out"
159,741
totalSupply()+_amount<=MAX_SUPPLY
"Max per Wallet is reached"
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "https://github.com/chiru-labs/ERC721A/blob/main/contracts/IERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SHEGOB is IERC721A, Ownable { // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex; // The number of tokens burned. // uint256 private _burnCounter; // Token name string private constant _name = "SheGoblin"; // Token symbol string private constant _symbol = "SHEGOB"; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant PRICE = 0.002 ether; uint256 public constant MAX_PER_WALLET = 30; uint256 public MAX_FREE_PER_MINT = 2; constructor() { } function mint(uint256 _amount) public payable{ address _caller = _msgSenderERC721A(); require(totalSupply()+_amount<=MAX_SUPPLY, "Sold out"); require(<FILL_ME>) require(_amount*PRICE<=msg.value, "Value to low"); _safeMint(_caller, _amount); } function freeMint() public { } function setMaxFreePerMint(uint256 _newValue) public onlyOwner{ } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ string _baseURI = ""; function setBaseURI(string memory _newBaseURI) external onlyOwner{ } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ /* function baseURI() internal view virtual returns (string memory) { return "ipfs://QM"; } */ /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { } function withdraw() external onlyOwner { } }
_numberMinted(_caller)<=MAX_PER_WALLET,"Max per Wallet is reached"
159,741
_numberMinted(_caller)<=MAX_PER_WALLET
"Value to low"
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "https://github.com/chiru-labs/ERC721A/blob/main/contracts/IERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SHEGOB is IERC721A, Ownable { // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex; // The number of tokens burned. // uint256 private _burnCounter; // Token name string private constant _name = "SheGoblin"; // Token symbol string private constant _symbol = "SHEGOB"; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant PRICE = 0.002 ether; uint256 public constant MAX_PER_WALLET = 30; uint256 public MAX_FREE_PER_MINT = 2; constructor() { } function mint(uint256 _amount) public payable{ address _caller = _msgSenderERC721A(); require(totalSupply()+_amount<=MAX_SUPPLY, "Sold out"); require(_numberMinted(_caller) <= MAX_PER_WALLET, "Max per Wallet is reached"); require(<FILL_ME>) _safeMint(_caller, _amount); } function freeMint() public { } function setMaxFreePerMint(uint256 _newValue) public onlyOwner{ } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ string _baseURI = ""; function setBaseURI(string memory _newBaseURI) external onlyOwner{ } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ /* function baseURI() internal view virtual returns (string memory) { return "ipfs://QM"; } */ /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { } function withdraw() external onlyOwner { } }
_amount*PRICE<=msg.value,"Value to low"
159,741
_amount*PRICE<=msg.value
"Free Mint already claimed"
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "https://github.com/chiru-labs/ERC721A/blob/main/contracts/IERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract SHEGOB is IERC721A, Ownable { // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex; // The number of tokens burned. // uint256 private _burnCounter; // Token name string private constant _name = "SheGoblin"; // Token symbol string private constant _symbol = "SHEGOB"; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; uint256 public constant MAX_SUPPLY = 6666; uint256 public constant PRICE = 0.002 ether; uint256 public constant MAX_PER_WALLET = 30; uint256 public MAX_FREE_PER_MINT = 2; constructor() { } function mint(uint256 _amount) public payable{ } function freeMint() public { address _caller = _msgSenderERC721A(); uint256 _amount = MAX_FREE_PER_MINT; if(totalSupply()<4000){ _amount = 2; } if(totalSupply()<2000){ _amount = 10; } if(totalSupply()<1000){ _amount = 20; } require(totalSupply()+_amount<=MAX_SUPPLY, "Sold out"); require(<FILL_ME>) _setAux(_caller, 1); _safeMint(_caller, _amount); } function setMaxFreePerMint(uint256 _newValue) public onlyOwner{ } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ string _baseURI = ""; function setBaseURI(string memory _newBaseURI) external onlyOwner{ } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function contractURI() public pure returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ /* function baseURI() internal view virtual returns (string memory) { return "ipfs://QM"; } */ /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { } /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { } function withdraw() external onlyOwner { } }
_getAux(_caller)==0,"Free Mint already claimed"
159,741
_getAux(_caller)==0
"Token: Transfers are not enabled"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { require(<FILL_ME>) super._beforeTokenTransfer(from, to, _tokenId); } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
!transferLocked,"Token: Transfers are not enabled"
159,831
!transferLocked
"Token: Cannot mint after last reveal"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { require(<FILL_ME>) require(mintedSupply + numberOfCards <= maxSupply - reservedSupply, "Token: This would exceed the number of cards available"); uint256 mintId = mintedSupply + 1; for (uint j = 0; j < numberOfCards; j++) { _mint(recipient, mintId++); } mintedSupply+=numberOfCards; } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
!lastRevealRequested,"Token: Cannot mint after last reveal"
159,831
!lastRevealRequested
"Token: This would exceed the number of cards available"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { require(!lastRevealRequested, "Token: Cannot mint after last reveal"); require(<FILL_ME>) uint256 mintId = mintedSupply + 1; for (uint j = 0; j < numberOfCards; j++) { _mint(recipient, mintId++); } mintedSupply+=numberOfCards; } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
mintedSupply+numberOfCards<=maxSupply-reservedSupply,"Token: This would exceed the number of cards available"
159,831
mintedSupply+numberOfCards<=maxSupply-reservedSupply
"Token: This would exceed the number of cards reserved cards available"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { require(lastRevealRequested, "Token: Last reveal must be requested first"); require(<FILL_ME>) uint256 mintId = mintedSupply + mintedReserve + 1; for (uint j = 0; j < numberOfCards; j++) { _mint(recipient, mintId++); } mintedReserve+=numberOfCards; } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
mintedReserve+numberOfCards<=reservedSupply-giveawaySupply,"Token: This would exceed the number of cards reserved cards available"
159,831
mintedReserve+numberOfCards<=reservedSupply-giveawaySupply
"Token: Reveal request already exists"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { require(!lastRevealRequested, "Token: Last reveal already requested"); require(<FILL_ME>) revealStruct storage currentReveal = reveals[++currentRevealCount]; currentReveal.RANGE_END = mintedSupply; currentReveal.REQUEST_ID = IRandomNumberProvider(TheRegistry.getRegistryAddress(REGISTRY_KEY_RANDOM_CONTRACT)).requestRandomNumberWithCallback(); requestToRevealId[currentReveal.REQUEST_ID] = currentRevealCount; } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
reveals[currentRevealCount].RANGE_END<mintedSupply,"Token: Reveal request already exists"
159,831
reveals[currentRevealCount].RANGE_END<mintedSupply
"Token: Reveal request already exists"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { require(!lastRevealRequested, "Token: Last reveal already requested"); require(<FILL_ME>) lastRevealRequested = true; revealStruct storage currentReveal = reveals[++currentRevealCount]; currentReveal.RANGE_END = mintedSupply + reservedSupply; currentReveal.REQUEST_ID = IRandomNumberProvider(TheRegistry.getRegistryAddress(REGISTRY_KEY_RANDOM_CONTRACT)).requestRandomNumberWithCallback(); requestToRevealId[currentReveal.REQUEST_ID] = currentRevealCount; } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
reveals[currentRevealCount].RANGE_END<maxSupply,"Token: Reveal request already exists"
159,831
reveals[currentRevealCount].RANGE_END<maxSupply
"Token: reveal already processed."
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { require(msg.sender == TheRegistry.getRegistryAddress(REGISTRY_KEY_RANDOM_CONTRACT), "Token: process() Unauthorised caller"); // get reveal using _requestId uint16 thisRevealId = requestToRevealId[_requestId]; revealStruct storage thisReveal = reveals[thisRevealId]; require(<FILL_ME>) if(thisReveal.REQUEST_ID == _requestId) { thisReveal.RANDOM_NUM = _random / 2; // Set msb to zero // in the very rare case where RANDOM_NUM is 0, use currentReveal.RANGE_END / 3 if(thisReveal.RANDOM_NUM == 0) { thisReveal.RANDOM_NUM = thisReveal.RANGE_END * (10 ** 5) / 3; } thisReveal.RANGE_START = reveals[currentRevealCount-1].RANGE_END; thisReveal.SHIFT = thisReveal.RANDOM_NUM % ( thisReveal.RANGE_END - thisReveal.RANGE_START ); // in the very rare case where the shifting result is 0, do it again but divide by 3 if(thisReveal.SHIFT == 0) { thisReveal.RANDOM_NUM = thisReveal.RANDOM_NUM / 3; thisReveal.SHIFT = thisReveal.RANDOM_NUM % ( thisReveal.RANGE_END - thisReveal.RANGE_START ); } thisReveal.processed = true; emit RandomProcessed( thisRevealId, thisReveal.RANDOM_NUM, thisReveal.SHIFT, thisReveal.RANGE_START, thisReveal.RANGE_END ); } else revert("Token: Incorrect requestId received"); } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
!thisReveal.processed,"Token: reveal already processed."
159,831
!thisReveal.processed
'Token: Token does not exist'
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { require(<FILL_ME>) uint16 rangeId = findRevealRangeForN(_tokenId); // outside ranges if(rangeId == 0) { return tokenPreRevealURI; } revealStruct memory currentReveal = reveals[rangeId]; // if random number was not set, return pre reveal // TODO: most likely remove this.. as we never get here.. we're already outside range if(currentReveal.RANDOM_NUM == 0) { return tokenPreRevealURI; } uint256 newTokenId = uri(_tokenId); string memory folder = (newTokenId % 100).toString(); string memory file = newTokenId.toString(); string memory slash = "/"; return string(abi.encodePacked(tokenRevealURI, folder, slash, file)); } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
_exists(_tokenId)||_reserved(_tokenId),'Token: Token does not exist'
159,831
_exists(_tokenId)||_reserved(_tokenId)
"Token: Unauthorised"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "./IToken.sol"; import "../interfaces/IRegistryConsumer.sol"; import "../interfaces/IRandomNumberProvider.sol"; import "../interfaces/IRandomNumberRequester.sol"; import "../extras/recovery/BlackHolePrevention.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; // import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; import "../../@galaxis/registries/contracts/CommunityList.sol"; import "../../@galaxis/registries/contracts/CommunityRegistry.sol"; import "../overrides/ERC721Enumerable.sol"; contract LockableRevealERC721EnumerableToken is IToken, ERC721Enumerable, Ownable, BlackHolePrevention { using Strings for uint256; bytes32 public constant TOKEN_CONTRACT_GIVEAWAY = keccak256("TOKEN_CONTRACT_GIVEAWAY"); bytes32 public constant TOKEN_CONTRACT_ACCESS_SALE = keccak256("TOKEN_CONTRACT_ACCESS_SALE"); bytes32 public constant TOKEN_CONTRACT_ACCESS_ADMIN = keccak256("TOKEN_CONTRACT_ACCESS_ADMIN"); bytes32 public constant TOKEN_CONTRACT_ACCESS_LOCK = keccak256("TOKEN_CONTRACT_ACCESS_LOCK"); bytes32 public constant TOKEN_CONTRACT_ACCESS_REVEAL = keccak256("TOKEN_CONTRACT_ACCESS_REVEAL"); IRegistryConsumer public TheRegistry; string constant public REGISTRY_KEY_RANDOM_CONTRACT = "RANDOMV2_SSP"; uint256 public projectID; uint256 public maxSupply; uint256 public mintedSupply; // minted incrementally uint256 public mintedReserve; uint256 public reservedSupply; // includes giveaway supply uint256 public giveawaySupply; string public tokenPreRevealURI; string public tokenRevealURI; bool public transferLocked; bool public lastRevealRequested; mapping(uint16 => revealStruct) public reveals; mapping(uint256 => uint16) public requestToRevealId; string public revealURI; uint16 public currentRevealCount; string public contractURI; bool _initialized; CommunityRegistry public myCommunityRegistry; using EnumerableSet for EnumerableSet.AddressSet; // onlyOwner can change contractControllers and transfer it's ownership // any contractController can setData EnumerableSet.AddressSet contractControllers; event contractControllerEvent(address _address, bool mode); EnumerableSet.AddressSet contractManagers; event contractManagerEvent(address _address, bool mode); event Locked(bool); event RandomProcessed(uint256 stage, uint256 randNumber, uint256 _shiftsBy, uint256 _start, uint256 _end); event ContractURIset(string contractURI); function setup(TokenConstructorConfig memory config) public onlyOwner { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. */ function _beforeTokenTransfer( address from, address to, uint256 _tokenId ) internal override { } /** * @dev Sale: mint cards. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_SALE */ function mintIncrementalCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_SALE) { } /** * @dev Admin: mint reserved cards. * Should only mint reserved AFTER the sale is over. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function mintReservedCards(uint256 numberOfCards, address recipient) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev DropRegistry util */ function getFirstGiveawayCardId() public view returns (uint256) { } /** * @dev DropRegistry: mint specific giveaway card. * Can only mint after reserve has been minted. * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_GIVEAWAY */ function mintGiveawayCard(uint256 _index, address _recipient) external onlyAllowed(TOKEN_CONTRACT_GIVEAWAY) { } /** * @dev Admin: set PreRevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setPreRevealURI(string calldata _tokenPreRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: set RevealURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setRevealURI(string calldata _tokenRevealURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } /** * @dev Admin: reveal tokens starting at prev range end to current supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function revealAtCurrentSupply() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Admin: reveal tokens starting at prev range end to max supply * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_REVEAL */ function lastReveal() external onlyAllowed(TOKEN_CONTRACT_ACCESS_REVEAL) { } /** * @dev Chainlink VRF callback */ function process(uint256 _random, uint256 _requestId) external { } function findRevealRangeForN(uint256 n) public view returns (uint16) { } function uri(uint256 n) public view returns (uint256) { } /** * @dev Reserved are always at the end of current minted */ function _reserved(uint256 _tokenId) public view returns (bool) { } /** * @dev Get metadata server url for tokenId */ function tokenURI(uint256 _tokenId) public view override(IToken, ERC721) returns (string memory) { } /** * @dev Admin: Lock / Unlock transfers * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_LOCK */ function setTransferLock(bool _locked) external onlyAllowed(TOKEN_CONTRACT_ACCESS_LOCK) { } function hasRole(bytes32 key, address user) public view returns (bool) { } /** * @dev Admin: Allow / Dissalow addresses */ modifier onlyAllowed(bytes32 role) { require(<FILL_ME>) _; } function isAllowed(bytes32 role, address user) public view returns (bool) { } function tellEverything() external view returns (TokenInfo memory) { } function getTokenInfoForSale() external view returns (TokenInfoForSale memory) { } /** * @dev Admin: set setContractURI * - DEFAULT_ADMIN_ROLE or TOKEN_CONTRACT_ACCESS_ADMIN */ function setContractURI(string memory _contractURI) external onlyAllowed(TOKEN_CONTRACT_ACCESS_ADMIN) { } }
isAllowed(role,msg.sender),"Token: Unauthorised"
159,831
isAllowed(role,msg.sender)
"CommunityRegistry : Unauthorised"
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.13; import "@openzeppelin/contracts/access/AccessControlEnumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; //import "hardhat/console.sol"; interface IOwnable { function owner() external view returns (address); } contract CommunityRegistry is AccessControlEnumerable { bytes32 public constant COMMUNITY_REGISTRY_ADMIN = keccak256("COMMUNITY_REGISTRY_ADMIN"); uint32 public community_id; string public community_name; address public community_admin; mapping(bytes32 => address) addresses; mapping(bytes32 => uint256) uints; mapping(bytes32 => bool) booleans; mapping(bytes32 => string) strings; // mapping(address => bool) public admins; mapping(address => mapping(address => bool)) public app_admins; mapping (uint => string) public addressEntries; mapping (uint => string) public uintEntries; mapping (uint => string) public boolEntries; mapping (uint => string) public stringEntries; uint public numberOfAddresses; uint public numberOfUINTs; uint public numberOfBooleans; uint public numberOfStrings; uint public nextAdmin; mapping(address => bool) public adminHas; mapping(uint256 => address) public adminEntries; mapping(address => uint256) public appAdminCounter; mapping(address =>mapping(uint256 =>address)) public appAdminEntries; address public owner; bool initialised; bool public independant; event IndependanceDay(bool gain_independance); modifier onlyAdmin() { require(<FILL_ME>) _; } // function isCommunityAdmin(bytes32 role) public view returns (bool) { // if (independant){ // return( // msg.sender == owner || // admins[msg.sender] // ); // } else { // IAccessControlEnumerable ac = IAccessControlEnumerable(owner); // return( // msg.sender == owner || // hasRole(DEFAULT_ADMIN_ROLE,msg.sender) || // ac.hasRole(role,msg.sender)); // } // } function isCommunityAdmin(bytes32 role) internal view returns (bool) { } function isUserCommunityAdmin(bytes32 role, address user) public view returns (bool) { } function grantRole(bytes32 key, address user) public override(AccessControl,IAccessControl) onlyAdmin { } constructor ( uint32 _community_id, address _community_admin, string memory _community_name ) { } function init( uint32 _community_id, address _community_admin, string memory _community_name ) external { } function _init( uint32 _community_id, address _community_admin, string memory _community_name ) internal { } event AdminUpdated(address user, bool isAdmin); event AppAdminChanged(address app,address user,bool state); //=== event AddressChanged(string key, address value); event UintChanged(string key, uint256 value); event BooleanChanged(string key, bool value); event StringChanged(string key, string value); function setIndependant(bool gain_independance) external onlyAdmin { } function setAdmin(address user,bool status ) external onlyAdmin { } function hash(string memory field) internal pure returns (bytes32) { } function setRegistryAddress(string memory fn, address value) external onlyAdmin { } function setRegistryBool(string memory fn, bool value) external onlyAdmin { } function setRegistryString(string memory fn, string memory value) external onlyAdmin { } function setRegistryUINT(string memory fn, uint value) external onlyAdmin { } function setAppAdmin(address app, address user, bool state) external { } function getRegistryAddress(string memory key) external view returns (address) { } function getRegistryBool(string memory key) external view returns (bool) { } function getRegistryUINT(string memory key) external view returns (uint256) { } function getRegistryString(string memory key) external view returns (string memory) { } function isAppAdmin(address app, address user) external view returns (bool) { } }
isCommunityAdmin(COMMUNITY_REGISTRY_ADMIN),"CommunityRegistry : Unauthorised"
159,832
isCommunityAdmin(COMMUNITY_REGISTRY_ADMIN)
"Montage: Account is already blocked"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { require(<FILL_ME>) _isBlocked[account] = true; emit BlockedAccountChange(account, true); } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
!_isBlocked[account],"Montage: Account is already blocked"
159,904
!_isBlocked[account]
"Montage: Account is not blcoked"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { require(<FILL_ME>) _isBlocked[account] = false; emit BlockedAccountChange(account, false); } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
_isBlocked[account],"Montage: Account is not blcoked"
159,904
_isBlocked[account]
"Montage: Account is already the value of 'excluded'"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { require(<FILL_ME>) _isExcludedFromFee[account] = excluded; emit ExcludeFromFeesChange(account, excluded); } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
_isExcludedFromFee[account]!=excluded,"Montage: Account is already the value of 'excluded'"
159,904
_isExcludedFromFee[account]!=excluded
"Montage: Account is already the value of 'excluded'"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { require(<FILL_ME>) _isExcludedFromMaxWalletLimit[account] = excluded; emit ExcludeFromMaxWalletChange(account, excluded); } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
_isExcludedFromMaxWalletLimit[account]!=excluded,"Montage: Account is already the value of 'excluded'"
159,904
_isExcludedFromMaxWalletLimit[account]!=excluded
"Montage: Fees must be less or equal to 5.00%"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { require(<FILL_ME>) _setCustomBuyTaxPeriod(_base,_targetAFeeOnBuy,_targetBFeeOnBuy, _targetCFeeOnBuy, _burnFeeOnBuy); emit FeeChange("baseFees-Buy",_targetAFeeOnBuy,_targetBFeeOnBuy, _targetCFeeOnBuy, _burnFeeOnBuy); } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
_targetAFeeOnBuy+_targetBFeeOnBuy+_targetCFeeOnBuy+_burnFeeOnBuy<=5000,"Montage: Fees must be less or equal to 5.00%"
159,904
_targetAFeeOnBuy+_targetBFeeOnBuy+_targetCFeeOnBuy+_burnFeeOnBuy<=5000
"Montage: Fees must be less or equal to 5.00%"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { require(<FILL_ME>) _setCustomSellTaxPeriod(_base,_targetAFeeOnSell, _targetBFeeOnSell, _targetCFeeOnSell, _burnFeeOnSell); emit FeeChange("baseFees-Sell",_targetAFeeOnSell, _targetBFeeOnSell, _targetCFeeOnSell, _burnFeeOnSell); } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
_targetAFeeOnSell+_targetBFeeOnSell+_targetCFeeOnSell+_burnFeeOnSell<=5000,"Montage: Fees must be less or equal to 5.00%"
159,904
_targetAFeeOnSell+_targetBFeeOnSell+_targetCFeeOnSell+_burnFeeOnSell<=5000
"Montage: Only claim launch tokens after first 5 blocks"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { require(<FILL_ME>) require(!_launchTokensClaimed, "Montage: Launch tokens have been claimed"); _launchTokensClaimed = true; uint256 tokenBalance = balanceOf(address(this)); (bool success) = IERC20(address(this)).transfer(owner(), tokenBalance); if (success){ emit ClaimOverflow(address(this), tokenBalance); } } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
block.number-_launchBlockNumber>5,"Montage: Only claim launch tokens after first 5 blocks"
159,904
block.number-_launchBlockNumber>5
"Montage: Launch tokens have been claimed"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { require(block.number - _launchBlockNumber > 5, "Montage: Only claim launch tokens after first 5 blocks"); require(<FILL_ME>) _launchTokensClaimed = true; uint256 tokenBalance = balanceOf(address(this)); (bool success) = IERC20(address(this)).transfer(owner(), tokenBalance); if (success){ emit ClaimOverflow(address(this), tokenBalance); } } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
!_launchTokensClaimed,"Montage: Launch tokens have been claimed"
159,904
!_launchTokensClaimed
"Montage: Account is blocked"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(<FILL_ME>) require(!_isBlocked[from], "Montage: Account is blocked"); if (amount == 0) { super._transfer(from, to, 0); return; } if (!_isAllowedToTradeWhenDisabled[from] && !_isAllowedToTradeWhenDisabled[to]) { require(isTradingEnabled, "Montage: Trading is currently disabled."); } _adjustTaxes(automatedMarketMakerPairs[from], automatedMarketMakerPairs[to]); bool canSwap = balanceOf(address(this)) >= minimumTokensBeforeSwap; if ( isTradingEnabled && canSwap && !_swapping && _totalFee > 0 && automatedMarketMakerPairs[to] ) { _swapping = true; _swapAndTransfer(); _swapping = false; } bool takeFee = !_swapping && isTradingEnabled; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } if (takeFee && _totalFee > 0) { uint256 fee = (amount * _totalFee) / 100000; amount = amount - fee; super._transfer(from, address(this), fee); } if (!_isExcludedFromMaxWalletLimit[to]) { require((balanceOf(to) + amount) <= maxWalletAmount, "Montage: Expected wallet amount exceeds the maxWalletAmount."); } super._transfer(from, to, amount); } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
!_isBlocked[to],"Montage: Account is blocked"
159,904
!_isBlocked[to]
"Montage: Account is blocked"
// SPDX-License-Identifier: MIT // Attention all users! // Montage Token takes a strong stance against any form of malicious trading behaviour. We prioritize the safety & security of our community and our enabling ecosystem. // Any user (BOT or human) engaging in activities that threaten the integrity of our services, such as interfering with transactions, will be swiftly identified and blacklisted. // This means permanently restricted from accessing our services. We urge all users to adhere to ethical practices when trading our token and respect these terms of service. // Let us work together to maintain a trusted and secure environment for all Montage investors worldwide. pragma solidity 0.8.19; 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 IFactory { function createPair(address tokenA, address tokenB) external returns (address pair); function getPair(address tokenA, address tokenB) external view returns (address pair); } interface IRouter { 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 swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } 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) { } } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; constructor(string memory name_, string memory symbol_) { } function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address to, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer( address from, address to, uint256 amount ) internal virtual { } function _mint(address account, uint256 amount) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract MontageToken is Ownable, ERC20 { using Address for address; IRouter public uniswapV2Router; address public uniswapV2Pair; string private constant _name = "Montage Token"; string private constant _symbol = "MTGX"; bool public isTradingEnabled; uint256 public initialSupply = 10000000000 * (10**18); uint256 public maxWalletAmount = initialSupply * 200 / 10000; bool private _swapping; uint256 public minimumTokensBeforeSwap = initialSupply - (initialSupply - 1); uint256 public acceptableSlippagePercent= 0; address public targetAWallet; address public targetBWallet; address public targetCWallet; struct CustomTaxPeriod { uint32 targetAFeeOnBuy; //liquidity uint32 targetAFeeOnSell; uint32 targetBFeeOnBuy; //marketing uint32 targetBFeeOnSell; uint32 targetCFeeOnBuy; //charity uint32 targetCFeeOnSell; uint32 burnFeeOnBuy; uint32 burnFeeOnSell; } // Base taxes CustomTaxPeriod private _base = CustomTaxPeriod(0, 618, 1000, 1000, 0, 1000, 0, 382); bool private _pairCreated; bool private _launchTokensClaimed; uint256 private _launchBlockNumber; mapping (address => bool) private _isBlocked; mapping(address => bool) private _isAllowedToTradeWhenDisabled; mapping(address => bool) private _isExcludedFromFee; mapping(address => bool) private _isExcludedFromMaxWalletLimit; mapping(address => bool) public automatedMarketMakerPairs; uint32 private _targetAFee; uint32 private _targetBFee; uint32 private _targetCFee; uint32 private _burnFee; uint32 private _totalFee; event AutomatedMarketMakerPairChange(address indexed pair, bool indexed value); event BlockedAccountChange(address indexed holder, bool indexed status); event UniswapV2RouterChange(address indexed newAddress, address indexed oldAddress); event WalletChange(string indexed indentifier,address indexed newWallet,address indexed oldWallet); event FeeChange(string indexed identifier,uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee); event CustomTaxPeriodChange(uint256 indexed newValue,uint256 indexed oldValue,string indexed taxType); event MaxWalletAmountChange(uint256 indexed newValue, uint256 indexed oldValue); event ExcludeFromFeesChange(address indexed account, bool isExcluded); event ExcludeFromMaxWalletChange(address indexed account, bool isExcluded); event AllowedWhenTradingDisabledChange(address indexed account, bool isExcluded); event MinTokenAmountBeforeSwapChange(uint256 indexed newValue, uint256 indexed oldValue); event ClaimOverflow(address token, uint256 amount); event TradingStatusChange(bool indexed newValue, bool indexed oldValue); event Liquify(uint256 ethReceived, uint256 tokensIntoLiqudity); event FeesApplied(uint32 targetAFee, uint32 targetBFee, uint32 targetCFee, uint32 burnFee, uint32 totalFee); event TokenBurn(uint32 burnFee, uint256 amountToBurn); constructor() ERC20(_name, _symbol) { } receive() external payable {} function activateTrading() external onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function allowTradingWhenDisabled(address account, bool allowed) external onlyOwner { } function blockAccount(address account) external onlyOwner { } function unblockAccount(address account) external onlyOwner { } function excludeFromFees(address account, bool excluded) external onlyOwner { } function excludeFromMaxWalletLimit(address account, bool excluded) external onlyOwner { } function setWallets(address newTargetAWallet, address newTargetBWallet, address newTargetCWallet) external onlyOwner { } function setFeesOnBuy(uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) external onlyOwner { } function setFeesOnSell(uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell) external onlyOwner { } function setUniswapRouter(address newAddress) external onlyOwner { } function setMaxWalletAmount(uint256 newValue) external onlyOwner { } function setMinimumTokensBeforeSwap(uint256 newValue) external onlyOwner { } function claimLaunchTokens() external onlyOwner { } function claimETHOverflow(uint256 amount) external onlyOwner { } function setAcceptableSlippage(uint256 value) external onlyOwner { } // Getters function getBuyFees() external view returns (uint32, uint32, uint32, uint32) { } function getSellFees() external view returns (uint32, uint32, uint32, uint32) { } // Main function _transfer( address from, address to, uint256 amount ) internal override { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(!_isBlocked[to], "Montage: Account is blocked"); require(<FILL_ME>) if (amount == 0) { super._transfer(from, to, 0); return; } if (!_isAllowedToTradeWhenDisabled[from] && !_isAllowedToTradeWhenDisabled[to]) { require(isTradingEnabled, "Montage: Trading is currently disabled."); } _adjustTaxes(automatedMarketMakerPairs[from], automatedMarketMakerPairs[to]); bool canSwap = balanceOf(address(this)) >= minimumTokensBeforeSwap; if ( isTradingEnabled && canSwap && !_swapping && _totalFee > 0 && automatedMarketMakerPairs[to] ) { _swapping = true; _swapAndTransfer(); _swapping = false; } bool takeFee = !_swapping && isTradingEnabled; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } if (takeFee && _totalFee > 0) { uint256 fee = (amount * _totalFee) / 100000; amount = amount - fee; super._transfer(from, address(this), fee); } if (!_isExcludedFromMaxWalletLimit[to]) { require((balanceOf(to) + amount) <= maxWalletAmount, "Montage: Expected wallet amount exceeds the maxWalletAmount."); } super._transfer(from, to, amount); } function _adjustTaxes(bool isBuy,bool isSell) private { } function _setCustomSellTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnSell, uint32 _targetBFeeOnSell, uint32 _targetCFeeOnSell, uint32 _burnFeeOnSell ) private { } function _setCustomBuyTaxPeriod(CustomTaxPeriod storage map, uint32 _targetAFeeOnBuy, uint32 _targetBFeeOnBuy, uint32 _targetCFeeOnBuy, uint32 _burnFeeOnBuy) private { } function _swapAndTransfer() private { } function _swapTokensForETH(uint256 tokenAmount) private { } function _addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { } }
!_isBlocked[from],"Montage: Account is blocked"
159,904
!_isBlocked[from]
"The commitment has been submitted"
// https://tornado.cash /* * d888888P dP a88888b. dP * 88 88 d8' `88 88 * 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b. * 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88 * 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88 * dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP * ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./MerkleTreeWithHistory.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IVerifier { function verifyProof( bytes memory _proof, uint256[6] memory _input ) external returns (bool); } abstract contract Tornado is MerkleTreeWithHistory, ReentrancyGuard { IVerifier public immutable verifier; uint256 public denomination; mapping(bytes32 => bool) public nullifierHashes; // we store all commitments just to prevent accidental deposits with the same commitment mapping(bytes32 => bool) public commitments; event Deposit( bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp ); event Withdrawal( address to, bytes32 nullifierHash, address indexed relayer, uint256 fee ); /** @dev The constructor @param _verifier the address of SNARK verifier for this contract @param _hasher the address of MiMC hash contract @param _denomination transfer amount for each deposit @param _merkleTreeHeight the height of deposits' Merkle Tree */ constructor( IVerifier _verifier, IHasher _hasher, uint256 _denomination, uint32 _merkleTreeHeight ) MerkleTreeWithHistory(_merkleTreeHeight, _hasher) { } /** @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance. @param _commitment the note commitment, which is PedersenHash(nullifier + secret) */ function deposit(bytes32 _commitment) external payable nonReentrant { require(<FILL_ME>) uint32 insertedIndex = _insert(_commitment); commitments[_commitment] = true; _processDeposit(); emit Deposit(_commitment, insertedIndex, block.timestamp); } /** @dev this function is defined in a child contract */ function _processDeposit() internal virtual; /** @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay) */ function withdraw( bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund ) external payable nonReentrant { } /** @dev this function is defined in a child contract */ function _processWithdraw( address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund ) internal virtual; /** @dev whether a note is already spent */ function isSpent(bytes32 _nullifierHash) public view returns (bool) { } /** @dev whether an array of notes is already spent */ function isSpentArray( bytes32[] calldata _nullifierHashes ) external view returns (bool[] memory spent) { } }
!commitments[_commitment],"The commitment has been submitted"
160,026
!commitments[_commitment]
"The note has been already spent"
// https://tornado.cash /* * d888888P dP a88888b. dP * 88 88 d8' `88 88 * 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b. * 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88 * 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88 * dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP * ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./MerkleTreeWithHistory.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IVerifier { function verifyProof( bytes memory _proof, uint256[6] memory _input ) external returns (bool); } abstract contract Tornado is MerkleTreeWithHistory, ReentrancyGuard { IVerifier public immutable verifier; uint256 public denomination; mapping(bytes32 => bool) public nullifierHashes; // we store all commitments just to prevent accidental deposits with the same commitment mapping(bytes32 => bool) public commitments; event Deposit( bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp ); event Withdrawal( address to, bytes32 nullifierHash, address indexed relayer, uint256 fee ); /** @dev The constructor @param _verifier the address of SNARK verifier for this contract @param _hasher the address of MiMC hash contract @param _denomination transfer amount for each deposit @param _merkleTreeHeight the height of deposits' Merkle Tree */ constructor( IVerifier _verifier, IHasher _hasher, uint256 _denomination, uint32 _merkleTreeHeight ) MerkleTreeWithHistory(_merkleTreeHeight, _hasher) { } /** @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance. @param _commitment the note commitment, which is PedersenHash(nullifier + secret) */ function deposit(bytes32 _commitment) external payable nonReentrant { } /** @dev this function is defined in a child contract */ function _processDeposit() internal virtual; /** @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay) */ function withdraw( bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund ) external payable nonReentrant { require(_fee <= denomination, "Fee exceeds transfer value"); require(<FILL_ME>) require(isKnownRoot(_root), "Cannot find your merkle root"); // Make sure to use a recent one require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(uint160(address(_recipient))), uint256(uint160(address(_relayer))), _fee, _refund]), "Invalid withdraw proof"); nullifierHashes[_nullifierHash] = true; _processWithdraw(_recipient, _relayer, _fee, _refund); emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee); } /** @dev this function is defined in a child contract */ function _processWithdraw( address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund ) internal virtual; /** @dev whether a note is already spent */ function isSpent(bytes32 _nullifierHash) public view returns (bool) { } /** @dev whether an array of notes is already spent */ function isSpentArray( bytes32[] calldata _nullifierHashes ) external view returns (bool[] memory spent) { } }
!nullifierHashes[_nullifierHash],"The note has been already spent"
160,026
!nullifierHashes[_nullifierHash]
"Cannot find your merkle root"
// https://tornado.cash /* * d888888P dP a88888b. dP * 88 88 d8' `88 88 * 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b. * 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88 * 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88 * dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP * ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./MerkleTreeWithHistory.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IVerifier { function verifyProof( bytes memory _proof, uint256[6] memory _input ) external returns (bool); } abstract contract Tornado is MerkleTreeWithHistory, ReentrancyGuard { IVerifier public immutable verifier; uint256 public denomination; mapping(bytes32 => bool) public nullifierHashes; // we store all commitments just to prevent accidental deposits with the same commitment mapping(bytes32 => bool) public commitments; event Deposit( bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp ); event Withdrawal( address to, bytes32 nullifierHash, address indexed relayer, uint256 fee ); /** @dev The constructor @param _verifier the address of SNARK verifier for this contract @param _hasher the address of MiMC hash contract @param _denomination transfer amount for each deposit @param _merkleTreeHeight the height of deposits' Merkle Tree */ constructor( IVerifier _verifier, IHasher _hasher, uint256 _denomination, uint32 _merkleTreeHeight ) MerkleTreeWithHistory(_merkleTreeHeight, _hasher) { } /** @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance. @param _commitment the note commitment, which is PedersenHash(nullifier + secret) */ function deposit(bytes32 _commitment) external payable nonReentrant { } /** @dev this function is defined in a child contract */ function _processDeposit() internal virtual; /** @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay) */ function withdraw( bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund ) external payable nonReentrant { require(_fee <= denomination, "Fee exceeds transfer value"); require( !nullifierHashes[_nullifierHash], "The note has been already spent" ); require(<FILL_ME>) // Make sure to use a recent one require(verifier.verifyProof(_proof, [uint256(_root), uint256(_nullifierHash), uint256(uint160(address(_recipient))), uint256(uint160(address(_relayer))), _fee, _refund]), "Invalid withdraw proof"); nullifierHashes[_nullifierHash] = true; _processWithdraw(_recipient, _relayer, _fee, _refund); emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee); } /** @dev this function is defined in a child contract */ function _processWithdraw( address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund ) internal virtual; /** @dev whether a note is already spent */ function isSpent(bytes32 _nullifierHash) public view returns (bool) { } /** @dev whether an array of notes is already spent */ function isSpentArray( bytes32[] calldata _nullifierHashes ) external view returns (bool[] memory spent) { } }
isKnownRoot(_root),"Cannot find your merkle root"
160,026
isKnownRoot(_root)
"Invalid withdraw proof"
// https://tornado.cash /* * d888888P dP a88888b. dP * 88 88 d8' `88 88 * 88 .d8888b. 88d888b. 88d888b. .d8888b. .d888b88 .d8888b. 88 .d8888b. .d8888b. 88d888b. * 88 88' `88 88' `88 88' `88 88' `88 88' `88 88' `88 88 88' `88 Y8ooooo. 88' `88 * 88 88. .88 88 88 88 88. .88 88. .88 88. .88 dP Y8. .88 88. .88 88 88 88 * dP `88888P' dP dP dP `88888P8 `88888P8 `88888P' 88 Y88888P' `88888P8 `88888P' dP dP * ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./MerkleTreeWithHistory.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; interface IVerifier { function verifyProof( bytes memory _proof, uint256[6] memory _input ) external returns (bool); } abstract contract Tornado is MerkleTreeWithHistory, ReentrancyGuard { IVerifier public immutable verifier; uint256 public denomination; mapping(bytes32 => bool) public nullifierHashes; // we store all commitments just to prevent accidental deposits with the same commitment mapping(bytes32 => bool) public commitments; event Deposit( bytes32 indexed commitment, uint32 leafIndex, uint256 timestamp ); event Withdrawal( address to, bytes32 nullifierHash, address indexed relayer, uint256 fee ); /** @dev The constructor @param _verifier the address of SNARK verifier for this contract @param _hasher the address of MiMC hash contract @param _denomination transfer amount for each deposit @param _merkleTreeHeight the height of deposits' Merkle Tree */ constructor( IVerifier _verifier, IHasher _hasher, uint256 _denomination, uint32 _merkleTreeHeight ) MerkleTreeWithHistory(_merkleTreeHeight, _hasher) { } /** @dev Deposit funds into the contract. The caller must send (for ETH) or approve (for ERC20) value equal to or `denomination` of this instance. @param _commitment the note commitment, which is PedersenHash(nullifier + secret) */ function deposit(bytes32 _commitment) external payable nonReentrant { } /** @dev this function is defined in a child contract */ function _processDeposit() internal virtual; /** @dev Withdraw a deposit from the contract. `proof` is a zkSNARK proof data, and input is an array of circuit public inputs `input` array consists of: - merkle root of all deposits in the contract - hash of unique deposit nullifier to prevent double spends - the recipient of funds - optional fee that goes to the transaction sender (usually a relay) */ function withdraw( bytes calldata _proof, bytes32 _root, bytes32 _nullifierHash, address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund ) external payable nonReentrant { require(_fee <= denomination, "Fee exceeds transfer value"); require( !nullifierHashes[_nullifierHash], "The note has been already spent" ); require(isKnownRoot(_root), "Cannot find your merkle root"); // Make sure to use a recent one require(<FILL_ME>) nullifierHashes[_nullifierHash] = true; _processWithdraw(_recipient, _relayer, _fee, _refund); emit Withdrawal(_recipient, _nullifierHash, _relayer, _fee); } /** @dev this function is defined in a child contract */ function _processWithdraw( address payable _recipient, address payable _relayer, uint256 _fee, uint256 _refund ) internal virtual; /** @dev whether a note is already spent */ function isSpent(bytes32 _nullifierHash) public view returns (bool) { } /** @dev whether an array of notes is already spent */ function isSpentArray( bytes32[] calldata _nullifierHashes ) external view returns (bool[] memory spent) { } }
verifier.verifyProof(_proof,[uint256(_root),uint256(_nullifierHash),uint256(uint160(address(_recipient))),uint256(uint160(address(_relayer))),_fee,_refund]),"Invalid withdraw proof"
160,026
verifier.verifyProof(_proof,[uint256(_root),uint256(_nullifierHash),uint256(uint160(address(_recipient))),uint256(uint160(address(_relayer))),_fee,_refund])
"Exceeds Max Supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import './extensions/ERC721AQueryable_opensea.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; contract vitoshi_721A_opensea_v2 is ERC721AQueryable, Ownable,ERC2981, ReentrancyGuard { bytes32 public constant merkleRoot = 0x61cb7d0b6537f0bb8d59c9749976290b171575119ca652ed984934f8cc281d68; uint256 public constant TOTAL_SUPPLY_LIMIT = 6302; uint256 public constant WHITELIST_LIMIT_PER_WALLET = 12; uint256 public constant TOTAL_LIMIT_PER_WALLET = 30; string public baseTokenURI =""; bool public publicMintingOpen; bool public whitelistMintingOpen; address public royaltyAddress; uint96 public royaltyFee = 1000; constructor() ERC721A("Vitoshis Castle OutTakes", "VCOT") { } function airdrop(address[] memory airdrops, uint256 tokensForEach) external onlyOwner { require(tokensForEach <= 30,"<30/batch"); for(uint i = 0; i < airdrops.length; i++) { _mint(airdrops[i], tokensForEach); require(<FILL_ME>) } } function mintFromWhitelist(bytes32[] calldata _merkleProof,uint64 contestantsToMint) public { } function mintFromSale(uint contestantsToMint) public { } function togglePublicSale() external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function retrieveFunds() external onlyOwner nonReentrant { } /// @dev Returns an URI for a given token ID function _baseURI() internal view virtual override returns (string memory) { } /// @dev Sets the base token URI prefix. function setBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function setRoyaltyFee(uint96 _feeNumerator) external onlyOwner { } //Change the royalty address where royalty payouts are sent function setRoyaltyAddress(address _royaltyAddress) external onlyOwner { } function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC721A, ERC721A, ERC2981) returns (bool) { } }
i+totalSupply()<=TOTAL_SUPPLY_LIMIT,"Exceeds Max Supply"
160,115
i+totalSupply()<=TOTAL_SUPPLY_LIMIT
"Exceeds Max Supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import './extensions/ERC721AQueryable_opensea.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; contract vitoshi_721A_opensea_v2 is ERC721AQueryable, Ownable,ERC2981, ReentrancyGuard { bytes32 public constant merkleRoot = 0x61cb7d0b6537f0bb8d59c9749976290b171575119ca652ed984934f8cc281d68; uint256 public constant TOTAL_SUPPLY_LIMIT = 6302; uint256 public constant WHITELIST_LIMIT_PER_WALLET = 12; uint256 public constant TOTAL_LIMIT_PER_WALLET = 30; string public baseTokenURI =""; bool public publicMintingOpen; bool public whitelistMintingOpen; address public royaltyAddress; uint96 public royaltyFee = 1000; constructor() ERC721A("Vitoshis Castle OutTakes", "VCOT") { } function airdrop(address[] memory airdrops, uint256 tokensForEach) external onlyOwner { } function mintFromWhitelist(bytes32[] calldata _merkleProof,uint64 contestantsToMint) public { require(whitelistMintingOpen == true, "Whitelist Sale Off"); require(<FILL_ME>) require(MerkleProof.verify(_merkleProof, merkleRoot, keccak256(abi.encodePacked(msg.sender))), "Not whitelisted"); require( (_getAux(msg.sender) + contestantsToMint) <= WHITELIST_LIMIT_PER_WALLET , "Exceeds Whitelist Limit / Wallet"); require(balanceOf(msg.sender) + contestantsToMint <= TOTAL_LIMIT_PER_WALLET,"Exceeds limit - 30/wallet"); _setAux(msg.sender, _getAux(msg.sender) + contestantsToMint); _mint(msg.sender,contestantsToMint); } function mintFromSale(uint contestantsToMint) public { } function togglePublicSale() external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function retrieveFunds() external onlyOwner nonReentrant { } /// @dev Returns an URI for a given token ID function _baseURI() internal view virtual override returns (string memory) { } /// @dev Sets the base token URI prefix. function setBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function setRoyaltyFee(uint96 _feeNumerator) external onlyOwner { } //Change the royalty address where royalty payouts are sent function setRoyaltyAddress(address _royaltyAddress) external onlyOwner { } function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC721A, ERC721A, ERC2981) returns (bool) { } }
contestantsToMint+totalSupply()<=TOTAL_SUPPLY_LIMIT,"Exceeds Max Supply"
160,115
contestantsToMint+totalSupply()<=TOTAL_SUPPLY_LIMIT
"Not whitelisted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import './extensions/ERC721AQueryable_opensea.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; contract vitoshi_721A_opensea_v2 is ERC721AQueryable, Ownable,ERC2981, ReentrancyGuard { bytes32 public constant merkleRoot = 0x61cb7d0b6537f0bb8d59c9749976290b171575119ca652ed984934f8cc281d68; uint256 public constant TOTAL_SUPPLY_LIMIT = 6302; uint256 public constant WHITELIST_LIMIT_PER_WALLET = 12; uint256 public constant TOTAL_LIMIT_PER_WALLET = 30; string public baseTokenURI =""; bool public publicMintingOpen; bool public whitelistMintingOpen; address public royaltyAddress; uint96 public royaltyFee = 1000; constructor() ERC721A("Vitoshis Castle OutTakes", "VCOT") { } function airdrop(address[] memory airdrops, uint256 tokensForEach) external onlyOwner { } function mintFromWhitelist(bytes32[] calldata _merkleProof,uint64 contestantsToMint) public { require(whitelistMintingOpen == true, "Whitelist Sale Off"); require(contestantsToMint + totalSupply() <= TOTAL_SUPPLY_LIMIT, "Exceeds Max Supply"); require(<FILL_ME>) require( (_getAux(msg.sender) + contestantsToMint) <= WHITELIST_LIMIT_PER_WALLET , "Exceeds Whitelist Limit / Wallet"); require(balanceOf(msg.sender) + contestantsToMint <= TOTAL_LIMIT_PER_WALLET,"Exceeds limit - 30/wallet"); _setAux(msg.sender, _getAux(msg.sender) + contestantsToMint); _mint(msg.sender,contestantsToMint); } function mintFromSale(uint contestantsToMint) public { } function togglePublicSale() external onlyOwner { } function toggleWhitelistSale() external onlyOwner { } function retrieveFunds() external onlyOwner nonReentrant { } /// @dev Returns an URI for a given token ID function _baseURI() internal view virtual override returns (string memory) { } /// @dev Sets the base token URI prefix. function setBaseTokenURI(string memory _baseTokenURI) external onlyOwner { } function setRoyaltyFee(uint96 _feeNumerator) external onlyOwner { } //Change the royalty address where royalty payouts are sent function setRoyaltyAddress(address _royaltyAddress) external onlyOwner { } function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC721A, ERC721A, ERC2981) returns (bool) { } }
MerkleProof.verify(_merkleProof,merkleRoot,keccak256(abi.encodePacked(msg.sender))),"Not whitelisted"
160,115
MerkleProof.verify(_merkleProof,merkleRoot,keccak256(abi.encodePacked(msg.sender)))